Error codes

validation_failed

Validation failed

HTTP 400

One or more fields, query parameters or path parameters failed validation. field_errors names each one and why.

The problem body

Sent as application/problem+json, with the request id in request_id and the X-Request-Id header. Branch on code: the error and detail sentences can change, and some operations add members of their own.

Example problem
{
  "error": "Validation failed.",
  "code": "validation_failed",
  "type": "https://secondappraisal.com/developers/errors/validation_failed",
  "title": "Validation failed",
  "status": 400,
  "detail": "Validation failed.",
  "instance": "/api/gap/v1/referrals",
  "request_id": "req_4f9a2c7e1b8d4a6f9c3e2b1a7d5f8e0c",
  "field_errors": [
    {
      "field": "date_of_loss",
      "code": "invalid_format",
      "message": "Date of loss must be a valid past date (e.g. 2026-06-15).",
      "pointer": "/date_of_loss"
    }
  ]
}

Operations that can send it