# 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"}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

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

```
GET https://api-docs.myhappyforce.com/docs/api-reference/segmentation.md?ask=<question>
```

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

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