Skip to content

Validation Errors

Any endpoint that inserts or modifies data may return validation errors. These responses will return with a 422 status code. The body response message will take on the following form:

{
    "validationErrors": {
        "hasErrors": true|false,
        "hasSchemaErrors": true|false,
        "hasDataErrors": true|false,
        "dataErrors": {
            "<invalid-key-1>": "<validation-error>",
            "<invalid-key-2>": "<validation-error>",
            ...
            "<invalid-key-n>": "<validation-error>"
        }
    },
    "correlationUUID": "<correlation-uuid>"
}

The following table gives more details of each of the attributes returned with validation error information:

Attribute Info
hasSchemaErrors Will indicate if there are schema errors with the data provided. This can happen if the request has an incorrectly formatted message body
hasDataErrors Will indicate if there are data-related errors, such as length requirements
hasErrors Will indicate if any validation errors have occured. It is really just a logical or against the hasShemaErrors and hasDataErrors attributes
schemaErrors If hasSchemaErrors is true this will contain details about what errors had occured
dataErrors This is where typical data-related validation errors will occur

Warning

Legacy endpoints will have a slightly different response structure. See individual endpoint documentation for more details.