Envia.com Commercial Invoice API

The Commercial Invoice API from Envia.com — 2 operation(s) for commercial invoice.

Operations 2

POST /ship/commercial-invoice Create a Commercial Invoice #
POST /ship/uploadDocuments Upload Customs Documents #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/envia:envia-commercial-invoice-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

envia-commercial-invoice-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Envia Shipping API — Complete Documentation Commercial…
  version: v2.3.0
  description: 'Shipping API to connect with over 100 couriers worldwide. Shipping made simple for e-commerces and enterprises. Envia''s Shipping Web Services offers solutions that applications can use to quote, create labels, request pickups, track packages, cancel shipments and many other logistics operations in USA, Mexico, Colombia, Brazil, India, Canada, Argentina, Chile, Guatemala, Spain, Italy and France. This API is built for e-commerce platforms, logistics teams, and enterprise applications that need a single integration to access multi-carrier shipping capabilities. Core features include real-time rate comparison, label generation, package tracking, pickup scheduling, shipment cancellation, and webhook-based event notifications.


    **Important Information:**

    - State codes must be 2 digits

    - Country codes must be 2 digits

    - Validate the shipping address structure

    - Make sure the zip code or locality are correct


    **Custom Keys:** Custom Keys are used when you have a direct account with a carrier. This way you create labels with your rates with an additional small fee for service.'
  contact:
    name: Envia API Support
    url: https://docs.envia.com/discuss
  license:
    name: Proprietary
    url: https://www.envia.com/terminos-y-condiciones
  termsOfService: https://www.envia.com/terminos-y-condiciones
servers:
- url: https://api-test.envia.com
  description: Sandbox/Test
- url: https://api.envia.com
  description: Production
