v1

latestOpenAPI 3.0.02026-07-14800227.2 KB
Employees

Return a list of employee works.

This endpoint returns a list with the work sections of the existing employees. Additionally, custom fields from this section will also be included.

get/employees/works

Query parameters

companyIdstring
Example:80a2db290da29e126a18789a

The company id of the Kenjo employee.

officeIdstring
Example:80a2db290da29e126a18789d

The office id of the Kenjo employee.

departmentIdstring
Example:80a2db290da29e126a18789c

The department id of the Kenjo employee.

startDatestring
Example:2022-06-01T00:00:00.000Z

The starting date of the Kenjo employee in format YYYY-MM-DDThh:mm:ss.

jobTitlestring
Example:Actor

The job title of the employee.

workPhonestring
Example:34 666 70 90 32

The work phone of the employee.

workMobilestring
Example:34 680 70 90 32

The work mobile of the employee.

isAssistantboolean

Allow to indicate if the employee has or not the assistant role.

probationPeriodEndstring
Example:2022-06-01T00:00:00.000Z

The probation period of the employee. Format YYYY-MM-DDThh:mm:ss.000Z.

contractEndstring
Example:2020-07-01T00:00:00.000Z

The contract end date of the employee. Format YYYY-MM-DDThh:00:00.000Z.

reportsToIdstring
Example:80a2db290da29e126a187891

The Kenjo employee id of the user to whom the employee reports. The employee id to assign can be an active or inactive user. Trying to assign the own employee id or the id of someone who is already reporting will arise an error.

Headers

Authorizationstring required
Example:Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2FwaS5rZW5qby5pbyIsInN1YiI6IjYwZjBhOTE2MjE0OTg3MjU2YmU5YzhmZiIsImF1ZCI6Imh0dHBzOi8vYXBpLmtlbmpvLmlvIiwiaWF0IjoxNjI2Mzg1MTE1LCJuYmYiOjE2MjYzODUxMTUsImV4cCI6MTYyNjU1NzkxNSwiYWNjZXNzVHlwZSI6IkFwaUFjY2VzcyIsInNfb3JnSWQiOiI2MGYwNGVhN2RmN2JhMjFlY2U0YmYzYzIifQ.cxG_7dIS-VbmDXdJuLkekoyuyCIzQG2fMcgc0nkfbWE8cihhcb5FnALbQkjU9b5-qVcEoMHZlSuUA-jMEBMMVQ

A valid bearer token.

Response

OK

Example response

{
  "data": [
    {
      "_id": "10a2db290da29e126a18789a",
      "companyId": "80a2db290da29e126a18789a",
      "officeId": "80a2db290da29e126a18789b",
      "departmentId": "80a2db290da29e126a18789c",
      "areaIds": [
        "68370faa00aab31dedd4c35f",
        "68370f9400aab31dedd4c358"
      ],
      "teamIds": [
        "68370faa00aab31dedd4c35f",
        "68370f9400aab31dedd4c358"
      ],
      "startDate": "2020-07-01T00:00:00.000Z",
      "jobTitle": "Actor",
      "workPhone": "+34 657 89 76 52",
      "workMobile": "+34 656 89 76 52",
      "isAssistant": false,
      "probationPeriodEnd": "2022-06-01T00:00:00.000Z",
      "timeOffApproverId": "50a2db290da29e126a1878523",
      "contractEnd": "2030-06-01T00:00:00.000Z",
      "reportsToId": "50a2db290da29e126a1878523"
    },
    {
      "_id": "20a2db290da29e126a18789a",
      "companyId": "80a2db290da29e126a18789a",
      "officeId": "80a2db290da29e126a18789b",
      "departmentId": "80a2db290da29e126a18789c",
      "areaIds": [
        "68370faa00aab31dedd4c35f",
        "68370f9400aab31dedd4c358"
      ],
      "teamIds": [
        "68370faa00aab31dedd4c35f"
      ],
      "startDate": "2021-01-01T00:00:00.000Z",
      "jobTitle": "Director",
      "workPhone": "+34 657 89 76 52",
      "workMobile": "+34 656 89 76 52",
      "isAssistant": true,
      "probationPeriodEnd": "2022-06-01T00:00:00.000Z",
      "timeOffApproverId": "50a2db290da29e126a1878523",
      "reportsToId": "50a2db290da29e126a1878523"
    },
    {
      "_id": "30a2db290da29e126a18789a",
      "companyId": "80a2db290da29e126a18789a",
      "officeId": "80a2db290da29e126a18789b",
      "departmentId": "80a2db290da29e126a18789c",
      "areaIds": [
        "68370f9400aab31dedd4c358"
      ],
      "teamIds": [
        "68370f9400aab31dedd4c358"
      ],
      "startDate": "2021-07-01T00:00:00.000Z",
      "jobTitle": "Musician",
      "workPhone": "+34 658 89 76 52",
      "workMobile": "+34 659 89 76 52",
      "isAssistant": false,
      "probationPeriodEnd": "2022-06-01T00:00:00.000Z",
      "reportsToId": "50a2db290da29e126a1878527"
    }
  ]
}