Skip to content

Upload Electronic Trade Document

Request

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:

  • FedEx supports ETD with the special service ELECTRONIC_TRADE_DOCUMENTS.
  • DHL Express supports ETD with the special service PAPERLESS.
  • 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.
Security
bearerAuth
Bodyapplication/jsonrequired
carrierAccountIdstringrequired

A unique identifier for the carrier account to which the document will be uploaded.

Example:"vO396rorMdxZ8k1"
shipmentDocumentsArray of objects, non-emptyrequired

List of electronic trade documents to be uploaded for the shipment.

curl -i -X POST \
  https://api-sandbox.sendpro360.pitneybowes.com/shipping/api/v1/importUrl \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "carrierAccountId": "vO396rorMdxZ8k1",
    "shipmentDocuments": [
      {
        "fileName": "string",
        "format": "PDF",
        "documentType": "INVOICE",
        "contentType": "DOCUMENT_REFERENCE"
      }
    ]
  }'

Responses

The pre-signed S3 upload url is generated successfully.

Bodyapplication/json
Array [
fileNamestring

The original name of the electronic document to be uploaded.

Example:"invoice.pdf"
s3FileIdstring

The internal relative file path in the S3 bucket. This ID is used when referencing the document in the customsDocuments object during shipment creation.

Example:"uploads/shipping/intl_docs/.../invoice.pdf"
urlstring, (url)

A pre-signed Amazon S3 URL used to upload the actual binary file via an HTTP PUT request. This URL is securely generated by the server. It allows direct upload to the S3 bucket without requiring AWS credentials or additional authentication.
To complete the document upload process:

  • Copy the URL and create a new request to this URL.
  • Perform an HTTP PUT request to this URL.
  • Set the request body to the binary content and select the same file whose metadata was previously submitted.
    Once the upload is complete, the document is stored in the specified S3 location and can be referenced later using the s3FileId.
Example:"https://s3-url-with-signature"
]
Response
[ { "fileName": "invoice.pdf", "s3FileId": "uploads/shipping/intl_docs/.../invoice.pdf", "url": "https://s3-url-with-signature" } ]