Fetching & Rendering
Load a survey schema and show only the questions that apply.
Updated
On this page
Fetch a survey
const survey = await dash.survey.get("post-purchase")
// survey.questions -> [{ id, type, label, required, options, condition, ... }]
Backing endpoint: GET /api/storefront/surveys/<slug>.
Conditional questions
Render questions in order; a question with a should only be shown when the referenced field's current value matches. The SDK's applies the same rule so hidden questions are never required.