vatlayer

FREE
By apilayer
Updated 4 months ago
Finance
1.3/10
Popularity Score
338ms
Latency
100%
Success Rate

vatlayer API Documentation

Vatlayer is a simple REST-based JSON API offering instant EU VAT number validation, VAT compliant price calculations and VAT rates for all 28 current member states of the European Union. Its system is secured by HTTPS and focused on ease of use & integration, delivering all VAT data in lightweight and highly portable JSON format.

This level of compatibility, paired with startup- and developer-friendly pricing and a full stack of features makes the vatlayer API a perfect VAT rate automation and number validation tool for individuals, businesses and merchants selling and buying goods in and around the European Union.

View API Details
GETValidate VAT Number
GETSingle EU VAT Rate
GETRequest all EU VAT Rates
GETCalculate EU VAT Compliant Price
GETRequest list of types of goods
GETValidate VAT Number

Using the "validate" endpoint, you may request the API to validate any EU VAT number and obtain information about the company it is assigned to

Authorization:

Access the vatlayer API by appending your unique Access Key.

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
vat_numberSTRING
REQUIRED"vat_number" parameter - append the VAT number you want to validate
access_keyQUERY
REQUIREDThis is your unique API Access Key
Code Snippet
unirest.get("https://apilayer-vatlayer-v1.p.rapidapi.com/validate")
.header("X-RapidAPI-Host", "apilayer-vatlayer-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://apilayer-vatlayer-v1.p.rapidapi.com/validate
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://apilayer-vatlayer-v1.p.rapidapi.com/validate")
.header("X-RapidAPI-Host", "apilayer-vatlayer-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication