MedicalTrace

Accept a custody transfer

Accept custody as the named receiver.

Requires transfer:accept. X-Organization-Id must be the receiver. On success, custodianId moves to that organization and custodyVersion increments. A conflicting acceptance returns 409.

1. Request URL

POST https://api.medicaltrace.net/v1/custody/transfers/66666666-6666-4666-8666-666666666666/accept

2. Request parameters

ParameterInRequiredTypeDescription
AuthorizationheaderYesstringBearer token from POST /auth/login. The sample value demo.local.jwt is a placeholder.
X-Organization-IdheaderYesstringReceiver organization. Demo Hospital in the sample.
idpathYesstringTransfer id.

3. Request example

curl -s -X POST 'https://api.medicaltrace.net/v1/custody/transfers/66666666-6666-4666-8666-666666666666/accept' \
  -H 'authorization: Bearer demo.local.jwt' \
  -H 'x-organization-id: 22222222-2222-4222-8222-222222222222'

4. Response data

HTTP 201. The body below uses the fictional DEMO-BED-001 fixtures.

{
  "id": "66666666-6666-4666-8666-666666666666",
  "equipmentId": "44444444-4444-4444-8444-444444444444",
  "senderOrgId": "11111111-1111-4111-8111-111111111111",
  "receiverOrgId": "22222222-2222-4222-8222-222222222222",
  "state": "ACCEPTED"
}

5. Response fields

FieldTypeDescriptionExample
statestringACCEPTED. The equipment row’s custodianId is updated in the same transaction.ACCEPTED