Skip to content

API reference

Each page lists the signature, parameters, return value and caveats, then shows usage. For a guided tour, start with Build a quote form.

The client. For backends, scripts or full control.

Export
createClient Create a client: start, resume and recommend questionnaires
Questionnaire An immutable snapshot: questions, errors, answer()
Quotes q.quotes.wait(), QuoteSet, quote.detail(), quote.select()
Errors SdkError and its subclasses
apiKey, createTransport Auth and transport: see createClient

A headless store for one quote journey. For any UI.

Export
createSession Create a session and its actions
SessionState State, events and storage adapters

Pure functions from session state to render-ready data.

Export
toScreen The screen to render for the current phase
toField A question as a Field to render
fieldState One field’s value and error; also validate, serverError
toQuoteCards Quotes as display cards
toTradeOption A trade search result as an option
Export
<sb-trade-selector> Trade search web component