v1

latestOpenAPI 3.1.0Proprietary2026-07-24710198.3 KB
Commercial Invoice

Upload Customs Documents

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
post/ship/uploadDocuments

Request body

carrierIdinteger required

Carrier identifier

trackingNumberstring required

Carrier tracking number

Example request

{
  "carrierId": 1,
  "trackingNumber": "7520610403",
  "documents": [
    {
      "typeCode": "COMMERCIAL_INVOICE",
      "fileName": "commercial_invoice.pdf",
      "content": "JVBERi0xLjQKJeLjz9MKMSAwIG9iago8PC..."
    }
  ]
}

Response

Documents uploaded successfully

metastring

Operation name

Example response

{
  "meta": "uploadDocuments",
  "data": {
    "success": true
  }
}