Get Sales Order Purchase Order Split
GET/api/spscommerce/sales-orders/:salesOrder/purchase-order-split
Get the split EDI purchase order (850) a sales order came from. When a retailer's purchase order ships to several stores, SKU.io creates one sales order per distribution center or per store; this returns the purchase order, how it was split, where this sales order sits among its siblings, every sibling with its DC or store, stores and units, and the stores each of this order's lines is for.
orders:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Response (data):
- purchase_order: id, po_number, integration_instance_id, partner_name (the order's customer, else the 850's buyer)
- split_by: distribution_center or store
- position / count: this order is position of count
- sales_orders: each sibling — id and sales_order_number (null while still being created), order_status, is_current, location_code, location_name, quantity, stores (location_code, name, quantity) and store_codes (null on a per-store split)
- line_stores: keyed by this order's sales order line ID, the stores that line's quantity is for (location_code, name, quantity)
data is null when the sales order did not come from a split purchase order (any other order, or an 850 that converted as one sales order). Store and DC names come from the connection's location directory; a code with no entry has a null name.
Request
Responses
- 200
- 401
- 403
- 404
- 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.
Not Found
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.