If you want to create a draft shipment, it's important to know if your shipment is passing customs or not. This is because if your shipment is passing customs our draft shipment endpoint requires more information than if your shipment is not passing customs.
In the shipping world, shipments that need to pass customs are called dutiable. If the shipment doesn't require to pass customs, the shipment is considered non-dutiable. In short, this endpoint returns if a shipment is dutiable or non-dutiable so that you know how you need to build up the body of the create a draft shipment request.
When does a shipment needs to pass customs and is considered dutiable?
A shipment is dutiable when it meets the following conditions:
- You're shipping a parcel or pallet
AND
- Either the pick-up country or destination country is not part of the European Union (EU).
Please note, document shipments are always considered not dutiable and thus don't pass customs.
Examples
Let's look at the following examples to clarify when a shipment is dutiable or not:
Pick-up Country | Destination Country | Shipment type | Dutiable? |
---|---|---|---|
The Netherlands | United States | NONDOC | true |
The Netherlands | United States | DOC | false |
The Netherlands | Italy | NONDOC | false |
United States | The Netherlands | PALLET | true |
Method
In order to create a draft shipment, you need to use the following method:
Endpoint
You need the following endpoint:
https://services.parcelparcel.com/partners-api/v1/dutiable-route/{countryFromIso}/{countryToIso}/{parcelType}
Header
You need to add the following headers:
Name | Value |
---|---|
Content-Type | application/json |
X-PP-API | {YourAPIKey}@{YourAPISecret} |
Don't you have an API Key and API Secret yet? Check our Authentication and how to get them in under a minute.
Parameters
Name | Value |
---|---|
countryFromIso | 2-digit ISO code. For example, the Netherlands would be "NL". |
countryToIso | 2-digit ISO code. For example, the United States would be "US". |
parcelType | Choose one of the following options: DOC, NONDOC or PALLET. You should choose NONDOC if you're shipping a parcel. |
Request example
In the example below, we are checking if a parcel (NONDOC) shipment from the Netherlands (NL) to the United States (US) is dutiable or not.
You can copy the cURL code below and paste it e.g. into Postman to test your request. Don't know how to do this? Read our guide on this page.
curl --location --request GET 'https://services.parcelparcel.com/partners-api/v1/dutiable-route/NL/US/NONDOC' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}'
Don't forget to replace the {YourAPIKey} and {Your APISecret} in the X-PP-API header with your own API credentials. Don't know how to acquire your API credentials? Check our Authentication page.
Response example
{
"errors": false,
"message": "Query processed successfully",
"data": {
"dutiable": true
}
}
Response elements
This request outputs the following response elements:
Name | Value |
---|---|
dutiable | (bool) |