> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate VAT

> Normalize and validate business VAT numbers (format + optional VIES check).

## Method

`POST` `/v1/verify/vat`

## Body Parameters

<ParamField name="vat" type="string">VAT number to validate (supports aliases <code>vatId</code>, <code>vat\_number</code>, <code>vatNumber</code>).</ParamField>
<ParamField name="country" type="string">ISO 3166-1 alpha-2 country code (alias <code>countryCode</code>).</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</ParamField>
<ParamField header="content-type" type="string">`application/json`</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.voyantcloud.com/v1/verify/vat \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{ "vat": "RO12345678" }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.voyantcloud.com/v1/verify/vat", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({ vatNumber: "GB999999973" }),
  })
  const result = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  payload = {"vatId": "DE123456789", "countryCode": "DE"}
  resp = requests.post(
    "https://api.voyantcloud.com/v1/verify/vat",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  validation = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "ok": true,
    "vat": "GB999999973",
    "isFormatValid": true,
    "viesChecked": false,
    "isRegistered": null
  }
  ```

  ```json 200 OK theme={null}
  {
    "ok": true,
    "vat": "INVALID",
    "isFormatValid": false,
    "viesChecked": false,
    "isRegistered": null
  }
  ```
</ResponseExample>

<Tip>The handler applies an EU-format heuristic. Set <code>ENABLE\_VIES\_CHECK=1</code> and extend the logic to call VIES, returning <code>isRegistered</code> when authoritative validation is required.</Tip>
