Skip to main content

Get Sales Order Dispatch Diagnosis

GET 

/api/sales-orders/:salesOrder/dispatch-diagnosis

Explains why one sales order is not being dispatched. The reason is computed when you call this, so it always reflects the order as it stands right now — nothing is stored and nothing is cached.

Automatic dispatch runs once per order, when the order is created or edited, and leaves nothing behind when a check says no. An order can therefore sit open for weeks with no visible explanation. This is the single-order counterpart to the release-candidates scan: use it when you are already looking at one order and want to know what is holding it up, and call it again after fixing the blocker to confirm it cleared.

It answers for any order, including closed, cancelled and fully fulfilled ones — in those cases blocker is null and detail says there is nothing left to dispatch.

Authentication: Requires Bearer token.

Path parameters:

  • salesOrder (integer, required): ID of the sales order to diagnose.

Query parameters: none.

Response fields:

  • sales_order_id (integer): The order that was diagnosed.
  • blocker (string, nullable): Blocker code. Null both when nothing is blocking the order and when there is nothing left to dispatch — is_releasable tells the two apart.
  • blocker_label (string, nullable): Short human-readable name for the blocker, suitable for a chip or heading.
  • detail (string, nullable): One sentence explaining the reason for this specific order. For unmapped lines it names the lines; for a missing warehouse address it names the warehouse.
  • is_releasable (boolean): True only when nothing is blocking the order and it can be dispatched now.
  • is_operator_actionable (boolean): True when the blocker is one a person can clear from inside SKU (map a line, add a warehouse address). False for blockers only time or incoming stock clears (awaiting_stock, held, before_inventory_start_date), and false whenever blocker is null.

Blocker codes: not_from_sales_channel, unmapped_lines, no_shipping_method, shipping_method_excluded, awaiting_stock, out_of_sync, held, before_inventory_start_date, no_warehouse_on_lines, warehouse_auto_dispatch_disabled, warehouse_manual_fulfillment, warehouse_missing_address, shipping_address_invalid.

Request

Responses

OK

Response Headers
    Content-Type