NewProvince is only required for addresses in Spain
BeeL
Get startedMulti-NIFVeriFactuRulesStripeAPI referenceChangelog
ErrorsAll codes

ALTERNATIVE_ID_VAT_INVALID_FORMAT

'‹value›' is not a valid EU VAT number for that country: it must be the prefix '‹value›' followed by the country's VAT number, in capital letters and without spaces. If it is the recipient of an invoice already issued, correct its data with an R4 corrective invoice


Category: Customers

HTTP status422 Unprocessable Content
RetryAfter fixing the cause

When it happens

An alternative_id of type NIF_IVA has a number without the EU VAT structure AEAT defines for its country: the country prefix (EL for Greece) followed by the national number, without spaces.

How to fix it

Send the full EU VAT number with its prefix, e.g. FR40303265045 for France or EL094014201 for Greece, and make country_code the country of that prefix. Lowercase letters are accepted and stored in uppercase. A well-formed number can still be refused after the invoice is issued if it is not in the VIES census: check it there first.

Retry

Not as is: the same request fails the same way. Fix the cause described above, then send the request again, under a new Idempotency-Key if the body changed.

Returned by

The operations where this code is most likely. The list is not exhaustive.

Rules that cite this code

Example response

When this error occurs, the API answers 422 Unprocessable Content with a JSON body of this shape:

{
  "type": "https://docs.beel.es/errors/ALTERNATIVE_ID_VAT_INVALID_FORMAT",
  "title": "ALTERNATIVE_ID_VAT_INVALID_FORMAT",
  "detail": "'‹value›' is not a valid EU VAT number for that country: it must be the prefix '‹value›' followed by the country's VAT number, in capital letters and without spaces. If it is the recipient of an invoice already issued, correct its data with an R4 corrective invoice",
  "instance": "/v1/<resource>",
  "errors": [],
  "success": false,
  "error": {
    "code": "ALTERNATIVE_ID_VAT_INVALID_FORMAT",
    "message": "'‹value›' is not a valid EU VAT number for that country: it must be the prefix '‹value›' followed by the country's VAT number, in capital letters and without spaces. If it is the recipient of an invoice already issued, correct its data with an R4 corrective invoice",
    "details": {}
  },
  "meta": {
    "timestamp": "2026-05-21T10:00:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

The type URI is stable and always resolves to this page.

Message

'‹value›' is not a valid EU VAT number for that country: it must be the prefix '‹value›' followed by the country's VAT number, in capital letters and without spaces. If it is the recipient of an invoice already issued, correct its data with an R4 corrective invoice
'‹value›' no es un NIF-IVA válido de ese país: tiene que ser el prefijo '‹value›' seguido del número de IVA del país, en mayúsculas y sin espacios. Si es el destinatario de una factura ya expedida, rectifica sus datos con una R4
'‹value›' no és un NIF-IVA vàlid d'aquest país: ha de ser el prefix '‹value›' seguit del número d'IVA del país, en majúscules i sense espais. Si és el destinatari d'una factura ja expedida, rectifica'n les dades amb una R4

Send the request with Accept-Language: <es|en|ca> to receive the message in your preferred language.

Placeholders like ‹value› are filled in at runtime with the actual values of your request.

Other errors in this category

Keep exploring