v1

latestOpenAPI 3.1.0Proprietary2026-07-24710198.3 KB
Commercial Invoice

Create a Commercial Invoice

Generate a commercial invoice document for an international shipment, detailing the goods, their value, and customs information required for cross-border clearance.

When to use: Call this endpoint when shipping internationally and the carrier or destination country requires a commercial invoice. This is typically needed alongside or after label generation.

Prerequisites:

  • Valid JWT authentication token (Bearer)
  • Complete origin and destination addresses (including country)
  • Shipment details with carrier and tracking number
  • Package contents: item descriptions, quantities, unit values, weight, and HS codes

Key behaviors:

  • Returns a downloadable commercial invoice PDF URL
  • USD is the recommended currency to avoid issues during customs inspections
  • Each item should include an HS code for proper tariff classification (use /utils/classify-hscode if needed)
  • The invoice is attached to the shipment and can be uploaded to the carrier via /ship/uploadDocuments
post/ship/commercial-invoice

Request body

Example request

{
  "origin": {
    "name": "Juan Pérez",
    "company": "Envia Corp",
    "email": "juan.perez@example.com",
    "phone_code": "+52",
    "phone": "8180000000",
    "street": "Av. Revolución 500",
    "number": "500",
    "district": "Centro",
    "city": "Monterrey",
    "state": "NL",
    "country": "MX",
    "postalCode": "64060",
    "reference": "Frente al parque",
    "address_id": 12345,
    "identificationNumber": "XAXX010101000",
    "category": 1
  },
  "destination": {
    "name": "María García",
    "company": "Tienda Online SA",
    "email": "maria.garcia@example.com",
    "phone_code": "+52",
    "phone": "8180000000",
    "street": "Calle Reforma 123",
    "number": "123",
    "district": "Coyoacán",
    "city": "Ciudad de México",
    "state": "CX",
    "country": "MX",
    "postalCode": "04530",
    "reference": "Edificio azul, piso 3",
    "address_id": 12345,
    "identificationNumber": "XAXX010101000",
    "category": 1
  },
  "shipment": {
    "carrier": "fedex",
    "trackingNumber": "7520610403"
  },
  "packages": [
    {
      "items": [
        {
          "description": "Wireless headphones",
          "productCode": "8518.30",
          "countryOfManufacture": "CN",
          "quantity": 2,
          "price": 45
        }
      ]
    }
  ],
  "customsSettings": {
    "dutiesPaymentEntity": "receiver",
    "exportReason": "sale"
  }
}

Response

Commercial invoice created successfully

metastring