validation_failed
- HTTP status
- 422 Unprocessable Content
- Returned by
- Every endpoint (request handling)
What it means
The request was well-formed JSON but some values are not acceptable. fields maps each problem field to a message you can show to people.
Typical causes
- A required field is missing or empty.
- A value is out of range, too long or in the wrong format.
- A referenced id (stage, pipeline, contact, member) does not exist or is not visible to the key.
How to fix it
- Read
fields: keys are the request field names (nested ones use dots, for examplecontact.phones). - Messages follow the
Accept-Languageheader (English, Russian or Uzbek).
Message
English text, as sent with Accept-Language: en. With ru or uz the API sends the translation.
- Some fields need attention.
RU: Проверьте некоторые поля.
UZ: Baʼzi maydonlarni tekshiring.
Example response
Response
HTTP/1.1 422 Unprocessable Content
Content-Type: application/json; charset=utf-8
X-Request-Id: req_4f2a9c1e0b7d3a55
{
"error": {
"code": "validation_failed",
"message": "Some fields need attention.",
"request_id": "req_4f2a9c1e0b7d3a55",
"docs_url": "https://developers.kweko.uz/errors/validation_failed",
"fields": {
"stage_id": "This stage belongs to another pipeline.",
"amount": "Enter an amount of zero or more."
}
}
}