Register stock movement
register_movementRecord inbound or outbound stock movements using an idempotency key, so retries never double-count inventory.
Instructions
Register a stock entry (in) or exit (out). Idempotent: send the same idempotency_key when retrying so the movement is never counted twice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sku | Yes | Product SKU | |
| note | No | Optional context, e.g. 'north site crew' | |
| type | Yes | 'in' adds stock, 'out' removes stock | |
| quantity | Yes | Whole number of units | |
| idempotency_key | Yes | Unique key for this real-world movement, e.g. the chat message ID. Reuse it only for retries. |