> For the complete documentation index, see [llms.txt](https://docs.hos.accessacloud.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/survey-api.md).

# Survey Api

API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen

## AddAllOptinQuestion

> Post Optin question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"AllOptinQuestionInput":{"type":"object","properties":{"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"OptinChoiceLabel":{"type":"string","description":"Optin Choice Text"},"OptoutChoiceLabel":{"type":"string","description":"Optout Choice Text"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddAllOptinQuestion":{"post":{"operationId":"SurveyApiAddAllOptinQuestion","summary":"AddAllOptinQuestion","tags":["SurveyApi"],"description":"Post Optin question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllOptinQuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddCaptchaQuestion

> Post Upload question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"QuestionInput":{"type":"object","properties":{"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddCaptchaQuestion":{"post":{"operationId":"SurveyApiAddCaptchaQuestion","summary":"AddCaptchaQuestion","tags":["SurveyApi"],"description":"Post Upload question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddChoiceQuestion

> Post Choices question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"ChoiceQuestionInput":{"type":"object","properties":{"Choices":{"type":"array","items":{"$ref":"#/components/schemas/ChoiceItem"},"description":"Response Options"},"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"KnownNodeCodeFromTree":{"type":"integer","format":"int32","nullable":true,"description":"Existing Node Code From Tree"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"Preticked":{"type":"boolean","nullable":true,"description":"Pre-Tick All Options"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"},"RandomiseResponsesOrder":{"type":"boolean","nullable":true,"description":"Randomise The Options Order"}}},"ChoiceItem":{"type":"object","properties":{"ID":{"type":"integer","format":"int32","nullable":true,"description":"Option ID"},"IsMaster":{"type":"boolean","nullable":true,"description":"\"Exclusive\" Option"},"IsOther":{"type":"boolean","nullable":true,"description":"\"Other\" Option"},"IsRandom":{"type":"boolean","nullable":true,"description":"Randomise The Option Order"},"Label":{"type":"string","description":"Option Text"},"Order":{"type":"integer","format":"int32","nullable":true,"description":"Option Order"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddChoiceQuestion":{"post":{"operationId":"SurveyApiAddChoiceQuestion","summary":"AddChoiceQuestion","tags":["SurveyApi"],"description":"Post Choices question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChoiceQuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddDateTimeQuestion

> Post Date question OR Time question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"DateAndTimeQuestion":{"type":"object","properties":{"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddDateTimeQuestion":{"post":{"operationId":"SurveyApiAddDateTimeQuestion","summary":"AddDateTimeQuestion","tags":["SurveyApi"],"description":"Post Date question OR Time question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateAndTimeQuestion"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddFeedbackScoreQuestion

> Post Feedback Score question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"FeedbackScoreQuestionInput":{"type":"object","properties":{"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"},"ScoreRange":{"description":"Score Range 0 : OneToFive 1 : ZeroToTen (Documented as type `ScoreRangeType`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"UseEmoticons":{"type":"boolean","nullable":true,"description":"Use Emoticons"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddFeedbackScoreQuestion":{"post":{"operationId":"SurveyApiAddFeedbackScoreQuestion","summary":"AddFeedbackScoreQuestion","tags":["SurveyApi"],"description":"Post Feedback Score question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackScoreQuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddKnownQuestion

> Post Knwon question (Location,Category,Subcategory,Preferred Site)

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"KnownQuestionInput":{"type":"object","properties":{"DisplayRegionFilter":{"type":"boolean","nullable":true,"description":"Display Region and Sub region as a Filter For the Location/PreferredSite Questions"},"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"IsStaticLocations":{"type":"boolean","nullable":true,"description":"Automatically Display New Locations in the Location/PreferredSite Question"},"KnownType":{"description":"Known Type 0 : Location 1 : Category 2 : SubCategory 3 : PreferredSite (Documented as type `KnownQuestionType`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"},"SelectedOptions":{"type":"array","items":{"type":"integer","format":"int32"},"description":"Options To Display (By difault: display all options)"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddKnownQuestion":{"post":{"operationId":"SurveyApiAddKnownQuestion","summary":"AddKnownQuestion","tags":["SurveyApi"],"description":"Post Knwon question (Location,Category,Subcategory,Preferred Site)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KnownQuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddLabelQuestion

> Post label question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"QuestionInput":{"type":"object","properties":{"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddLabelQuestion":{"post":{"operationId":"SurveyApiAddLabelQuestion","summary":"AddLabelQuestion","tags":["SurveyApi"],"description":"Post label question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddMatrixQuestion

> Post Matrix question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"MatrixQuestionInput":{"type":"object","properties":{"Columns":{"type":"array","items":{"$ref":"#/components/schemas/ChoiceItem"},"description":"Column Choices"},"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"},"Rows":{"type":"array","items":{"$ref":"#/components/schemas/ChoiceItem"},"description":"Row Choices"}}},"ChoiceItem":{"type":"object","properties":{"ID":{"type":"integer","format":"int32","nullable":true,"description":"Option ID"},"IsMaster":{"type":"boolean","nullable":true,"description":"\"Exclusive\" Option"},"IsOther":{"type":"boolean","nullable":true,"description":"\"Other\" Option"},"IsRandom":{"type":"boolean","nullable":true,"description":"Randomise The Option Order"},"Label":{"type":"string","description":"Option Text"},"Order":{"type":"integer","format":"int32","nullable":true,"description":"Option Order"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddMatrixQuestion":{"post":{"operationId":"SurveyApiAddMatrixQuestion","summary":"AddMatrixQuestion","tags":["SurveyApi"],"description":"Post Matrix question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatrixQuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddMultiChannelsOptinQuestion

> Post Marketing Optin – Multi Channel question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"OptinQuestionInput":{"type":"object","properties":{"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"OptinChannels":{"type":"array","items":{"description":"Element type `OptionChannel`; values listed on the parent property.","type":"integer","format":"int32"},"description":"Optin Channels : 0 : Email, 1 : SMS, 2 : Mail, 3 : Phone, The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented."},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddMultiChannelsOptinQuestion":{"post":{"operationId":"SurveyApiAddMultiChannelsOptinQuestion","summary":"AddMultiChannelsOptinQuestion","tags":["SurveyApi"],"description":"Post Marketing Optin – Multi Channel question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OptinQuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddNameAndAddressQuestion

> Post Name and Address question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"NameAddresQuestionInput":{"type":"object","properties":{"ContactInformationFields":{"type":"array","items":{"$ref":"#/components/schemas/ContactInformationField"},"description":"Contact Information Fields"},"CreateAsContact":{"type":"boolean","nullable":true,"description":"Create As Contact"},"CreateAsMasterContact":{"type":"boolean","nullable":true,"description":"Create As Master Contact"},"ErrorMessage":{"type":"string","description":"Error Message"},"FlagContactAsOptedIn":{"type":"boolean","nullable":true,"description":"Flag Contact As Opted In"},"IncorrectDetailsMessage":{"type":"string","description":"Message displayed If The Contact Details Are Incorrect"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"PrePopulateContactDetails":{"type":"boolean","nullable":true,"description":"Pre-Populate Contact Details"},"PrivacyPolicyLink":{"type":"string","description":"Link To Your Privacy Policy"},"PrivacyPolicyText":{"type":"string","description":"Link Text To Your Privacy Policy"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"},"RelationID":{"type":"integer","format":"int32","nullable":true,"description":"Relation With The Master Contact (1:Referrer Friend , 2:Family ) The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented."},"SourceID":{"type":"string","description":"Source"},"UpdateContactDetails":{"type":"boolean","nullable":true,"description":"Update Contact Details"}}},"ContactInformationField":{"type":"object","properties":{"FieldType":{"description":"Field Type : 0 : Title 1 : FirstName 2 : LastName 3 : Address 4 : Address2 5 : CityTown 6 : County 7 : PostCode 8 : Country 9 : EmailAddress 10: MobileNumber 11: PhoneNumber 12: Gender 13: BirthDate 14: Parent Email Address (Documented as type `ContactInformationFieldType`. The published description lists the values captured in `x-atreemo-documented-values`; their wire representation (number or name) and whether the list is exhaustive are not documented.)","type":"integer","format":"int32"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Field"},"Text":{"type":"string","description":"Field Text"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddNameAndAddressQuestion":{"post":{"operationId":"SurveyApiAddNameAndAddressQuestion","summary":"AddNameAndAddressQuestion","tags":["SurveyApi"],"description":"Post Name and Address question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NameAddresQuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddRightToProcessQuestion

> Post Right To Process question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"RightToProcessQuestionInput":{"type":"object","properties":{"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"PrivacyPolicyLink":{"type":"string","description":"Link To Your Privacy Policy"},"PrivacyPolicyText":{"type":"string","description":"Link Text To Your Privacy Policy"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddRightToProcessQuestion":{"post":{"operationId":"SurveyApiAddRightToProcessQuestion","summary":"AddRightToProcessQuestion","tags":["SurveyApi"],"description":"Post Right To Process question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RightToProcessQuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddSurveyPage

> Post survey page (used if you want to create survey with more than one page)

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddSurveyPage":{"post":{"operationId":"SurveyApiAddSurveyPage","summary":"AddSurveyPage","tags":["SurveyApi"],"description":"Post survey page (used if you want to create survey with more than one page)","parameters":[{"name":"OpCode","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int OpCode in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddTextQuestion

> Post text question (text or numeric)

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"TextQuestionInput":{"type":"object","properties":{"ErrorMessage":{"type":"string","description":"Error Message"},"IsExpansive":{"type":"boolean","description":"Response Display: Single-Multiple lines"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"},"WordLimit":{"type":"integer","format":"int32","description":"Response Max Length"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddTextQuestion":{"post":{"operationId":"SurveyApiAddTextQuestion","summary":"AddTextQuestion","tags":["SurveyApi"],"description":"Post text question (text or numeric)","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextQuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## AddUploadQuestion

> Post Upload question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"QuestionInput":{"type":"object","properties":{"ErrorMessage":{"type":"string","description":"Error Message"},"IsMandatory":{"type":"boolean","nullable":true,"description":"Mandatory Question"},"OpCode":{"type":"integer","format":"int32","description":"Survey ID"},"PageID":{"type":"integer","format":"int32","nullable":true,"description":"Page Number"},"QuestionID":{"type":"integer","format":"int32","nullable":true,"description":"Question ID"},"QuestionLabel":{"type":"string","description":"Question Title"},"QuestionPosition":{"type":"integer","format":"int32","nullable":true,"description":"Question Number"},"QuestionSubType":{"type":"string","description":"Question SubType"},"QuestionType":{"type":"string","description":"Question Type"}}},"PostOutput":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/AddUploadQuestion":{"post":{"operationId":"SurveyApiAddUploadQuestion","summary":"AddUploadQuestion","tags":["SurveyApi"],"description":"Post Upload question","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## DeleteQuestion

> Delete question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"ApiCallResponse":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/DeleteQuestion":{"delete":{"operationId":"SurveyApiDeleteQuestion","summary":"DeleteQuestion","tags":["SurveyApi"],"description":"Delete question","parameters":[{"name":"OpCode","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int OpCode in the pinned controller signature.","required":true},{"name":"QuestionID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int QuestionID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCallResponse"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## Get

> Get survey questions

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"SurveyOutput":{"type":"object","properties":{"ResponseData":{"$ref":"#/components/schemas/SurveyDefinitionData"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"SurveyDefinitionData":{"type":"object","nullable":true,"properties":{"OpCode":{"type":"integer","format":"int32"},"Description":{"type":"string","nullable":true},"PageTitle":{"type":"string","nullable":true},"SurveyName":{"type":"string","nullable":true},"SurveyIntroduction":{"type":"string","nullable":true},"ThankyouPageDescription":{"type":"string","nullable":true},"CreateContactQuestionID":{"type":"integer","format":"int32","nullable":true},"ConsentMinAge":{"type":"integer","format":"int32","nullable":true},"ParentConsentEnabled":{"type":"boolean"},"LoadCtctFromResponses":{"type":"boolean"},"PrePopulateResponses":{"type":"boolean"},"UpdateContact":{"type":"boolean"},"IncorrectDetailsMsg":{"type":"string","nullable":true},"Pages":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SurveyPageData"}},"CtcID":{"type":"integer","format":"int32","nullable":true}}},"SurveyPageData":{"type":"object","nullable":true,"properties":{"TabCode":{"type":"integer","format":"int32"},"Questions":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SurveyQuestionData"}}}},"SurveyQuestionData":{"type":"object","nullable":true,"description":"Public API Atreemo.Models.Question, not the same-named NewSurvey UI model. Properties and the KnownFieldID public field are modelled without inferring requiredness from CLR types.","properties":{"KnownFieldID":{"type":"integer","format":"int32","nullable":true},"QuestionID":{"type":"integer","format":"int32"},"QuestionSubType":{"type":"string","nullable":true},"QuestionType":{"type":"string","nullable":true},"QuestionTypeDescription":{"type":"string","nullable":true},"VirtualQuestionType":{"type":"string","nullable":true},"QuestionDisplayType":{"type":"string","nullable":true},"QuestionNumber":{"type":"integer","format":"int32","nullable":true},"QuestionText":{"type":"string","nullable":true},"IsMandatory":{"type":"boolean"},"ErrorMessage":{"type":"string","nullable":true},"RuleSet":{"$ref":"#/components/schemas/SurveyQuestionRuleData"},"Expansive":{"type":"boolean"},"ValidationExpression":{"type":"string","nullable":true},"ValidationErrorMessage":{"type":"string","nullable":true},"Minimum":{"type":"integer","format":"int32","nullable":true},"Maximum":{"type":"integer","format":"int32","nullable":true},"Step":{"type":"integer","format":"int32","nullable":true},"WordLimit":{"type":"string","nullable":true},"DefaultText":{"type":"string","nullable":true},"Choices":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SurveyChoiceData"}},"SubQuestions":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SurveySubQuestionData"}},"DisplayEmoticons":{"type":"boolean"},"Preticked":{"type":"boolean"},"RandomizeOptionsOrder":{"type":"boolean"},"MinimumAge":{"type":"integer","format":"int32","nullable":true},"PrivacyPolicyLink":{"type":"string","nullable":true},"PrivacyPolicyText":{"type":"string","nullable":true},"EmoticonsID":{"type":"integer","format":"int32","nullable":true},"isStaticLocations":{"type":"boolean","nullable":true},"DisplayRegionAsQuest":{"type":"boolean"},"MinTime":{"type":"string","nullable":true},"MaxTime":{"type":"string","nullable":true},"DefaultTime":{"type":"string","nullable":true},"StartTime":{"type":"string","nullable":true},"IntervalTime":{"type":"integer","format":"int32"},"MaxSelectedOptionsCount":{"type":"integer","format":"int32","nullable":true},"MinSelectedOptionsCount":{"type":"integer","format":"int32","nullable":true},"ValidationMessageForCheckboxSelection":{"type":"string","nullable":true},"IsDynamicDateRange":{"type":"boolean","nullable":true},"StaticEarliestDate":{"type":"string","format":"date-time","nullable":true},"StaticLatestDate":{"type":"string","format":"date-time","nullable":true},"DynamicEarliestValue":{"type":"integer","format":"int32","nullable":true},"DynamicLatestValue":{"type":"integer","format":"int32","nullable":true},"DynamicEarliestUnit":{"type":"integer","format":"int32","nullable":true},"DynamicLatestUnit":{"type":"integer","format":"int32","nullable":true}}},"SurveyQuestionRuleData":{"type":"object","nullable":true,"properties":{"RuleType":{"type":"string","nullable":true},"Operator":{"type":"string","nullable":true},"Rules":{"type":"array","nullable":true,"items":{"type":"string","nullable":true}}}},"SurveyChoiceData":{"type":"object","nullable":true,"properties":{"ChoiceID":{"type":"integer","format":"int32"},"ChoiceLabel":{"type":"string","nullable":true},"IsOther":{"type":"boolean"},"IsRandom":{"type":"boolean"},"IsMasterChoice":{"type":"boolean"},"RegionID":{"type":"integer","format":"int32","nullable":true},"RegionName":{"type":"string","nullable":true},"SubRegionID":{"type":"integer","format":"int32","nullable":true},"SubRegionName":{"type":"string","nullable":true},"ChoiceRule":{"$ref":"#/components/schemas/SurveyQuestionRuleData"}}},"SurveySubQuestionData":{"type":"object","nullable":true,"properties":{"QuestionID":{"type":"integer","format":"int32"},"QuestionSubType":{"type":"string","nullable":true},"QuestionType":{"type":"string","nullable":true},"VirtualQuestionType":{"type":"string","nullable":true},"QuestionDisplayType":{"type":"string","nullable":true},"QuestionNumber":{"type":"integer","format":"int32","nullable":true},"QuestionText":{"type":"string","nullable":true},"IsMandatory":{"type":"boolean"},"ErrorMessage":{"type":"string","nullable":true},"RuleSet":{"$ref":"#/components/schemas/SurveyQuestionRuleData"},"Expansive":{"type":"boolean"},"ValidationExpression":{"type":"string","nullable":true},"ValidationErrorMessage":{"type":"string","nullable":true},"Minimum":{"type":"integer","format":"int32","nullable":true},"Maximum":{"type":"integer","format":"int32","nullable":true},"Step":{"type":"integer","format":"int32","nullable":true},"WordLimit":{"type":"string","nullable":true},"Choices":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SurveyChoiceData"}},"DisplayEmoticons":{"type":"boolean"},"Preticked":{"type":"boolean"},"RandomizeOptionsOrder":{"type":"boolean"},"MinimumAge":{"type":"integer","format":"int32","nullable":true}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/Get":{"get":{"operationId":"SurveyApiGet","summary":"Get","tags":["SurveyApi"],"description":"Get survey questions","parameters":[{"name":"OpCode","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int OpCode in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurveyOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## GetSurveyQuestion

> Get Survey question

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"SurveyQuestionOutput":{"type":"object","properties":{"ResponseData":{"$ref":"#/components/schemas/SurveyQuestionData"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"SurveyQuestionData":{"type":"object","nullable":true,"description":"Public API Atreemo.Models.Question, not the same-named NewSurvey UI model. Properties and the KnownFieldID public field are modelled without inferring requiredness from CLR types.","properties":{"KnownFieldID":{"type":"integer","format":"int32","nullable":true},"QuestionID":{"type":"integer","format":"int32"},"QuestionSubType":{"type":"string","nullable":true},"QuestionType":{"type":"string","nullable":true},"QuestionTypeDescription":{"type":"string","nullable":true},"VirtualQuestionType":{"type":"string","nullable":true},"QuestionDisplayType":{"type":"string","nullable":true},"QuestionNumber":{"type":"integer","format":"int32","nullable":true},"QuestionText":{"type":"string","nullable":true},"IsMandatory":{"type":"boolean"},"ErrorMessage":{"type":"string","nullable":true},"RuleSet":{"$ref":"#/components/schemas/SurveyQuestionRuleData"},"Expansive":{"type":"boolean"},"ValidationExpression":{"type":"string","nullable":true},"ValidationErrorMessage":{"type":"string","nullable":true},"Minimum":{"type":"integer","format":"int32","nullable":true},"Maximum":{"type":"integer","format":"int32","nullable":true},"Step":{"type":"integer","format":"int32","nullable":true},"WordLimit":{"type":"string","nullable":true},"DefaultText":{"type":"string","nullable":true},"Choices":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SurveyChoiceData"}},"SubQuestions":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SurveySubQuestionData"}},"DisplayEmoticons":{"type":"boolean"},"Preticked":{"type":"boolean"},"RandomizeOptionsOrder":{"type":"boolean"},"MinimumAge":{"type":"integer","format":"int32","nullable":true},"PrivacyPolicyLink":{"type":"string","nullable":true},"PrivacyPolicyText":{"type":"string","nullable":true},"EmoticonsID":{"type":"integer","format":"int32","nullable":true},"isStaticLocations":{"type":"boolean","nullable":true},"DisplayRegionAsQuest":{"type":"boolean"},"MinTime":{"type":"string","nullable":true},"MaxTime":{"type":"string","nullable":true},"DefaultTime":{"type":"string","nullable":true},"StartTime":{"type":"string","nullable":true},"IntervalTime":{"type":"integer","format":"int32"},"MaxSelectedOptionsCount":{"type":"integer","format":"int32","nullable":true},"MinSelectedOptionsCount":{"type":"integer","format":"int32","nullable":true},"ValidationMessageForCheckboxSelection":{"type":"string","nullable":true},"IsDynamicDateRange":{"type":"boolean","nullable":true},"StaticEarliestDate":{"type":"string","format":"date-time","nullable":true},"StaticLatestDate":{"type":"string","format":"date-time","nullable":true},"DynamicEarliestValue":{"type":"integer","format":"int32","nullable":true},"DynamicLatestValue":{"type":"integer","format":"int32","nullable":true},"DynamicEarliestUnit":{"type":"integer","format":"int32","nullable":true},"DynamicLatestUnit":{"type":"integer","format":"int32","nullable":true}}},"SurveyQuestionRuleData":{"type":"object","nullable":true,"properties":{"RuleType":{"type":"string","nullable":true},"Operator":{"type":"string","nullable":true},"Rules":{"type":"array","nullable":true,"items":{"type":"string","nullable":true}}}},"SurveyChoiceData":{"type":"object","nullable":true,"properties":{"ChoiceID":{"type":"integer","format":"int32"},"ChoiceLabel":{"type":"string","nullable":true},"IsOther":{"type":"boolean"},"IsRandom":{"type":"boolean"},"IsMasterChoice":{"type":"boolean"},"RegionID":{"type":"integer","format":"int32","nullable":true},"RegionName":{"type":"string","nullable":true},"SubRegionID":{"type":"integer","format":"int32","nullable":true},"SubRegionName":{"type":"string","nullable":true},"ChoiceRule":{"$ref":"#/components/schemas/SurveyQuestionRuleData"}}},"SurveySubQuestionData":{"type":"object","nullable":true,"properties":{"QuestionID":{"type":"integer","format":"int32"},"QuestionSubType":{"type":"string","nullable":true},"QuestionType":{"type":"string","nullable":true},"VirtualQuestionType":{"type":"string","nullable":true},"QuestionDisplayType":{"type":"string","nullable":true},"QuestionNumber":{"type":"integer","format":"int32","nullable":true},"QuestionText":{"type":"string","nullable":true},"IsMandatory":{"type":"boolean"},"ErrorMessage":{"type":"string","nullable":true},"RuleSet":{"$ref":"#/components/schemas/SurveyQuestionRuleData"},"Expansive":{"type":"boolean"},"ValidationExpression":{"type":"string","nullable":true},"ValidationErrorMessage":{"type":"string","nullable":true},"Minimum":{"type":"integer","format":"int32","nullable":true},"Maximum":{"type":"integer","format":"int32","nullable":true},"Step":{"type":"integer","format":"int32","nullable":true},"WordLimit":{"type":"string","nullable":true},"Choices":{"type":"array","nullable":true,"items":{"$ref":"#/components/schemas/SurveyChoiceData"}},"DisplayEmoticons":{"type":"boolean"},"Preticked":{"type":"boolean"},"RandomizeOptionsOrder":{"type":"boolean"},"MinimumAge":{"type":"integer","format":"int32","nullable":true}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/GetSurveyQuestion":{"get":{"operationId":"SurveyApiGetSurveyQuestion","summary":"GetSurveyQuestion","tags":["SurveyApi"],"description":"Get Survey question","parameters":[{"name":"OpCode","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int OpCode in the pinned controller signature.","required":true},{"name":"QuestionID","in":"query","schema":{"type":"integer","format":"int32"},"description":"Native query parameter. CLR int QuestionID in the pinned controller signature.","required":true}],"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SurveyQuestionOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## PostLookandFeel

> Post survey look and feel

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"LookAndFeelInput":{"type":"object","nullable":true,"properties":{"OpCode":{"type":"integer","format":"int32"},"UseCustomHeaderFooter":{"type":"boolean","nullable":true},"LogoOptions":{"allOf":[{"$ref":"#/components/schemas/LogoOptions"}]},"TitleBarOptions":{"allOf":[{"$ref":"#/components/schemas/BarOptions"}]},"IntroductionBarOptions":{"allOf":[{"$ref":"#/components/schemas/BarOptions"}]},"CustomFiles":{"allOf":[{"$ref":"#/components/schemas/Files"}]},"AdvancedOptions":{"allOf":[{"$ref":"#/components/schemas/AdvancedOptions"}]},"MenuHeader":{"allOf":[{"$ref":"#/components/schemas/MenuHeader"}]},"FavIcons":{"allOf":[{"$ref":"#/components/schemas/FavIcons"}]},"QuestionsLookAndFeel":{"allOf":[{"$ref":"#/components/schemas/QuestionsLookAndFeel"}]}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"LogoOptions":{"type":"object","nullable":true,"properties":{"Logo":{"type":"string","format":"byte","nullable":true},"LogoPlacement":{"type":"string","nullable":true},"MaxLogoSizeEnabled":{"type":"boolean","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"BarOptions":{"type":"object","nullable":true,"properties":{"Description":{"type":"string","nullable":true},"Color":{"type":"string","nullable":true},"IsHidden":{"type":"boolean","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"Files":{"type":"object","nullable":true,"properties":{"BackgroundImage":{"type":"string","format":"byte","nullable":true},"BannerImage":{"type":"string","format":"byte","nullable":true},"CustomCssStyle":{"type":"string","format":"byte","nullable":true},"DefaultPathCssFile":{"type":"string","format":"byte","nullable":true},"PathJavaScriptFile":{"type":"string","format":"byte","nullable":true},"PathJavaScriptFile_Bottom":{"type":"string","format":"byte","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"AdvancedOptions":{"type":"object","nullable":true,"properties":{"ButtonBackgroundColor":{"type":"string","nullable":true},"ButtonBackgroundColorOnHover":{"type":"string","nullable":true},"ButtonTextColor":{"type":"string","nullable":true},"ButtonTextColorOnHover":{"type":"string","nullable":true},"CheckedStateColorforCheckboxandRadio":{"type":"string","nullable":true},"BackgroundColor":{"type":"string","nullable":true},"BodyBackgroundColor":{"type":"string","nullable":true},"BoundWidth":{"type":"integer","format":"int32"},"SubmitButtonText":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"MenuHeader":{"type":"object","nullable":true,"properties":{"BackgroundColor":{"type":"string","nullable":true},"Placement":{"type":"string","nullable":true},"IsEqualWidth":{"type":"boolean"},"FontColor":{"type":"string","nullable":true},"FontSize":{"type":"string","nullable":true},"MenuItems":{"type":"array","items":{"$ref":"#/components/schemas/MenuItem"},"nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"MenuItem":{"type":"object","nullable":true,"properties":{"ID":{"type":"integer","format":"int32"},"OrderNumber":{"type":"integer","format":"int32"},"FontawesomeIcon":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Link":{"type":"string","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"FavIcons":{"type":"object","nullable":true,"properties":{"LogoAssets":{"type":"string","format":"byte","nullable":true},"Logo64Assets":{"type":"string","format":"byte","nullable":true},"Logo180Assets":{"type":"string","format":"byte","nullable":true},"Logo70Assets":{"type":"string","format":"byte","nullable":true},"Logo150Assets":{"type":"string","format":"byte","nullable":true},"Logo310Assets":{"type":"string","format":"byte","nullable":true},"Logo3115Assets":{"type":"string","format":"byte","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"QuestionsLookAndFeel":{"type":"object","nullable":true,"properties":{"UseOneQuestionPerPage":{"type":"boolean","nullable":true},"Color":{"type":"string","nullable":true},"FontSize":{"type":"string","nullable":true},"FontFamily":{"type":"string","nullable":true},"SpaceBetweenQuestion":{"type":"integer","format":"int32","nullable":true},"IsPlaceHolderActive":{"type":"boolean","nullable":true},"DisplayQuestionsNumbers":{"type":"boolean","nullable":true}},"description":"Source-backed JSON members, including inheritance and JSON naming/ignore attributes. No property is required solely because its CLR value type is non-nullable. Runtime and deployment alignment are unverified."},"ApiCallResponse":{"type":"object","properties":{"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/PostLookandFeel":{"post":{"operationId":"SurveyApiPostLookandFeel","summary":"PostLookandFeel","tags":["SurveyApi"],"description":"Post survey look and feel","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LookAndFeelInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiCallResponse"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## PostResponses

> Post survey responses

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"PostResponsesInput":{"type":"object","properties":{"CtcID":{"type":"integer","format":"int32","nullable":true,"description":"Contact CtcID"},"IsCompleted":{"type":"boolean","description":"Shows if the respondent completed answering the survey"},"Request":{"allOf":[{"$ref":"#/components/schemas/RequestInfo"}],"description":"Collection of http request header fields"},"SessionID":{"type":"string","description":"Unique identifier of the call"},"Source":{"type":"string","description":"The Source of the call"},"Tracking":{"allOf":[{"$ref":"#/components/schemas/Tracking"}],"description":"Website Tracking"}}},"RequestInfo":{"type":"object","properties":{"BrowserActiveXControls":{"type":"boolean","description":"A value indicating whether the browser supports ActiveX controls"},"BrowserAOL":{"type":"boolean","description":"A value indicating whether the client is an America Online (AOL) browser"},"BrowserBackgroundSounds":{"type":"boolean","description":"A value indicating whether the browser supports playing background sounds"},"BrowserBeta":{"type":"boolean","description":"A value indicating whether the browser is a beta version"},"BrowserCDF":{"type":"boolean","description":"A value indicating whether the browser supports Channel Definition Format (CDF) for webcasting"},"BrowserClrVersion":{"type":"string","description":"The version of the .NET Framework that is installed on the client"},"BrowserCookies":{"type":"boolean","description":"A value indicating whether the browser supports cookies"},"BrowserCrawler":{"type":"boolean","description":"A value indicating whether the browser is a search engine Web crawler"},"BrowserEcmaScriptVersion":{"type":"string","description":"The version number of ECMAScript that the browser supports"},"BrowserFrames":{"type":"boolean","description":"Indicates whether the browser supports HTML frames"},"BrowserJavaApplets":{"type":"boolean","description":"A value indicating whether the browser supports Java"},"BrowserJavaScript":{"type":"boolean","description":"A value indicating whether the browser supports JavaScript"},"BrowserMajorVersion":{"type":"string","description":"The major (integer) version number of the browser"},"BrowserMinorVersion":{"type":"string","description":"The minor (decimal) version number of the browser"},"BrowserMSDomVersion":{"type":"string","description":"The version of Microsoft HTML (MSHTML) Document Object Model (DOM) that the browser supports"},"BrowserName":{"type":"string","description":"The full name of the browser"},"BrowserPlatform":{"type":"string","description":"The name of the platform that the client uses, if it is known"},"BrowserTables":{"type":"boolean","description":"Indicates whether the browser supports HTML table elements"},"BrowserVBScript":{"type":"boolean","description":"A value indicating whether the browser supports Visual Basic Scripting edition (VBScript)"},"BrowserVersion":{"type":"string","description":"The full version number (integer and decimal) of the browser as a string"},"BrowserW3CDomVersion":{"type":"string","description":"The version of the World Wide Web Consortium (W3C) XML Document Object Model (DOM) that the browser supports"},"LogonUserIdentityName":{"type":"string","description":"Gets the user's Windows logon name"},"LogonUserIdentityUser":{"type":"string","description":"Gets the security identifier (SID) for the user"},"QueryString":{"type":"string","description":"The collection of HTTP query string variables"},"Url":{"type":"string","description":"Information about the URL of the current request"},"UrlReferrer":{"type":"string","description":"Information about the URL of the client's previous request that linked to the current URL"},"UserAgent":{"type":"string","description":"The user agent string of the user agent"},"UserHostAddress":{"type":"string","description":"IP host address of the remote client"}}},"Tracking":{"type":"object","properties":{"Code":{"type":"string","description":"Tracking Code"},"Source":{"type":"string","description":"Tracking Source"}}},"PostResponsesOutput":{"type":"object","properties":{"ResponseData":{"$ref":"#/components/schemas/PostResponsesData"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"PostResponsesData":{"type":"object","nullable":true,"properties":{"SessionID":{"type":"string","nullable":true}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/PostResponses":{"post":{"operationId":"SurveyApiPostResponses","summary":"PostResponses","tags":["SurveyApi"],"description":"Post survey responses","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostResponsesInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostResponsesOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```

## PostSurvey

> create a new survey

```json
{"openapi":"3.0.3","info":{"title":"Atreemo API","version":"0.1.0"},"tags":[{"name":"SurveyApi","description":"API methods to save survey responses Standard API Responses 200 Success 401 Unauthorized (no valid access token provided) 403 Forbidden Forbidden (indicates you do not have access to this method) 404 Not Found (indicates invalid parameters or missing API endpoint) 500 Internal Server Error (indicates something went wrong on our end) for 200-level responses there is a field named ResponseStatus which will give you the status of the call : true Success false there is an error (you will find the error code and the description in the object Errors ) Possible Errors 1 Missing mandatory fields 2 Internal Error 12 empty input parameter 13 Invalid CtcID 14 Invalid SessionID 14 Invalid Question ID 16 Invalid response object 17 Invalid choice id 18 Question should have only one choice choosen"}],"servers":[{"url":"https://apim-hospitality-dev-uksouth.azure-api.net/atreemo-api","description":"Local DEV APIM import draft only; not a deployed endpoint announcement."}],"security":[{"AtreemoBearer":[]}],"components":{"securitySchemes":{"AtreemoBearer":{"type":"http","scheme":"bearer","description":"Atreemo access token obtained by the caller from the Atreemo instance `POST /token` endpoint (OAuth2 password grant) and sent as `Authorization: Bearer <token>`. See the Authorisation guide."}},"schemas":{"PostSurveyDataInput":{"type":"object","properties":{"BrandID":{"type":"integer","format":"int32","nullable":true,"description":"Brand ID"},"ClosureMessage":{"type":"string","description":"Closure Message"},"Description":{"type":"string","description":"Survey description"},"EndDate":{"type":"string","format":"date-time","nullable":true,"description":"End Date"},"Islive":{"type":"boolean","description":"Make This Survey Live"},"LandingPage":{"type":"string","description":"Landing Page"},"OpCode":{"type":"integer","format":"int32","nullable":true,"description":"Survey ID"},"PageTitle":{"type":"string","description":"Survey title"},"PleaseSelectText":{"type":"string","description":"Please select text"},"SubmissionCap":{"type":"integer","format":"int32","nullable":true,"description":"SubmissionCap"},"SurveyIntroduction":{"type":"string","description":"Survey Intro text"},"SurveyName":{"type":"string","description":"Survey name"},"ThankyouPageDescription":{"type":"string","description":"Text displayed after survey submission"},"UseEncryptedOpCode":{"type":"boolean","description":"Use Encrypted OpCode"}}},"PostSurveyDataOutput":{"type":"object","properties":{"SurveyData":{"$ref":"#/components/schemas/PostSurveyData"},"Errors":{"type":"array","items":{"$ref":"#/components/schemas/APICallError"},"description":"Collection of errors if exist"},"ResponseStatus":{"type":"boolean","description":"True: if the action was succsessfully treated False: if there is an error"}}},"PostSurveyData":{"type":"object","nullable":true,"properties":{"OpCode":{"type":"integer","format":"int32"},"Link":{"type":"string","nullable":true}}},"APICallError":{"type":"object","properties":{"ErrorCode":{"type":"integer","format":"int32","description":"The error code"},"ErrorDescription":{"type":"string","description":"The error description"}}}},"responses":{"401":{"description":"Unauthorized (no valid access token provided). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"403":{"description":"Forbidden (indicates you do not have access to this method). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"404":{"description":"Not Found (indicates invalid parameters or missing API endpoint). Wording from the Atreemo folder documentation; the response body for this status is not documented."},"500":{"description":"Internal Server Error (indicates something went wrong on our end). Wording from the Atreemo folder documentation; the response body for this status is not documented."}}},"paths":{"/api/SurveyApi/PostSurvey":{"post":{"operationId":"SurveyApiPostSurvey","summary":"PostSurvey","tags":["SurveyApi"],"description":"create a new survey","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSurveyDataInput"}}}},"responses":{"200":{"description":"OK (sample status in the public collection).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostSurveyDataOutput"}}}},"401":{"$ref":"#/components/responses/401"},"403":{"$ref":"#/components/responses/403"},"404":{"$ref":"#/components/responses/404"},"500":{"$ref":"#/components/responses/500"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hos.accessacloud.com/atreemo-api/api-reference/atreemo-api-reference/survey-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
