Skip to content

Transfer stock

POST
/stock/transfer
curl --request POST \
--url https://app.buildtrace.eu/api/stock/transfer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "revisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "fromLocationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "toLocationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "lot": "example", "quantity": "example" }'

Required scope: inventory:write.

Media typeapplication/json
object
revisionId
required
string format: uuid
fromLocationId
required
string format: uuid
toLocationId
required
string format: uuid
lot
string
quantity
required
string

Example generated

{
"revisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"fromLocationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"toLocationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"lot": "example",
"quantity": "example"
}

OK

Media typeapplication/json

A revision’s stock (at one location or over all of them). On hand = available + reserved + blocked. A material counts its lots; a serialized part counts its units, as the reorder status does (on hand = AVAILABLE + RESERVED + QUARANTINED units, blocked = QUARANTINED, available = AVAILABLE units not under an open rework; an AVAILABLE unit under an open rework counts as blocked, since a build order can’t reserve it).

object
revisionId
required
string format: uuid
onHand
required
string
available
required

What a build order can still reserve: on hand less what open build orders hold and less the stock in blocked lots. The same figure reservations and reorder points use.

string
blocked
required

On-hand stock in lots whose latest lot inspection failed; it can’t be reserved.

string

Example generated

{
"revisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"onHand": "example",
"available": "example",
"blocked": "example"
}

Bad request

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}

Unauthorized

Not found

Not enough stock, or what is on hand is reserved by open build orders

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}