REST API
TariffPilot offers a REST API for programmatically accessing customs tariff proposals.
OpenAPI Specification
The REST API is described by an OpenAPI 3 specification, which is publicly available without authorization:
curl -X GET "https://app-cloud.tariffpilot.com/api/openapi.json"
The specification can be imported into tools such as Postman, Swagger UI or OpenAPI code generators to explore the API or to generate client code. It is updated with every release.
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.
Token Binding and Validity
- Bound to user and tenant: An access token is associated to the user account and tenant it has been generated for. It cannot be used across tenants. Removing the user from the tenant invalidates the access token immediately.
- Expiry: Access tokens are long-lived.
- Secrecy: Treat the token like a password. To rotate a token, generate a new one in the
APItab.
Errors
The API does not return a structured error object.
Common responses:
| Status | Situation | Example body |
|---|---|---|
400 Bad Request | Missing or empty description (customs tariff proposals, classification proposals) | description must not be null in JSON |
400 Bad Request | Missing or empty direction (customs tariff proposals) | direction must not be null in JSON |
400 Bad Request | Missing proposal id in the path, or malformed JSON body | (message or empty body) |
403 Forbidden | Missing/invalid token, or insufficient role | Unauthorized |
403 Forbidden | Tenant proposal quota exhausted | Customs tariff proposals limit reached / Classification proposals limit reached |
404 Not Found | Proposal id does not exist in the tenant | (empty body) |
429 Too Many Requests | Only on auth/OAuth endpoints, not on the proposal endpoints | Too Many Requests |
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. The proposal will be created in the database and processed asynchronously.
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 tariff_system is optional and defaults to de; further values are ch (Swiss tariff), us, uk (UK Global Tariff) and cn (customs tariff of the People's Republic of China). 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.
The property auto_proceed is optional and defaults to false. A proposal created via the API always continues on its own as long as the data quality is high, until it stops for the first time. auto_proceed decides what happens when a user later proceeds with the proposal or sends additions in the web app: with true it continues after the product and, with data quality high, after the code; with false it stops after every step for a review. Users can change the setting in the web app with the checkbox Proceed automatically on high data quality.
Files and URL
Instead of or in addition to description, a proposal can be posted with files and a web page of the goods. At least one of description, files and url is required. This applies to POST /api/customs_tariff_proposals and POST /api/classification_proposals.
curl -X POST "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "direction": "export", "url": "https://www.example.com/products/123", "files": [ { "filename": "datasheet.pdf", "content_type": "application/pdf", "content": "<BASE64>" } ] }'
filesis optional and takes at most 3 files, each withfilename,content_typeand the Base64-encodedcontent. The decoded files must not exceed 10 MB in total. Supported types are PDF, JPEG, PNG, Word (.doc,.docx), PowerPoint (.pptx), Excel (.xlsx), plain text, CSV, HTML and Markdown; for an unknowncontent_typethe file extension decides.urlis optional and must be an absolutehttporhttpsURL, e.g.https://www.example.com/products/123. Its content is read during processing. A page that cannot be read or answers with an HTTP error is skipped without an error.- File contents and the content of the web page are deleted 14 days after the proposal was created.
- None of the three fields, more than 3 files, files above 10 MB in total, an unsupported or unreadable file, or a
urlthat is no absolutehttporhttpsURL is answered with400 Bad Request.
Navigate to Customs Tariff Proposal New Screen
Posts a request to open a customs tariff proposal New screen in the tenant. The proposal will not be created in the database. Instead a JSON objects with an authorize_url will be returned. The authorize_url can be used to open the customs tariff proposal in the TariffPilot web app.
curl -X POST "https://app-cloud.tariffpilot.com/api/customs_tariff_proposals/new" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "description": "Nici Einhorn 80cm", "reference_id": "PO-2026-0815", "vendor_id": "123" }'
A service user will be created upon first request to open a customs tariff proposal. Currently there is no option to specify a delegate user that should appear as the creator of the customs tariff proposal in the TariffPilot web app. The property reference_id is optional and prefills the reference ID of the customs tariff proposal in the New screen. The property vendor_id is optional and can be used to associate the customs tariff proposal with a vendor ID from your system.
Response Fields
The customs_tariff_proposals endpoints return objects with the following fields. Fields that are null are omitted from the JSON response.
| Field | Type | Description |
|---|---|---|
id | UUID string | Unique id of the proposal. |
state | string | Workflow state, see Proposal State and Data Quality. |
data_quality | string | Confidence of the result: low, medium or high. See Proposal State and Data Quality. |
code | string | The determined customs tariff code (for de: 8 digits for export, 11 digits for import; ch: 8 or 11 digits; us: 8 or 10 digits; uk: 10 digits for import, 8 for export; cn: 10 digits). |
direction | string | export (8-digit code) or import (11-digit code). |
description | string | The product description that was submitted. |
tariff_system | string | Tariff system: de, ch, us, uk or cn. |
origin_country | string | Country of origin, ISO 3166-1 alpha-2, if given. |
destination_country | string | Country of destination, ISO 3166-1 alpha-2, if given (UK export). |
classification_justification_short_de | string | Short justification of the proposed code in German. |
classification_justification_short_en | string | Short justification of the proposed code in English. |
bti_classification_justification_short_de | string | Short justification of the selected BTI in German, if any. |
bti_code | string | Customs code of a matched Binding Tariff Information (BTI), if any. |
bti_reference | string | Reference number of the matched BTI, if any. |
proposed_customs_description | string | The AI-proposed customs goods description in German (same value as proposed_customs_description_de). |
proposed_customs_description_de | string | The AI-proposed customs goods description in German. |
proposed_customs_description_en | string | The AI-proposed customs goods description in English. |
proposed_customs_description_short | string | A short form of the proposed customs goods description in German (same value as proposed_customs_description_short_de). |
proposed_customs_description_short_de | string | A short form of the proposed customs goods description in German. |
proposed_customs_description_short_en | string | A short form of the proposed customs goods description in English. |
reference_id | string | Surrogate key you supplied to identify the proposal in your system. |
vendor_id | string | Vendor id you supplied to associate the proposal with a vendor in your system. |
job_id | UUID string | Id of the batch job the proposal belongs to, if any. |
auto_proceed | boolean | Whether the proposal continues on its own when a user proceeds or sends additions, as long as the data quality is high. |
training_code | string | Customs code of the selected AI Database entry, if any. |
training_reference | string | Reference of the selected AI Database entry, if any. |
training_classification_justification_short_de | string | Short justification of the selected AI Database entry in German, if any. |
uk_declaration_codes | array | UK additional codes and document codes required by the measures of the code for the direction, country and date; uk only. Only in single-proposal GET/POST responses. |
uk_trade_tariff_url | string | Page of the code in the UK Trade Tariff; uk only. |
training_uk_declaration_codes, training_uk_trade_tariff_url | array, string | The same for the code of the selected AI Database entry; uk only. |
cn_declaration_codes | array | Supervision conditions and CIQ codes of the code for the direction; cn only. Only in single-proposal GET/POST responses. |
training_cn_declaration_codes | array | The same for the code of the selected AI Database entry; cn only. |
classification_proposal_id | UUID string | Id of the linked export control classification proposal, if any. |
validity | string | Validity of the code in the current tariff: valid, changed, invalid or reclassified. See Reclassification. |
change_kinds | array | Kinds of tariff changes since the classification for changed and invalid: text_changed, parent_changed, sibling_added, reused. |
predecessor_id | UUID string | Id of the original proposal that this proposal reclassifies, if any. |
successor_id | UUID string | Id of the proposal that reclassified this proposal, if any. |
test_code | string | Expected customs tariff code of a test suite job, if any. |
created_at | number | Creation time as a Unix timestamp in milliseconds. |
updated_at | number | Last update time as a Unix timestamp in milliseconds. |
memo_markdown_de | string | The full generated memo in German (Markdown). Only in single-proposal GET/POST responses, not in list responses. |
memo_markdown_en | string | The full generated memo in English (Markdown). Only in single-proposal GET/POST responses, not in list responses. |
file_name | string | Names of the files you supplied, comma-separated; omitted without files. |
url | string | The URL you supplied; omitted without URL. |
feedback_rating | string | Rating in the TariffPilot web app: correct (thumbs up), incorrect (thumbs down) or null. Always present, also when null. Can only be set in the web app. |
feedback_code | string | Code corrected by your team in the web app, or null. Always present. |
feedback_notes | string | Correction notes of your team in the web app, or null. Always present. |
authorize_url | string | URL to open the proposal in the TariffPilot web app. |
Note on timestamps: created_at and updated_at are serialized as numbers (epoch milliseconds), not as ISO-8601 strings.
Example JSON Responses
Immediately after POST /api/customs_tariff_proposals, the newly created proposal is returned. Processing is asynchronous, so state is start and result fields such as code are not yet present:
{
"id": "3f9a2c14-8b7e-4c2a-9f1d-2e5b6a7c8d90",
"state": "start",
"description": "Nici Einhorn 80cm",
"direction": "export",
"tariff_system": "de",
"reference_id": "PO-2026-0815",
"vendor_id": "123",
"created_at": 1754737200000,
"updated_at": 1754737200000,
"authorize_url": "https://app-cloud.tariffpilot.com/auth/oauth2/api/callback?code=...&state=..."
}
After processing has finished, GET /api/customs_tariff_proposals/<CUSTOMS_TARIFF_PROPOSAL_ID> returns the completed proposal:
{
"id": "3f9a2c14-8b7e-4c2a-9f1d-2e5b6a7c8d90",
"state": "end",
"data_quality": "high",
"code": "95034910",
"description": "Nici Einhorn 80cm",
"direction": "export",
"tariff_system": "de",
"proposed_customs_description": "Stofftiere in Gestalt von Tieren",
"proposed_customs_description_de": "Stofftiere in Gestalt von Tieren",
"proposed_customs_description_en": "Stuffed animals in the form of animals",
"proposed_customs_description_short": "Stofftiere",
"proposed_customs_description_short_de": "Stofftiere",
"proposed_customs_description_short_en": "Stuffed animals",
"reference_id": "PO-2026-0815",
"vendor_id": "123",
"created_at": 1754737200000,
"updated_at": 1754737512000,
"memo_markdown_de": "# Zolltarifvorschlag\n\n...",
"memo_markdown_en": "# Customs Tariff Proposal\n\n...",
"authorize_url": "https://app-cloud.tariffpilot.com/auth/oauth2/api/callback?code=...&state=..."
}
The list endpoint GET /api/customs_tariff_proposals returns a JSON array of the same objects, but without direction, bti_reference and the memo_markdown_de/memo_markdown_en fields:
[
{
"id": "3f9a2c14-8b7e-4c2a-9f1d-2e5b6a7c8d90",
"state": "end",
"data_quality": "high",
"code": "95034910",
"description": "Nici Einhorn 80cm",
"tariff_system": "de",
"reference_id": "PO-2026-0815",
"vendor_id": "123",
"created_at": 1754737200000,
"updated_at": 1754737512000,
"authorize_url": "https://app-cloud.tariffpilot.com/auth/oauth2/api/callback?code=...&state=..."
}
]
The POST /api/customs_tariff_proposals/new endpoint does not create a proposal; it returns only an authorize_url:
{
"authorize_url": "https://app-cloud.tariffpilot.com/auth/oauth2/api/callback?code=...&state=..."
}
Proposal State and Data Quality
The state field reflects the asynchronous workflow. For customs tariff proposals it takes one of the following values, in order:
state | Meaning |
|---|---|
start | Proposal was created and is queued for processing. |
product_done | The product analysis step has finished. |
code_done | The customs tariff code has been determined. |
training_done | The AI Database matching step has finished. |
overlay_done | The additional measures step has finished. The code is final. |
bti_done | The Binding Tariff Information (BTI) research has finished. |
ruling_done | The customs ruling research has finished. |
end | Processing is complete. This is the terminal state. |
Notes:
- The
stateis a plain string. Before the first step runs it may briefly bestart; in rare cases the field can be absent (null) for an object that has not been processed at all. - These states may be extended or changed in the future. Do not rely on the exact values, only on the order and the terminal state
end. - A proposal created through the API is finished exactly when
stateisend. PollGETuntil then. - A proposal created in the web app can rest in
overlay_donewhen a user continued without the BTI or rulings research. Its code is final; the research can still be run later, after which the proposal moves on toend. - The API does not expose a dedicated "waiting for clarification" state, and the AI's follow-up questions themselves are not part of the JSON returned by these endpoints. A proposal that stays in a non-
endstate without progressing over an extended period is a candidate for manual review.
The data_quality field indicates how confident the result is and whether information is missing:
data_quality | Meaning |
|---|---|
high | A code was found and all relevant information was available. |
medium | A code was found, but some information is missing — the result may be improvable. |
low | No code could be found / information is insufficient. |
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. The proposal will be created in the database and processed asynchronously.
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. The property destination_country is optional (ISO 3166-1 alpha-2, e.g. US) and is used for the check of the general licenses (AGG). The property job_id is optional (UUID4 string) and associates the proposal with an export control batch job, which is created if it does not exist; the job appears under Classification > Batch. An invalid destination_country or a job_id of a customs tariff job is answered with 400 Bad Request. The property auto_proceed is optional and defaults to false; it works as for customs tariff proposals, with the export control checks in place of the code: with true the proposal continues after the product and after each check with data quality high. Files and a web page can be posted as well, see Files and URL.
Type of Goods and Product Fields
The optional fields below describe the goods in more detail, as in the TariffPilot web app.
curl -X POST "https://app-cloud.tariffpilot.com/api/classification_proposals" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "description": "Frequency converter 7.5 kW", "good_kind": "dual_use", "good_type": "good", "good_condition": "component", "good_main_good": "Machine tool", "dual_use_code": "85044084" }'
| Field | Values | Description |
|---|---|---|
good_kind | all (default), military, dual_use | Which checks run: armaments and dual-use, armaments only, or dual-use EU and DE only. |
good_type | good, software, technology | Type of the goods. Selects the fields below and the annex the armaments check uses. |
good_condition | finished_good, component | Finished good or component. Only for good_type good. |
good_field_of_application | string | Field of application. Only for good_condition finished_good. |
good_main_good, good_main_good_field_of_application | string | Main good the component belongs to and its field of application. Only for good_condition component. |
dual_use_code | string | CN code of the goods as a hint for the dual-use checks. Only for good_type good with good_kind all or dual_use. |
software_description, software_function, software_relation_to_hardware | string | Description, function and relation to hardware. Only for good_type software. |
technology_description, technology_maturity, technology_relation_to_hardware | string | Description, maturity and relation to hardware. Only for good_type technology. |
Navigate to Classification Proposal New Screen
Posts a request to open a classification proposal New screen in the tenant. The proposal will not be created in the database. Instead a JSON objects with an authorize_url will be returned. The authorize_url can be used to open the classification proposal in the TariffPilot web app.
curl -X POST "https://app-cloud.tariffpilot.com/api/classification_proposals/new" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "description": "Nici Einhorn 80cm", "reference_id": "PO-2026-0815", "vendor_id": "123" }'
A service user will be created upon first request to open a classification proposal. Currently there is no option to specify a delegate user that should appear as the creator of the classification proposal in the TariffPilot web app. The property reference_id is optional and prefills the reference ID of the classification proposal in the New screen. The property vendor_id is optional and can be used to associate the classification proposal with a vendor ID from your system.
Response Fields
The classification_proposals endpoints return objects with the following fields. Fields that are null are omitted from the JSON response.
| Field | Type | Description |
|---|---|---|
id | UUID string | Unique id of the proposal. |
state | string | Workflow state, see Proposal State. |
description | string | The product description that was submitted. |
identification_military_equipment | string | Result of the armaments (military equipment) check. Only in single-proposal GET/POST responses. |
identification_dual_use_eu | string | Result of the EU dual-use check. Only in single-proposal GET/POST responses. |
identification_dual_use_de | string | Result of the German dual-use check. Only in single-proposal GET/POST responses. |
identification_leading | string | The identification with the highest export control risk (military equipment before dual-use EU before dual-use DE). Only in single-proposal GET/POST responses. |
data_quality | string | Data quality of the result, the worst of all checks that ran: high if no questions are open, medium if one listing is possible, low if several listings are possible or the description is insufficient. |
data_quality_military_equipment, data_quality_dual_use_eu, data_quality_dual_use_de | string | Data quality of the single checks: low, medium or high. |
destination_country | string | Country of destination, ISO 3166-1 alpha-2, if given. |
agg_result | object | Result of the check of the general licenses (AGG), with the BAFA status it was checked against. |
aggs_selected | array | General licenses (AGG) selected by a user, with the BAFA status. |
customs_tariff_proposal_id | UUID string | Id of the linked customs tariff proposal, if any. |
job_id | UUID string | Id of the batch job the proposal belongs to, if any. |
auto_proceed | boolean | Whether the proposal continues on its own when a user proceeds or sends additions, as long as the data quality is high. |
reference_id | string | Surrogate key you supplied to identify the proposal in your system. |
vendor_id | string | Vendor id you supplied to associate the proposal with a vendor in your system. |
file_name | string | Names of the files you supplied, comma-separated; omitted without files. |
url | string | The URL you supplied; omitted without URL. |
feedback_rating | string | Rating in the TariffPilot web app: correct (thumbs up), incorrect (thumbs down) or null. Always present, also when null. Can only be set in the web app. |
feedback_code | string | Code corrected by your team in the web app, or null. Always present. |
feedback_notes | string | Correction notes of your team in the web app, or null. Always present. |
good_kind, good_type, good_condition, good_field_of_application, good_main_good, good_main_good_field_of_application, dual_use_code, software_*, technology_* | string | The type of goods and product fields you supplied, see Type of Goods and Product Fields. Only in single-proposal GET/POST responses. |
created_at | number | Creation time as a Unix timestamp in milliseconds. |
updated_at | number | Last update time as a Unix timestamp in milliseconds. |
authorize_url | string | URL to open the proposal in the TariffPilot web app. |
Note on timestamps: created_at and updated_at are serialized as numbers (epoch milliseconds), not as ISO-8601 strings.
Example JSON Responses
Immediately after POST /api/classification_proposals, the newly created proposal is returned with state start:
{
"id": "a71c0e42-3d55-4f18-9b2c-1a6d4e7f8091",
"state": "start",
"description": "Nici Einhorn 80cm",
"reference_id": "PO-2026-0815",
"vendor_id": "123",
"created_at": 1754737200000,
"updated_at": 1754737200000,
"authorize_url": "https://app-cloud.tariffpilot.com/auth/oauth2/api/callback?code=...&state=..."
}
After processing has finished, GET /api/classification_proposals/<CLASSIFICATION_PROPOSAL_ID> returns the completed proposal, including the identification results:
{
"id": "a71c0e42-3d55-4f18-9b2c-1a6d4e7f8091",
"state": "end",
"description": "Nici Einhorn 80cm",
"identification_military_equipment": "...",
"identification_dual_use_eu": "...",
"identification_dual_use_de": "...",
"reference_id": "PO-2026-0815",
"vendor_id": "123",
"created_at": 1754737200000,
"updated_at": 1754737512000,
"authorize_url": "https://app-cloud.tariffpilot.com/auth/oauth2/api/callback?code=...&state=..."
}
The list endpoint GET /api/classification_proposals returns a JSON array of the same objects, but without the three identification_* fields.
Proposal State
The state field reflects the asynchronous workflow. For classification proposals it takes one of the following values, in order:
state | Meaning |
|---|---|
start | Proposal was created and is queued for processing. |
product_done | The product analysis step has finished. |
military_done | The armaments (military equipment) check has finished. |
dual_use_eu_done | The EU dual-use check has finished. |
dual_use_de_done | The German dual-use check has finished. |
agg_done | The check of the general licenses (AGG) has finished. |
end | Processing is complete. This is the terminal state. |
Notes:
- The
stateis a plain string. Before the first step runs it may briefly bestart; in rare cases the field can be absent (null) for an object that has not been processed at all. - These states may be extended or changed in the future. Do not rely on the exact values, only on the order and the terminal state
end. - The API does not expose a dedicated "waiting for clarification" state, and the AI's follow-up questions themselves are not part of the JSON returned by these endpoints. A proposal that stays in a non-
endstate without progressing over an extended period is a candidate for manual review.
AGG Checks API
An AGG check returns the general licenses (AGG) of the BAFA that come into question for identifications you already know and a country of destination, without a classification. See General Licenses. All endpoints require a bearer access token of a user with the Owner or Editor role; otherwise they answer with 403 Forbidden.
List All AGG Checks as JSON
Returns a JSON list of the newest AGG checks in the tenant, at most 1000.
curl -X GET "https://app-cloud.tariffpilot.com/api/agg_checks" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
A list of the AGG checks by vendor ID can be fetched with:
curl -X GET "https://app-cloud.tariffpilot.com/api/agg_checks/by_vendor_id?vendor_id=123" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
Get an AGG Check as JSON
Returns a JSON representation of the AGG check in the tenant. Poll it after creating until status is done.
curl -X GET "https://app-cloud.tariffpilot.com/api/agg_checks/<AGG_CHECK_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
Get an AGG Check as PDF
Returns the AGG check as PDF: reference ID, entered identifications, country of destination, description, the general licenses that come into question and the selected ones.
curl -X GET "https://app-cloud.tariffpilot.com/api/agg_checks/pdf/<AGG_CHECK_ID>?language=de" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/pdf"
The parameter language is optional. The default language is en. Additional languages are de for German.
Delete an AGG Check
Deletes the AGG check in the tenant.
curl -X DELETE "https://app-cloud.tariffpilot.com/api/agg_checks/<AGG_CHECK_ID>" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json"
Post an AGG Check
Creates an AGG check in the tenant. The check runs asynchronously; the response returns it with status pending.
curl -X POST "https://app-cloud.tariffpilot.com/api/agg_checks" \
-H "Authorization: Bearer <BEARER_TOKEN>" \
-H "Content-Type: application/json" \
-d '{ "description": "Network router with hardware encryption, AES-256", "identification_dual_use_eu": "5A002a", "destination_country": "US", "reference_id": "MAT-4711", "vendor_id": "123" }'
| Property | Required | Description |
|---|---|---|
description | yes | Description of the goods. |
destination_country | yes | Country of destination, ISO 3166-1 alpha-2, e.g. US. |
identification_military_equipment | at least one identification | Military equipment, German export list part I section A, e.g. 0001a. |
identification_dual_use_eu | at least one identification | Dual-use EU, Annex I of Regulation (EU) 2021/821, e.g. 5A002a. |
identification_dual_use_de | at least one identification | Dual-use DE, German export list part I section B, e.g. 5A902. |
reference_id | no | Your own reference, shown in the list and the PDF. |
vendor_id | no | Id of your system, to list its checks with by_vendor_id. |
A missing description, no identification, or a missing or invalid destination_country is answered with 400 Bad Request and nothing is created. When the classification proposal quota is used up, the request is answered with 403 Forbidden (Classification proposals limit reached). An AGG check uses the quota of the classification proposals once, when its first result is stored. Selecting general licenses, changing the input and restarting a check are only possible in the TariffPilot web app.
Response Fields
The agg_checks endpoints return objects with the following fields. Fields that are null are omitted from the JSON response.
| Field | Type | Description |
|---|---|---|
id | UUID string | Unique id of the AGG check. |
status | string | pending: the check is still running, poll again; done: agg_result is available; failed: the check failed repeatedly. |
description | string | The description of the goods that was submitted. |
destination_country | string | Country of destination, ISO 3166-1 alpha-2. |
identification_military_equipment, identification_dual_use_eu, identification_dual_use_de | string | The identifications that were submitted. |
agg_result | object | Result of the check with the general licenses (hits), the checked identifications and the BAFA status it was checked against. Missing while the check is pending. |
aggs_selected | array | General licenses selected in the TariffPilot web app, each with its country of destination. |
reference_id | string | Your own reference. |
vendor_id | string | Vendor id you supplied. |
created_at | number | Creation time as a Unix timestamp in milliseconds. |
updated_at | number | Last update time as a Unix timestamp in milliseconds. |
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"
Response Fields
Fields that are null are omitted from the JSON response. This endpoint is read-only; there is no API endpoint to update tenant settings.
Limits and counts refer to the quota period from quota_period_start to quota_period_end. For subscriptions that renew automatically (monthly self-service plans), the quota period is the current billing period. For contracts with a fixed term, the quota covers the whole term. Unused proposals do not carry over to the next quota period. Before creating a proposal, check that the matching *_remaining field is greater than 0.
| Field | Type | Description |
|---|---|---|
id | UUID string | Unique id of the tenant. |
name | string | Display name of the tenant. |
classification_proposals_count | number | Number of classification proposals created in the quota period. |
classification_proposals_limit | number | Limit of classification proposals in the quota period, summed over the active subscriptions. |
classification_proposals_remaining | number | Number of classification proposals that can still be created in the quota period; 0 if the limit is reached. |
customs_tariff_proposals_count | number | Number of customs tariff proposals created in the quota period. |
customs_tariff_proposals_limit | number | Limit of customs tariff proposals in the quota period, summed over the active subscriptions. |
customs_tariff_proposals_remaining | number | Number of customs tariff proposals that can still be created in the quota period; 0 if the limit is reached. |
quota_period_start | date string | First day of the quota period. Omitted without active subscription. |
quota_period_end | date string | Day (exclusive) on which the quota period ends and limits and counts start anew. Omitted without active subscription. |
subscriptions | array | Active and future subscriptions, sorted by start date. See below. |
Fields of an entry in subscriptions:
| Field | Type | Description |
|---|---|---|
id | UUID string | Unique id of the subscription. |
status | string | Status of the subscription, e.g. active, trialing, or unpaid for a follow-up subscription that has not been paid yet. |
start_date | date string | Day on which the subscription starts. |
end_date | date string | Day on which the subscription ends (exclusive). Omitted if the subscription renews automatically. |
items | array | Booked products with product (e.g. the plan Professional) and quantity. |
classification_proposals_limit | number | Classification proposals the subscription contributes: per billing period for subscriptions that renew automatically, otherwise for the whole term. |
customs_tariff_proposals_limit | number | Customs tariff proposals the subscription contributes: per billing period for subscriptions that renew automatically, otherwise for the whole term. |
Example JSON Response
{
"id": "6b2f1a9e-4d3c-4a7b-8f21-0c9d5e7a1b34",
"name": "Acme GmbH",
"classification_proposals_count": 312,
"classification_proposals_limit": 4800,
"classification_proposals_remaining": 4488,
"customs_tariff_proposals_count": 312,
"customs_tariff_proposals_limit": 4800,
"customs_tariff_proposals_remaining": 4488,
"quota_period_start": "2026-03-01",
"quota_period_end": "2027-03-01",
"subscriptions": [
{
"id": "0f3c2b1a-5e6d-4c7b-9a8f-1e2d3c4b5a69",
"status": "active",
"start_date": "2026-03-01",
"end_date": "2027-03-01",
"items": [{ "product": "Professional", "quantity": 1 }],
"classification_proposals_limit": 4800,
"customs_tariff_proposals_limit": 4800
},
{
"id": "7a8b9c0d-1e2f-4a3b-8c4d-5e6f7a8b9c0d",
"status": "unpaid",
"start_date": "2027-03-01",
"end_date": "2028-03-01",
"items": [{ "product": "Professional", "quantity": 1 }],
"classification_proposals_limit": 4800,
"customs_tariff_proposals_limit": 4800
}
]
}