Reserve document uploads for one patient
Register 1–20 file declarations before sending bytes. Each accepted file has a stable document identity and an authenticated public PUT target, not a storage presigned URL. Current documents:write authority, organisation grants, processing consent, MIME entitlement and policy apply. Mandatory privacy redaction cannot be disabled; extractData=false selects redaction only. Idempotency-Key is required and preserves the batch and acknowledged document identities for 24 hours within the application, organisation, Cell and patient, including credential replacement. Changed declarations conflict. A transient interruption can be retried with the same declarations and key. Per-file duplicate or quota rejection does not discard accepted siblings; rejected items have an error instead of a document or target. On replay, an individually erased file returns document_unavailable while live siblings retain their identities and targets; patient erasure denies the whole request. Retry rejected declarations in a new batch with a new key; replay returns their original outcomes. A reservation acknowledges no received bytes or completed processing.
Path Parameters
- Type:user
Id required
Headers
- Type: stringIdempotency
- Key min length:1max length:255required
Body
- Properties: 7Type: 1…20filesrequired
Responses
- application/json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
curl 'https://api.dev.eno.health/v1/users/{userId}/document-batches' \
--request POST \
--header 'Idempotency-Key: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"files": [
{
"fileName": "",
"contentType": "",
"sizeBytes": 1,
"sha256": "",
"externalId": "",
"extractData": true,
"scrubPII": true
}
]
}'
{
"id": "string",
"userId": "string",
"createdAt": "2026-11-16T18:04:15.841Z",
"files": [
{
"index": 0,
"document": {
"id": "string",
"userId": "string",
"externalId": "string",
"title": "string",
"language": "string",
"documentDate": "2026-11-16",
"issuers": [
{
"name": "string",
"type": "unknown",
"address": "string"
}
],
"fileName": "string",
"contentType": "string",
"sizeBytes": 0,
"status": "uploading",
"pageCount": 0,
"createdAt": "2026-11-16T18:04:15.841Z",
"updatedAt": "2026-11-16T18:04:15.841Z",
"uploadedAt": null
},
"uploadTarget": {
"method": "PUT",
"url": "https://example.com",
"expiresAt": "2026-11-16T18:04:15.842Z",
"requiredHeaders": {
"Content-Type": "string"
}
}
}
]
}