Welcome to our VAT Validation Service API documentation.
This comprehensive guide will walk you through the simple and efficient process of integrating VAT ID validation into your applications. With our API, you can easily validate VAT IDs and perform hassle-free checks.
Whether you're developing a financial app, e-commerce platform, or any application that requires VAT verification, our service streamlines the process, saving you time and resources.
Explore our user-friendly endpoints and detailed guides to get started with seamless VAT ID validation today. Enjoy the reliability and accuracy of our service and enhance your applications effortlessly.
The API endpoints require authentication using one of the following methods:
Authorization
header with the Bearer
token.Authorization: Bearer test
apiKey
as a query parameter in the URL.Please obtain the API key from your user account to authenticate your requests.
Test API key: test
. Only works with specific VAT IDs:
SE556313500201
- Valid VAT ID SE556313500202
- Invalid VAT IDThis endpoint validates a VAT ID number.
Parameter | Type | Description | Example |
---|---|---|---|
vatId | string | VAT ID number to validate | SE556313500201 |
{ "error": false, "errorMessage": "OK", "vatId": "SE556313500201", "vatIdCountryCode": "SE", "vatIdNumber": "556313500201", "vatIdValid": true, "companyName": "BMW Northern Europe AB", "companyAddress": "BOX 794 \n191 27 SOLLENTUNA", "date": "2023-08-01T21:31:15+02:00" }
{ "error": true, "errorMessage": "Invalid test VAT ID." }
true
if there is an error, otherwise false
.errorMessage
, will not be present.errorMessage
will be "OK".error
element will be false
and the vatIdValid
element will be false
.
true
if valid, otherwise false
.
---
or similar if the company name is not available.
---
or similar if the company address is not available.
Description: The provided API key is invalid. Ensure you are using a valid API key for authentication.
Description: No API key was provided in the request. Make sure to include the API key as either an Authorization header or a GET parameter.
Description: The request has exceeded the allowed quota for the current time period. Please contact support if you believe this is an error.
Description: The provided VAT ID for testing purposes is not a valid VAT ID. Please use a valid VAT ID for testing.
Description: The user associated with the API key is invalid or not authorized to access the resource.
Description: The request was successful, and the VAT ID is valid.
Description: The provided VAT ID has an invalid format. Check the format and try again.
Description: The service is temporarily unavailable. Please try again later.
Description: An unspecified error occurred while processing the request. Please contact support if the issue persists.
Test API key: test
. Only works with specific VAT IDs:
SE556313500201
- Valid VAT ID SE556313500202
- Invalid VAT IDGET /api/check/SE556313500201?apiKey=your_api_key_here HTTP/1.1 Host: vatprotect.com
HTTP/1.1 200 OK Content-Type: application/json { "error": false, "errorMessage": "OK", "vatId": "SE556313500201", "vatIdCountryCode": "SE", "vatIdNumber": "556313500201", "vatIdValid": true, "companyName": "BMW Northern Europe AB", "companyAddress": "BOX 794 \n191 27 SOLLENTUNA", "date": "2023-08-01T21:31:15+02:00" }
GET /api/check/SE556313500201 HTTP/1.1 Host: vatprotect.com Authorization: Bearer your_api_key_here
HTTP/1.1 200 OK Content-Type: application/json { "error": false, "errorMessage": "OK", "vatId": "SE556313500201", "vatIdCountryCode": "SE", "vatIdNumber": "556313500201", "vatIdValid": true, "companyName": "BMW Northern Europe AB", "companyAddress": "BOX 794 \n191 27 SOLLENTUNA", "date": "2023-08-01T21:31:15+02:00" }
curl -X GET "https://vatprotect.com/api/check/SE556313500201?apiKey=your_api_key_here"
{ "error": false, "errorMessage": "OK", "vatId": "SE556313500201", "vatIdCountryCode": "SE", "vatIdNumber": "556313500201", "vatIdValid": true, "companyName": "BMW Northern Europe AB", "companyAddress": "BOX 794 \n191 27 SOLLENTUNA", "date": "2023-08-01T21:31:15+02:00" }
curl -X GET "https://vatprotect.com/api/check/SE556313500201" -H "Authorization: Bearer your_api_key_here"
{ "error": false, "errorMessage": "OK", "vatId": "SE556313500201", "vatIdCountryCode": "SE", "vatIdNumber": "556313500201", "vatIdValid": true, "companyName": "BMW Northern Europe AB", "companyAddress": "BOX 794 \n191 27 SOLLENTUNA", "date": "2023-08-01T21:31:15+02:00" }
<?php // Include Guzzle HTTP client require 'vendor/autoload.php'; use GuzzleHttp\Client; $apiKey = 'your_api_key_here'; $vatId = 'SE556313500201'; $client = new Client(); // HTTP Request with apiKey GET Parameter $response = $client->get("https://vatprotect.com/api/check/{$vatId}?apiKey={$apiKey}"); $data = json_decode($response->getBody(), true); // Handle the response data as needed // ... ?>
<?php // Include Guzzle HTTP client require 'vendor/autoload.php'; use GuzzleHttp\Client; $apiKey = 'your_api_key_here'; $vatId = 'SE556313500201'; $client = new Client(); // HTTP Request with Authorization Header $headers = ['Authorization' => "Bearer {$apiKey}"]; $response = $client->get("https://vatprotect.com/api/check/{$vatId}", ['headers' => $headers]); $data = json_decode($response->getBody(), true); // Handle the response data as needed // ... ?>
<script> const apiKey = 'your_api_key_here'; const vatId = 'SE556313500201'; // HTTP Request with apiKey GET Parameter axios.get(`https://vatprotect.com/api/check/${vatId}?apiKey=${apiKey}`) .then(response => { const data = response.data; // Handle the response data as needed // ... }) .catch(error => { // Handle error responses console.error(error); }); </script>
<script> const apiKey = 'your_api_key_here'; const vatId = 'SE556313500201'; // HTTP Request with Authorization Header const headers = { Authorization: `Bearer ${apiKey}` }; axios.get(`https://vatprotect.com/api/check/${vatId}`, { headers }) .then(response => { const data = response.data; // Handle the response data as needed // ... }) .catch(error => { // Handle error responses console.error(error); }); </script>
import requests apiKey = 'your_api_key_here' vatId = 'SE556313500201' # HTTP Request with apiKey GET Parameter url = f'https://vatprotect.com/api/check/{vatId}?apiKey={apiKey}' response = requests.get(url) data = response.json() # Handle the response data as needed # ...
import requests apiKey = 'your_api_key_here' vatId = 'SE556313500201' # HTTP Request with Authorization Header headers = {'Authorization': f'Bearer {apiKey}'} url = f'https://vatprotect.com/api/check/{vatId}' response = requests.get(url, headers=headers) data = response.json() # Handle the response data as needed # ...