Skip to main content

Preview Mark Sales Orders Shipped Before Tracking

POST 

/api/sales-orders/mark-shipped-before-tracking/preview

Previews marking sales orders as shipped before inventory tracking, without changing any data. Use it for orders placed before your inventory start date that physically shipped back then but were never marked fulfilled — marking them here closes them without deducting stock the opening count already excluded.

Required scope: orders:write

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

Authentication: Requires Bearer token with the sales_orders.fulfill permission.

Request body fields:

  • ids (array of integers, required unless apply_to_all is true): Sales order IDs to target. Each ID must exist.
  • apply_to_all (boolean, optional): When true, target every sales order matching filters instead of ids. false never widens the selection.
  • filters (object, optional, used only with apply_to_all: true): The same filters as List Sales Orders (flat filter keys such as pre_tracking_open, search, or filter_groups). Omitted or empty targets every order.

Eligibility — an order is eligible when:

  • the account has an inventory start date set, and the order was placed strictly before it;
  • the order is not cancelled and at least one product line still has unshipped quantity;
  • nothing on it is already with a shipping provider, a dropship supplier, Amazon MCF, awaiting customer pickup, or mid-shipment. Ineligible reasons: not_found, no_inventory_start_date, ordered_on_or_after_start, cancelled, nothing_open, in_flight_fulfillment, submitted_to_provider, dropship_in_progress, active_mcf_order, awaiting_pickup, locked_period, failed.

Response fields:

  • inventory_start_date (string|null, Y-m-d)
  • eligible_count, ineligible_count (integer)
  • eligible_units (number): Open units that would be credited.
  • ineligible[] — sales_order_id, sales_order_number, reason, reason_label, detail (string|null)
  • units_by_product[] — product_id, sku, quantity (largest first)
  • channel_push — counts of eligible orders from Shopify (can be marked fulfilled on the channel), other channels, and no channel
  • reversible — orders that were already deducted because a channel fulfillment dated on/after the start date was recorded: order_count, fulfillment_count, units_by_product[] (units that reversing would return to stock), ineligible[] (e.g. locked_period)

Request​

Responses​

OK

Response Headers
    Content-Type