Skip to main content

List EDI Documents

GET 

/api/spscommerce/:integrationInstance/documents

Paginated list of every EDI document the connection received or sent, newest first. Each row names the purchase order it belongs to, its sales order and shipment (when it has one), the trading partner, its send status and the reason it failed.

Required scope: integrations:read

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

Authentication: Requires Bearer token.

Filters: filter[search], filter[trading_partner_id] (the partner on either side, sender or receiver), filter_groups (see query params). Sorts: id, transaction_set, direction, status, control_number, partner_reference, created_at, sent_at, received_at (default -id). Pagination: page, per_page (default 10, max 100).

Transaction sets also include an outbound 857 written before SKU.io stopped sending them (SPS now converts the 856 into an 857 for a retailer that takes one), and inbound 812 (credit/debit adjustment) and 820 (remittance advice). An 810 rendered from a sales invoice carries sales_invoice {id, sales_invoice_number} (null otherwise).

is_held is true for a document held because the connection's sync is paused; it is sent when sync resumes, or now with Resend. can_resend is also true for such a document, and for an acknowledgment (855) or ship notice (856) kept unsent while its sync was turned off, once that sync is back on.

The response also carries unfiltered_total: every row of the connection, whatever the filters.

A retailer's purchase order change (860) reads needs_review until someone decides it on its sales order, then accepted or declined; its review_url is the sales order page where that decision is made (null for other documents).

Request​

Responses​

OK

Response Headers
    Content-Type