Skip to main content

invalid_vat_format

HTTP Status: 422 Unprocessable Entity

Example response

{
  "error": {
    "code": "invalid_vat_format",
    "message": "The VAT number format is invalid. Expected format: CC123456789",
    "docs_url": "https://docs.vatly.dev/errors/invalid_vat_format"
  },
  "meta": {
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}

What happened?

The VAT number doesn’t match the expected format CC123456789 (two-letter country code followed by alphanumeric characters), or the country code is not supported. This happens when:
  • The VAT number is missing a two-letter country prefix
  • The country code is not in the supported countries list
  • The number contains only the country code with no digits
  • The number contains invalid characters after normalization

How to fix

  1. Include the country code — Always prefix with a two-letter code: NL123456789B01, GB123456789, DE123456789
  2. Check supported countries — See the full list at Supported Countries
  3. Let the API normalize — Don’t strip spaces or dots manually. Send "NL 123.456.789 B01" and the API handles it
# Correct
curl "...?vat_number=NL123456789B01"

# Wrong - no country code
curl "...?vat_number=123456789B01"

# Also correct - the API normalizes this
curl "...?vat_number=nl+123.456.789+b01"

Common mistakes

  • Forgetting the country code123456789 instead of NL123456789B01
  • Using lowercase — This actually works fine (the API normalizes to uppercase), but check there’s a country prefix
  • Including “VAT” prefixVAT123456789 is not valid; use the country code instead
  • Using GR for Greece — Greece uses EL in the VIES system, not GR
  • Using an unsupported country — Only EU member states, GB, and XI are supported