Documentation Index
Fetch the complete documentation index at: https://docs.vatly.dev/llms.txt
Use this file to discover all available pages before exploring further.
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
| Field | Type | Required | Description |
|---|---|---|---|
vat_numbers | string[] | Yes | Array of VAT numbers to validate (1-50 items) |
requester_vat_number | string | No | Your own VAT number, to receive consultation numbers |
cache | boolean | No | Set to false to bypass the cache. Defaults to true |
Response shape
The response always returns HTTP200 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
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 anerror object instead of data. The vat_number that failed is in meta.
Summary
Every batch response includes asummary 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.
| HTTP Status | Error Code | Cause |
|---|---|---|
| 401 | unauthorized | Invalid or missing API key |
| 403 | tier_insufficient | Free tier — upgrade to Pro or Business |
| 422 | validation_error | Invalid request body (e.g. empty array, >50 items) |
| 429 | rate_limit_exceeded | Monthly quota insufficient for this batch |
Inline errors
When the batch executes but individual VAT numbers fail, those failures appear as inline errors in theresults 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().