> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.lucanto.eu/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.lucanto.eu/_mcp/server.

# Check a VAT ID in EU VIES

GET https://app.lucanto.eu/api/v1/vat_validation

Asks the EU VAT register (VIES) whether a VAT ID (IČ DPH) is
registered — the web's VAT check next to a customer's IČ DPH. Three
answers:

- `valid: true` — VIES confirmed it; `name` and `address` as the
  member state publishes them (`null` where it publishes none, e.g.
  DE and ES).
- `valid: false` — VIES says it is not registered, or the number is
  malformed for its country.
- `valid: null`, `unverified: true` — VIES did not answer (throttled,
  a member state offline, a timeout). Not a verdict: try again later.

Verified answers are cached (valid for hours, invalid for an hour).
Auth-scoped; not workspace-scoped. Rate-limited per IP.


Reference: https://developer.lucanto.eu/api-reference/api-reference/registry/validate-vat-id

## Authentication

- `Authorization` header (bearer token, required) — JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are rejected.
- `Authorization` header (bearer token, required) — Lucanto API key. Two prefixes: * `lct_pat_<random><checksum>` — personal access token (owner: User) * `lct_live_<random><checksum>` — workspace token, live data Issue keys at `/settings/api_keys` (personal) or `/:workspace_id/settings/api_keys` (workspace). Plaintext token is shown once and never again.

## Request

### Query parameters

- `vat_id` (string, required) — The VAT ID with its country prefix; spaces and case are ignored.

## Response

### 200

OK

- `vat_id` (string, required) — The VAT ID as checked (spaces removed
- `valid` (boolean, required, nullable) — `null` when VIES could not answer.
- `name` (string, required, nullable) — The trader's name as VIES publishes it.
- `address` (string, required, nullable) — The trader's address, VIES's one free-text string.
- `unverified` (boolean, required) — True when VIES did not answer; `valid` is then `null`.

## Errors

### 400 Bad Request Error

`vat_id` missing, or not a two-letter country prefix followed by 2–13 letters or digits.

- `error` (string, required) — Machine-readable error code. Stable across releases — clients should branch on this rather than the human-readable message.
- `message` (string, required) — Human-readable error description. In English unless the request sends `Accept-Language` naming a language Lucanto offers (`sk`, `cs`, `en`, `de`, `fr`, `ro`, `uk`): then validation messages and other localized sentences come in that language, and the response carries `Content-Language`. Some fixed sentences stay English. Subject to wording changes between releases.
- `request_id` (string, required) — Server-side request identifier. Same value as the `X-Request-Id` response header. Quote this in support tickets so we can pull the matching server log line.
- `docs_url` (string, required) — URL of the per-error-code documentation page. Useful for SDK error subclasses to deep-link from a stack trace to the docs explaining the cause + remediation.

### 401 Unauthorized Error

Missing or invalid authentication credentials.

- `error` (string, required) — Machine-readable error code. Stable across releases — clients should branch on this rather than the human-readable message.
- `message` (string, required) — Human-readable error description. In English unless the request sends `Accept-Language` naming a language Lucanto offers (`sk`, `cs`, `en`, `de`, `fr`, `ro`, `uk`): then validation messages and other localized sentences come in that language, and the response carries `Content-Language`. Some fixed sentences stay English. Subject to wording changes between releases.
- `request_id` (string, required) — Server-side request identifier. Same value as the `X-Request-Id` response header. Quote this in support tickets so we can pull the matching server log line.
- `docs_url` (string, required) — URL of the per-error-code documentation page. Useful for SDK error subclasses to deep-link from a stack trace to the docs explaining the cause + remediation.

### 429 Too Many Requests Error

Rate limit exceeded. Retry after the window resets. The `error` code tells the limits apart: `too_many_requests` / `rate_limited` for the API request limits, `outbound_email_rate_limited` on the document send endpoints when a new workspace (under 14 days, or never paid) has reached its e-mail caps (20 recipients an hour, 50 a day) — retry after `retry_after_seconds` (also the `Retry-After` header), or ask support for a higher limit.

- `error` (string, required) — Machine-readable error code. Stable across releases — clients should branch on this rather than the human-readable message.
- `message` (string, required) — Human-readable error description. In English unless the request sends `Accept-Language` naming a language Lucanto offers (`sk`, `cs`, `en`, `de`, `fr`, `ro`, `uk`): then validation messages and other localized sentences come in that language, and the response carries `Content-Language`. Some fixed sentences stay English. Subject to wording changes between releases.
- `request_id` (string, required) — Server-side request identifier. Same value as the `X-Request-Id` response header. Quote this in support tickets so we can pull the matching server log line.
- `docs_url` (string, required) — URL of the per-error-code documentation page. Useful for SDK error subclasses to deep-link from a stack trace to the docs explaining the cause + remediation.

## Examples

**Response**

```json
{
  "vat_id": "SK2020123456",
  "valid": true,
  "name": "string",
  "address": "string",
  "unverified": true
}
```

**SDK Code**

```python
import requests

url = "https://app.lucanto.eu/api/v1/vat_validation"

querystring = {"vat_id":"SK2020123456"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://app.lucanto.eu/api/v1/vat_validation?vat_id=SK2020123456';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.lucanto.eu/api/v1/vat_validation?vat_id=SK2020123456"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.lucanto.eu/api/v1/vat_validation?vat_id=SK2020123456")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.lucanto.eu/api/v1/vat_validation?vat_id=SK2020123456")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.lucanto.eu/api/v1/vat_validation?vat_id=SK2020123456', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.lucanto.eu/api/v1/vat_validation?vat_id=SK2020123456");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.lucanto.eu/api/v1/vat_validation?vat_id=SK2020123456")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```