# Employees

Employees manage related operations

## PUT /api/v1/public/company/employees/reset

> Resets the employee profile for a given email address, allowing the employee to select a new are and profile when they log in on the app

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Employees","description":"Employees manage related operations"}],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","default":"https://api.happyforce.com","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"]}}}],"security":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Employee":{"type":"object","description":"The details of the employee you want to invite to Happyforce","properties":{"name":{"type":"string","description":"Name of the employee"},"email":{"type":"string","description":"Email of the employee"},"externalId":{"type":"string","description":"External id of the employee"},"hierarchyId":{"type":"string","description":"Area id where this employee belongs"},"profile":{"type":"array","description":"Employee profile data, used for later segmentation","items":{"$ref":"#/components/schemas/EmployeeProfile"},"uniqueItems":true},"groupIds":{"type":"array","description":"List of groups to which this user belongs","items":{"type":"string"},"uniqueItems":true},"role":{"type":"string","description":"Role of the employee in the company","enum":["ADVISOR","ADMIN","RESPONSIBLE","PUBLIC","MANAGER","EMPLOYEE"]},"managedHierarchies":{"type":"array","description":"List of hierarchies that this employee manages","items":{"type":"string"},"uniqueItems":true}}},"EmployeeProfile":{"type":"object","description":"Entity representing the profile of one of your employees","properties":{"id":{"type":"string","description":"Id of the segmentation property"},"date":{"type":"string","format":"date-time","description":"Date for date type segments"},"valueId":{"type":"string","description":"Value id, for list type segments"}}}}},"paths":{"/api/v1/public/company/employees/reset":{"put":{"tags":["Employees"],"summary":"Resets the employee profile for a given email address, allowing the employee to select a new are and profile when they log in on the app","operationId":"resetEmployee","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}},"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}},"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}}}}}}}}
```

## GET /api/v1/public/company/employees/externalid/{externalId}

> Retrieves an employee by external id

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Employees","description":"Employees manage related operations"}],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","default":"https://api.happyforce.com","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"]}}}],"security":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Employee":{"type":"object","description":"The details of the employee you want to invite to Happyforce","properties":{"name":{"type":"string","description":"Name of the employee"},"email":{"type":"string","description":"Email of the employee"},"externalId":{"type":"string","description":"External id of the employee"},"hierarchyId":{"type":"string","description":"Area id where this employee belongs"},"profile":{"type":"array","description":"Employee profile data, used for later segmentation","items":{"$ref":"#/components/schemas/EmployeeProfile"},"uniqueItems":true},"groupIds":{"type":"array","description":"List of groups to which this user belongs","items":{"type":"string"},"uniqueItems":true},"role":{"type":"string","description":"Role of the employee in the company","enum":["ADVISOR","ADMIN","RESPONSIBLE","PUBLIC","MANAGER","EMPLOYEE"]},"managedHierarchies":{"type":"array","description":"List of hierarchies that this employee manages","items":{"type":"string"},"uniqueItems":true}}},"EmployeeProfile":{"type":"object","description":"Entity representing the profile of one of your employees","properties":{"id":{"type":"string","description":"Id of the segmentation property"},"date":{"type":"string","format":"date-time","description":"Date for date type segments"},"valueId":{"type":"string","description":"Value id, for list type segments"}}}}},"paths":{"/api/v1/public/company/employees/externalid/{externalId}":{"get":{"tags":["Employees"],"summary":"Retrieves an employee by external id","operationId":"getEmployeeByExternalId","parameters":[{"name":"externalId","in":"path","description":"The externalId of the employee you want to retrieve","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}}}}}}}}
```

## PUT /api/v1/public/company/employees/externalid/{externalId}

