set_item_stock_quantity
Set an item's stock quantity to an absolute value, with optimistic locking that requires the current stock to equal the expected quantity, and an optional dry-run to preview before writing.
Instructions
Modifies merchant data. Set an item's stock to an ABSOLUTE quantity (not a delta).
Optimistic lock: refuses unless current stock equals expected_current_quantity. Bounds: 0 <= new_quantity <= 1_000_000. dry_run=True previews the PUT body (still performs one read to fetch current stock) and never writes. Requires INVENTORY_R and INVENTORY_W.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | ||
| item_id | Yes | ||
| new_quantity | Yes | ||
| expected_current_quantity | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||