Skip to main content

Release Sales Orders

POST 

/api/sales-orders/release

Re-runs automatic dispatch for the selected sales orders.

Every order is re-diagnosed before it is dispatched. The list of releasable orders may be minutes old by the time this is called, so an order whose blocker reappeared in the meantime is reported back as skipped, with the reason, rather than dispatched into a check that would reject it and annotate the order.

Authentication: Requires Bearer token.

Request body fields:

  • sales_order_ids (array of integers, required, min 1, max 500): IDs of the sales orders to release. The cap exists because each ID costs a re-diagnosis plus a queued dispatch.

Response fields:

  • released (array of integers): IDs of the orders accepted for dispatch.
  • skipped (array of objects): One entry per order that was not dispatched — id (integer) and reason (string). Reasons include "Order no longer exists or is no longer open." and the specific detail for whichever blocker is now in place.

The message reflects the outcome: "Released N order(s) — fulfillment is being created now." when every order went through, "Released N order(s); M skipped." when only some did, and "No orders were released." when none did.

Dispatch itself is queued, so a successful response means the orders were accepted for dispatch — not that their fulfillment records already exist.

Requires permission: sales_orders.fulfill

Request

Responses

OK

Response Headers
    Content-Type