Skip to main content

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.

Required scope: suppliers:write

Grant 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_closure or inbound_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) unless applies_to_all_suppliers is 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 in supplier_ids, or to every supplier when applies_to_all_suppliers is true. Can carry a ramp_days recovery period.
  • inbound_cutoff — the destination cannot receive (e.g. Amazon's Q4 peak-season inbound restrictions). Applies to the destination warehouses in warehouse_ids; supplier fields and ramp_days are 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​

Created

Response Headers
    Content-Type