Upsert Planning Policy
PUT/api/manufacturing/mrp/planning-policies/:product
Create or replace the planning policy for a product, either as the item-level default or as an override for one warehouse.
Authorization: requires the mrp.run permission and a token carrying the mrp:run scope (manufacturing:write also satisfies it).
Path param: product = product id.
warehouse_id (an existing warehouse, or null) decides which of the two this writes: null is the item-level default, a warehouse id is that warehouse's override.
Fields: planning_method (required — mrp, reorder_point, mps, min_max or none), lot_sizing_rule (required — lot_for_lot, fixed_order_qty, min_max, eoq, period_order_qty or days_of_supply), procurement_type (make, buy, transfer or make_or_buy), lead_time_source (manual, bom, supplier or computed), order_minimum, order_multiple, order_maximum, fixed_order_quantity, days_of_supply, eoq_ordering_cost, eoq_holding_cost_pct, safety_stock, reorder_point, reorder_up_to_level (numeric, nullable), period_order_days, safety_lead_time_days, lead_time_days, low_level_code (integer, nullable) and demand_time_fence_days (integer, 0 or more — the near-term window in which forecast demand is ignored in favour of real orders).
Returns 422 when the combination does not hold together — for example fixed_order_quantity is required when lot_sizing_rule is fixed_order_qty, the EOQ costs are required when it is eoq, and reorder_point is required when planning_method is reorder_point or min_max.
mrp:run|manufacturing:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.