Error codes · The request itself

Validation failed

Codevalidation_failed
Status422
If this was an orderThis request bought nothing
Send it again unchanged?No — change something first
.NET SDKValidationFailedException

What it means

A request breaks a rule. Direct recharge recipient validation can include field errors in extensions.fields; do not rely on field details for other refusals.

What to do

  • For meter-charge and direct-recharge lists, correct invalid status, meter or product filters, UTC dates, page size or cursor. Keep the same filters and page size with a continuation cursor, or omit the cursor to start a corrected search; never repeat the purchase to recover a list.
  • Prices are decimal strings with exactly three decimals, such as "10.500": greater than zero, with no sign, no leading zeros and at most 15 digits before the point. The total must be the unit price times the quantity, exactly.
  • externalReference must be 1 to 100 characters: Latin letters and digits, space and - _ . : / #.
  • Pass a paging cursor back exactly as received.
  • A call that takes no body — every GET, and both reveals — is refused if it carries even one byte; the signature self-check takes exactly {}.
  • The order body must be at most 8,192 bytes (8 KB), in UTF-8 — a Content-Type naming any other charset is refused as HTTP 422, validation_failed. An oversized order body is refused as HTTP 422 with validation_failed.
  • How the request is sent counts too: any other body over 64 KB, a chunked body (send Content-Length instead), headers over 32 KB in total, a path and query longer than 2,048 characters, or an order whose Idempotency-Key is missing or is not a UUID written with hyphens.
  • For direct recharge recipients, correct the keys reported in extensions.fields against the product’s field rules.

Where you can meet it

Example

The body of the refusal. Its type is the address of this page.

{
  "type": "https://developers.anis.ly/errors/validation-failed",
  "title": "Validation failed",
  "status": 422,
  "code": "validation_failed",
  "requestId": "01J9R2K8T4V6XQ0M3B7C5D9E1F"
}