# Segmentation

Segmentation metadata related operations

## Retrieves all the areas metadata and configuration available for your company in a hirarchical way

> The information provided by this endpoint is useful to build the filters on the stats API or setup the employee profiles on the Employees API.

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Segmentation","description":"Segmentation metadata related operations"}],"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":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Area":{"type":"object","description":"Entity representing the information for a given area or department on your account","properties":{"id":{"type":"string","description":"Id of the area"},"name":{"type":"string","description":"Name of the area"},"children":{"type":"array","description":"sub areas under this one","items":{"description":"Entity representing the information for a given area or department on your account"},"uniqueItems":true}}}}},"paths":{"/api/v1/public/company/hierarchy":{"get":{"tags":["Segmentation"],"summary":"Retrieves all the areas metadata and configuration available for your company in a hirarchical way","description":"The information provided by this endpoint is useful to build the filters on the stats API or setup the employee profiles on the Employees API.","operationId":"getHierarchy_1","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Area"}}}}}}}}}}
```

## Retrieves all the group metadata (eg: perfomant users, newbies...) and configuration available for your company

> The information provided by this endpoint is useful to build the filters on the stats API or setup the employee profiles on the Employees API.

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Segmentation","description":"Segmentation metadata related operations"}],"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":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Group":{"type":"object","description":"Entity representing the information for a given group on your account. A group is a way of tagging an employee, for later segmentation","properties":{"id":{"type":"string","description":"Id of the group"},"name":{"type":"string","description":"Name of the group"}}}}},"paths":{"/api/v1/public/company/groups":{"get":{"tags":["Segmentation"],"summary":"Retrieves all the group metadata (eg: perfomant users, newbies...) and configuration available for your company","description":"The information provided by this endpoint is useful to build the filters on the stats API or setup the employee profiles on the Employees API.","operationId":"getGroups_1","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Group"}}}}}}}}}}
```

## Retrieves all the personal profile metadata (eg: gender, age, tenure) and configuration available for your company

> The information provided by this endpoint is useful to build the filters on the stats API or setup the employee profiles on the Employees API.

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Segmentation","description":"Segmentation metadata related operations"}],"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":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Profile":{"type":"object","description":"Entity representing the information for a given employee","properties":{"id":{"type":"string"},"type":{"$ref":"#/components/schemas/CharacteristicType"},"name":{"type":"string"},"allowedValues":{"type":"array","items":{"$ref":"#/components/schemas/ProfileValue"},"uniqueItems":true}}},"CharacteristicType":{"type":"string","description":"Type of segmentation characteristic","enum":["DATE","LIST","BOOLEAN"]},"ProfileValue":{"type":"object","description":"For a given LIST type profile property, details of one of the values","properties":{"id":{"type":"string","description":"Id of the value property"},"label":{"type":"string","description":"Label of the value property"}}}}},"paths":{"/api/v1/public/company/characteristics":{"get":{"tags":["Segmentation"],"summary":"Retrieves all the personal profile metadata (eg: gender, age, tenure) and configuration available for your company","description":"The information provided by this endpoint is useful to build the filters on the stats API or setup the employee profiles on the Employees API.","operationId":"getCharacteristics","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Profile"}}}}}}}}}}
```
