Invoices
The Invoices resource allows a user to retrieve an itemized list of credits and debits for all of their processed shipments and overpacks. Invoices can be generated every day if necessary. When searching for invoices the results will include all invoices where created
is within the date_start
and date_end
search parameters inclusive.
Actions
GET /invoices |
Retrieves a paginated list of invoices |
GET /invoices/{id} |
Retrieves an invoice or PDF |
Properties
created |
|
currency |
|
end_date |
|
id |
|
name |
|
start_date |
|
total |
|
GET
/invoices
Retrieves a paginated list of invoices
date_end |
The inclusive date to end the search in YYYY-MM-DD format. Default is "now". |
date_start |
The inclusive date to begin the search in YYYY-MM-DD format. Default is 1 year ago. |
limit |
The number of results to return. Max: 100. Default: 50. |
order |
The order of the results. Can be "asc" for ascending, or "desc" for descending. Default: desc. |
page |
The page number of the results. Default: 1. |
request
GET /invoices
date_start=&date_end=&page=1=&limit=50&order=desc
response
HTTP/1.1 200 OK
{ "invoices": [{ "created": "2021-09-03 13:57:13", "currency": "USD", "end_date": "2021-08-29", "id": 123790, "name": "2021-W34", "start_date": "2021-08-23", "total": 450.86 }, { "created": "2021-09-03 13:57:13", "currency": "CAD", "end_date": "2021-08-29", "id": 123789, "name": "2021-W34", "start_date": "2021-08-23", "total": 770.52 }] }
GET
/invoices/{id}
Retrieves an invoice or download the PDF if
type=PDF
. Invoices before 2021-10-31 will not have a PDF.
type |
"PDF" is the only option. |
request
GET /invoices/123790
response
HTTP/1.1 200 OK
{ "created": "2021-09-03 13:57:13", "currency": "USD", "end_date": "2021-08-29", "id": 123790, "name": "2021-W34", "start_date": "2021-08-23", "total": 450.86 }
request
GET /invoices/123790
type=pdf
response
HTTP/1.1 200 OK
[blob]