Quote ID
curl --request POST \
--url https://sandbox-api.fletch.co/insurance/pet/quote-id \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-API-VERSION: <x-api-version>' \
--data '
{
"id": "<string>",
"partner_id": "<string>",
"owner_details": {},
"owner_details.first_name": "<string>",
"owner_details.last_name": "<string>",
"owner_details.phone": "<string>",
"owner_details.email": "<string>",
"owner_details.state": "<string>",
"owner_details.address": "<string>",
"owner_details.city": "<string>",
"owner_details.zip_code": "<string>",
"pet_details": {},
"pet_details.name": "<string>",
"pet_details.pet_type": "<string>",
"pet_details.age": 123,
"pet_details.breed": "<string>",
"pet_details.gender": "<string>",
"pet_details.pet_color": "<string>",
"insurance_options": {},
"insurance_options.deductible": "<string>",
"insurance_options.reimbursement": "<string>",
"insurance_options.annual_limit": "<string>",
"insurance_options.retired_military": true,
"insurance_options.vet_prof": true,
"insurance_options.neutered_new": true,
"insurance_options.medical_condition": true,
"insurance_options.medical_condition2": true,
"insurance_options.medical_condition_text": "<string>",
"insurance_options.wellness": true,
"insurance_options.frequency": "<string>",
"insurance_options.accident": true,
"utm_params": {},
"utm_params.utm_content": "<string>",
"utm_params.utm_medium": "<string>"
}
'const url = 'https://sandbox-api.fletch.co/insurance/pet/quote-id';
const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'X-API-VERSION': '<x-api-version>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: '<string>',
partner_id: '<string>',
owner_details: {},
'owner_details.first_name': '<string>',
'owner_details.last_name': '<string>',
'owner_details.phone': '<string>',
'owner_details.email': '<string>',
'owner_details.state': '<string>',
'owner_details.address': '<string>',
'owner_details.city': '<string>',
'owner_details.zip_code': '<string>',
pet_details: {},
'pet_details.name': '<string>',
'pet_details.pet_type': '<string>',
'pet_details.age': 123,
'pet_details.breed': '<string>',
'pet_details.gender': '<string>',
'pet_details.pet_color': '<string>',
insurance_options: {},
'insurance_options.deductible': '<string>',
'insurance_options.reimbursement': '<string>',
'insurance_options.annual_limit': '<string>',
'insurance_options.retired_military': true,
'insurance_options.vet_prof': true,
'insurance_options.neutered_new': true,
'insurance_options.medical_condition': true,
'insurance_options.medical_condition2': true,
'insurance_options.medical_condition_text': '<string>',
'insurance_options.wellness': true,
'insurance_options.frequency': '<string>',
'insurance_options.accident': true,
utm_params: {},
'utm_params.utm_content': '<string>',
'utm_params.utm_medium': '<string>'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.fletch.co/insurance/pet/quote-id"
payload = {
"id": "<string>",
"partner_id": "<string>",
"owner_details": {},
"owner_details.first_name": "<string>",
"owner_details.last_name": "<string>",
"owner_details.phone": "<string>",
"owner_details.email": "<string>",
"owner_details.state": "<string>",
"owner_details.address": "<string>",
"owner_details.city": "<string>",
"owner_details.zip_code": "<string>",
"pet_details": {},
"pet_details.name": "<string>",
"pet_details.pet_type": "<string>",
"pet_details.age": 123,
"pet_details.breed": "<string>",
"pet_details.gender": "<string>",
"pet_details.pet_color": "<string>",
"insurance_options": {},
"insurance_options.deductible": "<string>",
"insurance_options.reimbursement": "<string>",
"insurance_options.annual_limit": "<string>",
"insurance_options.retired_military": True,
"insurance_options.vet_prof": True,
"insurance_options.neutered_new": True,
"insurance_options.medical_condition": True,
"insurance_options.medical_condition2": True,
"insurance_options.medical_condition_text": "<string>",
"insurance_options.wellness": True,
"insurance_options.frequency": "<string>",
"insurance_options.accident": True,
"utm_params": {},
"utm_params.utm_content": "<string>",
"utm_params.utm_medium": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"X-API-VERSION": "<x-api-version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.fletch.co/insurance/pet/quote-id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'partner_id' => '<string>',
'owner_details' => [
],
'owner_details.first_name' => '<string>',
'owner_details.last_name' => '<string>',
'owner_details.phone' => '<string>',
'owner_details.email' => '<string>',
'owner_details.state' => '<string>',
'owner_details.address' => '<string>',
'owner_details.city' => '<string>',
'owner_details.zip_code' => '<string>',
'pet_details' => [
],
'pet_details.name' => '<string>',
'pet_details.pet_type' => '<string>',
'pet_details.age' => 123,
'pet_details.breed' => '<string>',
'pet_details.gender' => '<string>',
'pet_details.pet_color' => '<string>',
'insurance_options' => [
],
'insurance_options.deductible' => '<string>',
'insurance_options.reimbursement' => '<string>',
'insurance_options.annual_limit' => '<string>',
'insurance_options.retired_military' => true,
'insurance_options.vet_prof' => true,
'insurance_options.neutered_new' => true,
'insurance_options.medical_condition' => true,
'insurance_options.medical_condition2' => true,
'insurance_options.medical_condition_text' => '<string>',
'insurance_options.wellness' => true,
'insurance_options.frequency' => '<string>',
'insurance_options.accident' => true,
'utm_params' => [
],
'utm_params.utm_content' => '<string>',
'utm_params.utm_medium' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-API-VERSION: <x-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://sandbox-api.fletch.co/insurance/pet/quote-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-API-VERSION"] = '<x-api-version>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"partner_id\": \"<string>\",\n \"owner_details\": {},\n \"owner_details.first_name\": \"<string>\",\n \"owner_details.last_name\": \"<string>\",\n \"owner_details.phone\": \"<string>\",\n \"owner_details.email\": \"<string>\",\n \"owner_details.state\": \"<string>\",\n \"owner_details.address\": \"<string>\",\n \"owner_details.city\": \"<string>\",\n \"owner_details.zip_code\": \"<string>\",\n \"pet_details\": {},\n \"pet_details.name\": \"<string>\",\n \"pet_details.pet_type\": \"<string>\",\n \"pet_details.age\": 123,\n \"pet_details.breed\": \"<string>\",\n \"pet_details.gender\": \"<string>\",\n \"pet_details.pet_color\": \"<string>\",\n \"insurance_options\": {},\n \"insurance_options.deductible\": \"<string>\",\n \"insurance_options.reimbursement\": \"<string>\",\n \"insurance_options.annual_limit\": \"<string>\",\n \"insurance_options.retired_military\": true,\n \"insurance_options.vet_prof\": true,\n \"insurance_options.neutered_new\": true,\n \"insurance_options.medical_condition\": true,\n \"insurance_options.medical_condition2\": true,\n \"insurance_options.medical_condition_text\": \"<string>\",\n \"insurance_options.wellness\": true,\n \"insurance_options.frequency\": \"<string>\",\n \"insurance_options.accident\": true,\n \"utm_params\": {},\n \"utm_params.utm_content\": \"<string>\",\n \"utm_params.utm_medium\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"200": {},
"400": {},
"401": {}
}Pet insurance API
Quote ID
Create a quote ID for a pet insurance prospect.
POST
https://sandbox-api.fletch.co
/
insurance
/
pet
/
quote-id
Quote ID
curl --request POST \
--url https://sandbox-api.fletch.co/insurance/pet/quote-id \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-API-VERSION: <x-api-version>' \
--data '
{
"id": "<string>",
"partner_id": "<string>",
"owner_details": {},
"owner_details.first_name": "<string>",
"owner_details.last_name": "<string>",
"owner_details.phone": "<string>",
"owner_details.email": "<string>",
"owner_details.state": "<string>",
"owner_details.address": "<string>",
"owner_details.city": "<string>",
"owner_details.zip_code": "<string>",
"pet_details": {},
"pet_details.name": "<string>",
"pet_details.pet_type": "<string>",
"pet_details.age": 123,
"pet_details.breed": "<string>",
"pet_details.gender": "<string>",
"pet_details.pet_color": "<string>",
"insurance_options": {},
"insurance_options.deductible": "<string>",
"insurance_options.reimbursement": "<string>",
"insurance_options.annual_limit": "<string>",
"insurance_options.retired_military": true,
"insurance_options.vet_prof": true,
"insurance_options.neutered_new": true,
"insurance_options.medical_condition": true,
"insurance_options.medical_condition2": true,
"insurance_options.medical_condition_text": "<string>",
"insurance_options.wellness": true,
"insurance_options.frequency": "<string>",
"insurance_options.accident": true,
"utm_params": {},
"utm_params.utm_content": "<string>",
"utm_params.utm_medium": "<string>"
}
'const url = 'https://sandbox-api.fletch.co/insurance/pet/quote-id';
const options = {
method: 'POST',
headers: {
'X-API-Key': '<api-key>',
'X-API-VERSION': '<x-api-version>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
id: '<string>',
partner_id: '<string>',
owner_details: {},
'owner_details.first_name': '<string>',
'owner_details.last_name': '<string>',
'owner_details.phone': '<string>',
'owner_details.email': '<string>',
'owner_details.state': '<string>',
'owner_details.address': '<string>',
'owner_details.city': '<string>',
'owner_details.zip_code': '<string>',
pet_details: {},
'pet_details.name': '<string>',
'pet_details.pet_type': '<string>',
'pet_details.age': 123,
'pet_details.breed': '<string>',
'pet_details.gender': '<string>',
'pet_details.pet_color': '<string>',
insurance_options: {},
'insurance_options.deductible': '<string>',
'insurance_options.reimbursement': '<string>',
'insurance_options.annual_limit': '<string>',
'insurance_options.retired_military': true,
'insurance_options.vet_prof': true,
'insurance_options.neutered_new': true,
'insurance_options.medical_condition': true,
'insurance_options.medical_condition2': true,
'insurance_options.medical_condition_text': '<string>',
'insurance_options.wellness': true,
'insurance_options.frequency': '<string>',
'insurance_options.accident': true,
utm_params: {},
'utm_params.utm_content': '<string>',
'utm_params.utm_medium': '<string>'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://sandbox-api.fletch.co/insurance/pet/quote-id"
payload = {
"id": "<string>",
"partner_id": "<string>",
"owner_details": {},
"owner_details.first_name": "<string>",
"owner_details.last_name": "<string>",
"owner_details.phone": "<string>",
"owner_details.email": "<string>",
"owner_details.state": "<string>",
"owner_details.address": "<string>",
"owner_details.city": "<string>",
"owner_details.zip_code": "<string>",
"pet_details": {},
"pet_details.name": "<string>",
"pet_details.pet_type": "<string>",
"pet_details.age": 123,
"pet_details.breed": "<string>",
"pet_details.gender": "<string>",
"pet_details.pet_color": "<string>",
"insurance_options": {},
"insurance_options.deductible": "<string>",
"insurance_options.reimbursement": "<string>",
"insurance_options.annual_limit": "<string>",
"insurance_options.retired_military": True,
"insurance_options.vet_prof": True,
"insurance_options.neutered_new": True,
"insurance_options.medical_condition": True,
"insurance_options.medical_condition2": True,
"insurance_options.medical_condition_text": "<string>",
"insurance_options.wellness": True,
"insurance_options.frequency": "<string>",
"insurance_options.accident": True,
"utm_params": {},
"utm_params.utm_content": "<string>",
"utm_params.utm_medium": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"X-API-VERSION": "<x-api-version>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-api.fletch.co/insurance/pet/quote-id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'id' => '<string>',
'partner_id' => '<string>',
'owner_details' => [
],
'owner_details.first_name' => '<string>',
'owner_details.last_name' => '<string>',
'owner_details.phone' => '<string>',
'owner_details.email' => '<string>',
'owner_details.state' => '<string>',
'owner_details.address' => '<string>',
'owner_details.city' => '<string>',
'owner_details.zip_code' => '<string>',
'pet_details' => [
],
'pet_details.name' => '<string>',
'pet_details.pet_type' => '<string>',
'pet_details.age' => 123,
'pet_details.breed' => '<string>',
'pet_details.gender' => '<string>',
'pet_details.pet_color' => '<string>',
'insurance_options' => [
],
'insurance_options.deductible' => '<string>',
'insurance_options.reimbursement' => '<string>',
'insurance_options.annual_limit' => '<string>',
'insurance_options.retired_military' => true,
'insurance_options.vet_prof' => true,
'insurance_options.neutered_new' => true,
'insurance_options.medical_condition' => true,
'insurance_options.medical_condition2' => true,
'insurance_options.medical_condition_text' => '<string>',
'insurance_options.wellness' => true,
'insurance_options.frequency' => '<string>',
'insurance_options.accident' => true,
'utm_params' => [
],
'utm_params.utm_content' => '<string>',
'utm_params.utm_medium' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-API-VERSION: <x-api-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://sandbox-api.fletch.co/insurance/pet/quote-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["X-API-VERSION"] = '<x-api-version>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"partner_id\": \"<string>\",\n \"owner_details\": {},\n \"owner_details.first_name\": \"<string>\",\n \"owner_details.last_name\": \"<string>\",\n \"owner_details.phone\": \"<string>\",\n \"owner_details.email\": \"<string>\",\n \"owner_details.state\": \"<string>\",\n \"owner_details.address\": \"<string>\",\n \"owner_details.city\": \"<string>\",\n \"owner_details.zip_code\": \"<string>\",\n \"pet_details\": {},\n \"pet_details.name\": \"<string>\",\n \"pet_details.pet_type\": \"<string>\",\n \"pet_details.age\": 123,\n \"pet_details.breed\": \"<string>\",\n \"pet_details.gender\": \"<string>\",\n \"pet_details.pet_color\": \"<string>\",\n \"insurance_options\": {},\n \"insurance_options.deductible\": \"<string>\",\n \"insurance_options.reimbursement\": \"<string>\",\n \"insurance_options.annual_limit\": \"<string>\",\n \"insurance_options.retired_military\": true,\n \"insurance_options.vet_prof\": true,\n \"insurance_options.neutered_new\": true,\n \"insurance_options.medical_condition\": true,\n \"insurance_options.medical_condition2\": true,\n \"insurance_options.medical_condition_text\": \"<string>\",\n \"insurance_options.wellness\": true,\n \"insurance_options.frequency\": \"<string>\",\n \"insurance_options.accident\": true,\n \"utm_params\": {},\n \"utm_params.utm_content\": \"<string>\",\n \"utm_params.utm_medium\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"200": {},
"400": {},
"401": {}
}This endpoint creates a new quote ID. Each request has a unique quote ID. Leave
id blank when you onboard a prospect for the first time. Use the same quote ID for subsequent inquiries about that prospect. Fletch configurations can restrict quotes by state licenses and eligible insurance providers. Some insurance providers do not offer products in all states.
Headers and parameters
Body
Fletch assigns a unique ID to each partner. Email info@fletch.co if you have not received an ID.
Optional. Contact info@fletch.co for the list of values.
Annual deductible in dollars. Inclusive values are 250, 500, and 1000. Some carriers differ.
Pet has shown symptoms of, been treated for, or been diagnosed with Addison’s Disease, Cushing’s Disease, Diabetes, Cancer, Feline Leukemia, or Feline Immunodeficiency Virus.
Pet has shown symptoms of, been treated for, or been diagnosed with any other condition.
Provide a description when
medical_condition2 is true. Pass a blank space when medical_condition is false.