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

COUNTRY_CODE_REQUIRED

The country '‹value›' is not valid. Send the country's ISO 3166-1 alpha-2 code in country_code (for example, GB for the United Kingdom).


Category: Customers

HTTP status422 Unprocessable Content
RetryAfter fixing the cause

When it happens

An address carries a country that is neither a real ISO 3166-1 alpha-2 code nor the official name of a country in Spanish, English or Catalan (for example UK), or a country_code that is not a real code.

How to fix it

Send country_code with the ISO code (GB, not UK).

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.

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/COUNTRY_CODE_REQUIRED",
  "title": "COUNTRY_CODE_REQUIRED",
  "detail": "The country '‹value›' is not valid. Send the country's ISO 3166-1 alpha-2 code in country_code (for example, GB for the United Kingdom).",
  "instance": "/v1/<resource>",
  "errors": [],
  "success": false,
  "error": {
    "code": "COUNTRY_CODE_REQUIRED",
    "message": "The country '‹value›' is not valid. Send the country's ISO 3166-1 alpha-2 code in country_code (for example, GB for the United Kingdom).",
    "details": {}
  },
  "meta": {
    "timestamp": "2026-05-21T10:00:00Z",
    "request_id": "4bf92f3577b34da6a3ce929d0e0e4736"
  }
}

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

Message

The country '‹value›' is not valid. Send the country's ISO 3166-1 alpha-2 code in country_code (for example, GB for the United Kingdom).
El país '‹value›' no es válido. Indica el código ISO 3166-1 alfa-2 del país en country_code (por ejemplo, GB para Reino Unido).
El país '‹value›' no és vàlid. Indica el codi ISO 3166-1 alfa-2 del país a country_code (per exemple, GB per al Regne Unit).

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