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.statethat isn’t a two-letter USPS state code (detail codeINVALID_FORMAT). A full state name getsUse the two-letter state code, e.g. "TX" for Texas.; anything else getsMust 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 a201ineligible quote;minimum_earnedwith both or neither ofrateandamount;- a coverage
typethat isn’t on the list, or a misspelled field name; - a blank
broker_email; - more than 25 policies (one
TOO_MANYdetail, before anything else is checked).
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, so don’t retry it unchanged.
Example
422 Unprocessable Entity