Skip to main content

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.

Required scope: orders:read

Grant 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​

OK

Response Headers
    Content-Type