> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.truvo.com/api-reference/read-quote-request/llms.txt. # Read a quote request GET https://api.truvo.com/v1/quote-requests/{id} Reference: https://docs.truvo.com/api-reference/read-quote-request ## Authentication - `Authorization` header (bearer token, required) — Your Truvo API key, sent as a bearer token. The prefix selects sandbox (trv_sandbox_) or live (trv_live_). ## Request ### Path parameters - `id` (string, required) ### Headers - `Prefer` (string, optional) — `wait=N` holds the read open for up to N seconds, where N is a whole number from 0 to 20. The answer comes as soon as the status is final or the time runs out, and it carries `Preference-Applied` when the server held the read open. When the server can't hold the request, it answers at once without `Preference-Applied` and with `Retry-After`. Wait that long before you poll again. ## Response ### 200 Status, quote summaries, and next actions. Reading it doesn't start a new quote. - `id` (string, required) - `version` (integer, required) - `line` (enum, required) - Allowed values: `personal_auto`, `renters`, `pet` - `environment` (enum, required) - Allowed values: `sandbox`, `live` - `application_id` (string, required) - `application_version` (integer, required) - `status` (enum, required) - Allowed values: `queued`, `running`, `completed`, `failed`, `cancelled` - `completeness` (enum, required) - Allowed values: `pending`, `partial`, `complete` - `quotes` (list of QuoteReference, required) - `market_outcomes` (list of MarketOutcome, required) - `requirements` (list of Requirement, required) - `assumptions` (list of Assumption, required) - `next_actions` (list of NextAction, required) - `failure` (QuoteRequestFailure, required, nullable) ## Errors ### 401 Unauthorized Error Error envelope. One of: authentication_failed. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 403 Forbidden Error Error envelope. One of: forbidden. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 404 Not Found Error Error envelope. One of: not_found. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 422 Unprocessable Entity Error Error envelope. One of: invalid_input. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 429 Too Many Requests Error Error envelope. One of: rate_limited. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 500 Internal Server Error Error envelope. One of: internal_error. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 503 Service Unavailable Error Error envelope. One of: service_unavailable. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ## Types ### QuoteReference - `id` (string, required) - `version` (integer, required) ### MarketOutcome - `source` (string, required) - `outcome` (enum, required) - Allowed values: `quote`, `decline`, `missing_information`, `failed`, `unknown`, `no_answer` - `quote_id` (string, required, nullable) - `quote_version` (integer, required, nullable) ### Requirement - `kind` (enum, required) - Allowed values: `missing_fact`, `interaction` - `path` (string, required, nullable) - `code` (string, required) ### Assumption - `path` (string, required) - `value` (AssumptionValue, required) - `source` (enum, required) - Allowed values: `external_default`, `credit_disclosure_receipt`, `no_tcpa_consent`, `omitted_channel`, `catalog_vin_from_ymm`, `vehicle_trim_default`, `coverage_package`, `single_driver`, `vehicle_driver_default`, `renters_liability_label`, `renters_coverage_start_date`, `renters_default`, `pet_coverage_default`, `breed_rated_as_mixed`, `carrier_coverage_adjustment` - `label` (string, optional) ### NextAction ### QuoteRequestFailure - `code` (enum, required) - Allowed values: `no_quotes_by_deadline`, `quote_run_not_started` - `message` (string, required) - `retry_action` (RetryAction, required) ### ErrorEnvelopeError - `code` (enum, required) - Allowed values: `authentication_failed`, `forbidden`, `not_found`, `invalid_input`, `invalid_json`, `invalid_cursor`, `needs_information`, `conflict`, `quote_expired`, `price_changed`, `purchase_not_supported`, `rate_limited`, `request_too_large`, `internal_error`, `service_unavailable`, `event_cursor_expired` - `message` (string, required) - `field_errors` (list of FieldError, required, nullable) - `retry_action` (RetryAction, required) - `doc_url` (string, required) ### AssumptionValue ### PreparePurchaseAction - `type` ("prepare_purchase", required) - `quote_id` (string, required) - `quote_version` (integer, required) ### OpenHostedCheckoutAction Pay for this quote version on the carrier's hosted page. On a quote, start a purchase of this version. On a purchase, the action appears once the customer's approval of the offer is recorded: create the purchase's hosted_checkout interaction and send the customer to its url. The url is a Truvo link that redirects to the carrier's payment page. That page takes a card and shows no terms and no amount. The carrier sets the charge, and Truvo does not read the charged amount back. The purchase reads completed, with its policy, only after Truvo reads the policy back from the carrier and its terms match the approved offer. - `type` ("open_hosted_checkout", required) - `quote_id` (string, required) - `quote_version` (integer, required) ### ContinueOnCarrierSiteAction Open `url` in a new tab. The link goes through a Truvo redirect to the carrier's site. The link works until the quote's `availability.expires_at`. At that time and after, the link opens a Truvo page that says the quote has expired. When `expires_at` is null, the link works as long as the quote is active. A link that stops working for another reason opens a Truvo page that says the link no longer works. In the sandbox, the link opens a Truvo sandbox page and never a carrier site. - `type` ("continue_on_carrier_site", required) - `quote_id` (string, required) - `quote_version` (integer, required) - `redirect_path` (string, required) - `url` (string, required) - `open` ("new_tab", required) ### RequestAssistanceAction - `type` ("request_assistance", required) - `quote_id` (string, required) - `quote_version` (integer, required) ### RetryAction - `type` (enum, required) - Allowed values: `none`, `retry`, `correct_input`, `supply_facts`, `read_status`, `use_new_request_key`, `wait`, `contact_support` - `summary` (string, required) ### FieldError - `path` (string, required) - `message` (string, required) ## Examples **Response** ```json { "id": "string", "version": 1, "line": "personal_auto", "environment": "sandbox", "application_id": "string", "application_version": 1, "status": "queued", "completeness": "pending", "quotes": [ { "id": "string", "version": 1 } ], "market_outcomes": [ { "source": "string", "outcome": "quote", "quote_id": "string", "quote_version": 1 } ], "requirements": [ { "kind": "missing_fact", "path": "string", "code": "string" } ], "assumptions": [ { "path": "string", "value": "string", "source": "external_default", "label": "string" } ], "next_actions": [ { "id": "string", "resource": "string", "type": "string" } ], "failure": { "code": "no_quotes_by_deadline", "message": "string", "retry_action": { "type": "none", "summary": "string" } } } ``` **SDK Code** ```python import requests url = "https://api.truvo.com/v1/quote-requests/id" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.truvo.com/v1/quote-requests/id'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.truvo.com/v1/quote-requests/id" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.truvo.com/v1/quote-requests/id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.truvo.com/v1/quote-requests/id") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.truvo.com/v1/quote-requests/id', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.truvo.com/v1/quote-requests/id"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.truvo.com/v1/quote-requests/id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```