Employees

Retrieves an employee by email

GEThttps://api.myhappyforce.com/api/v1/public/company/employees/{employeeEmail}
Path parameters
employeeEmail*string

The email of the employee you want to retrieve

Response

OK

Body
namestring

Name of the employee

emailstring

Email of the employee

hierarchyIdstring
profilearray of EmployeeProfile (object)

Employee profile data, used for later segmentation

groupIdsarray of string

List of groups to which this user belongs

Request
const response = await fetch('https://api.myhappyforce.com/api/v1/public/company/employees/{employeeEmail}', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "name": "text",
  "email": "text",
  "hierarchyId": "text",
  "profile": [
    {
      "id": "text",
      "date": "2024-05-08T00:37:16.580Z",
      "valueId": "text"
    }
  ],
  "groupIds": [
    "text"
  ]
}

Updates an employee email address or hierarchy for a given email address

PUThttps://api.myhappyforce.com/api/v1/public/company/employees/{employeeEmail}
Path parameters
employeeEmail*string

The email of the employee you wish to update

Body
namestring

Name of the employee

emailstring

Email of the employee

hierarchyIdstring
profilearray of EmployeeProfile (object)

Employee profile data, used for later segmentation

groupIdsarray of string

List of groups to which this user belongs

Response

OK

Body
namestring

Name of the employee

emailstring

Email of the employee

hierarchyIdstring
profilearray of EmployeeProfile (object)

Employee profile data, used for later segmentation

groupIdsarray of string

List of groups to which this user belongs

Request
const response = await fetch('https://api.myhappyforce.com/api/v1/public/company/employees/{employeeEmail}', {
    method: 'PUT',
    headers: {
      "Content-Type": "*/*"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
{
  "name": "text",
  "email": "text",
  "hierarchyId": "text",
  "profile": [
    {
      "id": "text",
      "date": "2024-05-08T00:37:16.580Z",
      "valueId": "text"
    }
  ],
  "groupIds": [
    "text"
  ]
}

Deletes an employee for a given email address

DELETEhttps://api.myhappyforce.com/api/v1/public/company/employees/{employeeEmail}
Path parameters
employeeEmail*string

The email of the employee you wish to delete

Query parameters
Response

OK

Body
string
Request
const response = await fetch('https://api.myhappyforce.com/api/v1/public/company/employees/{employeeEmail}', {
    method: 'DELETE',
    headers: {},
});
const data = await response.json();
Response
"text"

Retrieves all the employees

GEThttps://api.myhappyforce.com/api/v1/public/company/employees
Query parameters
Response

OK

Body
namestring

Name of the employee

emailstring

Email of the employee

hierarchyIdstring
profilearray of EmployeeProfile (object)

Employee profile data, used for later segmentation

groupIdsarray of string

List of groups to which this user belongs

Request
const response = await fetch('https://api.myhappyforce.com/api/v1/public/company/employees', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
[
  {
    "name": "text",
    "email": "text",
    "hierarchyId": "text",
    "profile": [
      {
        "id": "text",
        "date": "2024-05-08T00:37:16.580Z",
        "valueId": "text"
      }
    ],
    "groupIds": [
      "text"
    ]
  }
]