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
s3FileIdused 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
s3FileIdin Create International Shipment API undercustomsDocumentsobject.
- Sandbox Serverhttps://api-sandbox.sendpro360.pitneybowes.com/shipping/api/v1/importUrl
- Production Server (uses live data)https://api.sendpro360.pitneybowes.com/shipping/api/v1/importUrl
- Sandbox Server for Canadahttps://api-ppd.shipping360.pitneybowes.com/ca/shipping/api/v1/importUrl
- Production Server for Canadahttps://api.shipping360.pitneybowes.com/ca/shipping/api/v1/importUrl
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"
}
]
}'The pre-signed S3 upload url is generated successfully.
The internal relative file path in the S3 bucket. This ID is used when referencing the document in the customsDocuments object during shipment creation.
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 thes3FileId.
[ { "fileName": "invoice.pdf", "s3FileId": "uploads/shipping/intl_docs/.../invoice.pdf", "url": "https://s3-url-with-signature" } ]