reserve_item
Hold a SKU for a customer for a limited time, ensuring stock availability. Fails if insufficient inventory; requires salesperson confirmation before writing.
Instructions
Hold units of a SKU for a customer for a limited time. Fails if there is not enough available stock. This writes to the database; confirm with the salesperson first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | Yes | ||
| customer | Yes | ||
| quantity | No | Default 1. | |
| ttl_minutes | No | How long to hold it. Default 120. | |
| idempotency_key | Yes | Unique key for this reservation attempt; repeating it returns the same reservation instead of double booking. |