Skip to main content

Create Schedule

POST 

/api/inventory-forecasting/schedules

Create a new forecast schedule.

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token.

schedule_time: HH:MM:SS format.

days_of_week: array of integers 0-6 (0=Sunday, 1=Monday, ..., 6=Saturday).

alert_channels: array of 'email' and/or 'slack'.

PO settings:

  • auto_create_po (boolean): create POs automatically from the forecast results.
  • po_status: draft, approved, or approved_sent.
  • separate_po_by_brand (boolean): split POs per brand instead of one per supplier.
  • auto_receive_po (boolean): automatically mark the created PO as received once it has been created and approved. Ignored when po_status is draft (a draft PO cannot be received).

Returns 201.

is_enabled is required. misfire_policy (optional): what to do when a scheduled run was missed, one of run_once, skip, run_within_deadline. starting_deadline_minutes (optional, integer 1-1440): how late a missed run may still start under run_within_deadline.

A schedule with auto_create_po true and po_status approved or approved_sent approves on every run, so saving one needs purchase_orders.approve (under an approval policy that covers forecast purchase orders, the policy decides instead). Without it the request is refused with 403; choose draft.

Request​

Responses​

Created

Response Headers
    Content-Type