Survey
Private Survey API endpoints
Get a specific survey by ID. Questions, their answers, and each answer's stock_count are always included, so the expand parameter is not required and does not change the response.
Path parameters
survey_idRequiredintegerSurvey ID
Query parameters
expand[]optionalstring[]List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.
ReturnsSurvey
Survey object response
Error responses
400objectThe survey belongs to another shop.
404objectNo survey with this ID exists.
422objectexpand is sent but is not an array.
Surveys are always returned with their questions, each question's answers, and each answer's stock_count. The expand parameter is not needed for these relations and changes nothing in the response.
expand[]: List of relations to expand. This endpoint accepts only the exact value questions; nested paths such as questions.answers are rejected with 422 here, although they are accepted on GET /surveys/{survey_id}.
Query parameters
expand[]optionalstring[]List of relations to expand in the response. Each expandable field on the response schema names its key, e.g. expand[]=customer. Nested keys use dot notation, e.g. items.product or subscriptions.items. Fields marked as always present are returned without being requested. An expanded list is null, not [], when there are no records. Unknown keys are ignored unless the endpoint says otherwise.
queryoptionalstringSearch query
ReturnsSurvey[]
Surveys list response
Error responses
422objectexpand is not an array or holds a value other than questions, or query is not a string or is longer than 255 characters.