Skip to main content

List Swap Suggestions for a Line

GET 

/api/sales-order-lines/:salesOrderLineId/swap-suggestions

Ranked substitute products for a sales order line, from the active substitution rules for the line's product. Availability is scoped to the line's warehouse (falls back to all warehouses when the line has none) and resolves_shortfall marks substitutes that can cover the line's full outstanding quantity.

Required scope: orders:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token.

Each suggestion includes the rule's mode (mode, mode_label) and free-text notes so the caller can show why the substitute exists.

meta.commitment reports how far the line has progressed: stage is none, submitted or shipped, and blocked_reason explains why a line that is already submitted or shipped cannot be swapped (null when it can).

Request​

Responses​

OK

Response Headers
    Content-Type