Resources
Units
Every Units endpoint, with the scope it enforces, the body it takes, a response you can read, and the refusals it can return.
List serialized units.
/organizations/{organization}/passports/{id}/units- Scope
- units:read
Idempotency-Key- Not accepted
- Returns
- 200
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Query parameters
limitstringOptionalHow many records to return. The server may return fewer.
cursorstringOptionalThe next_cursor from the previous page. A cursor encodes the filters it was issued under; sending it with different filters is refused with cursor_invalid.
statusstringOptionalReturn only units in this status.
unit_serialstringOptionalReturn the single unit carrying this serial.
Errors
Every refusal this endpoint can return, with the status it arrives with.
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04/units?limit=25" \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY"{
"object": "list",
"data": [
{
"object": "unit",
"id": "d41d8cd9-8f00-4b20-a204-9800998ecf84",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04/units/d41d8cd9-8f00-4b20-a204-9800998ecf84",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"passport_id": "b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04",
"passport": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04",
"unit_serial": "BAT-2026-000117",
"status": "original",
"livemode": true,
"created_at": "2026-08-01T12:00:03.114Z"
}
],
"has_more": false,
"next_cursor": null
}GET /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04/units?limit=25
Create serialized units.
/organizations/{organization}/passports/{id}/units- Scope
- units:write
Idempotency-Key- Accepted
- Returns
- 201
Path parameters
organizationstringRequiredThe organization this request acts for. The credential must hold a grant for it.
idstringRequiredThe identifier of the resource. Treat it as an opaque string.
Request body
unitsarray of objectsRequiredBetween 1 and 1000 units. The parent passport must be in the battery category — serialized units are a battery concept, and any other parent is refused with invalid_request. A serial repeated inside one request is refused per row rather than deduplicated, so a bulk importer never believes it created a row it did not.
unit_serialstringRequiredThe serial carried by this physical item, up to 70 characters. Unique within the passport.
statusstringOptionalThe lifecycle state, from the Annex XIII vocabulary: original, repurposed, re-used, remanufactured, waste. Stored as free text up to 70 characters — a value outside that list is accepted and then recognised by nothing.
Errors
Every refusal this endpoint can return, with the status it arrives with.
- 500configuration_error
- 409idempotency_conflict
- 403insufficient_scope
- 500internal_error
- 401invalid_key
- 400invalid_request
- 401key_expired
- 401key_revoked
- 401key_rotated
- 400mode_mismatch
- 402no_subscription
- 404organization_not_found_or_not_granted
- 413payload_too_large
- 402payment_overdue
- 429rate_limited
- 404resource_not_found
- 402unit_limit_reached
- 415unsupported_media_type
- 422validation_failed
- 400wildcard_not_supported
curl "https://passportcraft.com/api/v1/organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04/units" \
-X POST \
-H "Authorization: Bearer $PASSPORTCRAFT_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"units": [
{
"unit_serial": "BAT-2026-000117",
"status": "original"
},
{
"unit_serial": "BAT-2026-000118"
}
]
}'{
"object": "list",
"data": [
{
"object": "unit",
"id": "d41d8cd9-8f00-4b20-a204-9800998ecf84",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04/units/d41d8cd9-8f00-4b20-a204-9800998ecf84",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"passport_id": "b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04",
"passport": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04",
"unit_serial": "BAT-2026-000117",
"status": "original",
"livemode": true,
"created_at": "2026-08-02T09:31:18.446Z"
},
{
"object": "unit",
"id": "5a3e7c19-2b60-4d84-91f2-7e0c4b6a8d35",
"name": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04/units/5a3e7c19-2b60-4d84-91f2-7e0c4b6a8d35",
"organization_id": "8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2",
"passport_id": "b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04",
"passport": "organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04",
"unit_serial": "BAT-2026-000118",
"status": null,
"livemode": true,
"created_at": "2026-08-02T09:31:18.446Z"
}
],
"has_more": false,
"next_cursor": null
}POST /organizations/8f14e45f-ceea-467a-9a5f-8dc7d9c6a1b2/passports/b6f0d4a2-71c3-4e58-8a19-3f7c2d5e8b04/units