Tax & Duty Quote API
- HOST
- STAGING https://stage.tradeglobal.com
- PRODUCTION https://services.tradeglobal.com
The Tax & Duty Quote API is designed for those merchants who are looking to leverage TradeGlobal's technology to obtain a tax and duty quote calculation. This API enables merchants to obtain tax and duty quotes from "anywhere to anywhere" and recognizes all free trade agreements for these countries. To obtain a successful tax and duty calculation, the merchant will need to pass the following information in the POST request:
- Product SKU
- Product Quantity
- Unit Price of the product
- Country of Origin of the product
- Assigned harmonized tariff code
- Ship From country
- Ship To country
- State/Province and/or Postal Code of the destination if applicable
Note... If you are unable to pass product attributes such as country of origin or HSCode at time of quote, our system can retrieve the attribute information. However, you will need to upload the data for each product using the Product API.
The follow information below will walk you through how to integrate this API.
Available Countries
TGC is able to quote duties and taxes for 64 countries. Below is a listing of available countries.
- Australia (AU)
- Austria (AT)
- Bahamas (BS)
- Baharain (BH)
- Belgium (BE)
- Brazil (BR)
- Canada (CA)
- Chile (CL)
- China (CN)
- Colombia (CO)
- Czech Republic (CZ)
- Denmark (DK)
- Dominica (DM)
- Dominican Republic (DO)
- Ecuador (EC)
- Egypt (EG)
- Estonia (EE)
- Finland (FI)
- France (FR)
- Germany (DE)
- Greece (GR)
- Honduras (HN)
- Hong Kong (HK)
- Hungary (HU)
- Iceland (IS)
- India (IN)
- Indonesia (ID)
- Israel (IL)
- Italy (IT)
- Japan (JP)
- Jordan (JO)
- Korea, South (KR)
- Kuwait (KW)
- Latvia (LV)
- Liechtenstein (LI)
- Lithuania (LT)
- Luxembourg (LU)
- Malaysia (MY)
- Malta (MT)
- Mexico (MX)
- Netherlands (NL)
- New Zealand (NZ)
- Norway (NO)
- Norway (NO)
- Panama (PA)
- Philippines (PH)
- Poland (PL)
- Portugal (PT)
- Saudi Arabia (SA)
- Singapore (SG)
- Slovakia (SK)
- Slovenia (SI)
- South Africa (ZA)
- Spain (ES)
- Sweden (SE)
- Switzerland (CH)
- Taiwan (TW)
- Thailand (TH)
- Turkey (TR)
- United Arab Emirates (AE)
- United Kingdom (GB)
- Uruguay (UY)
- Venezuela (VE)
- Vietnam (VN)
Request (Y=Yes, N=No, C=Conditional, N/A=Not Applicable)
Authorization Required
To access this resources' endpoints you will need to provice your Access Token provided to you by TradeGlobal in the Authorization header.
Tax & Duty Quote requests are supported by the HTTP POST method. Create a POST request by adding the parameters in the HTTP request entity body using the application/json
media type. The request URL must conform to the following specifications:
POST /6.0/Merchant/api/TaxDutyQuote
HOST: services.tradeglobal.com
Content-Type: application/json
Authorization: Basic :access_token
{ "merchantCode" : "MAERSK_SANDBOX", "exchange" : { "CurrencyCode" : "USD" }, "itinerary" : { "totalFreight" : 9.99, "totalInsurance" : 0, "serviceCode" : null, "carrierCode" : null }, "cartItems" : [{ "sku" : "123456", "quantity" : 1, "price" : 100 }], "shipToAddress" : { "name" : { "firstName" : "Bryan", "lastName" : "Test" }, "address1" : "123 Main Street", "city" : "Toronto", "stateProvince" : "ON", "countryCode" : "CA", "postalCode" : "M5S 2A2", "phone" : "555555555", "email" : "test@tgc.com" } }
Response
200 OK
Content-Type: application/json
{ "merchantCode": "MAERSK_SANDBOX", "shipToAddress": { "name": { "firstName": "Bryan", "middleName": null, "lastName": "Test" }, "address1": "123 Main Street", "address2": null, "city": "Toronto", "stateProvince": "ON", "countryCode": "CA", "postalCode": "M5S 2A2", "phone": "555555555", "email": "test@tgc.com" }, "currencyCode": "USD", "exchangeRate": 1.0, "quotes": [ { "id": "26dcd88d-60c6-ec11-80fd-005056937110", "costOfGoods": 100.0, "quoteTotal": 122.99, "quoteFees": [ { "feeClassification": "SHIPPING", "discounts": null, "fees": [ { "amount": 9.99, "type": "Freight", "feeDescription": "SHIPPING", "message": null }, { "amount": 0.0, "type": "Insurance", "feeDescription": "SHIPPING", "message": null } ], "totalAmount": 9.99 }, { "feeClassification": "SERVICE", "discounts": null, "fees": [ { "amount": 0.0, "type": "Other", "feeDescription": "SERVICE", "message": null } ], "totalAmount": 0.0 }, { "feeClassification": "IMPORT", "discounts": [], "fees": [ { "amount": 0.0, "type": "Duty", "feeDescription": "IMPORT", "message": null }, { "amount": 13.00, "type": "VAT", "feeDescription": "IMPORT", "message": null } ], "totalAmount": 13.00 } ], "transportation": { "exportIdentificationNumber": "NA", "packages": [ { "packageID": "UNKNOWN", "packageCostOfGoods": 100.0, "dimensions": { "length": 0.0, "width": 0.0, "height": 0.0, "unitOfMeasure": "IN" }, "weightInfo": { "weight": 0.0, "unitOfMeasure": "LBS" }, "packageItems": [ { "sku": "123456", "unitPrice": 100.0, "quantity": 1, "hsCode": "330499", "countryOfOrigin": "CN", "commercialInvoiceDescription": "carbonated drink in aluminum can", "duty": 0.0, "appliedTariff": null, "vat": 13.00, "appliedTaxes": [ "HST - Federal", "HST - Provincial (PST)" ], "pst": 0.0 } ], "packageItinerary": [ { "warehouseID": 0, "estimatedDeliveryTime": "NA", "packageFreight": 9.99, "packageFuelSurcharge": 0.0, "shipMethod": null, "shipFromAddress": { "name": { "firstName": "Erlich", "middleName": null, "lastName": "Bachman" }, "address1": "5230 Penfield Avenue", "address2": "Woodland Hills", "city": "Los Angeles", "stateProvince": "CA", "countryCode": "US", "postalCode": "91364", "phone": "555555555", "email": "test@email.com" }, "shipToAddress": { "name": { "firstName": "Bryan", "middleName": null, "lastName": "Test" }, "address1": "123 Main Street", "address2": null, "city": "Toronto", "stateProvince": "ON", "countryCode": "CA", "postalCode": "M5S 2A2", "phone": "555555555", "email": "test@tgc.com" } } ], "volume": 0.0, "num": 1 } ] } } ] }
POST /6.0/Merchant/api/TaxDutyQuote
HOST: services.tradeglobal.com
Content-Type: application/json
Authorization: Basic :access_token
{ "merchantCode" : "MAERSK_SANDBOX", "exchange" : { "CurrencyCode" : "USD" }, "itinerary" : { "totalFreight" : 9.99, "totalInsurance" : 0, "serviceCode" : null, "carrierCode" : null }, "cartItems" : [{ "sku" : "1234567", "quantity" : 3, "price" : 100, "hsCode" : "330410", "countryOfOrigin" : "CN", "dimensions" : { "length" : 3, "width" : 6, "height" : 1, "unitOfMeasure" : "IN" }, "weightInfo" : { "weight" : 0.15, "unitOfMeasure" : "LBS" } }], "shipToAddress" : { "name" : { "firstName" : "Bryan", "lastName" : "Test" }, "address1" : "123 Main Street", "city" : "Toronto", "stateProvince" : "ON", "countryCode" : "CA", "postalCode" : "M5S 2A2", "phone" : "555555555", "email" : "test@tgc.com" } }
Response
200 OK
Content-Type: application/json
{ "merchantCode": "MAERSK_SANDBOX", "shipToAddress": { "name": { "firstName": "Bryan", "middleName": null, "lastName": "Test" }, "address1": "123 Main Street", "address2": null, "city": "Toronto", "stateProvince": "ON", "countryCode": "CA", "postalCode": "M5S 2A2", "phone": "555555555", "email": "test@tgc.com" }, "currencyCode": "USD", "exchangeRate": 1.0, "quotes": [ { "id": "d67f8097-30ca-ec11-95bc-70bc107d2669", "costOfGoods": 300.0, "quoteTotal": 371.03, "quoteFees": [ { "feeClassification": "SHIPPING", "discounts": null, "fees": [ { "amount": 9.99, "type": "Freight", "feeDescription": "SHIPPING", "message": null }, { "amount": 0.0, "type": "Insurance", "feeDescription": "SHIPPING", "message": null } ], "totalAmount": 9.99 }, { "feeClassification": "SERVICE", "discounts": null, "fees": [ { "amount": 0.0, "type": "Other", "feeDescription": "SERVICE", "message": null } ], "totalAmount": 0.0 }, { "feeClassification": "IMPORT", "discounts": [], "fees": [ { "amount": 19.50, "type": "Duty", "feeDescription": "IMPORT", "message": null }, { "amount": 41.54, "type": "VAT", "feeDescription": "IMPORT", "message": null } ], "totalAmount": 61.04 } ], "transportation": { "exportIdentificationNumber": "NA", "packages": [ { "packageID": "UNKNOWN", "packageCostOfGoods": 300.0, "dimensions": { "length": 0.0, "width": 0.0, "height": 0.0, "unitOfMeasure": "IN" }, "weightInfo": { "weight": 0.0, "unitOfMeasure": "LBS" }, "packageItems": [ { "sku": "1234567", "unitPrice": 100.0, "quantity": 3, "hsCode": "330410", "countryOfOrigin": "CN", "commercialInvoiceDescription": null, "duty": 19.50, "appliedTariff": "Most Favoured Nations Rate (MFN)", "vat": 41.54, "appliedTaxes": [ "HST - Federal", "HST - Provincial (PST)" ], "pst": 0.0 } ], "packageItinerary": [ { "warehouseID": 0, "estimatedDeliveryTime": "NA", "packageFreight": 9.99, "packageFuelSurcharge": 0.0, "shipMethod": null, "shipFromAddress": { "name": { "firstName": "Visible", "middleName": null, "lastName": "Supply Chain Management" }, "address1": "5160 WIley Post Way", "address2": "", "city": "Salt Lake City", "stateProvince": "UT", "countryCode": "US", "postalCode": "81460", "phone": "555555555", "email": "test@email.com" }, "shipToAddress": { "name": { "firstName": "Bryan", "middleName": null, "lastName": "Test" }, "address1": "123 Main Street", "address2": null, "city": "Toronto", "stateProvince": "ON", "countryCode": "CA", "postalCode": "M5S 2A2", "phone": "555555555", "email": "test@tgc.com" } } ], "volume": 0.0, "num": 1 } ] } } ] }
POST /6.0/Merchant/api/TaxDutyQuote
HOST: services.tradeglobal.com
Content-Type: application/json
Authorization: Basic :access_token
{ "merchantCode" : "MAERSK_SANDBOX", "exchange" : { "CurrencyCode" : "USD" }, "itinerary" : { "totalFreight" : 9.99, "totalInsurance" : 0, "serviceCode" : null, "carrierCode" : null }, "cartItems" : [{ "sku" : "1234567", "quantity" : 3, "price" : 100, "hsCode" : "111111", "countryOfOrigin" : "CN", "dimensions" : { "length" : 3, "width" : 6, "height" : 1, "unitOfMeasure" : "IN" }, "weightInfo" : { "weight" : 0.15, "unitOfMeasure" : "LBS" } }], "shipToAddress" : { "name" : { "firstName" : "Bryan", "lastName" : "Test" }, "address1" : "123 Main Street", "city" : "Toronto", "stateProvince" : "ON", "countryCode" : "CA", "postalCode" : "M5S 2A2", "phone" : "555555555", "email" : "test@tgc.com" } }
400 Bad Request
Content-Type: application/json
{ "errorCode":1007, "errorType":"GetTariffDatas", "errorMessage":"The provided HSCode (111111) is invalid." }