Format
Validation errors and refusals with a reason use RFC 9457 (Problem Details), withContent-Type: application/problem+json.
Validation (422)
errors[] has:
string
The field with the issue, as JSON Pointer:
/title, /features/2 (the third element from features), /photos/0/key.string
The error code. It’s stable: from it, you branch in your code. The list is below.
string
An explanation for humans, in the request language. The text may change at any time; do not compare it in the program.
errors[].
Refusals with a reason (409, 412)
code, at the first level.
Other refusals
All have the same form, withcode at the first level:
Message language
detail and title come in Romanian or English. You choose the language with the locale parameter in the address (?locale=en). Without it, the preferred language of the account is used, then the header Accept-Language, then Romanian. Codes are never translated.
Validation codes per field
When a field, taken alone, does not respect its rule, the code is the name of the rule:Cross-field check codes
Some rules apply to multiple fields at once. Their code is specific to the rule, andpointer indicates the field to correct.