Set stock quantity
sapo_set_inventory_levelWRITE: set the physical stock (on_hand) of one inventory item at one location to an exact quantity, with a reason. This OVERWRITES the current number and is recorded as a stock adjustment: read the level first (sapo_list_inventory_levels). PUT /admin/inventory_levels/set.json.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why the stock changes (default: Sapo's own default). | |
| on_hand | Yes | Physical on-hand quantity to set (at most 3 decimals are kept). | |
| location_id | Yes | Location id (see sapo_list_locations). | |
| inventory_item_id | Yes | Inventory item id (see sapo_list_inventory_items). |