> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reserve inventory for an order

> Inventory reservation result

### Path parameters

<ParamField path="tenant_id" type="string" required>
  Tenant identifier
</ParamField>

### Request body

`object`

<ParamField body="sku" type="string" required>
  Product SKU
</ParamField>

<ParamField body="quantity" type="integer" required>
  Quantity to reserve
</ParamField>

<ParamField body="location" type="string" required>
  Location code
</ParamField>

<ParamField body="referenceId" type="string" required>
  Reference ID (e.g., order ID)
</ParamField>

### Response

`object`

<ResponseField name="orderId" type="string" required />

<ResponseField name="reserved" type="integer" required />

<ResponseField name="failed" type="integer" required />

<ResponseField name="reservationExpiresAt" type="string (date-time)" />

### Status codes

| Code  | Meaning                      |
| ----- | ---------------------------- |
| `200` | Inventory reservation result |
| `401` | Unauthorized                 |
| `422` | Insufficient inventory       |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.sync.stateset.com/v1/tenants/{tenant_id}/inventory/reservations' \
    --header 'x-stateset-api-key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "sku": "SKU-TENT-2P-GRN",
    "quantity": 2,
    "location": "string",
    "referenceId": "string"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "orderId": "string",
    "reserved": 1,
    "failed": 1,
    "reservationExpiresAt": "2026-08-31T14:22:05Z"
  }
  ```
</ResponseExample>
