curl --request POST \
--url https://api.teleship.com/api/trade-engine/duties-taxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipTo": {
"name": "John Doe",
"email": "john@example.com",
"address": {
"line1": "123 Main St",
"city": "New York",
"state": "NY",
"postcode": "10001",
"country": "US"
}
},
"shipFrom": {
"name": "Acme Corp",
"email": "shipping@example.com",
"address": {
"line1": "456 High St",
"city": "London",
"postcode": "SW1A 1AA",
"country": "GB"
}
},
"commodities": [
{
"title": "Designer Handbag",
"description": "Leather handbag",
"hsCode": "4202210000",
"quantity": 1,
"value": {
"amount": 500,
"currency": "GBP"
},
"unitWeight": {
"value": 0.5,
"unit": "kg"
},
"countryOfOrigin": "IT"
}
],
"customs": {
"contentType": "CommercialGoods",
"incoterms": "DDP"
}
}
'{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
],
"dutiesAndTaxes": {
"price": 10.59,
"currency": "GBP",
"charges": [
{
"name": "Duty",
"amount": 1.2,
"currency": "GBP"
},
{
"name": "VAT",
"amount": 0.5,
"currency": "GBP"
}
],
"commodities": [
{
"itemNumber": 123,
"title": "<string>",
"hsCode": "<string>",
"charges": [
{
"name": "Duty",
"amount": 1.2,
"currency": "GBP",
"rate": 0.1
}
],
"restrictions": [
{
"importRegion": "<string>",
"flag": "<string>",
"importRisk": "<string>",
"id": "<string>",
"countryOfOrigin": "AF",
"hts": "<string>",
"chapter": "<string>",
"message": "<string>",
"info": "<string>",
"capture": "<string>",
"metadata": {},
"serviceCode": "TELESHIP-EXPEDITED-PICKUP",
"shippingMethod": "RM-RETURN-T24",
"restrictionLevel": "FALSE",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
],
"customsDeclaration": {}
},
"collection": {
"collectionId": "col_abc123",
"trackingNumber": "TRK123456789",
"status": "pending",
"collectionDeadline": "2026-01-31T23:59:59Z",
"paymentUrl": "https://duties-taxes.com/col_abc123",
"events": [
"<string>"
]
}
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}Calculate duties and taxes
Calculate import duties, taxes, and customs fees for international shipments.
How it works:
- Provide shipment and commodity details (origin, destination, HS codes, values)
- Receive a breakdown of all applicable duties and taxes in the
dutiesAndTaxesresponse
Additional Services:
additionalServices.postalDuties: Calculate lower postal duty rates instead of courier ratesadditionalServices.taxesCollection: Create a DDU taxes collection (see below)
DDU Taxes Collection (when additionalServices.taxesCollection: true):
- Requires:
incoterms: DDU,trackingNumber, andshipTo.phoneORshipTo.email - Creates a taxes collection record with status
pending_classification - Triggers background HS code classification and duty recalculation
- Returns
dutiesAndTaxes: null(final amount calculated after classification) - Returns
collectionobject withcollectionId,status,paymentUrl, andcollectionDeadline - Notification channel: Both SMS and email when both provided, otherwise whichever is available
- Partner receives webhook when classification completes and collection is ready for payment
Why use this? Show landed cost estimates to customers, avoid surprise fees, ensure customs compliance, and collect duties from consignees for DDU shipments.
curl --request POST \
--url https://api.teleship.com/api/trade-engine/duties-taxes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"shipTo": {
"name": "John Doe",
"email": "john@example.com",
"address": {
"line1": "123 Main St",
"city": "New York",
"state": "NY",
"postcode": "10001",
"country": "US"
}
},
"shipFrom": {
"name": "Acme Corp",
"email": "shipping@example.com",
"address": {
"line1": "456 High St",
"city": "London",
"postcode": "SW1A 1AA",
"country": "GB"
}
},
"commodities": [
{
"title": "Designer Handbag",
"description": "Leather handbag",
"hsCode": "4202210000",
"quantity": 1,
"value": {
"amount": 500,
"currency": "GBP"
},
"unitWeight": {
"value": 0.5,
"unit": "kg"
},
"countryOfOrigin": "IT"
}
],
"customs": {
"contentType": "CommercialGoods",
"incoterms": "DDP"
}
}
'{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
],
"dutiesAndTaxes": {
"price": 10.59,
"currency": "GBP",
"charges": [
{
"name": "Duty",
"amount": 1.2,
"currency": "GBP"
},
{
"name": "VAT",
"amount": 0.5,
"currency": "GBP"
}
],
"commodities": [
{
"itemNumber": 123,
"title": "<string>",
"hsCode": "<string>",
"charges": [
{
"name": "Duty",
"amount": 1.2,
"currency": "GBP",
"rate": 0.1
}
],
"restrictions": [
{
"importRegion": "<string>",
"flag": "<string>",
"importRisk": "<string>",
"id": "<string>",
"countryOfOrigin": "AF",
"hts": "<string>",
"chapter": "<string>",
"message": "<string>",
"info": "<string>",
"capture": "<string>",
"metadata": {},
"serviceCode": "TELESHIP-EXPEDITED-PICKUP",
"shippingMethod": "RM-RETURN-T24",
"restrictionLevel": "FALSE",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
]
}
],
"customsDeclaration": {}
},
"collection": {
"collectionId": "col_abc123",
"trackingNumber": "TRK123456789",
"status": "pending",
"collectionDeadline": "2026-01-31T23:59:59Z",
"paymentUrl": "https://duties-taxes.com/col_abc123",
"events": [
"<string>"
]
}
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}{
"messages": [
{
"code": 123,
"level": "error",
"timestamp": "2024-01-01T00:00:00.00Z",
"message": "An error occurred",
"details": [
"Missing required field"
]
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
GBP, USD, EUR, CAD, AUD, BGN, CZK, DKK, HUF, PLN, RON, SEK, NZD, SAR, AED, HKD, SGD Tracking number for the shipment. Required for DDU collection creation.
External manifest ID for partner reference (must be unique per account)
The freight/shipping charge for VAT-on-freight calculations.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Package weight for DDU collection
Show child attributes
Show child attributes
Package dimensions for DDU collection
Show child attributes
Show child attributes
Shipment description
Customer/partner reference number
Package type
envelope, tube, parcel Content type
Documents, Gift, Sample, Other, CommercialGoods, ReturnOfGoods Additional metadata
Additional services for duties calculation
Show child attributes
Show child attributes
Was this page helpful?