Any webhook
For any tool that can send a POST with JSON and read the JSON reply. You can read it before you sign up.
Send a POST to your endpoint
Each product has its own endpoint. They are also on your dashboard.
United National Life Dental Shield 2.0
https://ratebutter.com/api/quote/unl-dental
Add your key
Send your API key in the x-api-key header, and the body as JSON. You get the key on your dashboard.
x-api-key: rb_your_key content-type: application/json
Send the lead's text
Every field is optional, and empty strings count as missing. What the lead just texted wins, and the other fields fill the gaps.
Each product needs its own set of details, listed on its product page. These are the fields today. More are added as products need them.
- message: the lead's reply, exactly as they sent it
- dob: a date of birth saved on the contact
- zip: the contact's zip
- state: the contact's state, as a name or a 2-letter code
- gender: M or F, only for products that need it
- tobacco: yes or no, only for products that need it
A dental example, where the lead texted a date of birth and zip:
{ "message": "3/4/58 66614", "dob": "", "zip": "", "state": "", "gender": "", "tobacco": "" }
Try a request
Swap in your key and run this from a terminal. The example is a dental lead.
curl -X POST https://ratebutter.com/api/quote/unl-dental \ -H "x-api-key: rb_your_key" \ -H "content-type: application/json" \ -d '{"message":"3/4/58 66614","zip":"","state":""}'Read a quoted response
The lead was priced. There is one price per benefit level, monthly, with two decimals and no dollar sign. Each product page lists its keys.
{ "status": "quoted", "product": "unl-dental", "age": 65, "state": "AL", "sheet": "UNT852", "p1000": "39.35", "p2000": "50.48", "p3000": "55.07", "p4000": "58.99", "p5000": "62.75" }
Read a manual response
The lead could not be priced, and reason says why. Follow up by hand.
{ "status": "manual", "reason": "no_dob" }
- no_dob: no date of birth found
- ambiguous_dob: two different dates, or a date that cannot be read with certainty
- no_state: no zip or state found
- not_sold: the product is not sold in that state
- age_out_of_range: outside the product's issue ages
- missing_gender: the product needs gender and none was sent
- missing_tobacco: the product needs tobacco use and none was sent
- unreadable_message: the body was not valid JSON, often because of a quote mark in the lead's text
Only send the price when status is "quoted"
Check status before your tool texts the lead. A manual response has no prices.
An empty message, or just "test", with no other fields gets status "sample" and example prices, so a tool that needs a test call can see every key. Those prices are not the lead's, which is why the check is on "quoted".
{ "status": "sample", "product": "unl-dental", "age": 65, "state": "AL", "sheet": "UNT852", "p1000": "39.35", "p2000": "50.48", "p3000": "55.07", "p4000": "58.99", "p5000": "62.75" }