Skip to main content
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, 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, so don’t retry it unchanged.

Example

422 Unprocessable Entity
See all error codes, or how to handle errors.