Add a stock item
Add a stock item. Requires the MANAGER role.
Session cookie set by sign-in on HTTPS deployments (the hosted demo).
In: cookie
Header Parameters
CSRF guard: must be quartermaster on every mutation.
Request Body
application/json
A new stock item, including its opening on-hand count.
A new stock item, including its opening on-hand count.
Stock-keeping unit code.
^[A-Za-z0-9][\w.\-/]*$1 <= length <= 64Display name.
1 <= length <= 120Product category.
Value in
- "food_packaging"
- "cleaning_supplies"
- "cooking_ingredients"
- "beverages"
- "kitchen_equipment"
- "alcohol"
- "gift_cards"
- "services"
Unit of measure (each, liter, case...).
1 <= length <= 24Units to keep on hand as a buffer.
0 <= value <= 10000000Days of usage an order should cover.
1 <= value <= 60Lead time for this item, overriding the supplier's (null = use supplier's).
nullId of the related preferred supplier.
nullPhrase used to look up market prices (Channel3).
2 <= length <= 200Words that identify this item in natural-language requests.
items <= 20[]Units currently in stock.
0 <= value <= 100000000Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/inventory" \ -H "X-Requested-With: quartermaster" \ -H "Content-Type: application/json" \ -d '{ "sku": "BEV-COLA-CAN", "name": "Cola cans", "category": "beverages", "unit": "each", "on_hand": 48, "safety_stock": 24, "coverage_days": 4, "search_query": "cola soda cans 24 pack", "keywords": [ "cola", "soda" ] }'{ "item": { "id": "string", "sku": "string", "name": "string", "category": "food_packaging", "unit": "string", "on_hand": 0, "inbound_confirmed": 0, "committed": 0, "available": 0, "avg_daily_usage": 0, "lead_time_days": 0, "safety_stock": 0, "coverage_days": 0, "reorder_point": 0, "days_of_cover": 0, "status": "OK", "preferred_supplier_id": "string", "data_source": "CHANNEL3_MARKET", "search_query": "string", "keywords": [ "string" ], "lead_time_days_override": 0 }}