Sales Orders
Archive Sales Order
Archives a sales order (stamps its archived timestamp so it is hidden from active lists), then runs the legacy archive-and-fulfill flow: a fulfillment is created for the order's remaining unfulfilled items and the tracking is submitted to the order's sales channel. The success message and returned `data` describe the created fulfillment.
Unarchive Sales Order
Restores an archived sales order so it appears in active lists again (clears its archived timestamp). Returns the order in `data`.
Bulk Archive Sales Orders
Archives multiple sales orders at once (stamps each order's archived timestamp so it disappears from active lists). Unlike the single-order archive endpoint, this performs a pure archive with no fulfillment side effects.
Bulk Unarchive Sales Orders
Restores multiple archived sales orders at once (clears each order's archived timestamp so it reappears in active lists).
Check Sales Orders Deletable
Checks whether the given sales orders can be deleted, returning one result per order. Use this before calling the delete endpoints to warn users about related records that will be removed along with each order.
Bulk Approve Sales Orders
Approves multiple draft (or reserved) sales orders, transitioning them to `open`. Newly opened orders are automatically routed for fulfillment.
Bulk Mark Sales Orders as Draft
Reverts multiple sales orders back to `draft`. Reverting an order deletes its payments and fulfillments, reverses its inventory movements and cost layers, tears down its fulfillment routing, removes its accounting transaction, and resets order/fulfillment/payment statuses (including clearing any cancellation).
Duplicate Sales Order
Creates a copy of a sales order as a new draft order and returns the new order's full detail. The copy gets the next local order number, `draft` status, `unfulfilled` / `unpaid` statuses, and is assigned to the local (SKU.io) sales channel. Line items are copied without any fulfillment progress or sales-channel linkage; reservation and packing-slip state are cleared.
Resend Sales Order
Creates a $0 resend order for replacing items from an existing order (e.g. lost or damaged shipments), linked to the original order, and returns the new order's full detail.
Exchange Sales Order
Creates an exchange order for an existing order (e.g. swapping returned items), linked to the original order or to a sales credit, and returns the new order's full detail.
Refresh Sales Order Address Snapshots
Re-copies the current contents of the order's shipping and billing address records into the order's own inline address snapshot columns. Use this after editing an address record's content (same address ID, different data) so the order's stored snapshot — which is what documents and the order detail display — reflects the corrected address.
Fulfill Sales Order
Records a fulfillment (shipment) against a sales order, deducting inventory and, by default, submitting the fulfillment to the warehouse's shipping provider and reporting it to the originating sales channel.
Bulk Fulfill Sales Orders
Fulfills multiple sales orders at once by submitting each order's pending fulfillment work to the shipping provider or fulfillment service configured for its warehouse(s). This is an operator-initiated action, so warehouse auto-dispatch eligibility rules are bypassed.
Fulfill Sales Order via FBA
Submits a Fulfilled-by-Amazon multi-channel fulfillment request for the sales order — Amazon picks, packs, and ships the selected lines out of FBA stock on your behalf. Only available in production environments.
Mark Sales Order for Pickup
Stages a subset of the order's allocated line quantities for customer pickup. The order's pending fulfillment work is parked in an awaiting-pickup state — no shipment record is created until the customer actually collects — and the request records who marked the items, when, and the expected pickup date. Partial quantities are supported, so some units can be marked for pickup while the rest are fulfilled normally.
Reset Sales Order Fulfillment Status
Recalculates a sales order's fulfillment status from its actual fulfillment data. Only allowed while the order's current fulfillment status is `out_of_sync`; the recomputed status is one of unfulfilled, partially_fulfilled, fulfilled, or over_fulfilled based on the quantities actually fulfilled per line.
Compare Fulfillments with Sales Channel
Compares the fulfillments recorded in SKU.io against the fulfillments reported by the order's originating sales channel. Currently only orders linked to a Shopify order are compared; orders from other channels return an empty success response.
Dispatch Fulfillments for Sales Order
Runs the fulfillment dispatcher for a single sales order: validates that the order is dispatchable (approved, fulfillment status in sync, all lines mapped to products, a shipping method selected, valid addresses), groups the fulfillable allocated lines by warehouse, and submits each warehouse's pending fulfillment order to the shipping provider or fulfillment service configured for that warehouse.
Bulk Dispatch Fulfillments for Sales Orders
Runs the fulfillment dispatcher for multiple sales orders — each order is validated and its pending fulfillment orders are submitted to the shipping provider or fulfillment service configured for its warehouse(s).
Preview Dropship Request
Previews the supplier cost for each of the order's product lines routed to a dropship (supplier) warehouse, before creating the dropship purchase order.
Create Dropship Request
Creates a dropship request for the sales order: a purchase order is created and submitted to the supplier behind the given dropship warehouse for the selected lines, priced at supplier cost, with the sales order's shipping address as the delivery destination.
Preview Bulk Allocate Sales Orders
Previews a bulk allocate action without changing any data. For each targeted sales order the response reports per-line eligibility, the quantities involved, and the allocation impact, plus aggregate totals — use it to confirm what a bulk allocate will do before running it.
Bulk Allocate Sales Orders
Starts an asynchronous bulk allocate operation for the targeted sales orders and returns immediately with a `tracked_job_log_id` to poll for progress and results.
Preview Bulk Unallocate Sales Orders
Previews a bulk unallocate action without changing any data. For each targeted sales order the response reports per-line eligibility and how many allocated units would be released, plus aggregate totals — use it to confirm what a bulk unallocate will do before running it.
Bulk Unallocate Sales Orders
Starts an asynchronous bulk unallocate operation for the targeted sales orders and returns immediately with a `tracked_job_log_id` to poll for progress and results.
Mark Sales Order as Printed
Marks a sales order's packing slip as printed by setting the order's `packing_slip_printed_at` timestamp to the current time. Orders already marked as printed are simply re-stamped.
Bulk Print Packing Slips
Generates packing slips for the targeted sales orders as a single merged PDF. The generation runs as an asynchronous background operation; the response returns a `tracked_job_log_id` to poll for progress, and the finished job's results contain the PDF download URL.
Add Sales Order Note
Adds a note to a sales order. The authenticated user is recorded as the note's author.
List Sales Order Notes
Lists the notes on a sales order, newest first, as a paginated set (15 per page).
Delete Sales Order Note
Deletes a note from a sales order.
Toggle Sales Order Note Pin
Toggles the pinned state of a sales order note. Pinned notes surface at the top of the order's notes.
List Sales Order Discounts
Lists every discount applied to a sales order, ordered by `sequence` (the order in which discounts are applied). Includes line-level discounts — tied to a product line via `sales_order_line_id`, or to a charge line such as shipping via `financial_line_id` — and order-level discounts.
Create Sales Order Discount
Adds a discount to a sales order and recalculates the order's discount totals.
Get Sales Order Discount
Returns a single discount on a sales order. The response body is the discount object itself — it is not wrapped in a `data` envelope.
Update Sales Order Discount
Updates an existing discount on a sales order and recalculates the order's discount totals.
Delete Sales Order Discount
Deletes a discount from a sales order and recalculates the order's discount totals (line totals, order-level allocation across lines, and the order's denormalized totals are refreshed without the removed discount).
List Sales Order Financial Lines
Lists the financial lines attached to a sales order — shipping, handling, fees, and other non-product revenue or cost lines.
Create Sales Order Financial Line
Adds a financial line (shipping, handling, fee, or other non-product revenue/cost line) to a sales order.
Update Sales Order Financial Line
Updates a financial line on a sales order.
Delete Sales Order Financial Line
Deletes a financial line from a sales order. The order's product-line financial figures are flagged for recalculation so the removed amount drops out of prorated revenue/cost on the next computation.
Get Sales Order Accounting Transaction
Gets the accounting transaction (invoice journal) generated for a sales order, including its lines with nominal codes and tax rates, any child transactions, and a summary of its parent batch transaction. Returns `data: null` when no accounting transaction has been generated for the order yet.
Generate Sales Order Accounting Transaction
Generates — or regenerates — the accounting transaction (invoice journal) for a sales order from its current lines and financial data. Use this after correcting an order to refresh the journal without waiting for the next scheduled accounting sync.
Recalculate Sales Order Financials
Recalculates the line-level financial figures (revenue, cost of goods sold, fees, and profit) for every line on the sales order and refreshes the dependent daily financial aggregates.
Get Sales Order
Returns core sales order data for the V2 show page. Includes essential fields, addresses, channel info, totals, counts, custom fields, financial lines, tags, discounts, credits, RMAs, and purchase orders.
Update Sales Order
Updates a sales order. Accepts a partial payload — only the provided fields are applied.
Get Sales Order Details
Returns the complete order graph for a single sales order: header fields, line items with inventory and cost-of-goods breakdowns, fulfillments (with shipment lines and tracking), payments, notes, financial lines, discounts, addresses, linked purchase orders, and backorder coverage dates.
Delete Sales Order
Deletes a sales order along with its dependent records (lines, fulfillments, allocations, payments). Inventory consumed by the order is released back to stock.
Get Sales Order Line Items
Returns line items with full product details, inventory, allocations, and warehouse info. Pre-loads realtime inventory for all products in a single query. Loaded in parallel with show.
Get Customer Details
Returns customer details for the customer drawer. Includes total orders, lifetime value, recent orders, and all addresses. Loaded on-demand when the user clicks the customer name.
Get Activity Log
Returns paginated activity log for the sales order, including activities on the order, its lines, and fulfillments.
Get Inventory Movements
Returns paginated inventory movements for the sales order. Includes movements from order lines, fulfillments, fulfillment lines, and related adjustments.
Get Allocations
Returns paginated inventory allocations for all lines in the sales order.
Get Channel Items
Fetches raw marketplace order item data for the channel tab. Returns original order item data from the sales channel (Amazon order items, Shopify line items, etc.) keyed by marketplace order item ID.
Update Channel Mappings
Updates the sales channel line ID mappings for sales order lines. Set sales_channel_line_id to null to unlink a line from its channel item.
Get Sales Order Financials (Proforma)
Recalculates and returns proforma (on-the-fly) line-level financials for a single sales order. The endpoint runs the API::calculate for the order before responding, so figures always reflect current FIFO cost assignments — including the bundle cost-based revenue correction.
Get Backorder Detail for Line
Returns lazy-loaded backorder detail for a sales order line. Includes release sources (what freed up stock), PO coverage info, and remaining backorder breakdown. Called on badge click — not on list load.
Get Next Backorder Schedule
Returns the next scheduled fill_backorders runs (up to 3) for countdown display. Optionally filtered by supplier to find schedules relevant to a specific product's supplier.
Create PO from Backorder
Creates a draft purchase order from a backordered sales order line. Uses the line's product's primary supplier and the shortage quantity (planned allocations without PO coverage).
List Sales Orders
Paginated sales order listing for the list view (Spatie QueryBuilder).
Export Sales Orders
Exports the sales order list view as an XLSX or CSV file download.
Download Import Template
Downloads an XLSX import template with headers, sample data, a field guide, and reference data from the tenant's account.
Validate Import
Validates mapped import rows and returns a grouped preview. No side effects — safe to call repeatedly.
Import Sales Orders
Executes the import — creates or updates sales orders from validated/grouped data (the output of the Validate Import endpoint).
Bulk Close Sales Orders
Bulk closes one or more sales orders by transitioning their order_status to `closed`.
Bulk Delete Sales Orders (Tracked)
Bulk deletes sales orders with progress tracking. Dispatches a background job and returns a `tracked_job_log_id` to poll via the tracked job log endpoints.
Bulk Delete Sales Orders
Bulk deletes sales orders in the background. IDs are resolved either from an explicit `ids` array or from a `filters` payload, then chunked (1000 per job) and dispatched as a job batch. Orders without return receipts are deleted first; orders with return receipts are deleted in a second batch.
Create Sales Order
Creates a sales order, optionally with an embedded customer, shipping/billing addresses, line items, line-level discounts, and financial lines (shipping, fees, etc.). Orders can be created as drafts and approved later, or opened immediately.
Bulk Email Customers About Orders
Dispatches a tracked background job that emails customers about their selected sales orders. Multiple orders for the same customer (same store + email, case-insensitive) are grouped into a single email (Cin7 Omni model). Recipients without a resolvable email and opted-out customers are suppressed. The send is capped at `config('mail.bulk_sales_order_recipient_cap')` distinct recipients (default 5000); overflow recipients are reported via the job's `skipped_overflow` result and a warning log — never silently dropped. Every send is written to the order's activity log under one batch.
Preview Bulk Customer Email
Resolves and groups a bulk-email selection without sending anything, powering the confirmation dialog's recipient summary and a masked sample render. Accepts the exact same body as `POST /sales-orders/bulk-email`.
List Order Shipments
Lists ALL shipments (SalesOrderFulfillments) for a sales order, used by the order's Fulfillment tab. Includes VOIDED shipments: a voided shipment carries a non-null `voided_at` (plus `void_reason` and `voided_by`) and `status=canceled` — it was reversed and its fulfillment order reopened, but is kept for history. The UI buckets voided shipments into a read-only 'Voided' filter and excludes them from the active lifecycle counts. Each shipment exposes its `fulfillment_lines`, warehouse, shipping method, tracking, and provider-sync timestamps.
Get Sales Order Backorder Coverage
Gets backorder coverage data for a sales order — whether any of its lines are backordered, and the expected-arrival window of the incoming purchase orders that cover those backorders.
Get Sales Order Channel Document
Gets the original sales-channel order document for a sales order — the raw order snapshot imported from the connected marketplace or cart (Shopify, Amazon, etc.).
Download Sales Orders Export
Downloads a completed background export produced by Export Sales Orders (queued path). The filename is the one reported in the tracked job log's results.file field.