REST API
TariffPilot offers a REST API for programmatically accessing customs tariff proposals.
The API is in early alpha and probably will change in the future. Please let us know, when you are using the API, so we can inform you about changes.
Authorization
All of the following endpoints require authorization with a bearer access token. Such an access token can be retrieved at cloud.tariffpilot.com in the tenant settings at tab API
. Please note that the access token is associated to the user account and tenant it has been generated for. Thus removing an user from a tenant invalidates the access token.
Customs Tariff Proposals API
List All Customs Tariff Proposals as JSON
Returns a JSON list of all customs tariff proposals in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
A list of all customs tariff proposals by vendor ID can be fetched with:
curl -X GET "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/by_vendor_id?vendor_id=123" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
Get a Customs Tariff Proposal as JSON
Returns a JSON representation of the customs tariff proposal in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/<CUSTOMS_TARIFF_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
Get a Customs Tariff Proposal as PDF
Returns a PDF representation of the customs tariff proposal in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/pdf/<CUSTOMS_TARIFF_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/pdf"
Optionally, you can specify the language. The default language is en
. Additional languages are de
for German.
curl -X GET "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/pdf/<CUSTOMS_TARIFF_PROPOSAL_ID>?language=de" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/pdf"
Get a Customs Tariff Proposal as Markdown
Returns a Markdown representation of the customs tariff proposal in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/markdown/<CUSTOMS_TARIFF_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: text/markdown"
Optionally, you can specify the language. The default language is en
. Additional languages are de
for German.
curl -X GET "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/markdown/<CUSTOMS_TARIFF_PROPOSAL_ID>?language=de" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: text/markdown"
Get a Customs Tariff Proposal as HTML
Returns a HTML representation of the customs tariff proposal in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/html/<CUSTOMS_TARIFF_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: text/html"
Optionally, you can specify the language. The default language is en
. Additional languages are de
for German.
curl -X GET "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/html/<CUSTOMS_TARIFF_PROPOSAL_ID>?language=de" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: text/html"
Delete a Customs Tariff Proposal
Deletes the customs tariff proposal in the tenant.
curl -X DELETE "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/<CUSTOMS_TARIFF_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
Post a Customs Tariff Proposal
Posts a JSON representation of a customs tariff proposal into the tenant.
curl -X POST "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "description": "Nici Einhorn 80cm", "direction": "export", "search_web": true, "vendor_id": "123" }'
The property direction
is mandatory and can be either export
for 8-digit or import
for 11-digit customs code. The property search_web
is optional and defaults to false
. When set to true
, the web will be searched for the product descripton. The property vendor_id
is optional and can be used to associate the customs tariff proposal with a vendor ID from your system.
curl -X POST "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "description": "Nici Einhorn 80cm", "direction": "export", "job_id": <JOB_ID>, "search_web": true }'
The property job_id
is optional and can be used to associate the customs tariff proposal with a job. The job_id
must be a UUID4 string. If the job does not exist, it will be created.
Classification Proposals API
List All Classification Proposals as JSON
Returns a JSON list of all classification proposals in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/classification_proposals" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
A list of all classification proposals by vendor ID can be fetched with:
curl -X GET "https://app-cloud.tariffpilot.com/api/classification_proposals/by_vendor_id?vendor_id=123" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
Get a Classification Proposal as JSON
Returns a JSON representation of the classification proposal in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/classification_proposals/<CLASSIFICATION_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
Get a Classification Proposal as PDF
Returns a PDF representation of the classification proposal in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/classification_proposals/pdf/<CLASSIFICATION_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/pdf"
Optionally, you can specify the language. The default language is en
. Additional languages are de
for German.
curl -X GET "https://app-cloud.tariffpilot.com/api/classification_proposals/pdf/<CLASSIFICATION_PROPOSAL_ID>?language=de" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/pdf"
Get a Classification Proposal as Markdown
Returns a Markdown representation of the classification proposal in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/classification_proposals/markdown/<CLASSIFICATION_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: text/markdown"
Optionally, you can specify the language. The default language is en
. Additional languages are de
for German.
curl -X GET "https://app-cloud.tariffpilot.com/api/classification_proposals/markdown/<CLASSIFICATION_PROPOSAL_ID>?language=de" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: text/markdown"
Get a Classification Proposal as HTML
Returns a HTML representation of the classification proposal in the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/classification_proposals/html/<CLASSIFICATION_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: text/html"
Optionally, you can specify the language. The default language is en
. Additional languages are de
for German.
curl -X GET "https://app-cloud.tariffpilot.com/api/classification_proposals/html/<CLASSIFICATION_PROPOSAL_ID>?language=de" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: text/html"
Delete a Classification Proposal
Deletes the classification proposal in the tenant.
curl -X DELETE "https://app-cloud.tariffpilot.com/api/classification_proposals/<CLASSIFICATION_PROPOSAL_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
Post a Classification Proposal
Posts a JSON representation of a classification proposal into the tenant.
curl -X POST "https://app-cloud.tariffpilot.com/api/classification_proposals" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "description": "Nici Einhorn 80cm", "search_web": true, "vendor_id": "123" }'
The property search_web
is optional and defaults to false
. When set to true
, the web will be searched for the product descripton. The property vendor_id
is optional and can be used to associate the classification proposal with a vendor ID from your system.
Binding Tariff Information (BTI) API
Search for BTIs
Searches for up to 100 BTIs by a given search term.
curl -X POST "https://app-cloud.tariffpilot.com/api/bti/search" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "query": "Nici Einhorn 80cm" }'
curl -X POST "https://app-cloud.tariffpilot.com/api/bti/search" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "query": "Nici Einhorn 80cm", "issuing_country": "DE" }'
European Customs Inventory of Chemical Substances (ECICS) API
Search for Chemical Substances
Searches for up to 100 chemical substances by a given search term.
curl -X POST "https://app-cloud.tariffpilot.com/api/chemical_substances/search" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "query": "nitrogen" }'
Tenant API
Get Tenant Information
Returns a JSON representation of the tenant.
curl -X GET "https://app-cloud.tariffpilot.com/api/tenant/" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"