post
https://api-test.envia.com/ship/commercial-invoice
Generate an Envia commercial invoice PDF for an international label you already created.
When to use: After /ship/generate, when the carrier or destination needs a commercial invoice. FedEx and DHL Express return their own invoice in data[].additionalFiles of /ship/generate, so this call is not needed for them. For UPS (ups2), call it right after the label.
Prerequisites:
- Valid JWT authentication token (Bearer)
- A label that belongs to your account and is not cancelled (
shipment.carrier+shipment.trackingNumber). Otherwise error1127is returned. - Every package must include
amount,declaredValue,totalWeight,cost,cubicMetersanditems
Key behaviors:
- The PDF is built only from this request. Nothing is copied from the
/ship/generaterequest. - The invoice is always in English. For FedEx, DHL, UPS and most carriers, amounts are printed in USD. Send
settings.currency: "USD"when prices are in USD; otherwise prices are converted frompackages[].currency. priceis a unit price. Line subtotal = price × quantity × packageamount.- If
customsSettings.exportReasonis omitted, the invoice prints "Sample". Sendsalefor commercial shipments. - The "Tax ID" lines print
origin.taxId/destination.taxId, notidentificationNumber. - No charge is applied. Calling it again for the same tracking number replaces the PDF at the same URL (and, for UPS, sends it to UPS again).
- The PDF URL does not expire. It is also returned later as
bol_fileby the Queries API (GET /guide/{tracking_number}).
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
