API Integration Guide
Overview of direct API integration for partners who build their own quoting UI and handle the full customer experience.
With API integration, the partner builds the entire customer-facing experience — quoting UI, checkout flow, and confirmation — and calls the WeatherIt API directly for quotes and policy activation. Payment is handled by the partner via Stripe Connect.
Architecture
sequenceDiagram
participant Customer
participant PartnerUI as Partner UI
participant PartnerBackend as Partner Backend
participant API as WeatherIt API
participant Stripe as Stripe Connect
Customer->>PartnerUI: Selects experience
PartnerBackend->>API: POST /quotes
API-->>PartnerBackend: quoteId, pricing_options
PartnerBackend->>PartnerUI: Display protection options
Customer->>PartnerUI: Selects protection tier
Customer->>PartnerUI: Completes checkout
PartnerBackend->>Stripe: Charge total (split payment)
Stripe-->>PartnerBackend: transaction_id
PartnerBackend->>API: POST /quotes/quoteId/purchase
API-->>PartnerBackend: policyId, status active
PartnerBackend->>PartnerUI: Show confirmation
Key API Endpoints
| Method | Endpoint | Purpose |
|---|---|---|
| POST | /quotes | Generate a quote with pricing options |
| POST | /quotes/{quoteId}/purchase | Activate a policy after payment |
See the full API Reference for request/response schemas, authentication, and error codes.
Building in Node.js? The official Node.js SDK (@weatherit/node) wraps these endpoints and handles authentication, retries, idempotency and error mapping.
Authentication
API integration uses API key authentication for all server-to-server calls.
Authorization: Bearer {your_api_key}
API keys are provided during onboarding. All calls must be made from your backend — never expose API keys in client-side code.
Payment
Partners handle payment via Stripe Connect, splitting the transaction between the partner's booking amount and the WeatherIt premium. See the Split Payment & Reconciliation Guide for the full flow.
When to Use API Integration
API integration is suited for partners who:
- Have development capacity to build a custom quoting UI
- Want full control over the customer experience
- Need deep data alignment between their booking system and WeatherIt
Partners who prefer WeatherIt to provide the quoting UI should use the Checkout Widget or Post-Booking Tool instead.
Quote Content for Your UI
Every quote response also includes ready-to-display copy for your quoting UI, already filled in with that quote's trigger, hours, weather station and price. It's in quote.template_message.content.plainLanguage, grouped as:
| Group | Use it for |
|---|---|
learn_more | The Learn more panel: how the cover works, what triggers a claim, and the distributor disclosure |
landing_page | Labels for the protection options, such as titles, prices and buttons |
documents | Links to the policy wording and privacy statement |
Render these fields as returned rather than copying the text into your code, so wording updates reach your site automatically. See Displaying the Learn More Panel for the field reference, an example response and layout ideas.
Updated 19 days ago
