The Invoices List View end-point provides a list of Invoices associated with the requesting user.
Request URI
GET https://pluto.cargobase.com/api/1/invoices/
Content-Type: application/json
Authorization: Token your_token_here
Status codes
| Status | Description | Resolution |
|---|---|---|
| 200 | OK | -- |
| 403 | Forbidden | check Authentication token |
Request Response definition
Results (Main message)
| Key | Value | Definition |
|---|---|---|
| shipment_reference | STRING | Cargobase Shipment ID |
| invoice_reference | STRING | Title of the Shipment, as provided by the Shipper |
| invoice_status | STRING | Current status of the shipment, see list for potential status below |
| provider_name | STRING | Name of the provider / Freight forwarder submitting the invoice |
| provider_invoice_number | STRING | A provider submitted invoice reference |
| freight_mode | STRING | Awarded Freight Mode |
| primary_tracking_number | STRING | The HAWB or main tracking number of the shipment |
| submit_date | STRING | The initial date the invoice was submitted |
| modified | STRING | The Date and Time in UTC since the most recent update to this invoice |
Invoice status options
| Status | Definition |
|---|---|
| Awaiting audit | An invoice that has been submitted, but is awaiting audit approval |
| Approved | An invoice that was approved |
| Declined | An invoice that was declined, and can be resubmitted by the provider |
| Removed | An invoice that will not be submitted |
| Canceled | An invoice that was submitted, but retracted by the provider |
| Unsubmitted | An new or draft invoice (Visible to providers only) |
"Footer"
| Key | Value | Definition |
|---|---|---|
| previous | STRING | URL to the previous page, in case page number is higher than 1 |
| record_end | INTEGER | Number of the oldest invoice on the page |
| count | INTEGER | Total number of Invoices available to the user, across all pages |
| page | INTEGER | Page number |
| record_start | INTEGER | Number of the first Invoice on the page |
| next | STRING | URL to the previous page, in case page number is lower than the highest available |
Pagination & Filters
Filter by date
Invoices can be listed based on their specific submission date, or by the current or previous month. Future updates will include more extensive filter options. To filter based on a specific date, append =submit_date=YYYY-MM-DD To filter based on last month, append =submit_date=last_month To filter based on this month, append =submit_date=this_month
Filter by status
Invoices can be listed based on their specific status, to do so the api call should include status=[status_value]
Status values
| Status | Value | Definition |
|---|---|---|
| Awaiting audit | awaiting_audit | An invoice that has been submitted, but is awaiting audit approval |
| Approved | approved | An invoice that was approved |
| Declined | declined | An invoice that was declined, and can be resubmitted by the provider |
| Removed | removed | An invoice that will not be submitted |
| Canceled | canceled | An invoice that was submitted, but retracted by the provider |
| Unsubmitted | unsubmitted | An new or draft invoice (Visible to providers only) |
Pagination
The Invoice list results are paginated with 50 results per page by default.
Results are displayed in descending order, that means that result 1 on page 1 is the newest addition.
To request a specific page append ?page=XX to the URI.
To request a specific number of items per page, append ?page_size=xx to the URI.
Example
Calling the API to show only approved invoices from last month
GET https://pluto.cargobase.com/api/1/invoices/?status=approved&submit_date=last_month
Content-Type: application/json
Authorization: Token your_token_here
Known issues
- None at this moment.