validation_failed
- Status
- 400 Invalid request
- Code
- validation_failed
- Retry?
- No
A field is missing or wrong. Part of the request isn't valid: a required field is missing, a value is out of range, a word isn't one of the allowed ones, or the body isn't valid JSON. The errors object lists each field and what's wrong with it.
Common causes
- A required property is missing from the body (names are camelCase:
tariffId, notTariffId). - A value isn't one of the allowed words, e.g.
"type": "Physical"instead of"physical". - A number is out of range, e.g.
pageSize=500(the most is 100). - The body isn't valid JSON, or
Content-Type: application/jsonis missing.
What to do
Fix the fields listed in errors and send it again. Don't retry it unchanged: it will fail the same way.
Example
{
"type": "https://developer.zentarinetworks.com/axis/errors/validation_failed",
"title": "Invalid request",
"status": 400,
"detail": "Some of the values sent aren't valid. See errors.",
"code": "validation_failed",
"traceId": "0HN7Q2KJ1V3F4:00000002",
"errors": {
"quantity": ["Quantity must be between 1 and 1000."],
"type": ["Must be one of: physical, digital."]
}
}