# Introduction

{% hint style="danger" %}
VatZen is Deprecated since January 2022 and API server will be shut down soon!
{% endhint %}

VatZen provides *various tools to help you build VAT-compliant business. We provide tools to obtain VAT rates by country, properly geolocate you customers, validate business VAT numbers, and more. To see all the services, please* [*check our website*](https://vatzen.com/)*.*

Our API is built in accordance with [REST principles](https://en.wikipedia.org/wiki/Representational_state_transfer). All API results are delivered in JSON format through HTTP methods (endpoints mostly support GET and POST operations). The JSON format ensures maximum compatibility with industry-standard web application frameworks and programming languages.

VatZen also providers libraries for different programming languages and framework, including NodeJS, Ruby and Python. See documentation below.

## API Description

### API Endpoints

Current API version is `v1` and you can access the API via this endpoint:

```
https://api.vatzen.com/v1/
```

### Authorization

You can read more about Authorization in the [special documentation section](https://documentation.vatzen.com/authorization).

Every user has a uniq API key, which is assigned during the registration process and always available from the [VatZen Dashboard](https://dashboard.vatzen.com). You can also reset you API key at any time if you feel it could have been compromised.

Each API route is protected via api key, so it's required for you to provide it with every request.

### API Responses

Every endpoint returns the response in JSON format which can be easily read by your application.

Every successful response has HTTP status code `200` and also has `success: true` field inside. Is the response code is not 200 and `success: false`, it means you got an error. Read more about our API errors below.

&#x20;Here's the simple response from the `/rate` endpoint.

```javascript
{
  "success": true,
  "standart_rate": 20,
  "categories": {
    "audiobook": 10,
    "broadcasting": 10,
    "ebook": 10,
    "eperiodical": 10,
    "eservice": 10,
    "telecommunication": 20
  },
  "currency": "EUR",
  "country": {
    "code": "AT",
    "name": "Austria",
    "local_name": "Austria",
    "member_state": true
  }
}
```

### API Errors

*For details about API errors, please* [*see the dedicated page*](https://documentation.vatzen.com/api-errors)*.*

If you request fails for some reason, VatZen API will return non-200 HTTP code as well as JSON response which will contain details about the error occurred. Below you can see an example of the error returned:

```javascript
{
  "status": 403,
  "success": false,
  "error": {
    "code": 101,
    "type": "missing_api_key",
    "message": "You did not provide proper API key, please check documentation"
  }
}
```

## Available Endpoints

A list of available endpoints (more coming soon!):

* `/rates` to get all actual VAT rates, supports pagination.
* `/rate` to get the rate for the specific country based on different inputs, such as country code, ip address, etc.
* `/validate` to validate a VAT number.
* `/customerLocation` to get a customer location and VAT rate.
* `/price` for VAT price calculation.
* `/businessInfo` for obtaining business information.
* `/invoice` for generating VAT compliant invoices&#x20;
