# FedEx Electronic Trade Documents Upload

### <span style="color: rgb(243, 103, 68);">**Overview**</span>

Simplify your international shipping by electronically submitting customs documents **after** creating your shipping label. With [FedEx Electronic Trade Documents](https://www.fedex.com/en-us/electronic-trade-documents/post-shipment-document-upload.html), you can streamline customs processing and avoid manual paperwork.

#### <span style="color: rgb(243, 103, 68);">**Key Benefits**</span>

✅ **Avoid Customs Delays** – Submit customs documents early for broker review, preventing delays and rejections.  
✅ **Ensure Timely Delivery** – Get packages delivered on time with a smoother customs process.  
✅ **Flexible Submission** – Upload documents **before, during, or after** shipment to match your workflow.  
✅ **Focus on Packing** – Let your shipping team concentrate on preparing shipments while customs documents are processed digitally.

#### <span style="color: rgb(243, 103, 68);">**How It Works**</span>

##### <span style="color: rgb(243, 103, 68);">📤 </span>**Submit Customs Documents via API**

**Endpoint:** `api/couriers/v1/Fedex/add-customs-documents`

```JSON
{ 
    "testing": false, 
    "auth_company": "company", 
    "carrier_code": "FDXE", 
    "form_code": "", 
    "tracking_number": "794606723637", 
    "shipment_date": "2024-02-22T12:05:45+00:00", 
    "origin_country_code": "US", 
    "destination_country_code": "IN", 
    "origin_location_code" : "", 
    "destination_location_code" : "", 
    "documents": [ 
        { 
            "ship_document_type": "COMMERCIAL_INVOICE", 
            "filename" : "text.txt", 
            "content_type" : "text/plain", 
            "base_64_document": "Base64_text" 
        } 
    ] 
}
```

**Required Fields:**

- `ship_document_type`: Choose from: 
    - CERTIFICATE\_OF\_ORIGIN
    - COMMERCIAL\_INVOICE
    - DANGEROUS\_GOODS\_SHIPPERS\_DECLARATION
    - OP\_900
    - PRO\_FORMA\_INVOICE
    - RETURN\_INSTRUCTIONS

**Notes: `origin_location_code`, `destination_location_code`, and `form_code` are **optional.****

For detailed information about this endpoint, refer to the **[FedEx API Documentation](https://developer.fedex.com/api/en-us/guides/api-reference.html#exportdocuments).**

##### <span style="color: rgb(0, 0, 0);">**Response**</span>

Once submitted, the response includes:

- Document Type.
- Document ID &amp; Folder ID.
- Customer Transaction ID.
- File Name.
- Success Status.

```JSON
[ 
    { 
        "output": { 
            "meta": { 
                "documentType": "CI", 
                "docId": "EGfWYE9BxLBZ7Dzn", 
                "folderId": "Ac7JnEwPoUm1I3M2" 
            } 
        }, 
        "customerTransactionId": "", 
        "file": "text.txt", 
        "success": true 
    }, 
    { 
        "output": { 
            "meta": { 
                "documentType": "CI", 
                "docId": "BQH8o1FI73ZnQOg6", 
                "folderId": "Ac7JnEwPoUm1I3M2" 
            } 
        }, 
        "customerTransactionId": "", 
        "file": "text.txt", 
        "success": true 
    } 
]
```

📚 **For detailed API specifications, visit the [FedEx API Documentation](https://developer.fedex.com/api/en-us/guides/api-reference.html#exportdocuments).**

---

🚀 **Start automating your customs clearance today!**