Skip to main content

Error responses

When a request fails, the API returns an HTTP error status and a JSON body that describes the problem.

Every error body contains:

FieldDescription
titleShort summary of the problem
detailExplanation of this specific occurrence

Invalid request fields​

If one or more fields in the request body do not meet their constraints, for example a wrong format or a missing value, the API returns HTTP 422. The body then also contains a violations array with one entry per invalid field:

FieldDescription
propertyPathThe field that failed, e.g. vatId
messageWhy the value was rejected
codeIdentifier of the failed constraint

Example: creating a Legal Entity with an invalid VAT ID

{
"title": "An error occurred",
"detail": "vatId: The VAT ID must start with \"DE\" followed by 9 digits.",
"violations": [
{
"propertyPath": "vatId",
"message": "The VAT ID must start with \"DE\" followed by 9 digits.",
"code": "de1e3db3-5ed4-4941-aae4-59f3667cc3a3"
}
]
}