> 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/survey-stats-resource.md).

# Survey Stats Resource

## GET /api/v1/company/stats/surveys/{surveyId}

>

```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":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"SurveyPeriodResultDTO":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"result":{"$ref":"#/components/schemas/SurveyResultDTO"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"SurveyResultDTO":{"type":"object","properties":{"roundId":{"type":"string"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"nonAnonymous":{"type":"boolean"},"nonEnoughEmployees":{"type":"boolean"},"periodHasIndex":{"type":"boolean"},"periodIndex":{"type":"number","format":"double"},"distribution":{"type":"array","items":{"$ref":"#/components/schemas/SurveyParticipantsDistribution"}},"participants":{"type":"integer","format":"int64"},"completedParticipants":{"type":"integer","format":"int64"},"expectedActivatedParticipants":{"type":"integer","format":"int64"},"expectedInvitedParticipants":{"type":"integer","format":"int64"},"votes":{"type":"integer","format":"int64"},"comments":{"type":"integer","format":"int32"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockResultDTO"}},"byInvitedQuality":{"$ref":"#/components/schemas/DataQuality"},"byActivatedQuality":{"$ref":"#/components/schemas/DataQuality"},"scaleNormalized":{"type":"boolean"},"scaleMin":{"type":"integer","format":"int32"},"scaleMax":{"type":"integer","format":"int32"}}},"SurveyParticipantsDistribution":{"type":"object","properties":{"classification":{"type":"string","enum":["NEGATIVE","NEUTRAL","POSITIVE","SKIPPED"]},"count":{"type":"integer","format":"int32"}}},"SurveyBlockResultDTO":{"type":"object","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}},"blockIndex":{"type":"number","format":"double"},"blockHasIndex":{"type":"boolean"},"distribution":{"type":"array","items":{"$ref":"#/components/schemas/SurveyParticipantsDistribution"}},"participants":{"type":"integer","format":"int32"},"completedParticipants":{"type":"integer","format":"int32"},"votes":{"type":"integer","format":"int32"},"comments":{"type":"integer","format":"int32"},"byInvitedQuality":{"$ref":"#/components/schemas/DataQuality"},"byActivatedQuality":{"$ref":"#/components/schemas/DataQuality"}}},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]},"DataQuality":{"type":"string","description":"Quality of data of a specific field or metric","enum":["NO_DATA","LOW","WARNING","NORMAL","GOOD"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]}}},"paths":{"/api/v1/company/stats/surveys/{surveyId}":{"get":{"tags":["survey-stats-resource"],"operationId":"getSurveyLastResults","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"roundId","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"hierarchyId","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}},{"name":"filters","in":"query","required":false,"schema":{"type":"string"}},{"name":"groupId","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}},{"name":"questionResults","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyPeriodResultDTO"}}}}}}}}}
```

## GET /api/v1/company/stats/surveys/{surveyId}/grouping/{groupingType}

>

```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":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"GroupingType":{"type":"string","description":"Types of date grouping by segmentation","enum":["HIERARCHIES","GROUPS","CHARACTERISTICS","MANAGERS"]},"GroupingResultDTOSurveyGroupingResultDTO":{"type":"object","properties":{"groupingType":{"$ref":"#/components/schemas/GroupingType"},"noTypes":{"type":"boolean"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SurveyGroupingResultDTO"}}}},"SurveyGroupingResultDTO":{"type":"object","properties":{"hierarchyId":{"type":"string"},"characteristic":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"groupId":{"type":"string"},"result":{"$ref":"#/components/schemas/SurveyResultDTO"},"nonEnoughEmployees":{"type":"boolean"}}},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]},"SurveyResultDTO":{"type":"object","properties":{"roundId":{"type":"string"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"nonAnonymous":{"type":"boolean"},"nonEnoughEmployees":{"type":"boolean"},"periodHasIndex":{"type":"boolean"},"periodIndex":{"type":"number","format":"double"},"distribution":{"type":"array","items":{"$ref":"#/components/schemas/SurveyParticipantsDistribution"}},"participants":{"type":"integer","format":"int64"},"completedParticipants":{"type":"integer","format":"int64"},"expectedActivatedParticipants":{"type":"integer","format":"int64"},"expectedInvitedParticipants":{"type":"integer","format":"int64"},"votes":{"type":"integer","format":"int64"},"comments":{"type":"integer","format":"int32"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockResultDTO"}},"byInvitedQuality":{"$ref":"#/components/schemas/DataQuality"},"byActivatedQuality":{"$ref":"#/components/schemas/DataQuality"},"scaleNormalized":{"type":"boolean"},"scaleMin":{"type":"integer","format":"int32"},"scaleMax":{"type":"integer","format":"int32"}}},"SurveyParticipantsDistribution":{"type":"object","properties":{"classification":{"type":"string","enum":["NEGATIVE","NEUTRAL","POSITIVE","SKIPPED"]},"count":{"type":"integer","format":"int32"}}},"SurveyBlockResultDTO":{"type":"object","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}},"blockIndex":{"type":"number","format":"double"},"blockHasIndex":{"type":"boolean"},"distribution":{"type":"array","items":{"$ref":"#/components/schemas/SurveyParticipantsDistribution"}},"participants":{"type":"integer","format":"int32"},"completedParticipants":{"type":"integer","format":"int32"},"votes":{"type":"integer","format":"int32"},"comments":{"type":"integer","format":"int32"},"byInvitedQuality":{"$ref":"#/components/schemas/DataQuality"},"byActivatedQuality":{"$ref":"#/components/schemas/DataQuality"}}},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]},"DataQuality":{"type":"string","description":"Quality of data of a specific field or metric","enum":["NO_DATA","LOW","WARNING","NORMAL","GOOD"]}}},"paths":{"/api/v1/company/stats/surveys/{surveyId}/grouping/{groupingType}":{"get":{"tags":["survey-stats-resource"],"operationId":"getSurveyGroupResults","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"roundId","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"groupingType","in":"path","required":true,"schema":{"$ref":"#/components/schemas/GroupingType"}},{"name":"hierarchyId","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}},{"name":"filters","in":"query","required":false,"schema":{"type":"string"}},{"name":"groupId","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}},{"name":"questionResults","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/GroupingResultDTOSurveyGroupingResultDTO"}}}}}}}}}
```

