Create a 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 error 1127 is returned.
  • Every package must include amount, declaredValue, totalWeight, cost, cubicMeters and items

Key behaviors:

  • The PDF is built only from this request. Nothing is copied from the /ship/generate request.
  • 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 from packages[].currency.
  • price is a unit price. Line subtotal = price × quantity × package amount.
  • If customsSettings.exportReason is omitted, the invoice prints "Sample". Send sale for commercial shipments.
  • The "Tax ID" lines print origin.taxId / destination.taxId, not identificationNumber.
  • 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_file by the Queries API (GET /guide/{tracking_number}).
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
origin
object
required

Origin address information

destination
object
required

Destination address information

shipment
object
required

Shipment information

packages
array of objects
required

List of packages

packages*
customsSettings
object
required

Customs settings for international shipments

settings
object

Invoice options

Response

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json