---
title: "Upload Customs Documents"
method: POST
path: "/ship/uploadDocuments"
tags: ["Commercial Invoice"]
---

# Upload Customs Documents

`POST /ship/uploadDocuments`

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

## Request body

- object
  - `carrierId` integer, required — Carrier identifier
  - `trackingNumber` string, required — Carrier tracking number
  - `documents` object[], required — List of documents to attach to the shipment
    - `typeCode` string, required — Carrier-specific document type code (e.g., COMMERCIAL_INVOICE, INV, 002)
    - `fileName` string, required — Document file name with extension (e.g., commercial_invoice.pdf)
    - `content` string, required — Base64-encoded file content

## Response `200`

Documents uploaded successfully

- object
  - `meta` string — Operation name
  - `data` object
    - `success` boolean — Indicates if the upload was successful

---

[API](https://skmtc.net/envia/apis/envia-shipping-api-complete-documentation.md) · [All operations](https://skmtc.net/envia/apis/envia-shipping-api-complete-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/envia/envia-shipping-api-complete-documentation/revisions/39f9208959d6/schema)
