apyhub
Back
▣ VERIFICATION KIT

EU VAT Number Details API

What it does

EU VAT Number Validator checks whether an EU VAT number is formatted correctly and can be verified against the live VIES service. Send a vatNumber, and optionally country when the number has no prefix. If you only want a syntax check, set offlineOnly to true.

Use it when you need to confirm a customer or supplier VAT ID before creating an account, issuing an invoice, or applying reverse-charge tax logic. The validator accepts common formatting variations such as spaces or dots, so DE123456789 and DE 123.456.789 are treated as the same number.

The service returns a JSON object, so you can plug it into onboarding flows, billing systems, or back-office checks without adding your own VAT parsing logic. It is useful both for quick validation at form submit time and for deeper compliance checks that depend on a live VIES lookup.

If a VAT number is missing its country prefix, provide the two-letter country code separately. Greece uses EL in place of GR for VAT prefix handling.

POST
Validate an EU VAT number: layout check per member state plus a live VIES lookup
https://api.eu.apyhub.com/freedailypro/eu-vat-number-details/converters/vat-validate

QUICKSTART

GUIDE

Quickstart

Validate an EU VAT number by sending the VAT number in a JSON body.

curl -X POST "https://api.eu.apyhub.com/freedailypro/eu-vat-number-details/converters/vat-validate" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"vatNumber":"DE123456789"}'

What you'll get back

Returns a JSON object with a result object. The result object includes vatNumber, country, formatValid, valid, and checked as required fields, plus optional fields like name, note, reason, address, countryName, and requestDate.

{
  "result": {
    "vatNumber": "DE123456789",
    "country": "DE",
    "formatValid": true,
    "valid": true,
    "checked": "live"
  }
}
TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
The EU VAT number, with or without the two-letter prefix and with spaces or dots, for example DE123456789 or 'DE 123.456.789'.
Two-letter country code when vatNumber has no prefix (Greece is EL).
true checks only the number layout and skips the live VIES lookup.

About this endpoint

What it does

Validates an EU VAT number by checking its member-state-specific format and, unless disabled, performing a live VIES lookup. The request body must include vatNumber; you can optionally provide country when the number has no prefix and offlineOnly to skip the live lookup.

Request Body

ParameterTypeMandatoryDescription
countryStringNoTwo-letter country code to use when vatNumber has no prefix. Greece uses EL.
vatNumberStringYesThe EU VAT number, with or without the two-letter prefix, and with spaces or dots allowed. Minimum length 2, maximum length 40.
offlineOnlyBooleanNoWhen true, checks only the VAT number layout and skips the live VIES lookup.

Response

Returns a JSON object with a required result object field. The result object contains vatNumber, country, formatValid, valid, and checked as required fields, plus optional name, note, reason, address, countryName, and requestDate.

ParameterTypeMandatoryDescription
resultObjectYesContainer for the VAT validation result.
result.nameStringNoName returned by the lookup, if available.
result.noteStringNoAdditional note returned by the lookup, if available.
result.validBooleanNoThe validation result, or null when not available.
result.reasonStringNoReason returned when the VAT number is not valid or could not be checked.
result.addressStringNoAddress returned by the lookup, if available.
result.checkedStringYesIndicates what was checked.
result.countryStringYesCountry code associated with the VAT number.
result.vatNumberStringYesVAT number returned by the validation.
result.countryNameStringNoCountry name associated with the VAT number, if available.
result.formatValidBooleanYestrue when the VAT number layout is valid, false otherwise.
result.requestDateStringNoDate of the lookup request, if returned.
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.