GET Shift Tasks

Retrieve shift tasks for specified shifts using the Humanity API v2. Users can view shift tasks for shifts they have read permissions on.

GET Shift Tasks

Permissions

  • Minimum Role: Employee
  • Access: Users can view shift tasks for shifts they have read permissions on

API Endpoint

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

Parameters

  • shiftIds (required) - Comma-separated list of shift IDs
  • access_token (required) - Your API access token

Example

Request

GET https://www.humanity.com/api/v2/shifts/2413,2415/tasks?access_token=xxxx

Response

{
    "status": 1,
    "data": [
        {
            "id": "01k6j41wvk2mj4sgf6qfprpzb8",
            "taskId": "01ht07sr1e36pw203eyy7nhn0b",
            "shiftId": 2413,
            "name": "Develop",
            "description": "",
            "type": 1,
            "options": null,
            "createdBy": 39737,
            "createdAt": "2025-10-02T09:29:03+00:00",
            "updatedBy": null,
            "updatedAt": null,
            "deletedBy": null,
            "deletedAt": null
        },
        {
            "id": "01k6j41wwnx4ew7dg28jsbmsry",
            "taskId": "01ht0712np8f5ezngqqp8yfdkf",
            "shiftId": 2413,
            "name": "Test 08-08:30",
            "description": "",
            "type": 2,
            "options": {
                "startTime": "2025-10-04T07:00:00+00:00",
                "dueTime": "2025-10-04T07:30:00+00:00"
            },
            "createdBy": 39737,
            "createdAt": "2025-10-02T09:29:03+00:00",
            "updatedBy": null,
            "updatedAt": null,
            "deletedBy": null,
            "deletedAt": null
        },
        {
            "id": "01k6j4804v80bxazwx8395va9t",
            "taskId": "01ht07sr1e36pw203eyy7nhn0b",
            "shiftId": 2415,
            "name": "Develop",
            "description": "",
            "type": 1,
            "options": null,
            "createdBy": 2,
            "createdAt": "2025-10-02T09:32:24+00:00",
            "updatedBy": null,
            "updatedAt": null,
            "deletedBy": null,
            "deletedAt": null
        },
        {
            "id": "01k6j4804xmepth33c7qqwqh6g",
            "taskId": "01ht0712np8f5ezngqqp8yfdkf",
            "shiftId": 2415,
            "name": "Test 08-08:30",
            "description": "",
            "type": 2,
            "options": {
                "startTime": "2025-10-04T07:00:00+00:00",
                "dueTime": "2025-10-04T07:30:00+00:00"
            },
            "createdBy": 2,
            "createdAt": "2025-10-02T09:32:24+00:00",
            "updatedBy": null,
            "updatedAt": null,
            "deletedBy": null,
            "deletedAt": null
        }
    ],
    "metadata": [],
    "token": "7d31c4e93f680b48685eaeaebadc57cbc1846260",
    "error": null
}

Response Fields

FieldTypeDescription
idstringUnique identifier for the shift task
taskIdstringID of the associated task template
shiftIdintegerID of the shift this task belongs to
namestringName of the task
descriptionstringTask description
typeintegerTask type (1 = standard, 2 = timed)
optionsobject/nullTask-specific options (e.g., start/due times for timed tasks)
createdByintegerUser ID who created the task
createdAtstringCreation timestamp (ISO 8601)
updatedByinteger/nullUser ID who last updated the task
updatedAtstring/nullLast update timestamp
deletedByinteger/nullUser ID who deleted the task
deletedAtstring/nullDeletion timestamp
Language
Credentials
Query
Click Try It! to start a request and see the response here!