Register equipment
Register a device and create its passport.
Requires asset:create. The caller becomes both manufacturer and custodian. A duplicate serial for the same manufacturer returns 409. Omit udi unless the value is explicitly fictional.
1. Request URL
POST https://api.medicaltrace.net/v1/equipment
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 | Registering organization. This id is stored as manufacturerId. |
category | body | Yes | string | Device category. The sample is hospital_bed. |
model | body | Yes | string | Model name. |
serialNumber | body | Yes | string | Manufacturer serial. |
udi | body | No | string | Optional. Do not send a real UDI in these examples. |
3. Request example
curl -s -X POST 'https://api.medicaltrace.net/v1/equipment' \
-H 'content-type: application/json' \
-H 'authorization: Bearer demo.local.jwt' \
-H 'x-organization-id: 11111111-1111-4111-8111-111111111111' \
-d '{"category":"hospital_bed","model":"DemoBed 100","serialNumber":"SN-DEMO-001"}'4. Response data
HTTP 201. The body below uses the fictional DEMO-BED-001 fixtures.
{
"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",
"publicFields": {
"category": "hospital_bed",
"model": "DemoBed 100"
}
}5. Response fields
| Field | Type | Description | Example |
|---|---|---|---|
id | string | New equipment id. A local database issues its own id. | 44444444-4444-4444-8444-444444444444 |
passportId | string | Opaque public id. A QR code only links here. | ppt_demo_bed_001 |
lifecycleStatus | string | ACTIVE on registration. | ACTIVE |