Skip to content

Set a part's reorder point

PUT
/parts/{id}/reorder-point
curl --request PUT \
--url https://app.buildtrace.eu/api/parts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reorder-point \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "minQty": "example", "reorderQty": "example" }'

Set (or replace) the part’s reorder point: the minimum available stock, and optionally how much to reorder, both in the part’s stock unit. Available stock is on hand less what open build orders have reserved and what sits in blocked lots (or, for serialized parts, the units with status AVAILABLE), summed over all the part’s revisions and locations.

Required scope: inventory:write.

id
required
string format: uuid
Media typeapplication/json
object
minQty
required

Minimum available stock, in the part’s stock unit; zero or more.

string
reorderQty

How much to order when below the minimum, in the part’s stock unit; more than zero. Omit or null for none.

string
nullable

Example generated

{
"minQty": "example",
"reorderQty": "example"
}

OK

Media typeapplication/json
object
partId
required
string format: uuid
partCode
required
string
partName
required
string
partKind
required
string
stockUom
required
string
minQty
required
string
reorderQty
string
onHand
required

Over all revisions and locations; equals available + reserved + blocked. RAW: lot stock. Serialized parts: units available, reserved or quarantined.

string
reserved
required

Held by open build orders (RAW - reserved less consumed; serialized - reserved units).

string
available
required

Free to use: what a reservation may still take. RAW: on hand minus blocked minus reserved. Serialized: units with status AVAILABLE.

string
blocked
required

On hand but not usable. RAW: stock in lots whose latest lot inspection failed. Serialized: quarantined units.

string
shortfall
required

How far available is under the minimum; “0” when it is not below it.

string
belowMinimum
required

Available is less than the minimum (being exactly at it is not below it).

boolean

Example generated

{
"partId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"partCode": "example",
"partName": "example",
"partKind": "example",
"stockUom": "example",
"minQty": "example",
"reorderQty": "example",
"onHand": "example",
"reserved": "example",
"available": "example",
"blocked": "example",
"shortfall": "example",
"belowMinimum": true
}

Bad request

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}

Unauthorized

Not found