Trust VAT Checker API
The Trust VAT Checker API validates tax identifiers against the registry of their country: one at a time while a customer signs up, in batches for an existing customer base, or on a schedule that keeps re-checking them. Calls that create something name their project in the path, so an agency key works for each client project it reaches.
What the outcomes, provider statuses and match verdicts mean, and which registry checks which country, is in Checking VAT IDs.
Validate a tax identifier
Section titled “Validate a tax identifier”https://api.trustcomponent.com/taxvalidation/v2/projects/{projectId}/validationsValidates a tax identifier for a project
Checks one tax identifier against the registry of its country. 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 key of an agency validates for each client project it reaches; a key of a project uses its own project id.
Authentication: API key as bearer token. Operation createValidationV2.
curl -X POST "https://api.trustcomponent.com/taxvalidation/v2/projects/<project_id>/validations" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"countryCode": "DE", "rawValue": "DE811569869"}'import { TrustComponent } from '@trustcomponent/sdk';
const tc = new TrustComponent('<your_api_key>');
const validation = await tc.taxValidation.validations.createValidation({ projectId: '<project_id>', taxValidationValidationCreateParams: { countryCode: 'DE', rawValue: 'DE811569869' },});use TrustComponent\TrustComponent;use TrustComponent\Model\TaxValidationValidationCreateParams;
$tc = new TrustComponent('<your_api_key>');
$validation = $tc->taxValidation()->validations()->createValidation( '<project_id>', new TaxValidationValidationCreateParams(['countryCode' => 'DE', 'rawValue' => 'DE811569869']),);from uuid import UUIDfrom trustcomponent import TrustComponent, models
tc = TrustComponent("<your_api_key>")
validation = tc.tax_validation.validations.create_validation( UUID("<project_id>"), models.TaxValidationValidationCreateParams(countryCode="DE", rawValue="DE811569869"),)import com.trustcomponent.sdk.TrustComponent;import com.trustcomponent.sdk.model.TaxValidationValidation;import com.trustcomponent.sdk.model.TaxValidationValidationCreateParams;import java.util.UUID;
TrustComponent tc = new TrustComponent("<your_api_key>");
TaxValidationValidation validation = tc.taxValidation().validations().createValidation( UUID.fromString("<project_id>"), new TaxValidationValidationCreateParams().countryCode("DE").rawValue("DE811569869"));using TrustComponent;using TrustComponent.Model;
using var tc = new TrustComponentClient("<your_api_key>");
var validation = await tc.TaxValidation.Validations.CreateValidationAsync( Guid.Parse("<project_id>"), new TaxValidationValidationCreateParams(countryCode: "DE", rawValue: "DE811569869"));import ( "context"
trustcomponent "github.com/trustcomponent/trustcomponent-go" "github.com/trustcomponent/trustcomponent-go/api")
tc := trustcomponent.New("<your_api_key>")ctx := context.Background()
validation, _, err := tc.TaxValidation.Validations.CreateValidation(ctx, "<project_id>"). TaxValidationValidationCreateParams(*api.NewTaxValidationValidationCreateParams("DE", "DE811569869")). Execute()if err != nil { panic(err)}require 'trustcomponent'
tc = TrustComponent::Client.new('<your_api_key>')
validation = tc.tax_validation.validations.create_validation( '<project_id>', TrustComponent::Api::TaxValidationValidationCreateParams.new(country_code: 'DE', raw_value: 'DE811569869'))use trustcomponent::apis::tax_validation_validations_api::CreateValidationParams;use trustcomponent::models::TaxValidationValidationCreateParams;
let tc = trustcomponent::TrustComponent::new("<your_api_key>");
let validation = tc.tax_validation.validations.create_validation(CreateValidationParams { project_id: "<project_id>".into(), tax_validation_validation_create_params: TaxValidationValidationCreateParams::new("DE".into(), "DE811569869".into()),}).await?;{ "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"}Path parameters
| Name | Type | Description |
|---|---|---|
projectIdrequired | string (uuid) | Id of the project |
Headers
| Name | Type | Description |
|---|---|---|
Idempotency-Keyoptional | string | Your key for this request, at most 255 characters, for example a UUID. Sent again with the same key and the same request within 24 hours, the request is not processed a second time: the answer is the first one, marked with the header Idempotent-Replayed: true. Only successful answers are kept, so a request that failed can be repeated with the same key. The TrustComponent SDKs send a new key with every write and the same key on their own retries. · 0–255 characters |
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 |
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 201 · 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 |
|---|---|
201 | Validation completed (synchronous outcome) |
202 | Validation accepted, processing asynchronously |
400 | Input format invalid or scheme not supported, or the Idempotency-Key was already used for a different request (code: idempotency_key_reused) or is not 1 to 255 printable characters (code: idempotency_key_invalid) |
401 | API key missing (code: credentials_missing) or invalid (code: credentials_invalid) |
402 | Trial of the module ended (code: trial_expired), the plan does not include it (code: feature_not_included), or the tax identifier limit of the plan is reached (code: plan_limit_reached) |
403 | The API key has no access to this project or lacks the MEMBER role on it (code: access_denied) |
404 | The project has no VAT Checker module |
409 | A request with this Idempotency-Key is still being processed (code: idempotency_key_in_flight); send it again in a moment |
423 | Project locked by TrustComponent (code: project_locked); only support can unlock it |
429 | Too many requests (code: rate_limit_exceeded); retry after the seconds in Retry-After |
Synchronous, asynchronous, repeated
Section titled “Synchronous, asynchronous, repeated”201: the registry answered within the request;outcome,providerandvalidationResultIdare set.202: the registry was slow or unavailable. The check continues in the background (WAITING_FOR_RETRYshowsnextRetryAtand thefailureReason) and the result arrives by webhook or through the result call.- Repeated: a request sent again with the same
Idempotency-Keyheader is checked only once; the answer is the first one, marked withIdempotent-Replayed: true. The SDKs do this on their own retries; see Idempotency for your own key.
A check that cannot be completed automatically goes to the manual review queue by default instead of ending as a failure.
Validate many at once
Section titled “Validate many at once”https://api.trustcomponent.com/taxvalidation/v2/projects/{projectId}/validations/batchSubmits multiple validation requests for a project in one call
Accepts up to 1,000 tax identifiers at once. Every item becomes a validation with status PENDING and is checked in the background; each result arrives by webhook or through getValidationResultV1. The answer lists the validations in the order of the items. A batch is accepted or rejected as a whole: one invalid item rejects all of them.
Authentication: API key as bearer token. Operation createValidationBatchV2.
curl -X POST "https://api.trustcomponent.com/taxvalidation/v2/projects/<project_id>/validations/batch" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"items": [{"countryCode": "DE", "rawValue": "DE811569869"}, {"countryCode": "AT", "rawValue": "ATU33864707"}]}'import { TrustComponent } from '@trustcomponent/sdk';
const tc = new TrustComponent('<your_api_key>');
const validations = await tc.taxValidation.validations.createValidationBatch({ projectId: '<project_id>', taxValidationValidationBatchCreateParams: { items: [ { countryCode: 'DE', rawValue: 'DE811569869' }, { countryCode: 'AT', rawValue: 'ATU33864707' }, ], },});use TrustComponent\TrustComponent;use TrustComponent\Model\TaxValidationValidationBatchCreateParams;use TrustComponent\Model\TaxValidationValidationCreateParams;
$tc = new TrustComponent('<your_api_key>');
$validations = $tc->taxValidation()->validations()->createValidationBatch( '<project_id>', new TaxValidationValidationBatchCreateParams(['items' => [ new TaxValidationValidationCreateParams(['countryCode' => 'DE', 'rawValue' => 'DE811569869']), new TaxValidationValidationCreateParams(['countryCode' => 'AT', 'rawValue' => 'ATU33864707']), ]]),);from uuid import UUIDfrom trustcomponent import TrustComponent, models
tc = TrustComponent("<your_api_key>")
validations = tc.tax_validation.validations.create_validation_batch( UUID("<project_id>"), models.TaxValidationValidationBatchCreateParams(items=[ models.TaxValidationValidationCreateParams(countryCode="DE", rawValue="DE811569869"), models.TaxValidationValidationCreateParams(countryCode="AT", rawValue="ATU33864707"), ]),)import com.trustcomponent.sdk.TrustComponent;import com.trustcomponent.sdk.model.TaxValidationValidation;import com.trustcomponent.sdk.model.TaxValidationValidationBatchCreateParams;import com.trustcomponent.sdk.model.TaxValidationValidationCreateParams;import java.util.List;import java.util.UUID;
TrustComponent tc = new TrustComponent("<your_api_key>");
List<TaxValidationValidation> validations = tc.taxValidation().validations().createValidationBatch( UUID.fromString("<project_id>"), new TaxValidationValidationBatchCreateParams().items(List.of( new TaxValidationValidationCreateParams().countryCode("DE").rawValue("DE811569869"), new TaxValidationValidationCreateParams().countryCode("AT").rawValue("ATU33864707"))));using TrustComponent;using TrustComponent.Model;
using var tc = new TrustComponentClient("<your_api_key>");
var validations = await tc.TaxValidation.Validations.CreateValidationBatchAsync( Guid.Parse("<project_id>"), new TaxValidationValidationBatchCreateParams(items: new List<TaxValidationValidationCreateParams> { new(countryCode: "DE", rawValue: "DE811569869"), new(countryCode: "AT", rawValue: "ATU33864707"), }));import ( "context"
trustcomponent "github.com/trustcomponent/trustcomponent-go" "github.com/trustcomponent/trustcomponent-go/api")
tc := trustcomponent.New("<your_api_key>")ctx := context.Background()
items := []api.TaxValidationValidationCreateParams{ *api.NewTaxValidationValidationCreateParams("DE", "DE811569869"), *api.NewTaxValidationValidationCreateParams("AT", "ATU33864707"),}validations, _, err := tc.TaxValidation.Validations.CreateValidationBatch(ctx, "<project_id>"). TaxValidationValidationBatchCreateParams(*api.NewTaxValidationValidationBatchCreateParams(items)). Execute()if err != nil { panic(err)}require 'trustcomponent'
tc = TrustComponent::Client.new('<your_api_key>')
items = [%w[DE DE811569869], %w[AT ATU33864707]].map do |country_code, raw_value| TrustComponent::Api::TaxValidationValidationCreateParams.new(country_code: country_code, raw_value: raw_value)endvalidations = tc.tax_validation.validations.create_validation_batch( '<project_id>', TrustComponent::Api::TaxValidationValidationBatchCreateParams.new(items: items))use trustcomponent::apis::tax_validation_validations_api::CreateValidationBatchParams;use trustcomponent::models::{TaxValidationValidationBatchCreateParams, TaxValidationValidationCreateParams};
let tc = trustcomponent::TrustComponent::new("<your_api_key>");
let items = vec![ TaxValidationValidationCreateParams::new("DE".into(), "DE811569869".into()), TaxValidationValidationCreateParams::new("AT".into(), "ATU33864707".into()),];let validations = tc.tax_validation.validations.create_validation_batch(CreateValidationBatchParams { project_id: "<project_id>".into(), tax_validation_validation_batch_create_params: TaxValidationValidationBatchCreateParams::new(items),}).await?;[ { "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" }]Path parameters
| Name | Type | Description |
|---|---|---|
projectIdrequired | string (uuid) | Id of the project |
Headers
| Name | Type | Description |
|---|---|---|
Idempotency-Keyoptional | string | Your key for this request, at most 255 characters, for example a UUID. Sent again with the same key and the same request within 24 hours, the request is not processed a second time: the answer is the first one, marked with the header Idempotent-Replayed: true. Only successful answers are kept, so a request that failed can be repeated with the same key. The TrustComponent SDKs send a new key with every write and the same key on their own retries. · 0–255 characters |
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) |
400 | Invalid item or more than 1,000 items, or the Idempotency-Key was already used for a different request (code: idempotency_key_reused) or is not 1 to 255 printable characters (code: idempotency_key_invalid) |
401 | API key missing (code: credentials_missing) or invalid (code: credentials_invalid) |
402 | Tax identifier limit of the plan reached (code: plan_limit_reached) or trial of the module ended (code: trial_expired) |
403 | The API key has no access to this project or lacks the MEMBER role on it (code: access_denied) |
404 | The project has no VAT Checker module |
409 | A request with this Idempotency-Key is still being processed (code: idempotency_key_in_flight); send it again in a moment |
423 | Project locked by TrustComponent (code: project_locked); only support can unlock it |
429 | Too many requests (code: rate_limit_exceeded); retry after the seconds in Retry-After |
A batch holds up to 1,000 items and is checked as a whole before anything is stored: one invalid item answers 400 and nothing is created. Split larger volumes into several requests. When the tax identifier limit of the plan is already reached, the answer is 402 with code: plan_limit_reached; a batch that starts below the limit is accepted as a whole, even if it goes past it.
Re-validate on a schedule
Section titled “Re-validate on a schedule”https://api.trustcomponent.com/taxvalidation/v2/projects/{projectId}/schedulesCreates a recurring validation schedule for a project
Re-validates one tax identifier every month, quarter or year and stores each result like a single validation. Needs the scheduled validation of the plan. A key of an agency creates schedules in each client project it reaches.
Authentication: API key as bearer token. Operation createScheduleV2.
curl -X POST "https://api.trustcomponent.com/taxvalidation/v2/projects/<project_id>/schedules" \ -H "Authorization: Bearer <your_api_key>" \ -H "Content-Type: application/json" \ -d '{"countryCode": "DE", "rawValue": "DE811569869", "frequency": "MONTHLY"}'import { TrustComponent } from '@trustcomponent/sdk';
const tc = new TrustComponent('<your_api_key>');
const schedule = await tc.taxValidation.schedules.createSchedule({ projectId: '<project_id>', taxValidationScheduleCreateParams: { countryCode: 'DE', rawValue: 'DE811569869', frequency: 'MONTHLY' },});use TrustComponent\TrustComponent;use TrustComponent\Model\TaxValidationScheduleCreateParams;
$tc = new TrustComponent('<your_api_key>');
$schedule = $tc->taxValidation()->schedules()->createSchedule( '<project_id>', new TaxValidationScheduleCreateParams(['countryCode' => 'DE', 'rawValue' => 'DE811569869', 'frequency' => 'MONTHLY']),);from uuid import UUIDfrom trustcomponent import TrustComponent, models
tc = TrustComponent("<your_api_key>")
schedule = tc.tax_validation.schedules.create_schedule( UUID("<project_id>"), models.TaxValidationScheduleCreateParams(countryCode="DE", rawValue="DE811569869", frequency=models.TaxValidationValidationFrequencyEnum.MONTHLY),)import com.trustcomponent.sdk.TrustComponent;import com.trustcomponent.sdk.model.TaxValidationSchedule;import com.trustcomponent.sdk.model.TaxValidationScheduleCreateParams;import com.trustcomponent.sdk.model.TaxValidationValidationFrequencyEnum;import java.util.UUID;
TrustComponent tc = new TrustComponent("<your_api_key>");
TaxValidationSchedule schedule = tc.taxValidation().schedules().createSchedule( UUID.fromString("<project_id>"), new TaxValidationScheduleCreateParams().countryCode("DE").rawValue("DE811569869").frequency(TaxValidationValidationFrequencyEnum.MONTHLY));using TrustComponent;using TrustComponent.Model;
using var tc = new TrustComponentClient("<your_api_key>");
var schedule = await tc.TaxValidation.Schedules.CreateScheduleAsync( Guid.Parse("<project_id>"), new TaxValidationScheduleCreateParams(countryCode: "DE", rawValue: "DE811569869", frequency: TaxValidationValidationFrequencyEnum.MONTHLY));import ( "context"
trustcomponent "github.com/trustcomponent/trustcomponent-go" "github.com/trustcomponent/trustcomponent-go/api")
tc := trustcomponent.New("<your_api_key>")ctx := context.Background()
params := api.NewTaxValidationScheduleCreateParams("DE", "DE811569869", api.TAXVALIDATIONVALIDATIONFREQUENCYENUM_MONTHLY)schedule, _, err := tc.TaxValidation.Schedules.CreateSchedule(ctx, "<project_id>").TaxValidationScheduleCreateParams(*params).Execute()if err != nil { panic(err)}require 'trustcomponent'
tc = TrustComponent::Client.new('<your_api_key>')
schedule = tc.tax_validation.schedules.create_schedule( '<project_id>', TrustComponent::Api::TaxValidationScheduleCreateParams.new(country_code: 'DE', raw_value: 'DE811569869', frequency: 'MONTHLY'))use trustcomponent::apis::tax_validation_schedules_api::CreateScheduleParams;use trustcomponent::models::{TaxValidationScheduleCreateParams, TaxValidationValidationFrequencyEnum};
let tc = trustcomponent::TrustComponent::new("<your_api_key>");
let schedule = tc.tax_validation.schedules.create_schedule(CreateScheduleParams { project_id: "<project_id>".into(), tax_validation_schedule_create_params: TaxValidationScheduleCreateParams::new("DE".into(), "DE811569869".into(), TaxValidationValidationFrequencyEnum::Monthly),}).await?;{ "scheduleId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "taxIdentifierId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a", "countryCode": "DE", "normalizedValue": "DE123456789", "frequency": "MONTHLY", "mode": "AUTOMATIC", "preferredProvider": "VIES", "isManualReviewOnAutomaticFailure": true, "isEnabled": true, "nextRunAt": "2020-01-01T13:30:05.941Z", "lastRunAt": "2020-01-01T13:30:05.941Z", "latestValidationResultId": "cc2e2d5e-d1ef-4a7f-a7bd-dec5b37df47a"}Path parameters
| Name | Type | Description |
|---|---|---|
projectIdrequired | string (uuid) | Id of the project |
Headers
| Name | Type | Description |
|---|---|---|
Idempotency-Keyoptional | string | Your key for this request, at most 255 characters, for example a UUID. Sent again with the same key and the same request within 24 hours, the request is not processed a second time: the answer is the first one, marked with the header Idempotent-Replayed: true. Only successful answers are kept, so a request that failed can be repeated with the same key. The TrustComponent SDKs send a new key with every write and the same key on their own retries. · 0–255 characters |
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 |
isManualReviewOnAutomaticFailureoptional | 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 |
isManualReviewOnAutomaticFailure | 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 |
400 | Input format invalid or scheme not supported, or the Idempotency-Key was already used for a different request (code: idempotency_key_reused) or is not 1 to 255 printable characters (code: idempotency_key_invalid) |
401 | API key missing (code: credentials_missing) or invalid (code: credentials_invalid) |
402 | Scheduled validation not included in the plan (code: feature_not_included), the tax identifier limit of the plan reached (code: plan_limit_reached) or trial of the module ended (code: trial_expired) |
403 | The API key has no access to this project or lacks the MEMBER role on it (code: access_denied) |
404 | The project has no VAT Checker module |
409 | A request with this Idempotency-Key is still being processed (code: idempotency_key_in_flight); send it again in a moment |
423 | Project locked by TrustComponent (code: project_locked); only support can unlock it |
429 | Too many requests (code: rate_limit_exceeded); retry after the seconds in Retry-After |
A schedule runs monthly, quarterly or yearly and stores every run as a normal validation result, which reaches you by webhook like any other. Scheduled validation is part of the plan; without it the answer is 402 with code: feature_not_included. To start a schedule together with a first check, send attachSchedule with createValidationV2. More in Scheduled Re-Validation.
https://api.trustcomponent.com/taxvalidation/v2/schedules/{scheduleId}Stops and removes a recurring validation schedule
Results the schedule already produced stay. The schedule names its project, so a key of the project or of an agency that reaches the project with the Member role can delete it. An ended trial does not stop a deletion.
Authentication: API key as bearer token. Operation deleteScheduleV2.
curl -X DELETE "https://api.trustcomponent.com/taxvalidation/v2/schedules/<schedule_id>" \ -H "Authorization: Bearer <your_api_key>"import { TrustComponent } from '@trustcomponent/sdk';
const tc = new TrustComponent('<your_api_key>');
await tc.taxValidation.schedules.deleteSchedule({ scheduleId: '<schedule_id>' });use TrustComponent\TrustComponent;
$tc = new TrustComponent('<your_api_key>');
$tc->taxValidation()->schedules()->deleteSchedule('<schedule_id>');from uuid import UUIDfrom trustcomponent import TrustComponent
tc = TrustComponent("<your_api_key>")
tc.tax_validation.schedules.delete_schedule(UUID("<schedule_id>"))import com.trustcomponent.sdk.TrustComponent;import java.util.UUID;
TrustComponent tc = new TrustComponent("<your_api_key>");
tc.taxValidation().schedules().deleteSchedule(UUID.fromString("<schedule_id>"));using TrustComponent;
using var tc = new TrustComponentClient("<your_api_key>");
await tc.TaxValidation.Schedules.DeleteScheduleAsync(Guid.Parse("<schedule_id>"));import ( "context"
trustcomponent "github.com/trustcomponent/trustcomponent-go")
tc := trustcomponent.New("<your_api_key>")ctx := context.Background()
if _, err := tc.TaxValidation.Schedules.DeleteSchedule(ctx, "<schedule_id>").Execute(); err != nil { panic(err)}require 'trustcomponent'
tc = TrustComponent::Client.new('<your_api_key>')
tc.tax_validation.schedules.delete_schedule('<schedule_id>')use trustcomponent::apis::tax_validation_schedules_api::DeleteScheduleParams;
let tc = trustcomponent::TrustComponent::new("<your_api_key>");
tc.tax_validation.schedules.delete_schedule(DeleteScheduleParams { schedule_id: "<schedule_id>".into(),}).await?;Path parameters
| Name | Type | Description |
|---|---|---|
scheduleIdrequired | string (uuid) | Id of the schedule |
Headers
| Name | Type | Description |
|---|---|---|
Idempotency-Keyoptional | string | Your key for this request, at most 255 characters, for example a UUID. Sent again with the same key and the same request within 24 hours, the request is not processed a second time: the answer is the first one, marked with the header Idempotent-Replayed: true. Only successful answers are kept, so a request that failed can be repeated with the same key. The TrustComponent SDKs send a new key with every write and the same key on their own retries. · 0–255 characters |
Response 204
Schedule deleted (no body).
Status codes
| Status | Meaning |
|---|---|
204 | Schedule deleted |
400 | The Idempotency-Key was already used for a different request (code: idempotency_key_reused) or is not 1 to 255 printable characters (code: idempotency_key_invalid) |
401 | API key missing (code: credentials_missing) or invalid (code: credentials_invalid) |
403 | The API key has no access to the project of the schedule or lacks the MEMBER role on it (code: access_denied) |
404 | No schedule with this id, or its project has no VAT Checker module |
409 | A request with this Idempotency-Key is still being processed (code: idempotency_key_in_flight); send it again in a moment |
423 | Project locked by TrustComponent (code: project_locked); only support can unlock it |
429 | Too many requests (code: rate_limit_exceeded); retry after the seconds in Retry-After |
Fetch a validation result
Section titled “Fetch a validation result”https://api.trustcomponent.com/taxvalidation/v2/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. The result names its project, so any key of the project or of an agency that reaches the project can read it, also while the project is locked.
Authentication: API key as bearer token. Operation getValidationResultV2.
curl "https://api.trustcomponent.com/taxvalidation/v2/validation-results/<validation_result_id>" \ -H "Authorization: Bearer <your_api_key>"import { TrustComponent } from '@trustcomponent/sdk';
const tc = new TrustComponent('<your_api_key>');
const result = await tc.taxValidation.validationResults.getValidationResult({ validationResultId: '<validation_result_id>' });use TrustComponent\TrustComponent;
$tc = new TrustComponent('<your_api_key>');
$result = $tc->taxValidation()->validationResults()->getValidationResult('<validation_result_id>');from uuid import UUIDfrom trustcomponent import TrustComponent
tc = TrustComponent("<your_api_key>")
result = tc.tax_validation.validation_results.get_validation_result(UUID("<validation_result_id>"))import com.trustcomponent.sdk.TrustComponent;import com.trustcomponent.sdk.model.TaxValidationValidationResult;import java.util.UUID;
TrustComponent tc = new TrustComponent("<your_api_key>");
TaxValidationValidationResult result = tc.taxValidation().validationResults().getValidationResult(UUID.fromString("<validation_result_id>"));using TrustComponent;
using var tc = new TrustComponentClient("<your_api_key>");
var result = await tc.TaxValidation.ValidationResults.GetValidationResultAsync(Guid.Parse("<validation_result_id>"));import ( "context"
trustcomponent "github.com/trustcomponent/trustcomponent-go")
tc := trustcomponent.New("<your_api_key>")ctx := context.Background()
result, _, err := tc.TaxValidation.ValidationResults.GetValidationResult(ctx, "<validation_result_id>").Execute()if err != nil { panic(err)}require 'trustcomponent'
tc = TrustComponent::Client.new('<your_api_key>')
result = tc.tax_validation.validation_results.get_validation_result('<validation_result_id>')use trustcomponent::apis::tax_validation_validation_results_api::GetValidationResultParams;
let tc = trustcomponent::TrustComponent::new("<your_api_key>");
let result = tc.tax_validation.validation_results.get_validation_result(GetValidationResultParams { validation_result_id: "<validation_result_id>".into(),}).await?;{ "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 | API key missing (code: credentials_missing) or invalid (code: credentials_invalid) |
403 | The API key has no access to the project of the result (code: access_denied) |
404 | No validation result with this id, or its project has no VAT Checker module |
429 | Too many requests (code: rate_limit_exceeded); retry after the seconds in Retry-After |
Use it for the validationResultId of a 201 answer, of a webhook event or of the last run of a schedule. What each field means is in Results.
Webhook events
Section titled “Webhook events”Configure webhook endpoints per project under API / Integration. The VAT Checker sends:
| Event type | Sent when |
|---|---|
taxvalidation.validation.completed | Any check completes (automatic, manual review, or recorded) |
taxvalidation.validation.invalid | Additionally, when the outcome is INVALID |
taxvalidation.validation.manual-review-required | A check enters the manual review queue |
{ "eventType": "taxvalidation.validation.completed", "occurredAt": "2026-07-01T10:30:02Z", "taxValidatorId": "…", "validationResultId": "…", "outcome": "VALID", "provider": "VIES", "providerStatus": "SUCCESS"}The manual-review-required payload carries the validationRequestId and its status instead of a result. Fetch the full result with getValidationResultV2.