curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/inventory/{id}/reserve' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"location_id": 1,
"quantity": 10,
"reference_id": "550e8400-e29b-41d4-a716-446655440000",
"reference_type": "SALES_ORDER"
}'
{
"data": {
"location": {
"location_id": 1,
"location_name": "Main Warehouse",
"quantities": {
"allocated": "40",
"available": "260",
"on_hand": "300"
},
"updated_at": "2024-12-09T10:35:00Z",
"version": 6
},
"reservation_id": "res-550e8400-e29b-41d4"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Reserve an inventory
Reserve an inventory
POST
/
api
/
v1
/
inventory
/
{id}
/
reserve
curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/inventory/{id}/reserve' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"location_id": 1,
"quantity": 10,
"reference_id": "550e8400-e29b-41d4-a716-446655440000",
"reference_type": "SALES_ORDER"
}'
{
"data": {
"location": {
"location_id": 1,
"location_name": "Main Warehouse",
"quantities": {
"allocated": "40",
"available": "260",
"on_hand": "300"
},
"updated_at": "2024-12-09T10:35:00Z",
"version": 6
},
"reservation_id": "res-550e8400-e29b-41d4"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Path parameters
string
required
Inventory item id or item number
Request body
ReserveInventoryRequest
integer (int32)
required
Location ID (must be positive)
integer (int64)
required
Quantity to reserve (must be at least 1)
string,null
Reference ID (e.g., order ID) - must be valid UUID if provided
string,null
Reference type (e.g., ‘SALES_ORDER’, ‘CUSTOMER_HOLD’)
Response
ApiResponse_ReservationResponse
object
Show data
Show data
InventoryLocation
required
Updated location inventory after reservation
Show InventoryLocation
Show InventoryLocation
integer (int32)
required
Location identifier
string,null
Human-readable location name
InventoryQuantities
required
Quantities at this location
string
required
Last update timestamp (RFC3339)
integer (int32)
required
Version number for optimistic locking. Include this in update requests to prevent lost updates.
string
required
Unique reservation identifier
array,null
string,null
boolean
required
Status codes
| Code | Meaning |
|---|---|
200 | Inventory reserved |
curl --request POST \
--url 'https://prod-api.stateset.cloud.stateset.app/api/v1/inventory/{id}/reserve' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"location_id": 1,
"quantity": 10,
"reference_id": "550e8400-e29b-41d4-a716-446655440000",
"reference_type": "SALES_ORDER"
}'
{
"data": {
"location": {
"location_id": 1,
"location_name": "Main Warehouse",
"quantities": {
"allocated": "40",
"available": "260",
"on_hand": "300"
},
"updated_at": "2024-12-09T10:35:00Z",
"version": 6
},
"reservation_id": "res-550e8400-e29b-41d4"
},
"errors": [
"string"
],
"message": "Two-person tent, green — replacement for damaged pole set.",
"meta": {
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"timestamp": "2026-08-31T14:22:05Z"
},
"success": true
}
Last modified on August 31, 2026