> Updates an employee for a given external id

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Employees","description":"Employees manage related operations"}],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","default":"https://api.happyforce.com","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"]}}}],"security":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Employee":{"type":"object","description":"The details of the employee you want to invite to Happyforce","properties":{"name":{"type":"string","description":"Name of the employee"},"email":{"type":"string","description":"Email of the employee"},"externalId":{"type":"string","description":"External id of the employee"},"hierarchyId":{"type":"string","description":"Area id where this employee belongs"},"profile":{"type":"array","description":"Employee profile data, used for later segmentation","items":{"$ref":"#/components/schemas/EmployeeProfile"},"uniqueItems":true},"groupIds":{"type":"array","description":"List of groups to which this user belongs","items":{"type":"string"},"uniqueItems":true},"role":{"type":"string","description":"Role of the employee in the company","enum":["ADVISOR","ADMIN","RESPONSIBLE","PUBLIC","MANAGER","EMPLOYEE"]},"managedHierarchies":{"type":"array","description":"List of hierarchies that this employee manages","items":{"type":"string"},"uniqueItems":true}}},"EmployeeProfile":{"type":"object","description":"Entity representing the profile of one of your employees","properties":{"id":{"type":"string","description":"Id of the segmentation property"},"date":{"type":"string","format":"date-time","description":"Date for date type segments"},"valueId":{"type":"string","description":"Value id, for list type segments"}}}}},"paths":{"/api/v1/public/company/employees/externalid/{externalId}":{"put":{"tags":["Employees"],"summary":"Updates an employee for a given external id","operationId":"updateEmployeeByExternalId","parameters":[{"name":"externalId","in":"path","description":"The externalId of the employee you wish to update","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}}}}}}}}
```

## DELETE /api/v1/public/company/employees/externalid/{externalId}

> Deletes an employee for a given external id

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Employees","description":"Employees manage related operations"}],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","default":"https://api.happyforce.com","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"]}}}],"security":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}}},"paths":{"/api/v1/public/company/employees/externalid/{externalId}":{"delete":{"tags":["Employees"],"summary":"Deletes an employee for a given external id","operationId":"deleteEmployeeByExternalId","parameters":[{"name":"externalId","in":"path","description":"The externalId of the employee you wish to delete","required":true,"schema":{"type":"string"}},{"name":"turnoverDate","in":"query","description":"The turnover date of the employee (ddMMyyyy format)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"turnoverType","in":"query","description":"The type of turnover: Voluntary or involuntary","required":false,"schema":{"type":"string","enum":["VOLUNTARY","INVOLUNTARY","OTHER"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}}}}
```

## GET /api/v1/public/company/employees/email/{employeeEmail}

> Retrieves an employee by email

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Employees","description":"Employees manage related operations"}],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","default":"https://api.happyforce.com","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"]}}}],"security":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Employee":{"type":"object","description":"The details of the employee you want to invite to Happyforce","properties":{"name":{"type":"string","description":"Name of the employee"},"email":{"type":"string","description":"Email of the employee"},"externalId":{"type":"string","description":"External id of the employee"},"hierarchyId":{"type":"string","description":"Area id where this employee belongs"},"profile":{"type":"array","description":"Employee profile data, used for later segmentation","items":{"$ref":"#/components/schemas/EmployeeProfile"},"uniqueItems":true},"groupIds":{"type":"array","description":"List of groups to which this user belongs","items":{"type":"string"},"uniqueItems":true},"role":{"type":"string","description":"Role of the employee in the company","enum":["ADVISOR","ADMIN","RESPONSIBLE","PUBLIC","MANAGER","EMPLOYEE"]},"managedHierarchies":{"type":"array","description":"List of hierarchies that this employee manages","items":{"type":"string"},"uniqueItems":true}}},"EmployeeProfile":{"type":"object","description":"Entity representing the profile of one of your employees","properties":{"id":{"type":"string","description":"Id of the segmentation property"},"date":{"type":"string","format":"date-time","description":"Date for date type segments"},"valueId":{"type":"string","description":"Value id, for list type segments"}}}}},"paths":{"/api/v1/public/company/employees/email/{employeeEmail}":{"get":{"tags":["Employees"],"summary":"Retrieves an employee by email","operationId":"getEmployeeByEmail","parameters":[{"name":"employeeEmail","in":"path","description":"The email of the employee you want to retrieve","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}}}}}}}}
```

## PUT /api/v1/public/company/employees/email/{employeeEmail}

> Updates an employee for a given email address

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Employees","description":"Employees manage related operations"}],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","default":"https://api.happyforce.com","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"]}}}],"security":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Employee":{"type":"object","description":"The details of the employee you want to invite to Happyforce","properties":{"name":{"type":"string","description":"Name of the employee"},"email":{"type":"string","description":"Email of the employee"},"externalId":{"type":"string","description":"External id of the employee"},"hierarchyId":{"type":"string","description":"Area id where this employee belongs"},"profile":{"type":"array","description":"Employee profile data, used for later segmentation","items":{"$ref":"#/components/schemas/EmployeeProfile"},"uniqueItems":true},"groupIds":{"type":"array","description":"List of groups to which this user belongs","items":{"type":"string"},"uniqueItems":true},"role":{"type":"string","description":"Role of the employee in the company","enum":["ADVISOR","ADMIN","RESPONSIBLE","PUBLIC","MANAGER","EMPLOYEE"]},"managedHierarchies":{"type":"array","description":"List of hierarchies that this employee manages","items":{"type":"string"},"uniqueItems":true}}},"EmployeeProfile":{"type":"object","description":"Entity representing the profile of one of your employees","properties":{"id":{"type":"string","description":"Id of the segmentation property"},"date":{"type":"string","format":"date-time","description":"Date for date type segments"},"valueId":{"type":"string","description":"Value id, for list type segments"}}}}},"paths":{"/api/v1/public/company/employees/email/{employeeEmail}":{"put":{"tags":["Employees"],"summary":"Updates an employee for a given email address","operationId":"updateEmployeeByEmail","parameters":[{"name":"employeeEmail","in":"path","description":"The email of the employee you wish to update","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}}}}}}}}
```

