Set Inventory Level
Inventory
Set Inventory Level
Set inventory to an absolute value
POST
Set Inventory Level
Set Inventory Level
Sets the inventory level for an inventory item at a location to an absolute value. Unlikeadjust, this sets the exact quantity rather than adding or subtracting.
Request
Body Parameters
The inventory item ID to update
The location ID where the inventory should be set
The absolute available quantity to set (must be >= 0)
Reason for setting the inventory (for audit trail)
Response
Whether the request succeeded
The updated inventory level
Example Response
Connect Inventory Item to Location
Before setting inventory levels, ensure the inventory item is connected to the location:Disconnect from Location
To remove inventory from a location entirely:Use Cases
| Scenario | Endpoint to Use |
|---|---|
| Physical count reconciliation | set - Set to exact counted value |
| Receiving shipment | adjust - Add received quantity |
| Damaged goods | adjust - Subtract damaged quantity |
| Opening new location | connect then set |
| Closing location | disconnect (moves to other locations or sets to 0) |
Error Codes
| Code | Description |
|---|---|
UNAUTHORIZED | Invalid or missing access token |
FORBIDDEN | App doesn’t have write_inventory scope |
NOT_FOUND | Inventory item or location not found |
NOT_CONNECTED | Inventory item not connected to this location |
VALIDATION_ERROR | Invalid request body (e.g., negative quantity) |