Skip to main content

Batch Validation

Validate up to 50 VAT numbers in one request. Available on Pro and Business tiers only. Each VAT number is validated independently against the appropriate upstream service (VIES, HMRC, BFS, Bronnysund, or ABR). Results are returned in the same order as the input array.

Request body

Response shape

The response always returns HTTP 200 with a data object containing results and summary. Per-item errors appear inline in the results array rather than causing the entire request to fail.

Success result

The data object is the same VatValidationData shape as the single validate endpoint. Per-item meta contains cache information for that specific result.

Error result

When an individual VAT number fails (e.g. upstream timeout, invalid format), its result contains an error object instead of data. The vat_number that failed is in meta.

Summary

Every batch response includes a summary object:

Full example response

Deduplication

Duplicate VAT numbers in the input array are deduplicated internally. Only unique numbers are validated against the upstream service and counted toward your monthly quota. The response still returns one result per input item in the original order — duplicates receive the same result. For example, sending ["NL123456789B01", "NL123456789B01", "DE987654321"] validates 2 unique numbers and returns 3 results.

Examples

Error handling

Batch validation has two levels of errors:

HTTP-level errors

These prevent the entire batch from executing. The response shape is the standard { error, meta } envelope.

Inline errors

When the batch executes but individual VAT numbers fail, those failures appear as inline errors in the results array. The HTTP status is still 200 and the summary.failed count tells you how many items had errors. Common inline error codes: invalid_vat_format, upstream_unavailable.
Always check both levels: first error for HTTP-level failures, then iterate data.data.results for inline per-item errors. With the Node.js SDK, use isBatchSuccess() to type-narrow each result. With the Python SDK, use is_batch_success().