Skip to main content

Response Format

Every Avatcado response follows the same envelope pattern: either data or error, always accompanied by meta. This means if (response.error) always works as a check.

Success response

data fields

Error response

error fields

meta fields

Present on every response, success or error.

Batch items

Each item in a batch validation response uses the same envelope:
  • Success: { data: VatValidationData, meta }. The data object is the exact same shape as the single validate endpoint
  • Error: { error, meta }. The error object contains the normalized vat_number that failed (meta.vat_number is kept for backward compatibility but deprecated)
Per-item meta always contains source, source_status, cached and stale (plus cached_at when cached). Request-level fields like request_id and request_duration_ms live on the top-level meta.

Response headers

Request ID header

Every response includes an X-Request-Id header matching meta.request_id. You can pass your own X-Request-Id header and it will be echoed back - useful for correlating requests in your own logging.