Create Schedule
POST/api/inventory-forecasting/schedules
Create a new forecast schedule.
Any valid API token can call this endpoint — no specific scope required. Manage 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.
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.
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
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.