Inventory

Calculate reorder recommendations

POST
/inventory/forecast

Calculate reorder recommendations. Requires the MANAGER role.

Authorization

__Host-qm_session<token>

Session cookie set by sign-in on HTTPS deployments (the hosted demo).

In: cookie

Header Parameters

X-Requested-With*string

CSRF guard: must be quartermaster on every mutation.

Request Body

application/json

Parameters for a reorder forecast.

Parameters for a reorder forecast.

inventory_item_ids?array<>

Ids of the related inventory items.

Itemsitems <= 100
demand_multiplier?number

Demand relative to normal (1 = normal, 1.25 = 25% busier).

Range0.25 <= value <= 4
Default1
horizon_days?integer

Horizon, in days.

Range1 <= value <= 30

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/inventory/forecast" \  -H "X-Requested-With: quartermaster" \  -H "Content-Type: application/json" \  -d '{    "demand_multiplier": 1.25  }'
{  "id": "string",  "demand_multiplier": 0,  "created_at": "string",  "method": "REORDER_POINT_V1",  "lines": [    {      "inventory_item_id": "string",      "sku": "string",      "name": "string",      "unit": "string",      "base_daily_usage": 0,      "demand_multiplier": 0,      "forecast_daily_usage": 0,      "lead_time_days": 0,      "safety_stock": 0,      "coverage_days": 0,      "on_hand": 0,      "inbound_confirmed": 0,      "committed": 0,      "available": 0,      "reorder_point": 0,      "target_stock": 0,      "needs_reorder": true,      "suggested_quantity": 0,      "explanation": "string"    }  ]}