Skip to content

Receive units in bulk

POST
/serials/bulk
curl --request POST \
--url https://app.dev.buildtrace.eu/api/serials/bulk \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "partRevisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "locationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "supplierId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "serialNumbers": [ "example" ] }'

Receive multiple serialized units atomically (all-or-nothing)

Required scope: inventory:write.

Media typeapplication/json
object
partRevisionId
required
string format: uuid
locationId
string format: uuid
supplierId
string format: uuid
serialNumbers
required
Array<string>
>= 1 items

Example generated

{
"partRevisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"locationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"supplierId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"serialNumbers": [
"example"
]
}

Created

Media typeapplication/json
Array<object>
object
id
required
string format: uuid
partRevisionId
required
string format: uuid
serialNumber
required
string
status
required
string
currentLocationId
string format: uuid
lotNumber
string
consumedIntoSerialId
string format: uuid
reservedForOrderId
string format: uuid
partCode

Code of the serial’s part (read-only; populated by build-order unit reads).

string
partName

Name of the serial’s part (read-only; populated by build-order unit reads).

string
revisionLabel

Label of the serial’s part revision (read-only; populated by build-order unit reads).

string
finalTestResult

The unit’s final-test outcome (read-only; populated by a build order’s units list): its latest FINAL inspection (the one recorded when it was built, or a retest since, which may be CONDITIONAL), else NOT_TESTED when it was built with no final test. Absent when unknown. The as-built record keeps the result at build time.

string
Allowed values: PASS FAIL CONDITIONAL NOT_TESTED
ecoState

Derived ECO status (read-only; populated by list reads). NEEDS_WORK when an ECO targets this serial with no retrofit recorded yet; APPLIED when it has ECO history and nothing outstanding; NONE when no ECO has ever touched it.

string
Allowed values: NEEDS_WORK APPLIED NONE
createdAt
required
string format: date-time

Example

[
{
"finalTestResult": "PASS",
"ecoState": "NEEDS_WORK"
}
]

Empty batch, duplicate in batch, or part not serializable

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}

Unauthorized

Revision or location not found

A serial number is already used by another unit (none are received), or the serials limit is reached

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}