# Surveys

## List Survey Responses

> Returns a list of Survey Responses for the requested survey

```json
{"openapi":"3.0.1","info":{"title":"Okendo Enterprise API","version":"1.2.1"},"tags":[{"name":"surveys"}],"servers":[{"url":"https://api.okendo.io/enterprise"}],"security":[{"basic":[]}],"components":{"securitySchemes":{"basic":{"type":"http","scheme":"basic"}}},"paths":{"/surveys/{surveyId}/responses":{"get":{"tags":["surveys"],"summary":"List Survey Responses","description":"Returns a list of Survey Responses for the requested survey","parameters":[{"name":"surveyId","description":"The ID of the survey to retrieve responses for","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"description":"A limit on the number of items returned. Between 1 and 100. Default 25.","in":"query","name":"limit","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"lastEvaluated","description":"The URL-encoded JSON object representing the cursor for the next page of results.","in":"query","required":false,"schema":{"type":"string"}},{"name":"orderBy","description":"The sort order of the survey responses. Format: '(date) (asc|desc)'. Default 'date desc'","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"An object containing a list of Survey Responses and a relative link to the next page of results if available.","content":{"application/json":{"schema":{"type":"object","properties":{"surveyResponses":{"type":"array","items":{"type":"object","properties":{"subscriberId":{"type":"string","description":"Your user ID within Okendo.","format":"uuid"},"surveyResponseId":{"type":"string","format":"uuid"},"surveyId":{"type":"string","format":"uuid"},"surveyName":{"type":"string","description":"The name of the survey."},"channelSurveyId":{"type":"string","format":"uuid"},"channelSurveyDescription":{"type":"string","description":"The description of the channel survey."},"channel":{"type":"string","description":"The channel through which the survey was submitted.","enum":["on-site","post-checkout","post-review","shareable-link"]},"answeredQuestions":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string","description":"The question text."}},"required":["id","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"answer":{"type":"string"}},"required":["type"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string","description":"The question text."}},"required":["id","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["single-select"]},"answer":{"type":"string"},"customAnswer":{"type":"string","description":"Custom answer text provided by the respondent."},"customAnswerOptionText":{"type":"string","description":"Text for the custom answer option."}},"required":["type","answer"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string","description":"The question text."}},"required":["id","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["multi-select"]},"answer":{"type":"array","items":{"type":"string"}},"customAnswer":{"type":"string","description":"Custom answer text provided by the respondent."},"customAnswerOptionText":{"type":"string","description":"Text for the custom answer option."}},"required":["type","answer"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string","description":"The question text."}},"required":["id","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["five-point","star"]},"answer":{"type":"number"}},"required":["type","answer"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string","description":"The question text."}},"required":["id","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["nps"]},"answer":{"type":"number"},"answerNpsCategory":{"type":"string","enum":["promoter","detractor","passive"]}},"required":["type","answer","answerNpsCategory"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string","description":"The question text."}},"required":["id","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["profile"]},"answer":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["date-components"]},"value":{"type":"object","properties":{"day":{"type":"integer","minimum":1,"maximum":31},"month":{"type":"integer","minimum":1,"maximum":12},"year":{"type":"integer","minimum":1900,"maximum":2100}},"description":"Date components value."}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["location"]},"value":{"type":"object","properties":{"countryCode":{"type":"string","description":"Country code."},"countryName":{"type":"string","description":"Country name."},"zoneCode":{"type":"string","description":"State, province, or zone code."}},"required":["countryCode"],"description":"Location value."}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["multi-value"]},"value":{"type":"array","items":{"type":"string"},"description":"The selected values."}},"required":["type","value"]},{"type":"object","properties":{"type":{"type":"string","enum":["single-value"]},"value":{"type":"string","description":"The selected value."}},"required":["type","value"]}],"discriminator":{"propertyName":"type","mapping":{"date-components":"#/ProfileDateComponents","location":"#/ProfileLocation","multi-value":"#/ProfileMultiValue","single-value":"#/ProfileSingleValue"}},"description":"The profile answer data provided."},"profileQuestionId":{"type":"string","format":"uuid"}},"required":["type","answer","profileQuestionId"]}]},{"allOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"text":{"type":"string","description":"The question text."}},"required":["id","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["email"]},"answer":{"type":"string","format":"email"},"marketingOptIn":{"type":"boolean"}},"required":["type","answer"]}]}],"discriminator":{"propertyName":"type","mapping":{"text":"#/TextAnswer","single-select":"#/SingleSelectAnswer","multi-select":"#/MultiSelectAnswer","five-point":"#/NumberAnswer","star":"#/NumberAnswer","nps":"#/NpsAnswer","profile":"#/ProfileAnswer","email":"#/EmailAnswer"}}}},"customer":{"type":"object","properties":{"customerId":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"}}},"dateCreated":{"type":"string","format":"date-time"},"emailMarketingOptIn":{"type":"boolean","description":"Whether the customer opted in to email marketing."},"isArchived":{"type":"boolean","description":"Whether the survey response has been archived."},"order":{"type":"object","properties":{"remoteOrderId":{"type":"string","description":"The numeric order ID from Shopify."}}},"reward":{"type":"object","properties":{"type":{"type":"string","enum":["coupon"]},"description":{"type":"string","description":"Description of the reward."},"value":{"type":"string","description":"The coupon code or reward value."}},"required":["type","description","value"]}},"required":["subscriberId","surveyResponseId","surveyId","surveyName","channelSurveyId","channel","answeredQuestions","dateCreated"]}},"nextUrl":{"type":"string","format":"uri"}}}}}},"400":{"description":"Invalid request parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}},"401":{"description":"Authentication credentials are missing or incorrect."},"404":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"description":{"type":"string"}}}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.okendo.io/merchant-rest-api/endpoints/surveys.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
