Trust VAT Checker API (Legacy)
Besides the path and the error answers, two fields differ from the current versions:
createValidationV1takes anidempotencyKeyin the body; the current versions take theIdempotency-Keyheader instead (see Idempotency).- The schedule flag is called
manualReviewOnAutomaticFailurein v1 (inattachSchedule, in the body ofcreateScheduleV1and in its answer) andisManualReviewOnAutomaticFailurein the current versions. Unknown fields are ignored, so a v1 name sent to a current operation is lost and the default (true) applies.
The error answers:
| v1 answer | current answer |
|---|---|
402 for a locked project | 423, code: project_locked |
422 for invalid input | 400 |
deleteScheduleV1 and getValidationResultV1 also accept agency keys. With a project key they answer 404 for a schedule or result of another project and 402 without a code for a locked project; with an agency key they answer like the current versions (403 access_denied, 423 project_locked on the delete). The v1 calls do not count against the rate limit.
Validate a tax identifier (v1)
Section titled “Validate a tax identifier (v1)”https://api.trustcomponent.com/taxvalidation/v1/validationsSubmits a validation request via API key (programmatic integration)
Checks one tax identifier against the registry of its country for the project of the API key. Most checks finish within the request and answer 201 with the outcome; when the registry is slow or unavailable the answer is 202 with status PENDING, and the result follows by webhook or through getValidationResultV1. A request that repeats the idempotencyKey of the body answers 200 with the request created first. Accepts project keys only; an agency key uses createValidationV2 under /projects/{projectId}.
Authentication: API key as bearer token. Operation createValidationV1.
# Takes the project from the key: a project key only.curl -X POST "https://api.trustcomponent.com/taxvalidation/v1/validations" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"countryCode": "DE", "rawValue": "DE811569869"}'{ "validationRequestId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "validationResultId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "taxIdentifierId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "status": "PENDING", "input": { "scheme": "EU_VAT", "countryCode": "DE", "rawValue": "DE 123 456 789", "normalizedValue": "DE123456789", "companyName": "Example GmbH", "address": { "street": "Example Street 1", "postalCode": "80331", "city": "Munich", "region": "Bavaria", "countryCode": "DE" }, "requesterVatId": "DE123456789", "customerMetadata": { "customerId": "cus_4711" } }, "outcome": "VALID", "provider": "VIES", "providerStatus": "SUCCESS", "match": { "companyName": "MATCH", "address": "MATCH", "addressDetails": { "street": "MATCH", "postalCode": "MATCH", "city": "MATCH", "region": "MATCH", "countryCode": "MATCH" } }, "responseData": { "companyName": "Example GmbH", "address": { "street": "Example Street 1", "postalCode": "80331", "city": "Munich", "region": "Bavaria", "countryCode": "DE" }, "sourceReference": "WAPIAAAAZ1x2y3z4", "providerMessage": "Valid" }, "checkedAt": "2020-01-01T13:30:05.941Z", "failureReason": "The registry did not answer in time", "nextRetryAt": "2020-01-01T13:30:05.941Z", "idempotencyKey": "order-4711-validation", "correlationId": "order-4711"}Request body application/json
Validation input
| Field | Type | Description |
|---|---|---|
countryCoderequired | string | ISO 3166 alpha-2 country code. The TaxIdentifierScheme is derived automatically. |
rawValuerequired | string | The tax identifier as you have it; spaces, dots, dashes and underscores are removed, at most 20 characters remain. |
companyNameoptional | string | Company name to compare with the registry, at most 256 characters. |
addressoptional | object | |
requesterVatIdoptional | string | Your own VAT ID. A German one makes the BZSt confirm a non-German EU VAT ID (qualified confirmation); VIES receives it for its qualified check. |
customerMetadataoptional | map of string | Free-form key/value metadata. Max 20 entries; key must match [a-z0-9_-]+ (1..64 chars); value max 512 chars, no control characters. Carried through from request to result snapshot for downstream lookups. |
preferredProvideroptional | enum | Registry that answered or should answer: VIES (EU), BZST (Germany), HMRC (United Kingdom), SWISS_UID (Switzerland), BRREG (Norway), ABR (Australia), NZBN (New Zealand); MANUAL for a manual review.VIESBZSTHMRCSWISS_UIDBRREGABRNZBNMANUAL |
idempotencyKeyoptional | string | Your key for this request. Sent again with the same key, the request is not processed twice and the answer is the first validation. |
correlationIdoptional | string | Your own id for this request, returned unchanged with the validation and its result. |
attachScheduleoptional | object | Also re-validate this identifier on a schedule, like createScheduleV2 does. |
Response 200 · application/json
| Field | Type | Description |
|---|---|---|
validationRequestId | string (uuid) | Id of the validation request. |
validationResultIdmay be null | string (uuid) | Id of the result, once the check is finished. |
taxIdentifierId | string (uuid) | The stored TaxIdentifier this validation resolved to. |
status | enum | PENDING accepted, PROCESSING at the registry, WAITING_FOR_RETRY the registry was unavailable and is asked again at nextRetryAt, WAITING_FOR_MANUAL_REVIEW in the manual review queue, COMPLETED the result is there, CANCELLED stopped without result.PENDINGPROCESSINGWAITING_FOR_RETRYWAITING_FOR_MANUAL_REVIEWCOMPLETEDCANCELLED |
input | object | Echo of the input the validation was run with — including the customerMetadata you supplied, so results can be correlated back to your request. |
outcomemay be null | enum | VALID the registry confirmed the identifier, INVALID it rejected it (not registered, deregistered or inactive), UNKNOWN no verdict, SOURCE_UNAVAILABLE the registry could not be reached after every retry, NOT_SUPPORTED no registry checks this scheme automatically, PLAN_RESTRICTED the registry needs the all-registries option of the plan.VALIDINVALIDUNKNOWNSOURCE_UNAVAILABLENOT_SUPPORTEDPLAN_RESTRICTED |
providermay be null | enum | Registry that answered or should answer: VIES (EU), BZST (Germany), HMRC (United Kingdom), SWISS_UID (Switzerland), BRREG (Norway), ABR (Australia), NZBN (New Zealand); MANUAL for a manual review.VIESBZSTHMRCSWISS_UIDBRREGABRNZBNMANUAL |
providerStatusmay be null | enum | What technically happened at the registry. SOURCE_TIMEOUT, SOURCE_UNAVAILABLE, RATE_LIMITED and TECHNICAL_ERROR are retried automatically; NOT_USED for a manual result.SUCCESSINVALID_INPUTREQUESTER_REJECTEDREQUEST_REJECTEDACCESS_BLOCKEDSOURCE_TIMEOUTSOURCE_UNAVAILABLERATE_LIMITEDAUTHENTICATION_FAILEDTECHNICAL_ERRORNOT_SUPPORTEDPLAN_RESTRICTEDNOT_USED |
matchmay be null | object | |
responseDatamay be null | object | |
checkedAtmay be null | string | When the registry answered. |
failureReasonmay be null | string | Why the last automatic attempt failed (e.g. the source was unavailable). Present while the validation is retrying or awaiting manual review. |
nextRetryAtmay be null | string | When the next automatic attempt is scheduled, while the validation is retrying. |
idempotencyKeymay be null | string | The idempotencyKey of the request; only createValidationV1 and createValidationBatchV1 take one, newer versions use the Idempotency-Key header. |
correlationIdmay be null | string | The correlationId of the request. |
Status codes
| Status | Meaning |
|---|---|
200 | The body's idempotencyKey was already used: the validation request created first, with its outcome if it has one |
201 | Validation completed (synchronous outcome) |
202 | Validation accepted, processing asynchronously |
401 | Missing or invalid API key |
402 | Project locked; answered without a code, unchanged since v1 |
403 | API key not permitted to perform validation, or a key that is not a project key (code: project_key_required); an agency key uses the v2 operation under /projects/{projectId} |
422 | Input format invalid or scheme not supported |
Validate many at once (v1)
Section titled “Validate many at once (v1)”https://api.trustcomponent.com/taxvalidation/v1/validations/batchSubmits multiple validation requests in one call via API key
Every item is accepted as a PENDING validation request and processed asynchronously; the per-item result is delivered via webhook (or can be polled). The response carries the created requests in input order, each without an outcome yet. A batch is always accepted or rejected as a whole.
Authentication: API key as bearer token. Operation createValidationBatchV1.
# Takes the project from the key: a project key only.curl -X POST "https://api.trustcomponent.com/taxvalidation/v1/validations/batch" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"items": [{"countryCode": "DE", "rawValue": "DE811569869"}, {"countryCode": "AT", "rawValue": "ATU33864707"}]}'[ { "validationRequestId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "validationResultId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "taxIdentifierId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "status": "PENDING", "input": { "scheme": "EU_VAT", "countryCode": "DE", "rawValue": "DE 123 456 789", "normalizedValue": "DE123456789", "companyName": "Example GmbH", "address": { "street": "Example Street 1", "postalCode": "80331", "city": "Munich", "region": "Bavaria", "countryCode": "DE" }, "requesterVatId": "DE123456789", "customerMetadata": { "customerId": "cus_4711" } }, "outcome": "VALID", "provider": "VIES", "providerStatus": "SUCCESS", "match": { "companyName": "MATCH", "address": "MATCH", "addressDetails": { "street": "MATCH", "postalCode": "MATCH", "city": "MATCH", "region": "MATCH", "countryCode": "MATCH" } }, "responseData": { "companyName": "Example GmbH", "address": { "street": "Example Street 1", "postalCode": "80331", "city": "Munich", "region": "Bavaria", "countryCode": "DE" }, "sourceReference": "WAPIAAAAZ1x2y3z4", "providerMessage": "Valid" }, "checkedAt": "2020-01-01T13:30:05.941Z", "failureReason": "The registry did not answer in time", "nextRetryAt": "2020-01-01T13:30:05.941Z", "idempotencyKey": "order-4711-validation", "correlationId": "order-4711" }]Request body application/json
Batch of validation inputs
| Field | Type | Description |
|---|---|---|
itemsrequired | array of object | Validation inputs, at most 1,000 per batch. Split larger volumes into several requests. · 0–1000 entries |
Response 202 · application/json
| Field | Type | Description |
|---|---|---|
validationRequestId | string (uuid) | Id of the validation request. |
validationResultIdmay be null | string (uuid) | Id of the result, once the check is finished. |
taxIdentifierId | string (uuid) | The stored TaxIdentifier this validation resolved to. |
status | enum | PENDING accepted, PROCESSING at the registry, WAITING_FOR_RETRY the registry was unavailable and is asked again at nextRetryAt, WAITING_FOR_MANUAL_REVIEW in the manual review queue, COMPLETED the result is there, CANCELLED stopped without result.PENDINGPROCESSINGWAITING_FOR_RETRYWAITING_FOR_MANUAL_REVIEWCOMPLETEDCANCELLED |
input | object | Echo of the input the validation was run with — including the customerMetadata you supplied, so results can be correlated back to your request. |
outcomemay be null | enum | VALID the registry confirmed the identifier, INVALID it rejected it (not registered, deregistered or inactive), UNKNOWN no verdict, SOURCE_UNAVAILABLE the registry could not be reached after every retry, NOT_SUPPORTED no registry checks this scheme automatically, PLAN_RESTRICTED the registry needs the all-registries option of the plan.VALIDINVALIDUNKNOWNSOURCE_UNAVAILABLENOT_SUPPORTEDPLAN_RESTRICTED |
providermay be null | enum | Registry that answered or should answer: VIES (EU), BZST (Germany), HMRC (United Kingdom), SWISS_UID (Switzerland), BRREG (Norway), ABR (Australia), NZBN (New Zealand); MANUAL for a manual review.VIESBZSTHMRCSWISS_UIDBRREGABRNZBNMANUAL |
providerStatusmay be null | enum | What technically happened at the registry. SOURCE_TIMEOUT, SOURCE_UNAVAILABLE, RATE_LIMITED and TECHNICAL_ERROR are retried automatically; NOT_USED for a manual result.SUCCESSINVALID_INPUTREQUESTER_REJECTEDREQUEST_REJECTEDACCESS_BLOCKEDSOURCE_TIMEOUTSOURCE_UNAVAILABLERATE_LIMITEDAUTHENTICATION_FAILEDTECHNICAL_ERRORNOT_SUPPORTEDPLAN_RESTRICTEDNOT_USED |
matchmay be null | object | |
responseDatamay be null | object | |
checkedAtmay be null | string | When the registry answered. |
failureReasonmay be null | string | Why the last automatic attempt failed (e.g. the source was unavailable). Present while the validation is retrying or awaiting manual review. |
nextRetryAtmay be null | string | When the next automatic attempt is scheduled, while the validation is retrying. |
idempotencyKeymay be null | string | The idempotencyKey of the request; only createValidationV1 and createValidationBatchV1 take one, newer versions use the Idempotency-Key header. |
correlationIdmay be null | string | The correlationId of the request. |
Status codes
| Status | Meaning |
|---|---|
202 | Batch accepted; every item created as PENDING and processed asynchronously (result delivered via webhook) |
401 | Missing or invalid API key |
402 | Tax identifier limit of the plan reached |
403 | API key not permitted to perform validation, or a key that is not a project key (code: project_key_required); an agency key uses the v2 operation under /projects/{projectId} |
422 | Invalid item or more than 1,000 items |
Re-validate on a schedule (v1)
Section titled “Re-validate on a schedule (v1)”https://api.trustcomponent.com/taxvalidation/v1/schedulesCreates a recurring validation schedule via API key (countryCode + rawValue; TaxIdentifier derived server-side)
Re-validates one tax identifier every month, quarter or year in the project of the API key and stores each result like a single validation. Accepts project keys only; an agency key uses createScheduleV2 under /projects/{projectId}.
Authentication: API key as bearer token. Operation createScheduleV1.
# Takes the project from the key: a project key only.curl -X POST "https://api.trustcomponent.com/taxvalidation/v1/schedules" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"countryCode": "DE", "rawValue": "DE811569869", "frequency": "MONTHLY"}'{ "scheduleId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "taxIdentifierId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "countryCode": "DE", "normalizedValue": "DE123456789", "frequency": "MONTHLY", "mode": "AUTOMATIC", "preferredProvider": "VIES", "manualReviewOnAutomaticFailure": true, "isEnabled": true, "nextRunAt": "2020-01-01T13:30:05.941Z", "lastRunAt": "2020-01-01T13:30:05.941Z", "latestValidationResultId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a"}Request body application/json
Schedule input
| Field | Type | Description |
|---|---|---|
countryCoderequired | string | ISO 3166 alpha-2 country code. The TaxIdentifierScheme is derived automatically. |
rawValuerequired | string | The tax identifier as you have it; spaces, dots, dashes and underscores are removed, at most 20 characters remain. |
companyNameoptional | string | Company name to compare with the registry, at most 256 characters. |
addressoptional | object | |
requesterVatIdoptional | string | Your own VAT ID. A German one makes the BZSt confirm a non-German EU VAT ID (qualified confirmation); VIES receives it for its qualified check. |
customerMetadataoptional | map of string | Free-form key/value metadata supplied by the customer. Max 20 entries; key must match [a-z0-9_-]+ (1..64 chars); value max 512 chars, no control characters. |
frequencyrequired | enum | How often the schedule re-validates.MONTHLYQUARTERLYYEARLY |
modeoptional | enum | AUTOMATIC asks the registry, MANUAL puts every run into the manual review queue.AUTOMATICMANUAL |
preferredProvideroptional | enum | Registry that answered or should answer: VIES (EU), BZST (Germany), HMRC (United Kingdom), SWISS_UID (Switzerland), BRREG (Norway), ABR (Australia), NZBN (New Zealand); MANUAL for a manual review.VIESBZSTHMRCSWISS_UIDBRREGABRNZBNMANUAL |
manualReviewOnAutomaticFailureoptional | boolean | Whether validations started by this schedule are routed to the manual review queue when they cannot be completed automatically. Overrides the tax validator setting. Defaults to true. |
isEnabledoptional | boolean | Defaults to true. |
Response 201 · application/json
| Field | Type | Description |
|---|---|---|
scheduleId | string (uuid) | Id of the schedule. |
taxIdentifierId | string (uuid) | Id of the stored tax identifier the schedule re-validates. |
countryCode | string | Country of the tax identifier, ISO 3166 alpha-2. |
normalizedValue | string | The tax identifier after normalization, with country prefix where the scheme has one. |
frequency | enum | How often the schedule re-validates.MONTHLYQUARTERLYYEARLY |
mode | enum | AUTOMATIC asks the registry, MANUAL puts every run into the manual review queue.AUTOMATICMANUAL |
preferredProvidermay be null | enum | Registry that answered or should answer: VIES (EU), BZST (Germany), HMRC (United Kingdom), SWISS_UID (Switzerland), BRREG (Norway), ABR (Australia), NZBN (New Zealand); MANUAL for a manual review.VIESBZSTHMRCSWISS_UIDBRREGABRNZBNMANUAL |
manualReviewOnAutomaticFailure | boolean | Whether validations of the schedule go to manual review when they cannot be completed automatically. |
isEnabled | boolean | Whether the schedule runs. |
nextRunAt | string | When the schedule runs next. |
lastRunAtmay be null | string | When the schedule ran last. |
latestValidationResultIdmay be null | string (uuid) | Id of the result of the last run. |
Status codes
| Status | Meaning |
|---|---|
201 | Schedule created |
401 | Missing or invalid API key |
402 | Project locked; answered without a code, unchanged since v1 |
403 | API key not permitted, or a key that is not a project key (code: project_key_required); an agency key uses createScheduleV2 under /projects/{projectId} |
422 | Input format invalid or scheme not supported |
Delete a schedule (v1)
Section titled “Delete a schedule (v1)”https://api.trustcomponent.com/taxvalidation/v1/schedules/{scheduleId}Stops and removes a recurring validation schedule
Results the schedule already produced stay.
Authentication: API key as bearer token. Operation deleteScheduleV1.
curl -X DELETE "https://api.trustcomponent.com/taxvalidation/v1/schedules/<schedule_id>" \ -H "Authorization: Bearer <your_api_key>"Path parameters
| Name | Type | Description |
|---|---|---|
scheduleIdrequired | string (uuid) | Id of the schedule |
Response 204
Schedule deleted (no body).
Status codes
| Status | Meaning |
|---|---|
204 | Schedule deleted |
401 | Missing or invalid API key |
402 | The project of a project API key is locked (answered without a code, as released) |
403 | A project API key lacks the Member role (code: access_denied) or its project has no VAT Checker module (without a code, as released); an agency API key has no access to the project of the schedule or lacks the Member role there (code: access_denied) |
404 | No schedule with this id, or for a project API key a schedule of another project |
423 | For an agency API key: the project of the schedule is locked by TrustComponent (code: project_locked); only support can unlock it |
Fetch a validation result (v1)
Section titled “Fetch a validation result (v1)”https://api.trustcomponent.com/taxvalidation/v1/validation-results/{validationResultId}Returns a single validation result (e.g. the one referenced in a webhook notification)
The result of a finished validation, with the input it was run with, the outcome, what the registry returned and the match verdicts.
Authentication: API key as bearer token. Operation getValidationResultV1.
curl "https://api.trustcomponent.com/taxvalidation/v1/validation-results/<validation_result_id>" \ -H "Authorization: Bearer <your_api_key>"{ "validationResultId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "taxIdentifierId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "createdAt": "2020-01-01T13:30:05.941Z", "checkedAt": "2020-01-01T13:30:05.941Z", "input": { "scheme": "EU_VAT", "countryCode": "DE", "rawValue": "DE 123 456 789", "normalizedValue": "DE123456789", "companyName": "Example GmbH", "address": { "street": "Example Street 1", "postalCode": "80331", "city": "Munich", "region": "Bavaria", "countryCode": "DE" }, "requesterVatId": "DE123456789", "customerMetadata": { "customerId": "cus_4711" } }, "outcome": "VALID", "provider": "VIES", "providerStatus": "SUCCESS", "verificationMethod": "AUTOMATIC", "match": { "companyName": "MATCH", "address": "MATCH", "addressDetails": { "street": "MATCH", "postalCode": "MATCH", "city": "MATCH", "region": "MATCH", "countryCode": "MATCH" } }, "responseData": { "companyName": "Example GmbH", "address": { "street": "Example Street 1", "postalCode": "80331", "city": "Munich", "region": "Bavaria", "countryCode": "DE" }, "sourceReference": "WAPIAAAAZ1x2y3z4", "providerMessage": "Valid" }, "comment": "Confirmed by phone with the tax office", "idempotencyKey": "order-4711-validation", "correlationId": "order-4711"}Path parameters
| Name | Type | Description |
|---|---|---|
validationResultIdrequired | string (uuid) | Id of the validation result |
Response 200 · application/json
| Field | Type | Description |
|---|---|---|
validationResultId | string (uuid) | Id of the result. |
taxIdentifierId | string (uuid) | Id of the stored tax identifier. |
createdAt | string | When the result was stored. |
checkedAt | string | When the registry answered, or the reviewer decided. |
input | object | Echo of the input the validation was run with — including the customerMetadata you supplied, so results can be correlated back to your request. |
outcome | enum | VALID the registry confirmed the identifier, INVALID it rejected it (not registered, deregistered or inactive), UNKNOWN no verdict, SOURCE_UNAVAILABLE the registry could not be reached after every retry, NOT_SUPPORTED no registry checks this scheme automatically, PLAN_RESTRICTED the registry needs the all-registries option of the plan.VALIDINVALIDUNKNOWNSOURCE_UNAVAILABLENOT_SUPPORTEDPLAN_RESTRICTED |
provider | enum | Registry that answered or should answer: VIES (EU), BZST (Germany), HMRC (United Kingdom), SWISS_UID (Switzerland), BRREG (Norway), ABR (Australia), NZBN (New Zealand); MANUAL for a manual review.VIESBZSTHMRCSWISS_UIDBRREGABRNZBNMANUAL |
providerStatus | enum | What technically happened at the registry. SOURCE_TIMEOUT, SOURCE_UNAVAILABLE, RATE_LIMITED and TECHNICAL_ERROR are retried automatically; NOT_USED for a manual result.SUCCESSINVALID_INPUTREQUESTER_REJECTEDREQUEST_REJECTEDACCESS_BLOCKEDSOURCE_TIMEOUTSOURCE_UNAVAILABLERATE_LIMITEDAUTHENTICATION_FAILEDTECHNICAL_ERRORNOT_SUPPORTEDPLAN_RESTRICTEDNOT_USED |
verificationMethod | enum | AUTOMATIC the registry decided, MANUAL a reviewer.AUTOMATICMANUAL |
match | object | |
responseDatamay be null | object | |
commentmay be null | string | Comment of the reviewer of a manual review. |
idempotencyKeymay be null | string | The idempotencyKey of the request; only createValidationV1 and createValidationBatchV1 take one, newer versions use the Idempotency-Key header. |
correlationIdmay be null | string | The correlationId of the request. |
Status codes
| Status | Meaning |
|---|---|
200 | Validation result |
401 | Missing or invalid API key |
402 | The project of a project API key is locked (answered without a code, as released) |
403 | The project of a project API key has no VAT Checker module (without a code, as released); an agency API key has no access to the project of the result (code: access_denied) |
404 | No validation result with this id, or for a project API key a result of another project |