Errors

The API distinguishes two kinds of failure: request errors, where the API call itself was rejected, and job failures, where the call succeeded but a carrier did not produce a quote. They are handled differently.

Request Errors

All request errors follow one structure.

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request contains invalid fields",
    "field_errors": {
      "contactPhone": ["Insured phone must be 10 digits"]
    }
  }
}
HTTPCodeDescription
400VALIDATION_ERRORMissing or malformed request fields. field_errors lists every failing field, not just the first.
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENKey lacks the required scope
403AGENCY_PAUSEDThe agency is in a paused billing state; quoting is blocked
403CARRIER_NOT_ENABLEDOne or more selected carriers are not enabled for this agency
404NOT_FOUNDThe record does not exist, or belongs to another agency
409INVALID_STATEThe request is not in a state that permits this operation
429RATE_LIMITEDRequest rate exceeded. Back off and retry.
500INTEGRATION_ERRORQuoteSweep encountered an internal error. Retriable.

Job Failure Types

A job that ends without a quote carries an errorType. The request itself succeeded — read these from the status response, not from an HTTP status code.

ValueRetriableDescription

Declines are not errors

declined_appetite means a carrier assessed the risk and said no. Retrying will produce the same answer. Show it to the agent as a decline with the carrier's stated reason, distinct from a technical failure they might retry.

Recoverable failures need a person, not a retry

mfa_required, uwq_unanswered, and uwq_aborted mean a nearly-complete quote is waiting on agent input. Route the agent to the deep link rather than resubmitting — a new request restarts the carrier submission from the beginning. See Action Required.

Partial Runs Are Normal

A run where three of five carriers quote, one declines, and one needs MFA returns request status partial with HTTP 200. Treat partial as a successful outcome that carries detail, not as a failure state.