Create Supplier Closure
POST/api/supplier-closures
Create a supplier closure (the supplier cannot produce or ship) or an inbound cutoff (a destination warehouse cannot receive). Planning picks the change up immediately.
suppliers:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token (scope: suppliers, write).
Body fields:
name(string, required, max 120) — must be unique among active closures.kind(string, required) —supplier_closureorinbound_cutoff.preset_key(string, optional, nullable) — the preset this closure was started from: chinese_new_year, vietnam_tet, golden_week, amazon_q4_inbound.ramp_days(integer, optional, 0–60, default 0) — recovery days after each window. Forced to 0 for inbound cutoffs.applies_to_all_suppliers(boolean, optional, default false) — supplier closures only: apply to every supplier, now and future.supplier_ids(integer[], optional) — supplier closures only; each must be an existing supplier id, no duplicates. Required (at least one) unlessapplies_to_all_suppliersis true. Ignored for inbound cutoffs and when applying to all suppliers.warehouse_ids(integer[], optional) — inbound cutoffs only; the destination warehouses that stop receiving. Each must be an existing warehouse id. Required (at least one) for inbound cutoffs; ignored for supplier closures.windows(array, required, 1–20 items) — the full set of windows; windows must not overlap.windows.*.id(integer, optional, nullable) — on update, the id of an existing window to keep and edit; omit for a new window.windows.*.start_date(string, required, YYYY-MM-DD) — first closed day.windows.*.end_date(string, required, YYYY-MM-DD, on or after start_date) — last closed day (inclusive).windows.*.label(string, optional, nullable, max 40) — e.g. the year.
notes(string, optional, nullable, max 2000).
Inbound cutoff example body:
{
"name": "Amazon Q4 inbound cutoff",
"kind": "inbound_cutoff",
"preset_key": "amazon_q4_inbound",
"warehouse_ids": [
4
],
"windows": [
{
"start_date": "2026-11-28",
"end_date": "2026-12-31",
"label": "2026"
}
],
"notes": "Dates from this year's Seller Central peak-season inbound notice."
}
Validation beyond field rules: an inbound cutoff needs at least one warehouse_ids; a supplier closure needs supplier_ids or applies_to_all_suppliers: true; the name must not match another active closure; windows must not overlap.
Returns 201 with the created closure.
Response fields: id, name, kind, kind_label, preset_key, ramp_days (always 0 for inbound cutoffs), applies_to_all_suppliers, is_active (false = archived), notes, suppliers[] (id, name, route), warehouses[] (id, name), windows[] (id, start_date, end_date, label, days — inclusive day count), next_window (the first window that has not ended yet, or null), status (upcoming, active when today falls inside a window, past when every window has ended — relative to the account's today), created_at, updated_at.
Kinds (kind):
supplier_closure— the supplier cannot produce or dispatch (a factory shut, e.g. Chinese New Year, Vietnam Tết, Golden Week). Applies to the suppliers insupplier_ids, or to every supplier whenapplies_to_all_suppliersis true. Can carry aramp_daysrecovery period.inbound_cutoff— the destination cannot receive (e.g. Amazon's Q4 peak-season inbound restrictions). Applies to the destination warehouses inwarehouse_ids; supplier fields andramp_daysare ignored (ramp is always 0).
Windows are inclusive, date-only ranges (YYYY-MM-DD, the account's local calendar): a window of 2027-01-30 to 2027-02-20 blocks both of those days and every day between (22 days). A closure can hold several windows (one per year, up to 20) and they must not overlap.
Ramp (ramp_days, 0–60): days after a supplier closure window ends while the factory is back but not at full output. Planning treats them as closed too, so a 22-day window with a 14-day ramp blocks 36 days.
How planning uses closures: lead times are calendar days. When the production days of an order (order date + lead time) cross a supplier closure window, the lead time grows by the blocked days (window + ramp), and an arrival that lands inside a destination's inbound cutoff moves to the day after the cutoff ends. If the next order would be held up by a closure, the current order's cover is lengthened too, so it buys enough stock to last through the closure. The Inventory Planning report, replenishment forecasts and forecast schedules all report the resulting extension days, a plain-English reason, and the latest date an order can go out (order_by_date) and still land before the projected stockout. Archived closures are ignored by planning.
Request
Responses
- 201
- 401
- 403
- 422
- 429
Created
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.
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.