# Electronic Trade Document

The Electronic Trade Document API facilitates uploading electronic trade documents for international shipments.<br/>These APIs support faster customs processing by enabling required trade information to be captured and shared electronically at earlier stages of the shipment.

## Upload Electronic Trade Document

 - [POST /api/v1/importUrl](https://docs.sendpro360.pitneycloud.com/openapi/shipping/electronic-trade-document/uploadetd.md): 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.

