POST/api/ordering/recurring/run

Trigger standing-order generation

Triggers a manual generation pass for standing-order occurrences. Use the request body’s date to select the generation day; the manual run bypasses the fire-time and createdAt gates but still honours the kill switch. It only accepts today’s Montreal business day and cannot recover a missed day, which requires a human to take the order.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 body field

Optional manual generation input. Supply date to identify the generation day; anything other than today’s Montreal business day is rejected.

datestringoptional
The generation day in ISO 8601 date format (YYYY-MM-DD). Must be today’s Montreal business day.

5 status codes
200Returns a generation-pass summary with the date, trigger type, kill-switch state, generation window, and per-run counts for actions such as materialized, swept, generated, held-back, skipped, and unpriced lines. Counts are not persisted, and a repeated run is idempotent.
datestringoptional
The Montreal business day this run was for.
triggerstringoptional
Allowed:tickmanual
autorunstringoptional
The kill switch AS READ BY THIS RUN. `off` means nothing below happened.
Allowed:onoff
leadDaysintegeroptional
firesThroughstringoptional
The far edge of the window this run fired — `date + leadDays`.
autoConfirmbooleanoptional
Whether generated orders were born confirmed and priced.
resumedintegeroptional
Dated pauses that elapsed and were reactivated.
materializedintegeroptional
New `scheduled` rows created across the horizon.
sweptintegeroptional
Past-dated `scheduled` rows cancelled as `missed`.
generatedintegeroptional
heldBackintegeroptional
In the window but NOT fired, because the standing order was created or edited after today's fire time. Always 0 for a manual run, which is what overrides it.
skippedintegeroptional
Declined under the lock — inactive, paused, or no lines left.
notDueintegeroptional
`scheduled` rows beyond the window.
alreadyResolvedintegeroptional
unpricedLinesintegeroptional
Lines stamped with a null price because the SKU has no base price on file — a legitimate state, not an error. Meaningful only when `autoConfirm` is true; a draft has no stamped prices at all, so it reports 0.
errorsintegeroptional
Per-occurrence failures. One does not abort the run.
ordersarray<object>optional
400Returned when the input is invalid; the `error` field describes the problem, such as a date other than today’s Montreal business day.
errorstringrequired
401Returned when the authenticated user is not signed in.
errorstringrequired
403Returned when the authenticated user lacks the required department membership or role.
errorstringrequired
500Returned when an unexpected server error occurs.
errorstringrequired

Error handling

A 400 is returned when the input is invalid, including when date is not today’s Montreal business day; a 401 is returned when the authenticated user is not signed in. A 403 is returned when the authenticated user lacks the required department membership or role, and a 500 is returned for an unexpected server error. When supplied, date must use the ISO 8601 date format and identify today’s Montreal business day.