> 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/llms.txt. # Read a quote GET https://api.truvo.com/v1/quotes/{id} Reference: https://docs.truvo.com/api-reference/read-quote ## 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) ### Query parameters - `version` (string, optional) ## Response ### 200 One quote version, with its full terms and next actions. - `id` (string, required) - `version` (integer, required) - `environment` (enum, required) - Allowed values: `sandbox`, `live` - `quote_request_id` (string, required) - `application_id` (string, required) - `application_version` (integer, required) - `source` (QuoteSource, required) - `price` (QuotePrice, required) - `coverage` (QuoteCoverage, required) - `availability` (QuoteAvailability, required) - `next_actions` (list of NextAction, required) - `evidence` (QuoteEvidence, required) ## 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 ### QuoteSource - `carrier` (Carrier, required) - `product` (string, required, nullable) - `registry_ids` (list of string, required) ### QuotePrice - `premium` (Money, required, nullable) — The price for the whole term, as the carrier states it, or null when the price is unknown. On a renters quote, the premium already includes every fee in `fees`: it is the total for the term. On other lines, the quote doesn't say whether the premium includes `fees`. - `term_months` (integer, required, nullable) - `billing_cycle` (enum, required, nullable) - Allowed values: `pay_in_full`, `monthly` - `fees` (list of QuotePriceFeesItems, required) — The fees the carrier names for the quote, each with its code and amount. On a renters quote, `premium` already includes them, so don't add them to it. - `comparison` (QuotePriceComparison, required, nullable) ### QuoteCoverage - `conditions` (list of string, required) - `subjects` (list of CoveredSubject, required) ### QuoteAvailability - `status` (enum, required) - Allowed values: `active`, `expired`, `withdrawn`, `unknown` - `expires_at` (datetime, required, nullable) - `revalidation` (enum, required) - Allowed values: `none`, `required`, `unknown` ### NextAction ### QuoteEvidence - `source_time` (datetime, required, nullable) - `assumptions` (list of Assumption, required) - `label` (enum, required) - Allowed values: `mock`, `test`, `live` ### 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) ### Carrier - `id` (string, required) - `name` (string, required) ### Money - `amount_minor` (integer, required) - `currency` ("USD", required) ### QuotePriceFeesItems - `code` (string, required) - `amount` (Money, required) ### QuotePriceComparison - `amount` (Money, required) - `label` (string, required) ### CoveredSubject - `subject_id` (string, required) - `kind` (enum, required) - Allowed values: `vehicle`, `dwelling`, `pet` - `label` (string, required, nullable) - `coverages` (list of CoverageItem, required) ### 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) ### 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) ### FieldError - `path` (string, required) - `message` (string, 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) ### CoverageItem - `code` (string, required) - `limit` (Money, required, nullable) - `deductible` (Money, required, nullable) - `included` (boolean, required, nullable) ### AssumptionValue ## Examples **Response** ```json { "id": "string", "version": 1, "environment": "sandbox", "quote_request_id": "string", "application_id": "string", "application_version": 1, "source": { "carrier": { "id": "string", "name": "string" }, "product": "string", "registry_ids": [ "string" ] }, "price": { "premium": { "amount_minor": 1, "currency": "string" }, "term_months": 1, "billing_cycle": "pay_in_full", "fees": [ { "code": "string", "amount": { "amount_minor": 1, "currency": "string" } } ], "comparison": { "amount": { "amount_minor": 1, "currency": "string" }, "label": "string" } }, "coverage": { "conditions": [ "string" ], "subjects": [ { "subject_id": "string", "kind": "vehicle", "label": "string", "coverages": [ { "code": "string", "limit": { "amount_minor": 1, "currency": "string" }, "deductible": { "amount_minor": 1, "currency": "string" }, "included": true } ] } ] }, "availability": { "status": "active", "expires_at": "2024-01-15T09:30:00Z", "revalidation": "none" }, "next_actions": [ { "id": "string", "resource": "string", "type": "string" } ], "evidence": { "source_time": "2024-01-15T09:30:00Z", "assumptions": [ { "path": "string", "value": "string", "source": "external_default", "label": "string" } ], "label": "mock" } } ``` **SDK Code** ```python import requests url = "https://api.truvo.com/v1/quotes/id" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.truvo.com/v1/quotes/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/quotes/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/quotes/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/quotes/id") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.truvo.com/v1/quotes/id', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.truvo.com/v1/quotes/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/quotes/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() ```