# Check if a shipment goes through customs

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

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

A shipment is **dutiable** when it goes through customs. For a dutiable shipment you need more information when you [create it](https://www.parcelparcel.com/api-docs/create-shipment/): `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.

| Route | parcelType | dutiable |
| :--- | :--- | :--- |
| Netherlands → Germany | NONDOC | `false` (both in the EU) |
| Netherlands → United States | NONDOC | `true` |
| Netherlands → United Kingdom | PALLET | `true` |
| Netherlands → United States | DOC | `false` (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.

## 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](https://www.parcelparcel.com/api-docs/authentication/) page.

## Path parameters

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

| Name        | Value    | Required | Comments |
| :---------- | :------- | :------- | :------- |
| countryFrom | (string) | true | The country you ship from, in ISO-2 format (e.g. NL). |
| countryTo   | (string) | true | The country you ship to, in ISO-2 format (e.g. US). |
| parcelType  | (string) | true | `DOC`, `NONDOC` or `PALLET`, the same types as in [Compare shipping options](https://www.parcelparcel.com/api-docs/compare-shipping-options/#parcel-type). Upper or lower case both work. |

For example:

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

## Response

| Name           | Value    | Comments |
| :------------- | :------- | :------- |
| 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

- **Dutiable?** Add `reasonForExport`, `incoterms` and complete `contentItems` when you [create the shipment](https://www.parcelparcel.com/api-docs/create-shipment/).
- **Want to know the costs?** [Estimate the duties and taxes](https://www.parcelparcel.com/api-docs/estimate-duties-taxes/) for the goods in the shipment.

## Examples

Don't know how to test these requests? Check [our guide](https://www.parcelparcel.com/api-docs/postman-guide/).

### Request example - Parcel from the Netherlands to the United States

```bash cURL
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'
```
```http HTTP
GET /partners-api/v1/dutiable-route/NL/US/NONDOC HTTP/1.1
Host: services.parcelparcel.com
X-PP-API: {YourAPIKey}@{YourAPISecret}
Content-Type: application/json
```

### Request example - Parcel from the Netherlands to Germany

```bash cURL
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'
```
```http HTTP
GET /partners-api/v1/dutiable-route/NL/DE/NONDOC HTTP/1.1
Host: services.parcelparcel.com
X-PP-API: {YourAPIKey}@{YourAPISecret}
Content-Type: application/json
```

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