Skip to main content

validation_error

HTTP Status: 422 Unprocessable Entity

Example response

What happened?

The request body failed schema validation. This applies to endpoints that accept a JSON body, such as the batch validation endpoint. Common causes:
  • vat_numbers array is empty or contains more than 50 items
  • vat_numbers is not an array of strings
  • Required fields are missing from the request body
  • Extra fields with incorrect types were provided

How to fix

  1. Check the message field: It describes exactly which validation rule failed
  2. Review the request body schema: See Batch Validation for the expected shape
  3. Ensure correct types: vat_numbers must be an array of strings, cache must be a boolean

Common mistakes

  • Sending an empty array: vat_numbers must contain at least 1 item
  • Exceeding 50 items: Split large batches into multiple requests of 50 or fewer
  • Wrong Content-Type: Make sure you set Content-Type: application/json
  • Confusing with invalid_vat_format: validation_error is about the request structure; invalid_vat_format is about individual VAT number formats

Catching this error with the SDKs