Complete an upload
Record the digest of a document that was uploaded.
Requires asset:update_metadata and the same equipment access as the upload intent. The stored access policy is RESTRICTED. The public passport does not return this file.
1. Request URL
POST https://api.medicaltrace.net/v1/equipment/44444444-4444-4444-8444-444444444444/documents/complete
2. Request parameters
| Parameter | In | Required | Type | Description |
|---|---|---|---|---|
Authorization | header | Yes | string | Bearer token from POST /auth/login. The sample value demo.local.jwt is a placeholder. |
X-Organization-Id | header | Yes | string | Manufacturer or current custodian. |
id | path | Yes | string | Equipment id. |
logicalDocId | body | Yes | string | From the upload intent. |
version | body | Yes | number | From the upload intent. |
storageKey | body | Yes | string | From the upload intent. |
sha256 | body | Yes | string | Hex digest of the demo bytes. Do not hash a real certificate into this site. |
mediaType | body | Yes | string | Same media type as the intent. |
3. Request example
curl -s -X POST 'https://api.medicaltrace.net/v1/equipment/44444444-4444-4444-8444-444444444444/documents/complete' \
-H 'content-type: application/json' \
-H 'authorization: Bearer demo.local.jwt' \
-H 'x-organization-id: 11111111-1111-4111-8111-111111111111' \
-d '{"logicalDocId":"doc_demo_model","version":1,"storageKey":"org/11111111-1111-4111-8111-111111111111/equipment/44444444-4444-4444-8444-444444444444/doc_demo_model/v1","sha256":"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa","mediaType":"application/pdf"}'4. Response data
HTTP 201. The body below uses the fictional DEMO-BED-001 fixtures.
{
"id": "88888888-8888-4888-8888-888888888888",
"equipmentId": "44444444-4444-4444-8444-444444444444",
"logicalDocId": "doc_demo_model",
"version": 1,
"sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"mediaType": "application/pdf",
"accessPolicy": "RESTRICTED",
"scanStatus": "PENDING"
}5. Response fields
| Field | Type | Description | Example |
|---|---|---|---|
sha256 | string | Digest a later reader compares with a file in hand. | aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa |
accessPolicy | string | Demo default is RESTRICTED. | RESTRICTED |
scanStatus | string | PENDING until a scan worker runs. The demo does not scan the bytes. | PENDING |