> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bridgelinepf.com/llms.txt
> Use this file to discover all available pages before exploring further.

# VALIDATION_FAILED

> The body is valid JSON but breaks the endpoint's rules. `details` lists every problem at once.

`422 Unprocessable Entity` · type `invalid_request`

**When it happens**

One or more fields are missing, have the wrong type or format, are out of range, or aren't fields at all. `POST /v1/quotes` checks the whole body and reports **every** problem in `details`, each with its own `code`, `param` and `message`; the top-level `param` and `message` describe the first.

Common causes:

* money sent as a JSON number (`46100`) instead of a string (`"46100.00"`);
* a rate sent as a percentage (`25`) instead of a fraction (`0.25`);
* `insured.address.state` that isn't a two-letter USPS state code (detail code `INVALID_FORMAT`). A full state name gets `Use the two-letter state code, e.g. "TX" for Texas.`; anything else gets `Must be a two-letter US state code, e.g. "TX".` A valid code for a state outside the program isn't an error: it's a `201` ineligible quote;
* `minimum_earned` with both or neither of `rate` and `amount`;
* a coverage `type` that isn't on the [list](/guides/coverage-types), or a misspelled field name;
* a blank `broker_email`;
* more than 25 policies (one `TOO_MANY` detail, before anything else is checked).

**What to do**

Fix each field named in `details` and send the request again. A request that fails validation never uses up its `Idempotency-Key`, so you can reuse the key. It does count toward your [rate limits](/guides/rate-limits), so don't retry it unchanged.

## Example

```json 422 Unprocessable Entity theme={null}
{
  "error": {
    "type": "invalid_request",
    "code": "VALIDATION_FAILED",
    "message": "Invalid request body: policies[0].premium: Send money as a decimal string, e.g. \"46100.00\", not a JSON number. (and 1 more; see details)",
    "param": "policies[0].premium",
    "details": [
      {
        "code": "INVALID_TYPE",
        "param": "policies[0].premium",
        "message": "Send money as a decimal string, e.g. \"46100.00\", not a JSON number."
      },
      {
        "code": "UNKNOWN_FIELD",
        "param": "policies[0].polcy_number",
        "message": "\"polcy_number\" is not a field here. Did you mean \"policy_number\"?"
      }
    ],
    "doc_url": "https://docs.bridgelinepf.com/errors#VALIDATION_FAILED",
    "request_id": "req_8fJ2kQ9xLm4TzW7nB3cY5pDv"
  }
}
```

See all [error codes](/errors), or how to [handle errors](/guides/errors).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.