Back to Features
🌐

Customs Documentation

ActiveTradeMUSTFREE

What it does

Generate commercial invoices, packing lists, and certificates of origin in a single API call. Provide shipper, consignee, and item details, and POTAL generates all required customs documents with proper formatting and regulatory compliance.

Required Fields for 100% Accuracy

10 required / 12 total
FieldTypeRequired
doc_typestring!
shipment.shipper.namestring!
shipment.consignee.namestring!
shipment.items[].hs_codestring!
shipment.items[].descriptionstring!
shipment.items[].valuenumber!
shipment.items[].quantitynumber!
shipment.items[].weightnumber!
shipment.items[].originstring!
shipment.destinationstring!
shipment.incotermsstringopt
shipment.currencystringopt

Tips for Best Accuracy

  • All item fields (hs_code, description, value, quantity, weight, origin) are required
  • HS codes should be at least 4 digits — warnings are generated for shorter codes
  • Values above $100,000 trigger validation warnings

Common Mistakes

  • Missing item-level origin field — each item needs its own origin country
  • Providing hs_code with fewer than 4 digits — use at least 4 digits for accuracy
  • Forgetting doc_type — it determines which document template is generated

How to use it

1

Prepare shipment data

Collect shipper info, consignee info, item details (HS code, description, value, quantity, weight).

2

Generate documents

POST /api/v1/customs-docs/generate with the complete shipment data.

3

Download documents

The response includes structured document data for commercial invoice, packing list, and certificates.

4

Export as PDF

Use the /documents/pdf endpoint to convert document data into printable PDF format.

API Reference

POST/api/v1/customs-docs/generate
Request
{
  "shipper": {
    "name": "Acme Corp",
    "address": "123 Main St, Shanghai",
    "country": "CN"
  },
  "consignee": {
    "name": "US Buyer LLC",
    "address": "456 Oak Ave, New York",
    "country": "US"
  },
  "items": [
    {
      "hs_code": "6109.10",
      "description": "Cotton t-shirts",
      "value": 500,
      "quantity": 100,
      "weight": 25,
      "origin": "CN"
    }
  ],
  "destination": "US",
  "incoterms": "DDP",
  "currency": "USD"
}
Response
{
  "documents": {
    "commercial_invoice": {
      "invoice_number": "INV-2026-001",
      "total_value": 500,
      "items": [
        "..."
      ]
    },
    "packing_list": {
      "packages": 1,
      "total_weight": 25,
      "items": [
        "..."
      ]
    },
    "certificate_of_origin": {
      "origin": "CN",
      "certifier": "Self-certified"
    }
  },
  "timestamp": "2026-03-29T12:00:00Z"
}
cURL
curl -X POST https://potal.app/api/v1/customs-docs/generate \
  -H "X-API-Key: pk_live_your_key" \
  -H "Content-Type: application/json" \
  -d '{"shipper":{"name":"Acme Corp","country":"CN"},"consignee":{"name":"US Buyer","country":"US"},"items":[{"hs_code":"6109.10","description":"Cotton t-shirts","value":500,"quantity":100,"weight":25,"origin":"CN"}],"destination":"US"}'

Related Features

Having issues?