Documents
Get commercial invoice
The commercial invoice of a cross-border order, as a PDF.
GET
/v1/orders/{orderId}/commercial-invoiceBearer tokenReturns a PDF fileSuccess 200
Only for a cross-border order with customs details.
Request
Headers
| Field | Type | Description |
|---|---|---|
Authorizationrequired | string | The access token from Get token, as "Bearer <token>". |
Path parameters
| Field | Type | Description |
|---|---|---|
orderIdrequired | string | The order's id (the UUID, not the short Order ID). |
Example request
curl -X GET "https://api.swiftazu.com/v1/orders/dffcd25d-6eb3-4b90-868c-6deca160ad74/commercial-invoice" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
--output getCommercialInvoice.pdfResponse
The response body is the PDF file itself (Content-Type: application/pdf), not JSON.
Errors
| HTTP | Code | Meaning |
|---|---|---|
| 404 | order_not_found | No order of yours has this id or air waybill number. |
| 404 | document_unavailable | The file could not be read. Try again. |
| 400 | not_cross_border | The document exists only for a cross-border order. |
| 400 | invalid_request | The request broke a business rule. message says which one. |
Every call can also return the shared errors listed on the Overview page. Overview