Upload Electronic Trade Document

Electronic Trade Documents Upload API is an international shipping document upload solution that simplifies global shipping needs and allows you to electronically upload customs documentation required for international shipments. You can submit most of your trade documents electronically relieving yourself from printing or attaching trade documents with the shipment.
This API simplifies and accelerates customs clearance by replacing physical paperwork with electronic documentation.
The customs and other agencies receive electronically sent documents faster than paper copies attached with your shipment. The customs clearance process is also optimized as capturing and sharing of critical trade information is done at earlier stages of shipping.

Note:

  • In certain scenarios, the originals of specific international documents still need to be attached to the package.
  • For smooth customs clearance and to avoid delays, ensure that the documents are visually clear and not distorted in any way.

How the Workflow Operates

Step 1: Submit Electronic Trade Document Metadata

Initiate the process by making a POST request to the ETD Upload API with the document metadata (e.g., file name, document type, and content type).
In response, the system returns:

  • A pre-signed S3 upload URL (url)
  • A fileName
  • A relative s3FileId used to reference the uploaded document later

Step 2: Upload the Document File

After receiving the response, you must perform a separate HTTP PUT request to the provided url.

  • This request must upload the binary content of the file (e.g., PDF or image)

  • Upload the same file whose metadata was submitted in step-1

Step 3: Reference the Document in Shipment Creation

Once the ETD uploaded successfully, the document is stored in the S3 bucket.

  • Once uploaded, the document is stored in the S3 bucket and can later be referenced via the s3FileId in Create International Shipment API under customsDocuments object.
SecuritybearerAuth
Request
Request Body schema: application/json
format
required
string

The format of the file to be uploaded.

Value: "PDF"
name
required
string

The name of the file to be uploaded.

carrierAccountId
required
string

A unique identifier associated with the Carrier account used by client users during shipment process.

documentType
required
string

Type of the electronic trade document to be uploaded .

Enum: "INVOICE" "COMMERCIAL_INVOICE" "PROFORMA_INVOICE" "CERTIFICATE_OF_ORIGIN" "NAFTA_CERTIFICATE_OF_ORIGIN" "CUSTOMS_DECLARATION_FORM" "AIR_WAYBILL_AND_WAYBILL"
Responses
200

The pre-signed S3 upload url is generated successfully.

400

Invalid request.

401

The request could not be authorized.

404

The requested resource was not found.

500

The request could not be completed due to an internal error.

post/api/v1/importUrl
Request samples
application/json
{
  • "format": "PDF",
  • "name": "string",
  • "carrierAccountId": "string",
  • "documentType": "INVOICE"
}
Response samples
application/json
{}