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

# Question Stats

## GET /api/v1/employee/stats/{employeeId}/questions

> Get's the stats for all the questions of the company of an employee

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionStatus":{"type":"string","description":"Status of a question in a survey or questionnaire","enum":["ANY","ACTIVE","PENDING","EXPIRED","PAUSED","ARCHIVED"]},"PaginableGenericListResultBaseStatsResultDTO":{"type":"object","properties":{"from":{"type":"integer","format":"int32"},"to":{"type":"integer","format":"int32"},"total":{"type":"integer","format":"int32"},"noContent":{"type":"boolean"},"results":{"type":"array","items":{"$ref":"#/components/schemas/BaseStatsResultDTO"}}}},"BaseStatsResultDTO":{"type":"object","description":"Base stats result: date range, total comments, total votes, hierarchy name.","properties":{"from":{"type":"string","format":"date-time","description":"Start date of the period"},"to":{"type":"string","format":"date-time","description":"End date of the period"},"totalComments":{"type":"integer","format":"int64","description":"Total number of comments"},"totalVotes":{"type":"integer","format":"int64","description":"Total number of votes"},"hierarchyName":{"type":"string","description":"Name of the hierarchy (area) this result applies to"},"companyEmployeeQuestion":{"$ref":"#/components/schemas/QuestionInfoDTO"},"questionType":{"type":"string"}}},"QuestionInfoDTO":{"type":"object","description":"Question info (summary): id, title, type, values, date range, representation, feedback mode, max comment length, feedback types.","properties":{"id":{"type":"string","description":"Question identifier"},"title":{"type":"string","description":"Question title"},"questionType":{"$ref":"#/components/schemas/QuestionType","description":"Question type (e.g. HI, CHECK_IN)"},"values":{"type":"array","description":"Available values/options","items":{"$ref":"#/components/schemas/QuestionValueDTO"},"uniqueItems":true},"from":{"type":"string","format":"date-time","description":"Start date of the question period"},"to":{"type":"string","format":"date-time","description":"End date of the question period"},"representation":{"type":"string","description":"How the question is represented (e.g. scale, list)","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"feedbackMode":{"$ref":"#/components/schemas/FeedbackMode","description":"Feedback mode for comments"},"maxCommentLength":{"type":"integer","format":"int32","description":"Maximum comment length"},"feedbackTypes":{"type":"array","description":"Feedback types available for this question","items":{"$ref":"#/components/schemas/QuestionFeedbackDTO"},"uniqueItems":true}}},"QuestionValueDTO":{"type":"object","description":"Option or value for a question (e.g. scale value, choice): id, score, value, image, color.","properties":{"id":{"type":"integer","format":"int32","description":"Value identifier"},"score":{"type":"integer","format":"int32","description":"Numeric score when applicable (e.g. for scales)"},"value":{"type":"string","description":"Display value (label)"},"imageUrl":{"type":"string","description":"URL of the image for this value"},"color":{"type":"string","description":"Color code for this value (e.g. for UI)"},"reflectionPrompt":{"type":"string","description":"Reflection prompt, in case the question has an additional comment option enabled"}}},"FeedbackMode":{"type":"string","enum":["ON_VOTE","AFTER_VOTE","ON_AND_AFTER_VOTE","NO_FEEDBACK","INLINE"]},"QuestionFeedbackDTO":{"type":"object","description":"Feedback type configuration for a question: type, privacy, signature, max length, target, image.","properties":{"feedbackType":{"$ref":"#/components/schemas/FeedbackType","description":"Feedback type (e.g. SUGGESTION, RECOGNITION)"},"privateEnabled":{"type":"boolean","description":"Whether private comments are enabled"},"nonAnonymousEnabled":{"type":"boolean","description":"Whether non-anonymous (signed) comments are enabled"},"maxCommentLength":{"type":"integer","format":"int32","description":"Maximum comment length (default 3000)"},"targeted":{"type":"boolean","description":"Whether comments can be targeted (e.g. to a person or area)"},"imageURL":{"type":"string","description":"URL of the image for this feedback type"}}},"FeedbackType":{"type":"string","description":"Type of feedback","enum":["RECOGNITION","CONGRATULATION","SUGGESTION","INFORMATION","CRITICISM","OTHER","SCORE","ENPS","CLASSIFICATION_FOLLOWUP","QUESTION","SURVEY","ANNOUNCEMENT_COMMENT"]}}},"paths":{"/api/v1/employee/stats/{employeeId}/questions":{"get":{"tags":["Question Stats"],"description":"Get's the stats for all the questions of the company of an employee","operationId":"getQuestionsStats","parameters":[{"name":"type","in":"query","description":"question type to be found: Open, Topic, General (HI), etc.","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuestionType"}}},{"name":"status","in":"query","description":"status of the question: ANY, ACTIVE, EXPIRED...","required":false,"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuestionStatus"},"uniqueItems":true}},{"name":"from","in":"query","description":"Starting results position","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"to","in":"query","description":"End results position","required":false,"schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginableGenericListResultBaseStatsResultDTO"}}}}}}}}}
```

## GET /api/v1/employee/stats/{employeeId}/question/{questionId}

> Get's the stats of a question of the company of an employee

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"],"default":"https://api.happyforce.com"}}}],"security":[{"employeeAPISessionId":[]}],"components":{"securitySchemes":{},"schemas":{"BaseStatsResultDTO":{"type":"object","description":"Base stats result: date range, total comments, total votes, hierarchy name.","properties":{"from":{"type":"string","format":"date-time","description":"Start date of the period"},"to":{"type":"string","format":"date-time","description":"End date of the period"},"totalComments":{"type":"integer","format":"int64","description":"Total number of comments"},"totalVotes":{"type":"integer","format":"int64","description":"Total number of votes"},"hierarchyName":{"type":"string","description":"Name of the hierarchy (area) this result applies to"},"companyEmployeeQuestion":{"$ref":"#/components/schemas/QuestionInfoDTO"},"questionType":{"type":"string"}}},"QuestionInfoDTO":{"type":"object","description":"Question info (summary): id, title, type, values, date range, representation, feedback mode, max comment length, feedback types.","properties":{"id":{"type":"string","description":"Question identifier"},"title":{"type":"string","description":"Question title"},"questionType":{"$ref":"#/components/schemas/QuestionType","description":"Question type (e.g. HI, CHECK_IN)"},"values":{"type":"array","description":"Available values/options","items":{"$ref":"#/components/schemas/QuestionValueDTO"},"uniqueItems":true},"from":{"type":"string","format":"date-time","description":"Start date of the question period"},"to":{"type":"string","format":"date-time","description":"End date of the question period"},"representation":{"type":"string","description":"How the question is represented (e.g. scale, list)","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"feedbackMode":{"$ref":"#/components/schemas/FeedbackMode","description":"Feedback mode for comments"},"maxCommentLength":{"type":"integer","format":"int32","description":"Maximum comment length"},"feedbackTypes":{"type":"array","description":"Feedback types available for this question","items":{"$ref":"#/components/schemas/QuestionFeedbackDTO"},"uniqueItems":true}}},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionValueDTO":{"type":"object","description":"Option or value for a question (e.g. scale value, choice): id, score, value, image, color.","properties":{"id":{"type":"integer","format":"int32","description":"Value identifier"},"score":{"type":"integer","format":"int32","description":"Numeric score when applicable (e.g. for scales)"},"value":{"type":"string","description":"Display value (label)"},"imageUrl":{"type":"string","description":"URL of the image for this value"},"color":{"type":"string","description":"Color code for this value (e.g. for UI)"},"reflectionPrompt":{"type":"string","description":"Reflection prompt, in case the question has an additional comment option enabled"}}},"FeedbackMode":{"type":"string","enum":["ON_VOTE","AFTER_VOTE","ON_AND_AFTER_VOTE","NO_FEEDBACK","INLINE"]},"QuestionFeedbackDTO":{"type":"object","description":"Feedback type configuration for a question: type, privacy, signature, max length, target, image.","properties":{"feedbackType":{"$ref":"#/components/schemas/FeedbackType","description":"Feedback type (e.g. SUGGESTION, RECOGNITION)"},"privateEnabled":{"type":"boolean","description":"Whether private comments are enabled"},"nonAnonymousEnabled":{"type":"boolean","description":"Whether non-anonymous (signed) comments are enabled"},"maxCommentLength":{"type":"integer","format":"int32","description":"Maximum comment length (default 3000)"},"targeted":{"type":"boolean","description":"Whether comments can be targeted (e.g. to a person or area)"},"imageURL":{"type":"string","description":"URL of the image for this feedback type"}}},"FeedbackType":{"type":"string","description":"Type of feedback","enum":["RECOGNITION","CONGRATULATION","SUGGESTION","INFORMATION","CRITICISM","OTHER","SCORE","ENPS","CLASSIFICATION_FOLLOWUP","QUESTION","SURVEY","ANNOUNCEMENT_COMMENT"]}}},"paths":{"/api/v1/employee/stats/{employeeId}/question/{questionId}":{"get":{"tags":["Question Stats"],"description":"Get's the stats of a question of the company of an employee","operationId":"getHierarchyStatsForQuestion","parameters":[{"name":"questionId","in":"path","description":"Id of the question to be retrieved","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseStatsResultDTO"}}}}}}}}}
```
