ParcelParcelAPI docs

API docs Endpoints

Check if a shipment goes through customs

Markdown

Find out if a shipment between two countries is dutiable, before you create it.

GEThttps://services.parcelparcel.com/partners-api/v1/dutiable-route/{countryFrom}/{countryTo}/{parcelType}

Example request

Parcel from the Netherlands to the United States More examples

curl --request GET 'https://services.parcelparcel.com/partners-api/v1/dutiable-route/NL/US/NONDOC' \
  --header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
  --header 'Content-Type: application/json'

Tip: copy the cURL and paste it in Postman under Import, or straight into the URL bar of a new request. Postman fills in the method, headers and body for you. Replace {YourAPIKey}@{YourAPISecret} with your own API key and secret (use your sandbox key while testing), or import the whole Postman Collection.

A shipment is dutiable when it goes through customs. For a dutiable shipment you need more information when you create it: reasonForExport and incoterms are required, and the contentItems (description, value, country of origin and HS code) go on the customs documents.

With this endpoint you know up front whether that's the case, so your integration only asks for customs details when they're needed.

How we decide

A shipment is dutiable when both of these are true:

  1. At least one of the two countries is outside the EU. Within the EU, goods move without customs.
  2. It's not a document shipment. Documents (DOC) never count as dutiable here.
RouteparcelTypedutiable
Netherlands → GermanyNONDOCfalse (both in the EU)
Netherlands → United StatesNONDOCtrue
Netherlands → United KingdomPALLETtrue
Netherlands → United StatesDOCfalse (documents)

We follow our own country list. Besides countries such as the United Kingdom, Switzerland and Norway, some areas that belong to an EU country also count as outside the EU, because they are outside the EU customs area: the Canary Islands (IC), Ceuta and Melilla (EA), the French overseas regions (GP, MQ, RE, GF, YT) and Åland (AX). Use their own country code, not the one of the mainland. Guernsey (GG), Jersey (JE) and Gibraltar (GI) are outside the EU too.

You need to add the following headers:

NameValue
Content-Typeapplication/json
X-PP-API{YourAPIKey}@{YourAPISecret}

Don't you have an API Key and API Secret yet? Check our Authentication page.

Path parameters

There is no body. You put everything in the URL:

NameValueRequiredComments
countryFrom(string)requiredThe country you ship from, in ISO-2 format (e.g. NL).
countryTo(string)requiredThe country you ship to, in ISO-2 format (e.g. US).
parcelType(string)requiredDOC, NONDOC or PALLET, the same types as in Compare shipping options. Upper or lower case both work.

For example:

https://services.parcelparcel.com/partners-api/v1/dutiable-route/NL/US/NONDOC

Response

NameValueComments
errors(bool)false when the check worked.
message(string)Query processed successfully
data.dutiable(bool)true if the shipment goes through customs, false if it doesn't.

If a country code or parcel type isn't recognised, you get an error instead of data.dutiable. Check that you use 2-letter ISO country codes and one of the three parcel types.

Example response

JSON
{
  "errors": false,
  "message": "Query processed successfully",
  "data": {
    "dutiable": true
  }
}

Next steps

Examples

Don't know how to test these requests? Check our guide.

Request example - Parcel from the Netherlands to the United States

curl --location --request GET 'https://services.parcelparcel.com/partners-api/v1/dutiable-route/NL/US/NONDOC' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
--header 'Content-Type: application/json'

Request example - Parcel from the Netherlands to Germany

curl --location --request GET 'https://services.parcelparcel.com/partners-api/v1/dutiable-route/NL/DE/NONDOC' \
--header 'X-PP-API: {YourAPIKey}@{YourAPISecret}' \
--header 'Content-Type: application/json'

This one returns "dutiable": false: both countries are in the EU.