Update a bin
Operation ID: updateBin
Group: Inventory › Bins
Open in the interactive reference
PATCH /inventory/bins/{id}
Retry-safe: A write that accepts Idempotency-Key: repeating a request with the same key replays the stored answer instead of executing twice.
Updates a bin with the fields you send. A field you leave out keeps its current value.
Use the bin's id, not its binCode.
You can change the bin's layout, flags, limits, and temperature range. binCode, barcode, and the warehouse are not accepted.
The limit and range checks look at the request and the current bin together. For example, sending maxWeight for a bin with no maxWeightUnit is refused, because a limit needs a unit.
To remove a limit, send null for it: maxQuantity, maxWeight or maxVolume. A null maxWeight or maxVolume removes its unit too. A limit of zero or below is refused, so null is the only way to leave a bin with no limit.
The layout fields (aisle, rack, shelfLevel, zone, itemPosition) and the temperature fields (tempZone, tempMin, tempMax) are cleared the same way, by sending null.
The response is only the bin's id. To see the updated bin, use GET inventory/bins/:id.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Api-Version |
header | string · v1 | yes | The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1. |
Idempotency-Key |
header | string | no | An opaque caller-chosen string (1-255 characters) that makes this request safe to retry. Repeating the same key with an identical request body replays the original response instead of re-executing - but only once that original request succeeded; a failed attempt re-executes on retry. Repeating the key with a different body is answered with 422. A key still in flight is answered with 409 - as is a key whose original request was interrupted before it finished, for a few minutes afterwards, until that attempt is presumed dead. A completed response stays replayable for 24 hours. The key is scoped to the caller, not to the action: reusing it for a different action is answered with 409 or 422 rather than treated independently. On read actions this header is ignored. On write actions that cannot offer the guarantee it is answered with 400 IDEMPOTENCY_NOT_SUPPORTED rather than silently ignored. |
id |
path | string | yes | The unique identifier of the bin you want to update. |
Request body
Required, application/json: updateBinInput.
| Field | Type | Required | Description |
|---|---|---|---|
aisle |
string | null | no | The aisle in the warehouse layout. Send null to clear it. |
rack |
string | null | no | The rack within the aisle. Send null to clear it. |
shelfLevel |
string | null | no | The shelf level within the rack. Send null to clear it. |
zone |
string | null | no | The logical zone of the bin, as your tenant names them. For example 'Picking', 'Storage' or 'Quarantine'. Send null to clear it. |
itemPosition |
string | null | no | The position within the shelf, where a bin is subdivided further. Send null to clear it. |
isPickingBin |
boolean | no | Whether the bin is a picking location, a fast-access place stock is taken from to fulfill shipments. |
isReceivingBin |
boolean | no | Whether the bin stages newly received goods before they are put away. |
isProductionBin |
boolean | no | Whether the bin feeds or receives production. |
maxQuantity |
number | null | no | The largest number of units the bin will hold, above zero. It is meaningful only when everything in the bin is counted in the same unit. Send null to remove the limit. |
maxWeight |
decimal | null | no | The largest weight the bin will hold, in maxWeightUnit, above zero. The bin must have a maxWeightUnit, from this request or already. Send null to remove the limit; its maxWeightUnit is removed with it. Example: "300". |
maxWeightUnit |
string | null | no | The unit maxWeight is given in. Accepted values: 'G', 'Kg', 'Lbs'. Send it together with maxWeight, or leave both out. It can be null only when maxWeight is null too, and a null maxWeight already removes it. |
maxVolume |
decimal | null | no | The largest volume the bin will hold, in maxVolumeUnit, above zero. The bin must have a maxVolumeUnit, from this request or already. Send null to remove the limit; its maxVolumeUnit is removed with it. |
maxVolumeUnit |
string | null | no | The unit maxVolume is given in. Accepted values: 'L'. Send it together with maxVolume, or leave both out. It can be null only when maxVolume is null too, and a null maxVolume already removes it. |
capacityCheckMode |
string | no | What happens when a movement would exceed a limit. Accepted values: 'HardBlock', which refuses the movement, and 'SoftWarning', which allows it and flags it. Example: "HardBlock". |
tempZone |
string | null | no | The temperature zone the bin belongs to, as your tenant names them. For example 'Ambient', 'Chilled' or 'Frozen'. Send null to clear it. |
tempMin |
decimal | null | no | The lowest temperature kept in the bin, in degrees Celsius. It must not be above tempMax. Send null to remove the lower bound. |
tempMax |
decimal | null | no | The highest temperature kept in the bin, in degrees Celsius. Send null to remove the upper bound. |
supportsPerishable |
boolean | no | Whether perishable stock may be kept in the bin. |
active |
boolean | no | Whether the bin may be chosen for new movements. Set it to false to retire the bin without deleting it: the stock already in it stays where it is. |
{
"aisle": "<aisle>",
"rack": "<rack>",
"shelfLevel": "<shelfLevel>",
"zone": "<zone>",
"itemPosition": "<itemPosition>",
"isPickingBin": true,
"isReceivingBin": true,
"isProductionBin": true,
"maxQuantity": 0,
"maxWeight": "300",
"maxWeightUnit": "<maxWeightUnit>",
"maxVolume": "19.99",
"maxVolumeUnit": "<maxVolumeUnit>",
"capacityCheckMode": "HardBlock",
"tempZone": "<tempZone>",
"tempMin": "19.99",
"tempMax": "19.99",
"supportsPerishable": true,
"active": true
}
Response
200 Success
Under data (updateBinOutput):
| Field | Type | Required | Description |
|---|---|---|---|
id |
string | yes | The unique identifier for the bin. Example: "8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02". |
{
"data": {
"id": "8e1c40a7-5b93-4d26-a0f8-3c74e19b5d02"
},
"diagnostics": [
{
"code": "<code>",
"message": "<message>",
"severity": "error",
"path": [
"<path>"
],
"details": "<details>"
}
]
}
Response headers
Idempotency-Replayed— Present andtrueonly when this response replays a previously stored one for the same Idempotency-Key, rather than reflecting a live execution. Absent on a live response - never sent asfalse.
Errors
| Code | Status |
|---|---|
NOT_FOUND |
400 |
REFERENCE_NOT_FOUND |
400 |
DUPLICATE_CODE |
400 |
WAREHOUSE_NOT_BIN_TRACKABLE |
400 |
UNKNOWN_VALUE |
400 |
INCOMPLETE_LIMIT |
400 |
NON_POSITIVE_LIMIT |
400 |
INVALID_RANGE |
400 |
IDEMPOTENCY_KEY_CONFLICT |
409 |
IDEMPOTENCY_PAYLOAD_MISMATCH |
422 |
Statuses
400— Invalid request or business failure. Codes: NOT_FOUND, REFERENCE_NOT_FOUND, DUPLICATE_CODE, WAREHOUSE_NOT_BIN_TRACKABLE, UNKNOWN_VALUE, INCOMPLETE_LIMIT, NON_POSITIVE_LIMIT, INVALID_RANGE401— The request carries no valid access token.403— Not authorized404— Not found409— The Idempotency-Key is still being processed by another request.422— The Idempotency-Key was already used with a different request payload.429— Too many requests from this client address. The response has no body and noRetry-Afterheader.500— Internal server error