Skip to main content

Download EDI Document

GET 

/api/spscommerce/:integrationInstance/documents/:document/download

Download a document as an RSX XML or RSX JSON file attachment. Every document is stored as RSX XML; the JSON file is written from it exactly as it is sent to SPS Commerce on a JSON connection (no root element, repeating groups such as line items, addresses and charges always as arrays, numeric fields as numbers).

Required scope: integrations:read

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

Authentication: Requires Bearer token.

Query: format (optional) — xml or json. Without it the file is in the connection's document_format, which defaults to xml.

Response: the file, with Content-Type application/xml or application/json and a filename such as 810-000000118.json.

Errors: 404 when the document belongs to another connection or has no content yet; 422 when format is not xml or json, or when the stored content cannot be written as JSON (for example a non-RSX document).

Request​

Responses​

OK

Response Headers
    Content-Type
    Content-Disposition