## GET /api/v1/company/stats/surveys/{surveyId}/evolution

>

```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":[{"companyAPISessionId":[]}],"components":{"securitySchemes":{"companyAPISessionId":{"type":"apiKey","description":"SessionId","name":"SessionId","in":"header"}},"schemas":{"DateGroupingTypes":{"type":"string","description":"Types of date grouping intervals","enum":["DAY","WEEK","MONTH","QUARTER","NON_NATURAL_QUARTER","YEAR"]},"SurveyEvolutionResultDTO":{"type":"object","properties":{"grouping":{"$ref":"#/components/schemas/DateGroupingTypes"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"results":{"type":"array","items":{"$ref":"#/components/schemas/SurveyPeriodResultDTO"}}}},"SurveyPeriodResultDTO":{"type":"object","properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"result":{"$ref":"#/components/schemas/SurveyResultDTO"},"hierarchyIds":{"type":"array","items":{"type":"string"},"uniqueItems":true},"characteristics":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBoolean"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueDate"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueList"},{"$ref":"#/components/schemas/EmployeeCharacteristicValueTree"}]},"uniqueItems":true},"groupIds":{"type":"array","items":{"type":"string"},"uniqueItems":true}}},"SurveyResultDTO":{"type":"object","properties":{"roundId":{"type":"string"},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"nonAnonymous":{"type":"boolean"},"nonEnoughEmployees":{"type":"boolean"},"periodHasIndex":{"type":"boolean"},"periodIndex":{"type":"number","format":"double"},"distribution":{"type":"array","items":{"$ref":"#/components/schemas/SurveyParticipantsDistribution"}},"participants":{"type":"integer","format":"int64"},"completedParticipants":{"type":"integer","format":"int64"},"expectedActivatedParticipants":{"type":"integer","format":"int64"},"expectedInvitedParticipants":{"type":"integer","format":"int64"},"votes":{"type":"integer","format":"int64"},"comments":{"type":"integer","format":"int32"},"blocks":{"type":"array","items":{"$ref":"#/components/schemas/SurveyBlockResultDTO"}},"byInvitedQuality":{"$ref":"#/components/schemas/DataQuality"},"byActivatedQuality":{"$ref":"#/components/schemas/DataQuality"},"scaleNormalized":{"type":"boolean"},"scaleMin":{"type":"integer","format":"int32"},"scaleMax":{"type":"integer","format":"int32"}}},"SurveyParticipantsDistribution":{"type":"object","properties":{"classification":{"type":"string","enum":["NEGATIVE","NEUTRAL","POSITIVE","SKIPPED"]},"count":{"type":"integer","format":"int32"}}},"SurveyBlockResultDTO":{"type":"object","properties":{"blockId":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"description":{"$ref":"#/components/schemas/MultiLanguage"},"questions":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/OpenSurveyQuestion"},{"$ref":"#/components/schemas/OptionsSurveyQuestion"},{"$ref":"#/components/schemas/ScaleSurveyQuestion"}]}},"blockIndex":{"type":"number","format":"double"},"blockHasIndex":{"type":"boolean"},"distribution":{"type":"array","items":{"$ref":"#/components/schemas/SurveyParticipantsDistribution"}},"participants":{"type":"integer","format":"int32"},"completedParticipants":{"type":"integer","format":"int32"},"votes":{"type":"integer","format":"int32"},"comments":{"type":"integer","format":"int32"},"byInvitedQuality":{"$ref":"#/components/schemas/DataQuality"},"byActivatedQuality":{"$ref":"#/components/schemas/DataQuality"}}},"MultiLanguage":{"type":"object","description":"A translatable text value: a required default value plus optional per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\"). Consumers resolve the user's language from langValues (falling back to the base language, then to defaultValue).","properties":{"defaultValue":{"type":"string","description":"Fallback text used when there is no entry in langValues for the requested language.","minLength":1},"langValues":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-language overrides keyed by language tag (e.g. \"es\", \"en\", \"pt-BR\")."},"valid":{"type":"boolean"}},"required":["defaultValue"]},"OpenSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"requireNotEmpty":{"type":"boolean"}}}],"required":["questionType","representation","title","voteMode"]},"AbstractSurveyQuestion":{"type":"object","description":"Base class for survey questions","discriminator":{"propertyName":"questionType","mapping":{"OPEN":"#/components/schemas/OpenSurveyQuestion","TOPIC":"#/components/schemas/OptionsSurveyQuestion","RANGE":"#/components/schemas/ScaleSurveyQuestion"}},"properties":{"id":{"type":"string"},"title":{"$ref":"#/components/schemas/MultiLanguage"},"questionType":{"$ref":"#/components/schemas/QuestionType"},"order":{"type":"integer","format":"int32"},"visible":{"type":"boolean"},"computeInBlock":{"type":"boolean"},"feedbackEnabled":{"type":"boolean"},"mandatory":{"type":"boolean","deprecated":true},"voteMode":{"$ref":"#/components/schemas/QuestionVoteMode"},"representation":{"type":"string","enum":["IMAGES","OPTIONS","MULTIPLE_OPTIONS","FEEDBACK","SCALE","GRADIENT_SLIDE"]},"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"uniqueItems":true}},"required":["questionType","representation","title","voteMode"]},"QuestionType":{"type":"string","description":"Type of question used in company surveys or questionnaires","enum":["GENERAL","TOPIC","OPEN","RANGE"]},"QuestionVoteMode":{"type":"string","description":"Modes of question voting in a survey or feedback form. Defines whether a question is mandatory, optional, or deferred.","enum":["MANDATORY","OPTIONAL","DEFERRED"]},"QuestionValue":{"type":"object","properties":{"id":{"type":"integer","format":"int32"},"score":{"type":"integer","format":"int32"},"label":{"$ref":"#/components/schemas/MultiLanguage"},"imageUrl":{"type":"string"},"color":{"type":"string"}},"required":["id","label","score"]},"OptionsSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"values":{"type":"array","items":{"$ref":"#/components/schemas/QuestionValue"},"maxItems":2147483647,"minItems":2,"uniqueItems":true},"minSelection":{"type":"integer","format":"int32"},"maxSelection":{"type":"integer","format":"int32"},"multipleChoice":{"type":"boolean"},"minValue":{"$ref":"#/components/schemas/QuestionValue"},"maxValue":{"$ref":"#/components/schemas/QuestionValue"}}}],"required":["questionType","representation","title","voteMode"]},"ScaleSurveyQuestion":{"allOf":[{"$ref":"#/components/schemas/AbstractSurveyQuestion"},{"type":"object","properties":{"firstValue":{"$ref":"#/components/schemas/QuestionValue"},"lastValue":{"$ref":"#/components/schemas/QuestionValue"},"inverted":{"type":"boolean"}}}],"required":["firstValue","lastValue","questionType","representation","title","voteMode"]},"DataQuality":{"type":"string","description":"Quality of data of a specific field or metric","enum":["NO_DATA","LOW","WARNING","NORMAL","GOOD"]},"EmployeeCharacteristicValueBoolean":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"boolean"}}}]},"EmployeeCharacteristicValueBase":{"type":"object","description":"Base class for employee characteristic values","discriminator":{"propertyName":"questionType","mapping":{"LIST":"#/components/schemas/EmployeeCharacteristicValueList","DATE":"#/components/schemas/EmployeeCharacteristicValueDate","BOOLEAN":"#/components/schemas/EmployeeCharacteristicValueBoolean","TREE":"#/components/schemas/EmployeeCharacteristicValueTree"}},"properties":{"characteristicId":{"type":"string"},"id":{"type":"string"},"questionType":{"$ref":"#/components/schemas/CharacteristicType"}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN","TREE"]},"EmployeeCharacteristicValueDate":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"date":{"type":"string","format":"date-time"},"value":{"type":"string"}}}]},"EmployeeCharacteristicValueList":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"}}}]},"EmployeeCharacteristicValueTree":{"allOf":[{"$ref":"#/components/schemas/EmployeeCharacteristicValueBase"},{"type":"object","properties":{"value":{"type":"string"},"assignedPath":{"type":"array","items":{"type":"string"}},"assignedOn":{"type":"string","format":"date-time"}}}]}}},"paths":{"/api/v1/company/stats/surveys/{surveyId}/evolution":{"get":{"tags":["survey-stats-resource"],"operationId":"getSurveyEvolutionResults","parameters":[{"name":"surveyId","in":"path","required":true,"schema":{"type":"string"}},{"name":"roundId","in":"query","required":false,"schema":{"type":"string"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"hierarchyId","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}},{"name":"filters","in":"query","required":false,"schema":{"type":"string"}},{"name":"groupId","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}},{"name":"questionResults","in":"query","required":false,"schema":{"type":"string"}},{"name":"grouping","in":"query","required":false,"schema":{"$ref":"#/components/schemas/DateGroupingTypes","default":"MONTH"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SurveyEvolutionResultDTO"}}}}}}}}}
```