## DELETE /api/v1/public/company/employees/email/{employeeEmail}

> Deletes an employee for a given email address

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Employees","description":"Employees manage related operations"}],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","default":"https://api.happyforce.com","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"]}}}],"security":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}}},"paths":{"/api/v1/public/company/employees/email/{employeeEmail}":{"delete":{"tags":["Employees"],"summary":"Deletes an employee for a given email address","operationId":"deleteEmployeeByEmail","parameters":[{"name":"employeeEmail","in":"path","description":"The email of the employee you wish to delete","required":true,"schema":{"type":"string"}},{"name":"turnoverDate","in":"query","description":"The turnover date of the employee (ddMMyyyy format)","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"turnoverType","in":"query","description":"The type of turnover: Voluntary or involuntary","required":false,"schema":{"type":"string","enum":["VOLUNTARY","INVOLUNTARY","OTHER"]}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}}}}
```

## POST /api/v1/public/company/employees/invite

> Invite an employee

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Employees","description":"Employees manage related operations"}],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","default":"https://api.happyforce.com","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"]}}}],"security":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Employee":{"type":"object","description":"The details of the employee you want to invite to Happyforce","properties":{"name":{"type":"string","description":"Name of the employee"},"email":{"type":"string","description":"Email of the employee"},"externalId":{"type":"string","description":"External id of the employee"},"hierarchyId":{"type":"string","description":"Area id where this employee belongs"},"profile":{"type":"array","description":"Employee profile data, used for later segmentation","items":{"$ref":"#/components/schemas/EmployeeProfile"},"uniqueItems":true},"groupIds":{"type":"array","description":"List of groups to which this user belongs","items":{"type":"string"},"uniqueItems":true},"role":{"type":"string","description":"Role of the employee in the company","enum":["ADVISOR","ADMIN","RESPONSIBLE","PUBLIC","MANAGER","EMPLOYEE"]},"managedHierarchies":{"type":"array","description":"List of hierarchies that this employee manages","items":{"type":"string"},"uniqueItems":true}}},"EmployeeProfile":{"type":"object","description":"Entity representing the profile of one of your employees","properties":{"id":{"type":"string","description":"Id of the segmentation property"},"date":{"type":"string","format":"date-time","description":"Date for date type segments"},"valueId":{"type":"string","description":"Value id, for list type segments"}}}}},"paths":{"/api/v1/public/company/employees/invite":{"post":{"tags":["Employees"],"summary":"Invite an employee","operationId":"inviteEmployee","requestBody":{"content":{"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/Employee"}}}}}}}}}
```

## GET /api/v1/public/company/employees

> Retrieves all the employees

```json
{"openapi":"3.1.0","info":{"title":"Happyforce API","version":"v1"},"tags":[{"name":"Employees","description":"Employees manage related operations"}],"servers":[{"url":"{url}","description":"API URL","variables":{"url":{"description":"API Environment","default":"https://api.happyforce.com","enum":["https://api.happyforce.com","https://staging.happyforce.com","http://localhost:9000"]}}}],"security":[{"happyforceAPIKey":[]}],"components":{"securitySchemes":{"happyforceAPIKey":{"type":"apiKey","description":"API Key for Happyforce API","name":"happyforceAPIKey","in":"header"}},"schemas":{"Employee":{"type":"object","description":"The details of the employee you want to invite to Happyforce","properties":{"name":{"type":"string","description":"Name of the employee"},"email":{"type":"string","description":"Email of the employee"},"externalId":{"type":"string","description":"External id of the employee"},"hierarchyId":{"type":"string","description":"Area id where this employee belongs"},"profile":{"type":"array","description":"Employee profile data, used for later segmentation","items":{"$ref":"#/components/schemas/EmployeeProfile"},"uniqueItems":true},"groupIds":{"type":"array","description":"List of groups to which this user belongs","items":{"type":"string"},"uniqueItems":true},"role":{"type":"string","description":"Role of the employee in the company","enum":["ADVISOR","ADMIN","RESPONSIBLE","PUBLIC","MANAGER","EMPLOYEE"]},"managedHierarchies":{"type":"array","description":"List of hierarchies that this employee manages","items":{"type":"string"},"uniqueItems":true}}},"EmployeeProfile":{"type":"object","description":"Entity representing the profile of one of your employees","properties":{"id":{"type":"string","description":"Id of the segmentation property"},"date":{"type":"string","format":"date-time","description":"Date for date type segments"},"valueId":{"type":"string","description":"Value id, for list type segments"}}}}},"paths":{"/api/v1/public/company/employees":{"get":{"tags":["Employees"],"summary":"Retrieves all the employees","operationId":"getEmployees","parameters":[{"name":"hierarchyId","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}},{"name":"profile","in":"query","required":false,"schema":{"type":"string"}},{"name":"groupId","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"uniqueItems":true}},{"name":"activated","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"deleted","in":"query","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Employee"}}}}}}}}}}
```
