updateInventoryThresholds
Requires permission inventory:stock_level:update.
Sets the alert thresholds on one stock line: reorder point, minimum and maximum quantity, reorder quantity and lead time. They change when you are warned, not what is on the shelf. Setting the reorder point by hand pins it, so the automatic reorder engine never overwrites it. Needs the stock level update permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation UpdateInventoryThresholds($input: UpdateInventoryThresholdsInput!) {
updateInventoryThresholds(input: $input) {
id
batchNumber
serialNumber
createdAt
availableQuantity
averageCost
lastMovement {
id
batchNumber
movementNumber
serialNumber
status
type
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateInventoryThresholds($input: UpdateInventoryThresholdsInput!) {\n updateInventoryThresholds(input: $input) {\n id\n batchNumber\n serialNumber\n createdAt\n availableQuantity\n averageCost\n lastMovement {\n id\n batchNumber\n movementNumber\n serialNumber\n status\n type\n }\n }\n}",
"variables": {
"input": {
"inventoryId": "id"
}
}
}
EOF
Variables:
{
"input": {
"inventoryId": "id"
}
}
Response:
{
"data": {
"updateInventoryThresholds": {
"id": "id",
"batchNumber": "string",
"serialNumber": "string",
"createdAt": "2025-01-15T00:00:00Z",
"availableQuantity": 0,
"averageCost": 0,
"lastMovement": {
"id": "id",
"batchNumber": "string",
"movementNumber": "string",
"serialNumber": "string",
"status": "CANCELLED",
"type": "ADJUSTMENT"
}
}
}
}
updateInventoryThresholds(
input: UpdateInventoryThresholdsInput!
): Inventory!
Arguments
updateInventoryThresholds.input ● UpdateInventoryThresholdsInput! non-null input
The fields of the inventory thresholds to change.
Type
Inventory object
The stock of one product variant in one warehouse.