Preflight Post-Submission Merge
POST/api/fulfillment-orders/merge-provider/preflight
Returns the read-only PLAN for merging two or more already-dispatched fulfillment orders into one provider order (post-submission cross-order merge). No provider call and no data is changed — this is the plan the operator confirms before the merge runs.
orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body
fulfillment_order_ids(int[], required, min 2) — the already-dispatched fulfillment orders to merge.primary_fulfillment_order_id(int, optional) — the order to keep as the master (it receives the others' lines). Defaults to the order with the most lines.
Response — a plan object:
primary_fulfillment_order_id(int) — the master.provider(string | null) — the resolved shipping provider.warehouse_id(int | null).can_execute(bool) — true only when there are no blockers and at least two eligible members (including the master).blockers(string[]) — whole-plan problems (different warehouses, providers, or addresses) that no per-order exclusion can fix.members[]— one per order:fulfillment_order_id,sales_order_id,sales_order_number,role(master|absorbed),action(receive_lines|cancel),line_count,eligible(bool),reason(string | null),requires_label_void(bool),provider_order_reference(string | null),provider_status(string | null).
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
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.
Unprocessable Content
Response Headers
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.