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+.
The journey
Section titled “The journey”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- Start a questionnaire for a product (a vertical, such as
cyber). - Answer questions. Each response tells you which questions are still outstanding. Answers can reveal new questions or retract others.
- Once the server has everything it needs, the questionnaire is ready.
- Get quotes. Quoting is asynchronous; the SDK polls until insurers have responded.
- Select a quote and hand off: redirect the customer to the signed comparison URL to buy.
Three layers
Section titled “Three layers”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.
Next steps
Section titled “Next steps”- Quick start: get a cyber quote from the mock API.
- Build a quote form: the session + view-model walkthrough.
- Concepts: the rules the SDK is built around.