security:
- bearerAuth: []
tags:
- name: Commercial Invoice
paths:
  /ship/commercial-invoice:
    post:
      tags:
      - Commercial Invoice
      summary: Create a Commercial Invoice
      description: '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`'
      operationId: create-commercial-invoice
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - origin
              - destination
              - shipment
              - packages
              - customsSettings
              properties:
                origin:
                  type: object
                  required:
                  - name
                  - phone
                  - street
                  - city
                  - state
                  - country
                  - postalCode
                  description: Origin address information
                  properties:
                    name:
                      type: string
                      description: Name of the person
                      example: Juan Pérez
                    company:
                      type: string
                      description: Name of the company or business
                      example: Envia Corp
                    email:
                      type: string
                      format: email
                      description: Email address
                      example: juan.perez@example.com
                    phone_code:
                      type: string
                      description: Country phone code
                      example: '+52'
                    phone:
                      type: string
                      description: Phone number
                      pattern: ^\+?[0-9\s\-()]+$
                      example: '8180000000'
                    street:
                      type: string
                      description: Street address
                      example: Av. Revolución 500
                    number:
                      type: string
                      description: Street number
                      example: '500'
                    district:
                      type: string
                      description: District or neighborhood
                      example: Centro
                    city:
                      type: string
                      description: City name
                      example: Monterrey
                    state:
                      type: string
                      description: State or province code (e.g., NL, TX, QC)
                      example: NL
                      minLength: 2
                      maxLength: 3
                    country:
                      type: string
                      description: ISO 3166-1 alpha-2 country code (e.g., MX, US, CO)
                      example: MX
                      pattern: ^[A-Z]{2}$
                      minLength: 2
                      maxLength: 2
                    postalCode:
                      type: string
                      description: Zipcode value
                      example: '64060'
                      minLength: 3
                      maxLength: 10
                    reference:
                      type: string
                      description: Reference information for delivery
                      example: Frente al parque
                    address_id:
                      type: integer
                      description: Unique identifier of a previously saved address in your Envia account. When provided, the saved address data is used and you can omit the other address fields. Retrieve saved address IDs from the Queries API (Get All Addresses).
                      example: 12345
                    identificationNumber:
                      type: string
                      description: Tax identification number
                      example: XAXX010101000
                    category:
                      type: integer
                      description: Address category
                      example: 1
                destination:
                  type: object
                  required:
                  - name
                  - phone
                  - street
                  - city
                  - state
                  - country
                  - postalCode
                  description: Destination address information
                  properties:
                    name:
                      type: string
                      description: Name of the person
                      example: María García
                    company:
                      type: string
                      description: Name of the company or business
                      example: Tienda Online SA
                    email:
                      type: string
                      format: email
                      description: Email address
                      example: maria.garcia@example.com
                    phone_code:
                      type: string
                      description: Country phone code
                      example: '+52'
                    phone:
                      type: string
                      description: Phone number
                      pattern: ^\+?[0-9\s\-()]+$
                      example: '8180000000'
                    street:
                      type: string
                      description: Street address
                      example: Calle Reforma 123
                    number:
                      type: string
                      description: Street number
                      example: '123'
                    district:
                      type: string
                      description: District or neighborhood
                      example: Coyoacán
                    city:
                      type: string
                      description: City name
                      example: Ciudad de México
                    state:
                      type: string
                      description: State or province code (e.g., NL, TX, QC). Retrieve valid codes from the Queries API (Get States by Country).
                      example: CX
                      minLength: 2
                      maxLength: 3
                    country:
                      type: string
                      description: ISO 3166-1 alpha-2 country code (e.g., MX, US, CO)
                      example: MX
                      pattern: ^[A-Z]{2}$
                      minLength: 2
                      maxLength: 2
                    postalCode:
                      type: string
                      description: Zipcode value
                      example: '04530'
                      minLength: 3
                      maxLength: 10
                    reference:
                      type: string
                      description: Reference information for delivery
                      example: Edificio azul, piso 3
                    address_id:
                      type: integer
                      description: Unique identifier of a previously saved address in your Envia account. When provided, the saved address data is used and you can omit the other address fields. Retrieve saved address IDs from the Queries API (Get All Addresses).
                      example: 12345
                    identificationNumber:
                      type: string
                      description: Tax identification number
                      example: XAXX010101000
                    category:
                      type: integer
                      description: Address category
                      example: 1
                shipment:
                  type: object
                  required:
                  - carrier
                  - trackingNumber
                  description: Shipment information
                  properties:
                    carrier:
                      type: string
                      description: Carrier name
                      example: fedex
                    trackingNumber:
                      type: string
                      description: Tracking number generated when making the shipment
                      example: '7520610403'
                packages:
                  type: array
                  description: List of packages
                  items:
                    type: object
                    required:
                    - items
                    properties:
                      items:
                        type: array
                        description: List of items in the package
                        items:
                          type: object
                          required:
                          - description
                          - productCode
                          - quantity
                          - price
                          properties:
                            description:
                              type: string
                              description: Description of the item
                              minLength: 1
                              example: Wireless headphones
                            productCode:
                              type: string
                              description: HS Code of the item
                              example: '8518.30'
                            countryOfManufacture:
                              type: string
                              description: Country where item was manufactured (ISO 3166-1 alpha-2 country code)
                              pattern: ^[A-Z]{2}$
                              minLength: 2
                              maxLength: 2
                              example: CN
                            quantity:
                              type: integer
                              description: Quantity of the items
                              minimum: 1
                              example: 2
                            price:
                              type: number
                              description: Unit price of the item
                              minimum: 0
                              example: 45
                customsSettings:
                  type: object
                  required:
                  - dutiesPaymentEntity
                  description: Customs settings for international shipments
                  properties:
                    dutiesPaymentEntity:
                      type: string
                      enum:
                      - sender
                      - recipient
                      description: Payer of duties (Sender or Recipient)
                      example: receiver
                    exportReason:
                      type: string
                      enum:
                      - sale
                      - gift
                      - sample
                      - return
                      - personal_effects
                      description: Export type reason (Sale, Gift, Sample, Return, Personal effects)
                      example: sale
            example:
              origin:
                name: Pedro Garcia
                company: Tendencys
                email: pedro.garcia@envia.com
                phone_code: '52'
                phone: '8113219177'
                street: Belisario dominguez
                number: '2470'
                district: Centro
                city: Monterrey
                state: NL
                country: MX
                postalCode: '64060'
                reference: Esquina con portón negro
                address_id: 4346032
                identificationNumber: XAXX010101000
              destination:
                name: Federico Llaguno - Madrid
                company: Company Name
                email: karine.ruby@example.com
                phone_code: ES
                phone: '679223722'
                street: C. del Moscatelar
                number: '18'
                district: ''
                city: Madrid
                state: M
                country: ES
                postalCode: '28043'
                reference: puerta roja
                address_id: 1510003
                identificationNumber: XAXX010101000
              shipment:
                carrier: dhl
                trackingNumber: '794929929630'
              packages:
              - items:
                - description: blue jeans to wear for kids made of cotton
                  productCode: 6204.62.3190
                  quantity: 1
                  countryOfManufacture: MX
                  price: 20
                - description: cotton shirt L size
                  productCode: 6206.30.0090
                  quantity: 2
                  countryOfManufacture: MX
                  price: 3
              customsSettings:
                dutiesPaymentEntity: recipient
                exportReason: sale
      responses:
        '200':
          description: Commercial invoice created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: string
                    default: billoflading
                  data:
                    type: object
                    properties:
                      carrier:
                        type: string
                        description: Carrier code that generated the commercial invoice document
                      trackingNumber:
                        type: string
                        description: Associated tracking number
                      billOfLading:
                        type: string
                        description: URL to download the generated commercial invoice PDF
  /ship/uploadDocuments:
    post:
      tags:
      - Commercial Invoice
      summary: Upload Customs Documents
      description: 'Upload customs-related documents (such as a commercial invoice) to an existing international shipment so the carrier can process customs clearance.


        **When to use:** Call this endpoint after generating a label and a commercial invoice for an international shipment. Some carriers require documents to be uploaded separately before the package can clear customs.


        **Prerequisites:**

        - Valid JWT authentication token (Bearer)

        - A carrier ID and tracking number from a previously generated international shipment

        - One or more document URLs (e.g., the commercial invoice PDF returned by `/ship/commercial-invoice`)


        **Key behaviors:**

        - Accepts documents as URLs pointing to PDF files

        - Supported carriers include FedEx, DHL, and UPS (carrier support may vary by origin country)

        - Returns a confirmation indicating whether the documents were successfully attached to the shipment

        - Documents must be uploaded before the carrier''s cutoff time for the shipment to avoid delays'
      operationId: upload-customs-documents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - carrierId
              - trackingNumber
              - documents
              properties:
                carrierId:
                  type: integer
                  description: Carrier identifier
                  example: 1
                trackingNumber:
                  type: string
                  description: Carrier tracking number
                  example: '7520610403'
                documents:
                  type: array
                  description: List of documents to attach to the shipment
                  items:
                    type: object
                    required:
                    - typeCode
                    - fileName
                    - content
                    properties:
                      typeCode:
                        type: string
                        description: Carrier-specific document type code (e.g., COMMERCIAL_INVOICE, INV, 002)
                        example: COMMERCIAL_INVOICE
                      fileName:
                        type: string
                        description: Document file name with extension (e.g., commercial_invoice.pdf)
                        example: commercial_invoice.pdf
                      content:
                        type: string
                        description: Base64-encoded file content
                        example: JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC...
            examples:
              FedEx_MX:
                summary: FedEx - Origin Mexico
                value:
                  carrierId: 1
                  trackingNumber: '794966390773'
                  documents:
                  - typeCode: COMMERCIAL_INVOICE
                    fileName: commercial_invoice.pdf
                    content: base64file
              DHL_CO:
                summary: DHL - Origin Colombia
                value:
                  carrierId: 95
                  trackingNumber: '5817068283'
                  documents:
                  - typeCode: INV
                    fileName: commercial_invoice.pdf
                    content: base64file
              UPS_CA:
                summary: UPS - Origin Canada
                value:
                  carrierId: 171
                  trackingNumber: 1ZXXXXXXXXXXXXXXXX
                  documents:
                  - typeCode: '002'
                    fileName: commercial_invoice.pdf
                    content: base64file
      responses:
        '200':
          description: Documents uploaded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: string
                    description: Operation name
                    example: uploadDocuments
                  data:
                    type: object
                    properties:
                      success:
                        type: boolean
                        description: Indicates if the upload was successful
                        example: true
              examples:
                Success:
                  summary: Successful upload
                  value:
                    meta: uploadDocuments
                    data:
                      success: true
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Full Envia API Documentation
  url: https://docs.envia.com
x-provenance:
  method: searched
  source: https://docs.envia.com/reference
  harvested: '2026-10-27'
  tool: harvest-readme-openapi.py
  note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
  assembled_from:
  - https://docs.envia.com/reference/cancel-shipment.md
  - https://docs.envia.com/reference/classify-hs-code.md
  - https://docs.envia.com/reference/create-commercial-invoice.md
  - https://docs.envia.com/reference/create-shipping-label.md
  - https://docs.envia.com/reference/create-shipping-manifest.md
  - https://docs.envia.com/reference/locatecolombiacity.md
  - https://docs.envia.com/reference/schedule-pickup.md
  - https://docs.envia.com/reference/shipping-rates.md
  - https://docs.envia.com/reference/test-webhook-endpoint.md
  - https://docs.envia.com/reference/track-shipments.md
  - https://docs.envia.com/reference/upload-customs-documents.md
  merge:
    pages: 11
    deduped: 10
    conflicts_kept_first: 0