Validate multiple VAT numbers asynchronously
curl --request POST \
--url https://api.avatcado.com/v1/validate/async/batch \
--header 'Content-Type: application/json' \
--data '
{
"vat_numbers": [
"DE123456789",
"NL987654321B01"
],
"requester_vat_number": "NL987654321B01",
"cache": true
}
'import requests
url = "https://api.avatcado.com/v1/validate/async/batch"
payload = {
"vat_numbers": ["DE123456789", "NL987654321B01"],
"requester_vat_number": "NL987654321B01",
"cache": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vat_numbers: ['DE123456789', 'NL987654321B01'],
requester_vat_number: 'NL987654321B01',
cache: true
})
};
fetch('https://api.avatcado.com/v1/validate/async/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.avatcado.com/v1/validate/async/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vat_numbers' => [
'DE123456789',
'NL987654321B01'
],
'requester_vat_number' => 'NL987654321B01',
'cache' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.avatcado.com/v1/validate/async/batch"
payload := strings.NewReader("{\n \"vat_numbers\": [\n \"DE123456789\",\n \"NL987654321B01\"\n ],\n \"requester_vat_number\": \"NL987654321B01\",\n \"cache\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.avatcado.com/v1/validate/async/batch")
.header("Content-Type", "application/json")
.body("{\n \"vat_numbers\": [\n \"DE123456789\",\n \"NL987654321B01\"\n ],\n \"requester_vat_number\": \"NL987654321B01\",\n \"cache\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avatcado.com/v1/validate/async/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vat_numbers\": [\n \"DE123456789\",\n \"NL987654321B01\"\n ],\n \"requester_vat_number\": \"NL987654321B01\",\n \"cache\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"batch_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"total": 200,
"accepted": 197,
"rejected": [
{
"vat_number": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
]
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"cached": true,
"cached_at": "<string>",
"stale": true,
"source_status": "live",
"mode": "test",
"request_duration_ms": 120
}
}{
"error": {
"code": "webhook_not_configured",
"message": "Configure a webhook URL before using async validation. See https://docs.avatcado.com/webhooks",
"docs_url": "https://docs.avatcado.com/errors/webhook_not_configured"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key",
"docs_url": "https://docs.avatcado.com/errors/unauthorized"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "tier_insufficient",
"message": "Async validation requires a Pro or Business plan",
"docs_url": "https://docs.avatcado.com/errors/tier_insufficient"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "validation_error",
"message": "At least one VAT number is required",
"docs_url": "https://docs.avatcado.com/errors/validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Monthly validation limit exceeded",
"docs_url": "https://docs.avatcado.com/errors/rate_limit_exceeded"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Async Validation
Validate multiple VAT numbers asynchronously
Submit an array of VAT numbers for asynchronous validation. Returns 202 immediately with an accepted/rejected breakdown. Items with invalid formats are rejected inline in the response (never queued). Results for all accepted items are delivered as a single batch.completed webhook event.
Pro tier: max 200 items. Business tier: max 1000 items. Test keys are rejected.
POST
/
v1
/
validate
/
async
/
batch
Validate multiple VAT numbers asynchronously
curl --request POST \
--url https://api.avatcado.com/v1/validate/async/batch \
--header 'Content-Type: application/json' \
--data '
{
"vat_numbers": [
"DE123456789",
"NL987654321B01"
],
"requester_vat_number": "NL987654321B01",
"cache": true
}
'import requests
url = "https://api.avatcado.com/v1/validate/async/batch"
payload = {
"vat_numbers": ["DE123456789", "NL987654321B01"],
"requester_vat_number": "NL987654321B01",
"cache": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vat_numbers: ['DE123456789', 'NL987654321B01'],
requester_vat_number: 'NL987654321B01',
cache: true
})
};
fetch('https://api.avatcado.com/v1/validate/async/batch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.avatcado.com/v1/validate/async/batch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vat_numbers' => [
'DE123456789',
'NL987654321B01'
],
'requester_vat_number' => 'NL987654321B01',
'cache' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.avatcado.com/v1/validate/async/batch"
payload := strings.NewReader("{\n \"vat_numbers\": [\n \"DE123456789\",\n \"NL987654321B01\"\n ],\n \"requester_vat_number\": \"NL987654321B01\",\n \"cache\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.avatcado.com/v1/validate/async/batch")
.header("Content-Type", "application/json")
.body("{\n \"vat_numbers\": [\n \"DE123456789\",\n \"NL987654321B01\"\n ],\n \"requester_vat_number\": \"NL987654321B01\",\n \"cache\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.avatcado.com/v1/validate/async/batch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vat_numbers\": [\n \"DE123456789\",\n \"NL987654321B01\"\n ],\n \"requester_vat_number\": \"NL987654321B01\",\n \"cache\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"batch_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"total": 200,
"accepted": 197,
"rejected": [
{
"vat_number": "<string>",
"error": {
"code": "<string>",
"message": "<string>"
}
}
]
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"cached": true,
"cached_at": "<string>",
"stale": true,
"source_status": "live",
"mode": "test",
"request_duration_ms": 120
}
}{
"error": {
"code": "webhook_not_configured",
"message": "Configure a webhook URL before using async validation. See https://docs.avatcado.com/webhooks",
"docs_url": "https://docs.avatcado.com/errors/webhook_not_configured"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key",
"docs_url": "https://docs.avatcado.com/errors/unauthorized"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "tier_insufficient",
"message": "Async validation requires a Pro or Business plan",
"docs_url": "https://docs.avatcado.com/errors/tier_insufficient"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "validation_error",
"message": "At least one VAT number is required",
"docs_url": "https://docs.avatcado.com/errors/validation_error"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Monthly validation limit exceeded",
"docs_url": "https://docs.avatcado.com/errors/rate_limit_exceeded"
},
"meta": {
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Body
application/json
Array of VAT numbers to validate (max 200 for Pro, 1000 for Business)
Minimum array length:
1Minimum string length:
1Example:
["DE123456789", "NL987654321B01"]
Your own VAT number (for consultation numbers)
Example:
"NL987654321B01"
Whether to use cached results
Example:
true
⌘I