GET api/v1/documents

Returns the documents requested in base64 format.

Request Information

URI Parameters

NameDescriptionTypeAdditional information
document_type

Document Type Requested

document_type

Required

reference1

  • Proof Of Delivery: list of tracking numbers, separated by comma (maximum allowed: 100).
  • Commercial Invoice: list of order numbers, separated by comma (maximum allowed: 100).
  • Packing List: list of order numbers, separated by comma (maximum allowed: 100).
  • SLI: list of order numbers, separated by comma (maximum allowed: 100).

string

Required

reference2

  • Proof Of Delivery: Output format, when available from carrier (Fedex: [PDF or PNG]). Empty is default.

string

None.

fields

Limit which fields are returned by the API. Ignored when null or empty (example: 'reference1,content')

string

None.

Body Parameters

None.

Response Information

Resource Description

response_get_documents
NameDescriptionTypeAdditional information
error_code

Zero if no errors. See 'error_message' for a detailed description of the error.

integer

None.

error_message

Returns a detailed description of the error.

string

None.

documents

List of documents returned.

Collection of document

None.

Response Formats

application/json, text/json

Sample:
{
  "error_code": 0,
  "error_message": "",
  "documents": [
    {
      "reference1": "638584286549",
      "description": "POD Letter",
      "content_type": "application/pdf",
      "content": "wAAACwAAAAADwAPAAACIISPeQHsrZ5ModrLlN48CXF8m2iQ3YmmKqVlRtW4ML...",
      "delivered_date": "2011-10-12"
    }
  ]
}