> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.truvo.com/api-reference/start-quote-request/llms.txt. # Start a quote request POST https://api.truvo.com/v1/quote-requests Content-Type: application/json Reference: https://docs.truvo.com/api-reference/start-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 ### Headers - `Idempotency-Key` (string, required) — A caller-chosen request key. A key replays for at least 24 hours. The same key with the same body replays the first answer; the same key with a different body is a conflict. ### Body (application/json) This endpoint expects a QuoteRequestHttpBody. - `QuoteRequestHttpBody` ## Response ### 202 Starts a quote request for one line and one applicant. - `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 ### 400 Bad Request Error Error envelope. One of: invalid_json. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 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) ### 409 Conflict Error Error envelope. One of: conflict. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 413 Content Too Large Error Error envelope. One of: request_too_large. - `error` (ErrorEnvelopeError, required) - `request_id` (string, required) ### 422 Unprocessable Entity Error Error envelope. One of: invalid_input, needs_information. - `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 ### PersonalAutoQuoteRequestHttpBody - `line` ("personal_auto", required) - `consent_receipt_id` (string, required) — The ID of the person's consent for Truvo to get quotes for them. It covers quoting only. - `application` (PersonalAutoIntake, required) - `credit_disclosure_receipt_id` (string, optional) — The ID of the person's own record of agreeing to a credit check. It covers the credit check only. - `contact_consent` (ContactConsent, optional) — The person's own record of consent to be contacted, and each channel it covers. A contact channel set to true must be one of these channels. - `contact_channels` (ContactChannelsIntake, optional) - `scenario` (string, optional) — Sandbox testing only. Send it only when the person or developer asks to test a named outcome, and never on a first quote. Leave it out when you act for a person. ### RentersQuoteRequestHttpBody - `line` ("renters", required) - `consent_receipt_id` (string, required) — The ID of the person's consent for Truvo to get quotes for them. It covers quoting only. - `application` (RentersIntake, required) - `credit_disclosure_receipt_id` (string, optional) — The ID of the person's own record of agreeing to a credit check. It covers the credit check only. - `contact_consent` (ContactConsent, optional) — The person's own record of consent to be contacted, and each channel it covers. A contact channel set to true must be one of these channels. - `contact_channels` (ContactChannelsIntake, optional) - `scenario` (string, optional) — Sandbox testing only. Send it only when the person or developer asks to test a named outcome, and never on a first quote. Leave it out when you act for a person. ### PetQuoteRequestHttpBody - `line` ("pet", required) - `consent_receipt_id` (string, required) — The ID of the person's consent for Truvo to get quotes for them. It covers quoting only. - `application` (PetIntake, required) - `contact_consent` (ContactConsent, optional) — The person's own record of consent to be contacted, and each channel it covers. A contact channel set to true must be one of these channels. - `contact_channels` (ContactChannelsIntake, optional) - `scenario` (string, optional) — Sandbox testing only. Send it only when the person or developer asks to test a named outcome, and never on a first quote. Leave it out when you act for a person. ### 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) ### PersonalAutoIntake - `applicant` (AutoApplicantIntake, optional) - `garaging_address` (PostalAddressIntake, optional) - `drivers` (list of DriverIntake, optional) - `vehicles` (list of VehicleIntake, optional) - `protection` (AutoProtectionIntake, optional) - `credit_mode` (enum, optional) - Allowed values: `declined`, `consented` ### ContactConsent The person's own record of consent to be contacted, and each channel it covers. A contact channel set to true must be one of these channels. - `receipt_id` (string, required) - `channels` (list of enum, required) - Allowed values: `email`, `sms`, `phone` ### ContactChannelsIntake - `email` (boolean, optional) - `sms` (boolean, optional) - `phone` (boolean, optional) ### RentersIntake - `applicant` (ApplicantIntake, optional) - `rented_address` (PostalAddressIntake, optional) - `dwelling` (RentersDwellingIntake, optional) - `current_insurance` (RentersCurrentInsuranceIntake, optional) - `protection` (RentersProtectionIntake, optional) - `billing_cycle` (enum, optional) - Allowed values: `pay_in_full`, `monthly` - `facts` (RentersFactsIntake, optional) - `coverage_start_date` (date, optional) ### PetIntake - `owner` (PetOwnerIntake, optional) - `pets` (list of PetFactsIntake, optional) - `coverage` (PetCoverageIntake, optional) ### 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) ### AutoApplicantIntake - `name` (PersonNameIntake, optional) - `email` (string, optional, nullable) - `phone` (string, optional, nullable) ### PostalAddressIntake - `line1` (string, optional) - `line2` (string, optional, nullable) - `city` (string, optional) - `state` (string, optional) - `postal_code` (string, optional) ### DriverIntake - `name` (PersonNameIntake, optional) - `date_of_birth` (date, optional) - `gender` (enum, optional) - Allowed values: `female`, `male`, `non-binary` - `relationship` (enum, optional) - Allowed values: `spouse`, `child`, `parent`, `sibling`, `domestic_partner`, `other` ### VehicleIntake - `vin` (string, optional) - `year` (integer, optional) - `make` (string, optional) - `model` (string, optional) - `trim` (string, optional) - `ownership` (enum, optional) - Allowed values: `owned`, `financed`, `leased` - `use` (enum, optional) - Allowed values: `pleasure`, `work_school`, `business`, `artisan`, `farm` - `annual_mileage` (integer, optional) - `assigned_driver` (integer, optional) - `comprehensive_deductible_minor` (integer, optional) - `collision_deductible_minor` (integer, optional) ### AutoProtectionIntake - `bodily_injury_per_person_minor` (integer, optional) - `bodily_injury_per_accident_minor` (integer, optional) - `property_damage_minor` (integer, optional) - `coverage_package` (enum, optional) - Allowed values: `minimum`, `liability`, `standard`, `full` - `tort_type` (enum, optional) - Allowed values: `full`, `limited` - `stacked_uninsured_motorist` (boolean, optional) - `stacked_underinsured_motorist` (boolean, optional) ### ApplicantIntake - `name` (PersonNameIntake, optional) - `date_of_birth` (date, optional) - `email` (string, optional, nullable) - `phone` (string, optional, nullable) ### RentersDwellingIntake - `dwelling_type` (enum, optional) - Allowed values: `apartment`, `single_family`, `condo`, `townhouse`, `mobile_home` ### RentersCurrentInsuranceIntake - `insured` (boolean, optional) - `carrier` (string, optional) ### RentersProtectionIntake - `personal_property_minor` (integer, optional) - `liability_minor` (integer, optional) - `deductible_minor` (integer, optional) ### RentersFactsIntake - `roof_type` (enum, optional) - Allowed values: `aluminum`, `asbestos`, `asphalt`, `cedar_shakes`, `cedar_shingles`, `clay_tile`, `composition`, `concrete`, `concrete_tile`, `copper`, `fiberglass`, `gravel`, `metal`, `other`, `plastic`, `plywood`, `recycled`, `reinforced_concrete`, `rock`, `roll_roofing`, `rubber`, `single_ply_membrane`, `slate`, `spanish_tile`, `steel_porcelain_shingles`, `tar_and_gravel`, `tin`, `wood_shake`, `wood_shingle` - `roof_shape` (enum, optional) - Allowed values: `gable`, `hip`, `flat`, `gambrel`, `mansard`, `shed` - `foundation` (enum, optional) - Allowed values: `slab`, `basement`, `crawl_space`, `pier`, `stilts` - `construction` (enum, optional) - Allowed values: `frame`, `masonry`, `masonry_veneer`, `fire_resistive`, `superior` - `heating_type` (enum, optional) - Allowed values: `central`, `baseboard`, `space_heater`, `wood_stove`, `none` - `heating_fuel` (enum, optional) - Allowed values: `electric`, `gas`, `oil`, `propane`, `wood`, `solar` - `year_built` (integer, optional) - `pool` (boolean, optional) - `square_feet` (integer, optional) - `garages` (integer, optional) - `residents` (integer, optional) - `dog_breed` (enum, optional) - Allowed values: `none`, `pit_bull`, `rottweiler`, `german_shepherd`, `doberman`, `chow`, `akita`, `wolf_hybrid`, `other` - `prior_tenure_months` (integer, optional) - `number_of_past_losses` (integer, optional) - `is_renters_insurance_required` (boolean, optional) - `is_lease_started_today` (boolean, optional) - `owns_a_pet` (boolean, optional) - `own_or_care_for_animal_that_has_harmed_someone` (boolean, optional) ### PetOwnerIntake - `name` (PersonNameIntake, optional) - `email` (string, optional) - `phone` (string, optional) - `postal_code` (string, optional) - `state` (string, optional) ### PetFactsIntake - `name` (string, optional) - `species` (enum, optional) - Allowed values: `dog`, `cat` - `breed` (string, optional) - `date_of_birth` (date, optional) - `sex` (enum, optional) - Allowed values: `female`, `male` - `neutered` (boolean, optional) ### PetCoverageIntake - `deductible_minor` (integer, optional) - `reimbursement_percent` (integer, optional) - `annual_limit_minor` (integer, optional, nullable) ### PersonNameIntake - `first_name` (string, optional) - `last_name` (string, optional) ## Examples **Request** ```json { "consent_receipt_id": "string", "line": "string" } ``` **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" payload = { "consent_receipt_id": "string", "line": "string" } headers = { "Idempotency-Key": "Idempotency-Key", "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.truvo.com/v1/quote-requests'; const options = { method: 'POST', headers: { 'Idempotency-Key': 'Idempotency-Key', Authorization: 'Bearer ', 'Content-Type': 'application/json' }, body: '{"consent_receipt_id":"string","line":"string"}' }; 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" "strings" "net/http" "io" ) func main() { url := "https://api.truvo.com/v1/quote-requests" payload := strings.NewReader("{\n \"consent_receipt_id\": \"string\",\n \"line\": \"string\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Idempotency-Key", "Idempotency-Key") req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") 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") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Idempotency-Key"] = 'Idempotency-Key' request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"consent_receipt_id\": \"string\",\n \"line\": \"string\"\n}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.truvo.com/v1/quote-requests") .header("Idempotency-Key", "Idempotency-Key") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"consent_receipt_id\": \"string\",\n \"line\": \"string\"\n}") .asString(); ``` ```php request('POST', 'https://api.truvo.com/v1/quote-requests', [ 'body' => '{ "consent_receipt_id": "string", "line": "string" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', 'Idempotency-Key' => 'Idempotency-Key', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.truvo.com/v1/quote-requests"); var request = new RestRequest(Method.POST); request.AddHeader("Idempotency-Key", "Idempotency-Key"); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"consent_receipt_id\": \"string\",\n \"line\": \"string\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Idempotency-Key": "Idempotency-Key", "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "consent_receipt_id": "string", "line": "string" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.truvo.com/v1/quote-requests")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ```