Quote Integration

There are three ways partners can integrate with Sensible Weather to manage quotes: API, SDK, and the widget.

API Integration

Integrating with the API provides partners the greatest flexibility to create quotes in a manner that integrates best with their existing checkout flow.

Create a Quote

Partners can create a quote as soon as they know the dates of the booking, the location, and the booking price. We recommend presenting the quote to the customer as early as possible in the booking flow. To generate the quote, call our Create Guarantee Quote endpoint.

curl --request POST \
     --url https://protect.sandbox.sensibleweather.io/api/v0_1/quote/guarantee \
     --header 'accept: application/json' \
     --header 'authorization: Bearer {{token}}' \
     --header 'content-type: application/json' \
     --data '
{
  "include_plain_language": true,
  "external_attributes": {
    "name": "unique_id",
    "id": "a5691bc8-8e3e-11ee-b9d1-0242ac120002"
  },
  "product_id": "{{productId}}",
  "coverage_start_date": "2025-10-01",
  "coverage_end_date": "2025-10-04",
  "coverage_start_hour_number": 8,
  "coverage_end_hour_number": 22,
  "currency": "USD",
  "lang_locale": "en-US",
  "exposure_name": "Diablo Canyon Campsite 14A",
  "exposure_latitude": 35.8048664,
  "exposure_longitude": -106.1389522,
  "exposure_total_coverage_amount": 300.51,
  "external_id": "R1294868"
}
'

The response body will have the following form:

{
    "id": "6665ff59-6ee1-40ba-ae04-1c4da577050e",
    "product_id": "ad683954-df8a-44bd-86f8-b0bc2dc04ac2",
    "offer_key": "general_light_rain",
    "created_at": "2024-03-05T15:44:38Z",
    "coverage_start_date": "2025-10-01",
    "coverage_end_date": "2025-10-04",
    "coverage_start_hour": "08:00:00 -0600",
    "coverage_end_hour": "22:00:00 -0600",
    "lang_locale": "en-US",
    "wholesale_price": 8.59,
    "suggested_price": 10.3,
    "tax_amount": 0,
    "tax_rate": 0,
    "tax_was_assessed": true,
    "expires_at": "2024-03-12T15:44:38Z",
    "currency": "USD",
    "external_id": "R1294868",
    "exposure_name": "Diablo Canyon Campsite 14A",
    "exposure_latitude": 35.8048664,
    "exposure_longitude": -106.1389522,
    "exposure_total_coverage_amount": 300.51,
    "exposure_protections": [
        {
            "name": "rainfall",
            "upper_threshold": 0.0015,
            "unit": "meter"
        }
    ],
    "payout_tiers": [
        {
            "number_of_hours": 3,
            "payout_amount": 75.13
        }
    ],
    "plain_language": {
        "details": {
            "action": "Add",
            "close": "Close Window",
            "step_1_body": "Sensible Weather diligently tracks the NOAA forecast during your trip.",
            "step_1_heading": "Watching the Forecast",
            "step_2_body": "Bad weather forecasted? Sensible will text when your reimbursement is ready.",
            "step_2_heading": "Keeping you Updated",
            "step_3_body": "Once reimbursed, simply transfer funds to the account of your choosing.",
            "step_3_heading": "Money Back, Promptly",
            "steps_heading": "What to Expect from Sensible Weather:",
            "suggested_price": "Add a Weather Guarantee for $2.58/day",
            "suggested_price_total": "$10.30 total",
            "summary_body": "A forecasted \"light rain\" of 1.5 mm, or more, for 3+ hours will trigger the daily coverage. We'll alert you if bad weather is on the horizon. Don't worry, we'll only text you if it's important—aka you have money available.",
            "summary_body_alt_unit": "A forecasted \"light rain\" of 0.002 m, or more, for 3+ hours will trigger the daily coverage. We'll alert you if bad weather is on the horizon. Don't worry, we'll only text you if it's important—aka you have money available.",
            "summary_explainer": "Light rain is when you walk outside, and the ground looks like it's been raining, think small puddles.",
            "summary_heading": "Included in Your Coverage:",
            "summary_subheading": "How's the coverage triggered?",
            "summary_tiers": [
                "3+ hours of rain = $75.13 in your pocket"
            ],
            "summary_times": "Forecasted rain between 8:00 AM and 10:00 PM each day.",
            "title": "Protect Your Day with Sensible Weather"
        },
        "documents": {
            "privacy_policy": {
                "link": "https://www.sensibleweather.com/sensible-weather-privacy-policy",
                "title": "View our Privacy Policy"
            },
            "terms_conditions": {
                "link": "https://www.sensibleweather.com/guarantee-terms-and-conditions",
                "title": "Terms and Conditions"
            }
        },
        "main": {
            "action": "Add Weather Guarantee",
            "body": "Get your money back if the forecast is bad, even if you keep your plans. It's automatic–No Claims, No Hassle.",
            "open_details": "Learn More",
            "suggested_price": "Add a Weather Guarantee for $2.58/day",
            "suggested_price_total": "$10.30 total",
            "title": "Protect Your Day with Sensible Weather"
        }
    },
    "documents": [
        {
            "name": "Terms and Conditions",
            "link": "https://www.sensibleweather.com/guarantee-terms-and-conditions"
        },
        {
            "name": "View our Privacy Policy",
            "link": "https://www.sensibleweather.com/sensible-weather-privacy-policy"
        }
    ]
}

📘

For US partners, note that the suggested price does not include taxes. Review the Tax Integration section to walk through how to assess taxes on the quote.

Quotes remain valid for a certain period of time, during which they can be accepted or declined. The quote response includes a field expires_at which specifies the expiration date for the quote. The quote is typically valid for 1 week.

Decline a Quote

We request that partners call our Decline Guarantee Quote endpoint when a customer decides to not purchase the Weather Guarantee. This ensures that we can optimize pricing and attach rates for partners. There are two customer actions that result in a partner calling DeclineQuote:

  1. When a quote is presented to the customer and they purchase the booking without adding the Weather Guarantee to their cart.
  2. When a quote is presented to the customer and the customer explicitly declines the Weather Guarantee. For example, they may click a checkbox that says "Decline coverage".

In both cases, the partner should call DeclineQuote with the ID of the quote when accepting the booking.

curl -X PATCH 'https://protect.sandbox.sensibleweather.io/api/v0_1/quote/guarantee/{{guaranteeQuoteID}}/decline' \
     -H 'Content-Type: application/json' \
     -H 'authorization: Bearer {{token}}'

The endpoint will return a 204 No Content response if the decline is successful.

Get a Quote

Quotes can be retrieved after creation using the Get Guarantee Quote by ID endpoint.

curl -X GET 'https://protect.sandbox.sensibleweather.io/api/v0_1/quote/guarantee/{{guaranteeQuoteID}}' \
     -H 'Content-Type: application/json' \
     -H 'authorization: Bearer {{token}}'

The response body will match the JSON returned in Create Guarantee Quote.

Accept a Quote

The partner needs to let Sensible Weather know if a customer decides to purchase a Weather Guarantee. This is done by calling the Accept Guarantee Quote endpoint. This request must be made before the quote expires.

curl -X PATCH 'https://protect.sandbox.sensibleweather.io/api/v0_1/quote/guarantee/{{guaranteeQuoteID}}/accept' \
     -H 'Content-Type: application/json' \
     -H 'Authorization: Bearer {{token}}' \
     -d '{
         "price_charged": 10.3,
         "reservation_id": "R1294868",
         "user": {
             "name": "{{policyHolderName}}",
             "phone": "{{policyHolderPhone}}",
             "email": "{{policyHolderEmail}}"
         }
     }'

The price_charged is the price that the customer paid for the Weather Guarantee and should match the suggested_price in the CreateQuote response. reservation_id is a unique ID from the partner; we strongly recommend that this ID is set to the ID of the booking or reservation ID generated by the partner.

The response:

{
    "id": "cc05d097-e80a-4a10-804c-ccc4fe6c47d3",
    "product_id": "{{productID}}",
    "created_at": "2024-03-05T16:26:08Z",
    "coverage_start_date": "2025-10-01",
    "coverage_end_date": "2025-10-04",
    "coverage_start_hour": "08:00:00 -0600",
    "coverage_end_hour": "22:00:00 -0600",
    "lang_locale": "en-US",
    "wholesale_price": 8.59,
    "suggested_price": 10.3,
    "user_email": "{{policyHolderEmail}}",
    "tax_amount": 0,
    "tax_rate": 0,
    "price_charged": 109.99,
    "reservation_id": "R1294868",
    "currency": "USD",
    "exposure_name": "Diablo Canyon Campsite 14A",
    "exposure_latitude": 35.8048664,
    "exposure_longitude": -106.1389522,
    "exposure_total_coverage_amount": 300.51,
    "exposure_protections": [
        {
            "name": "rainfall",
            "upper_threshold": 0.0015,
            "unit": "meter"
        }
    ],
    "payout_tiers": [
        {
            "number_of_hours": 3,
            "payout_amount": 75.13
        }
    ],
    "documents": [
        {
            "name": "Terms and Conditions",
            "link": "https://www.sensibleweather.com/guarantee-terms-and-conditions"
        },
        {
            "name": "View our Privacy Policy",
            "link": "https://www.sensibleweather.com/sensible-weather-privacy-policy"
        }
    ]
}