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.
orders:writeGrant 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_allis true): Sales order IDs to target. Each ID must exist. - apply_to_all (boolean, optional): When true, target every sales order matching
filtersinstead ofids.falsenever widens the selection. - filters (object, optional, used only with
apply_to_all: true): The same filters as List Sales Orders (flat filter keys such aspre_tracking_open,search, orfilter_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
- 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 Entity
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.