GET Employee Tasks

Retrieve employee tasks for specified shifts using the Humanity API v2. View task assignments, status, and activity details for employees with appropriate permissions.

Overview

Retrieve employee tasks for specified shifts. This endpoint returns detailed information about tasks assigned to employees for the provided shift IDs.

API Details

  • Minimum Role: Employee
  • API Version: v2

Parameters

ParameterTypeRequiredDescription
shiftIdsstringYesComma separated IDs of shifts
access_tokenstringYesAuthentication token

Permissions

Users can view employee tasks for shifts they have read permissions on.

Request Format

GET {baseUrl}/api/v2/shifts/{shiftIds}/employee-tasks?access_token={token}

Example

Request

GET https://www.humanity.com/api/v2/shifts/2413,2415/employee-tasks?access_token=7d31c4e93f680b48685eaeaebadc57cbc1846260

Response

{
    "status": 1,
    "data": [
        {
            "id": "01jbegdrx488az35r79fcj4s8x",
            "employeeId": 2,
            "taskId": "01ht07sr1e36pw203eyy7nhn0b",
            "shiftId": 2413,
            "shiftTaskId": "01jbegdrv07rdnwkfn2y0zcgf6",
            "type": 1,
            "options": null,
            "activity": {
                "startedAt": null,
                "endedAt": null,
                "startedBy": null,
                "endedBy": null,
                "status": 0
            },
            "createdBy": 3,
            "createdAt": "2024-10-30T10:44:29+00:00",
            "updatedBy": null,
            "updatedAt": null,
            "deletedBy": null,
            "deletedAt": null
        },
        {
            "id": "01k6wdtxjpqt6hzyyr094ybv5t",
            "employeeId": 2,
            "taskId": "01ht07sr1e36pw203eyy7nhn0b",
            "shiftId": 2415,
            "shiftTaskId": "01k6wdtxg32wchygd7j01dvpwz",
            "type": 1,
            "options": null,
            "activity": {
                "startedAt": "2025-10-06T09:37:49+00:00",
                "endedAt": "2025-10-06T09:39:07+00:00",
                "startedBy": 2,
                "endedBy": 2,
                "status": 2
            },
            "createdBy": 3,
            "createdAt": "2025-10-06T09:32:25+00:00",
            "updatedBy": 2,
            "updatedAt": "2025-10-06T09:39:07+00:00",
            "deletedBy": null,
            "deletedAt": null
        },
        {
            "id": "01k6wdtxjr3kdxcc73xcmz5s0y",
            "employeeId": 39737,
            "taskId": "01ht07sr1e36pw203eyy7nhn0b",
            "shiftId": 2415,
            "shiftTaskId": "01k6wdtxg32wchygd7j01dvpwz",
            "type": 1,
            "options": null,
            "activity": {
                "startedAt": null,
                "endedAt": null,
                "startedBy": null,
                "endedBy": null,
                "status": 0
            },
            "createdBy": 3,
            "createdAt": "2025-10-06T09:32:25+00:00",
            "updatedBy": null,
            "updatedAt": null,
            "deletedBy": null,
            "deletedAt": null
        },
        {
            "id": "01k6wdtxjsjzda6jmj83xfcbmk",
            "employeeId": 39786,
            "taskId": "01ht07sr1e36pw203eyy7nhn0b",
            "shiftId": 2415,
            "shiftTaskId": "01k6wdtxg32wchygd7j01dvpwz",
            "type": 1,
            "options": null,
            "activity": {
                "startedAt": "2025-10-06T09:38:33+00:00",
                "endedAt": null,
                "startedBy": 2,
                "endedBy": null,
                "status": 1
            },
            "createdBy": 3,
            "createdAt": "2025-10-06T09:32:25+00:00",
            "updatedBy": 2,
            "updatedAt": "2025-10-06T09:38:33+00:00",
            "deletedBy": null,
            "deletedAt": null
        }
    ],
    "metadata": [],
    "token": "token",
    "error": null
}

Response Fields

Employee Task Object

FieldTypeDescription
idstringUnique identifier for the employee task
employeeIdintegerID of the employee assigned to the task
taskIdstringID of the task definition
shiftIdintegerID of the shift this task is associated with
shiftTaskIdstringID of the shift task assignment
typeintegerTask type identifier
optionsobject/nullAdditional task options
activityobjectTask activity tracking information
createdByintegerID of user who created the task assignment
createdAtstringISO 8601 timestamp of creation
updatedByinteger/nullID of user who last updated the task
updatedAtstring/nullISO 8601 timestamp of last update
deletedByinteger/nullID of user who deleted the task (if applicable)
deletedAtstring/nullISO 8601 timestamp of deletion (if applicable)

Activity Object

FieldTypeDescription
startedAtstring/nullISO 8601 timestamp when task was started
endedAtstring/nullISO 8601 timestamp when task was completed
startedByinteger/nullID of user who started the task
endedByinteger/nullID of user who ended the task
statusintegerTask status (0: Not Started, 1: In Progress, 2: Completed)
Language
Credentials
Query
Click Try It! to start a request and see the response here!