Skip to content

Overview

The Partner SDK is a headless TypeScript library for the Simply Business Questionnaire V0 API. Use it to build an insurance quote journey inside your own product: ask the customer about their business, get real quotes from insurers, and hand the customer off to buy.

It has zero runtime dependencies, ships as ESM, and runs in browsers and on Node 20+.

Every quote journey has the same shape. Only the questions differ by product, and the server decides those.

start("cyber")
│
▼
┌──────────┐ answer ┌──────────┐
│ questions│ ─────────▶ │ questions│ ─── ... until ready
└──────────┘ └──────────┘
│ ready
▼
get quotes (polls while insurers respond)
│
▼
select a quote ──▶ hand off to the comparison page to buy
  1. Start a questionnaire for a product (a vertical, such as cyber).
  2. Answer questions. Each response tells you which questions are still outstanding. Answers can reveal new questions or retract others.
  3. Once the server has everything it needs, the questionnaire is ready.
  4. Get quotes. Quoting is asynchronous; the SDK polls until insurers have responded.
  5. Select a quote and hand off: redirect the customer to the signed comparison URL to buy.

Each layer works on its own. Pick the highest one that fits.

Layer Import Use it for
Client @partner-sdk/core Backends, scripts, full control. Immutable questionnaire snapshots; you drive every call.
Session @partner-sdk/core/session Any UI. Holds answers, debounces saves, resumes after reload, polls for quotes, hands off.
View-model @partner-sdk/core/view-model Any UI. Pure functions that turn session state into render-ready data: screens, fields, errors, quote cards.

There is also one web component, <sb-trade-selector>, for the trade search question.

If you’re building a form, use session + view-model. Your code renders what toScreen() returns and calls session.edit() when the customer types. That’s it: you never hard-code which question comes next.