Fulfillment Orders
List Fulfillment Orders for a Sales Order
Lists every FulfillmentOrder attached to a SalesOrder with eager-loaded lines + warehouse. Powers the Pending sub-tab in the Vue3 SO detail page.
Get Fulfillment Order Detail
Returns a single FulfillmentOrder with its lines and warehouse eager-loaded. Each line exposes its `quantity` (the original budget) and `remaining_quantity` (the over-fulfilment backstop — units still available to consume via a SalesOrderFulfillmentLine).
Create Fulfillment Order
Creates a new FulfillmentOrder + its line budgets in a single transaction. Each line's `remaining_quantity` is initialized to `quantity`.
Dispatch Board — Active FOs Across All Orders
Cross-order **dispatch board** feed: every ACTIVE fulfillment order across all sales orders (excludes `closed` and `cancelled`), with `salesOrder` (for `sales_order_number`), `warehouse`, and `lines` eager-loaded. The frontend groups these into Kanban columns by `request_status` / `status` (Awaiting dispatch → Submitting → Submitted/Accepted → In progress → Needs attention). Capped at the most recent 300.
Move Fulfillment Order to Different Warehouse
Pre-submit warehouse re-route. Updates the FO's `warehouse_id` only.
Submit Fulfillment Order to Provider
Transitions `request_status` from `unsubmitted` → `submitting` and stamps `submitted_at` to the moment of hand-off (NOT when the carrier confirms — see Stage 2 for the carrier-callback flow that flips `submitting` → `submitted`/`accepted`).
Cancel Fulfillment Order
Cancels the FO, releases its line budgets back to the parent SOLs (so a different FO can pick them up), and optionally records a rejection reason. Sets `status=cancelled` + `cancelled_at`.
Split Fulfillment Order
Manually carve an **unsubmitted (proforma)** FulfillmentOrder into a NEW open/unsubmitted FO sized to the supplied per-line quantities. The original FO keeps the remainder. This is pure FulfillmentOrderLine budget redistribution — **neither FO is submitted** as a result (split and submit are separate concerns). To dispatch part of an order, split it then submit/hold each piece.
Retry Fulfillment Order Submission
Operator recovery action for a FO that is **stuck submitting** — i.e. `request_status=submitting` for longer than the stuck threshold (`config('fulfillment.stuck_submitting_threshold_minutes')`, default 15) without the provider confirming. Resets `request_status` back to `unsubmitted` and clears `submitted_at`, so the operator (or the dispatcher) can re-attempt the hand-off.
Force-Fail Fulfillment Order Submission
Operator recovery action for a FO that is **stuck submitting** when retrying is not appropriate (e.g. confirmed provider/carrier outage). Transitions `request_status` to `rejected` and records the supplied reason on `rejection_reason`. The FO drops out of the in-flight set so it can be cancelled or re-routed.
Merge Fulfillment Orders
Fold a sibling fulfillment order (`source_fulfillment_order_id`) INTO the route FO (the target). The source's lines are merged into the target per sales order line, the emptied source FO is deleted, and the target is returned. One fulfillment order → one submission → one shipment.
Get Fulfillment Order Activity Log
Paginated audit trail for a single fulfillment order — created, warehouse move, shipping-method change, submit, merge, cancel — newest first. The same events also roll up onto the parent sales order's Activity tab (`GET /api/v2/sales-orders/{salesOrder}/activity-log`).
Edit Fulfillment Order Shipping Details
Edit the **requested** shipping params on a proforma fulfillment order before it is submitted — the shipping method, requested ship date, and provider-specific metadata (e.g. notes). These travel with the FO into the submission payload.
Record Shipment
Record a REAL shipment (one SalesOrderFulfillment) against this fulfillment order — the operator fallback for the intent/execution split. A fulfillment order is the provider's order; shipments come back as 1..N SalesOrderFulfillments over time.
List Fulfillment Orders (Data Table)
Paginated, filtered, sorted list of FulfillmentOrders across ALL sales orders — the data source for the top-level **Fulfillment Orders** data table (a sibling of the Fulfillments table). Distinct from `GET /api/fulfillment-orders` (the active dispatch board): this `list` endpoint includes closed/cancelled FOs and supports the full filter/sort/paginate surface.
Get Fulfillment Order Line Items
The FO's lines (sku / name / product_id / quantity / remaining_quantity) for the data table's lazily-loaded expandable rows. Mirrors the SOF / PO line-items endpoints. `quantity` is the FOL budget; `remaining_quantity` is the amount still to be fulfilled.
Get Shipping Provider Options
The shipping-provider options for the Edit Shipping Details picker (SKU-8019 per-FO provider override). Lists the configured shipping-provider integration instances in the tenant PLUS a synthetic Manual option, each with whether it's mapped to this FO's warehouse (`is_mapped`) and whether it's the warehouse's preferred default (`is_warehouse_default`). The dialog pre-selects `default_integration_instance_id`.
Bulk Submit Fulfillment Orders
Bulk submitted many FulfillmentOrders at once. Accepts `ids[]` (required without apply_to_all; each must exist in fulfillment_orders) OR `apply_to_all=true`.
Bulk Cancel Fulfillment Orders
Bulk cancelled many FulfillmentOrders at once. Accepts `ids[]` (required without apply_to_all; each must exist in fulfillment_orders) OR `apply_to_all=true`, optional `reason` (string, max 1000) recorded on each cancelled FO.
Print Packing Slips
Render (and combine, when several) packing slips for the given FulfillmentOrders and return the resulting file URL. The FO is the warehouse work package, so its slip lists the FO's planned line quantities — the FO equivalent of the sales-order-fulfillment packing-slip export. Open `data.file` in a new tab to view/print the PDF.