Create Schedule
POST/api/inventory-forecasting/schedules
Create a new forecast schedule.
purchase-orders:writeGrant 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
- 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
Response Headers
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.