Demo samples
Request and response examples for the fictional DEMO-BED-001 workflow.
These bodies are the demonstration contract. Fixed ids below are documentation fixtures. A local database will issue its own ids when you run the seed.
Not live customer data
Demo Manufacturer, Demo Lab, Demo Hospital, and DEMO-BED-001 are fictional. Do not replace them with a real facility, patient, or device in a ticket, log, or screenshot from this site.
| Fixture | Value |
|---|---|
| Demo Manufacturer | 11111111-1111-4111-8111-111111111111 |
| Demo Lab | 33333333-3333-4333-8333-333333333333 |
| Demo Hospital | 22222222-2222-4222-8222-222222222222 |
| Equipment | 44444444-4444-4444-8444-444444444444 |
| Passport | ppt_demo_bed_001 |
| Serial | SN-DEMO-001 |
Base URL for every path: https://api.medicaltrace.net/v1.
The same demo bodies are also in the downloadable contract: medicaltrace-api.yaml. Language-specific calls for every route are in the API reference.
Sign in
POST /auth/login
{
"email": "[email protected]",
"password": "password123"
}{
"accessToken": "demo.local.jwt",
"user": {
"id": "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa",
"email": "[email protected]",
"name": "Demo Manufacturer Admin"
},
"memberships": [
{
"orgId": "11111111-1111-4111-8111-111111111111",
"role": "org_admin",
"permissions": ["asset:create", "asset:read", "asset:update_metadata"],
"organization": {
"id": "11111111-1111-4111-8111-111111111111",
"displayName": "Demo Manufacturer",
"status": "APPROVED"
}
}
]
}Register DEMO-BED-001
POST /equipment as Demo Manufacturer.
{
"category": "hospital_bed",
"model": "DemoBed 100",
"serialNumber": "SN-DEMO-001"
}{
"id": "44444444-4444-4444-8444-444444444444",
"manufacturerId": "11111111-1111-4111-8111-111111111111",
"custodianId": "11111111-1111-4111-8111-111111111111",
"category": "hospital_bed",
"model": "DemoBed 100",
"serialNumber": "SN-DEMO-001",
"passportId": "ppt_demo_bed_001",
"custodyVersion": 1,
"lifecycleStatus": "ACTIVE"
}Do not send a real UDI. Omit udi unless the value is explicitly fictional.
Attach a file
POST /equipment/44444444-4444-4444-8444-444444444444/documents/upload-intent
{ "mediaType": "application/pdf" }{
"uploadUrl": "https://api.medicaltrace.net/v1/equipment/44444444-4444-4444-8444-444444444444/documents/doc_demo_model/v1",
"storageKey": "org/11111111-1111-4111-8111-111111111111/equipment/44444444-4444-4444-8444-444444444444/doc_demo_model/v1",
"logicalDocId": "doc_demo_model",
"version": 1,
"method": "PUT"
}The file stays in private storage. After the upload, complete it with the SHA-256 of the demo bytes:
POST /equipment/44444444-4444-4444-8444-444444444444/documents/complete
{
"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"
}Sign a demo assertion
Call this as Demo Lab ([email protected]), with X-Organization-Id set to the lab. Declaring an issuer capability does not by itself allow signing. The lab needs an issuer grant for the claim type.
POST /credentials/draft
{
"equipmentId": "44444444-4444-4444-8444-444444444444",
"claimType": "safety_inspection",
"claims": { "result": "sample_pass", "device": "DEMO-BED-001" },
"validFrom": "2026-01-01T00:00:00.000Z",
"validTo": "2027-03-01T00:00:00.000Z",
"documentDigests": [
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
]
}POST /credentials/{id}/sign returns the signed demo envelope. Signature, credential status, and document match stay separate fields when you verify.
GET /credentials/{id}/verify
{
"subjectId": "44444444-4444-4444-8444-444444444444",
"findings": {
"signature": { "result": "PASS" },
"documentMatch": { "result": "UNKNOWN", "reason": "ACCESS_REQUIRED" },
"credentialStatus": { "result": "PASS", "status": "ACTIVE" }
},
"limitations": ["Underlying evidence does not establish clinical safety"]
}Record service and custody
Maintenance, as an authorized service organization:
POST /maintenance
{
"equipmentId": "44444444-4444-4444-8444-444444444444",
"eventType": "annual_service",
"summary": "Demo annual service for DEMO-BED-001",
"occurrenceAt": "2026-01-15T15:00:00.000Z",
"evidenceRefs": ["svc_demo_bed_001_2026"]
}Custody, initiated by the current custodian and accepted by Demo Hospital:
POST /custody/transfers
{
"equipmentId": "44444444-4444-4444-8444-444444444444",
"receiverOrgId": "22222222-2222-4222-8222-222222222222"
}The hospital then calls POST /custody/transfers/{id}/accept with its own token and X-Organization-Id. Until that call succeeds, custody has not moved. Acceptance is not a transfer of legal title.
Public passport
GET /public/passports/ppt_demo_bed_001 needs no token. It returns approved public fields for the sample passport, not the restricted PDF.