> For the complete documentation index, see [llms.txt](https://knowledgebase.flaik.com/flaik-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.flaik.com/flaik-knowledge-base/for-it-specialists/3.-flaik-connect-api/schedule/task-data-by-season.md).

# Task Data by Season

## Overview

The Tasks API provides access to employee scheduled task assignments from flaik. Use this to synchronise scheduled teaching assignments with external data warehouse, workforce management, or labour planning systems.

Two endpoints are available — use the right one for your use case:

* **Full pull** — `GET /api/schedule/tasks/{seasonId}` — initial load or complete re-sync of all active assignments for a season
* **Delta pull** — `GET /api/schedule/tasks/{seasonId}/delta` — incremental sync of changes since a given timestamp

Results are returned in pages of up to 1,000 records. The response wrapper includes ready-made cursor values so clients can loop through pages without inspecting individual records.

{% hint style="info" %}
See also: [Pagination and Delta Sync](https://knowledgebase.flaik.com/flaik-knowledge-base/for-it-specialists/3.-flaik-connect-api/overview/pagination-and-delta-sync) — shared cursor pattern, tombstone semantics, recovery rules, and common pitfalls. The cursor mechanics described in that page apply to this endpoint pair.
{% endhint %}

## Authentication

All Schedule endpoints require authentication. Include your access token in the Authorization header:

```http
Authorization: Bearer {access_token}
```

See the [Authentication Guide](https://knowledgebase.flaik.com/flaik-knowledge-base/for-it-specialists/3.-flaik-connect-api/overview/authentication) for details on obtaining access tokens.

## Endpoints

### Full Pull — Get All Tasks by Season

Retrieves all active employee scheduled task assignments for a season. Results are paginated — continue calling until `hasMore` is `false`.

```http
GET {api-url}/api/schedule/tasks/{seasonId}
```

**Path Parameters**

| Parameter  | Type    | Required | Description                                          |
| ---------- | ------- | -------- | ---------------------------------------------------- |
| `seasonId` | integer | Yes      | Season identifier — retrieve from GlobalSettings API |

**Query Parameters**

| Parameter     | Type    | Required | Description                                                                                           |
| ------------- | ------- | -------- | ----------------------------------------------------------------------------------------------------- |
| `nextAfterId` | integer | No       | Pagination cursor — pass the `nextAfterId` value from the previous response to retrieve the next page |
| `pageSize`    | integer | No       | Number of records per page. Maximum and default: `1000`                                               |

**Example Request — First Page**

```http
GET {api-url}/api/schedule/tasks/18
Authorization: Bearer {access_token}
```

**Example Request — Subsequent Page**

```http
GET {api-url}/api/schedule/tasks/18?nextAfterId=98765
Authorization: Bearer {access_token}
```

**Response Format**

```json
{
  "data": [
    {
      "taskAssignmentId": 98765,
      "employeeId": 42,
      "payrollIdentifier": "EMP123456",
      "posIdentifier": "POS789",
      "taskId": 11,
      "assignmentName": "Group Lesson AM",
      "taskType": "GroupLesson",
      "scheduledDate": "2025-01-15",
      "startTime": "09:00:00",
      "endTime": "11:00:00",
      "comment": null,
      "abilityLevelId": 3,
      "abilityLevelName": "Beginner",
      "resortLocationId": 7,
      "resortLocationName": "Base Lodge",
      "isInConflict": false,
      "conflictCreatedByScopeWorkId": null,
      "associatedClassManagementClassId": 5012,
      "sequenceOrderingNumber": "1",
      "updatedUtc": "2025-01-10T14:22:00Z",
      "deleted": false,
      "disciplineCode": 1,
      "disciplineDescription": "Alpine Skiing",
      "disciplinePosId": "SKI"
    }
  ],
  "hasMore": true,
  "pageSize": 1000,
  "nextAfterId": 98765
}
```

**Response Wrapper Fields**

| Field         | Type    | Description                                                                                           |
| ------------- | ------- | ----------------------------------------------------------------------------------------------------- |
| `data`        | array   | Page of task assignment records (see field descriptions below)                                        |
| `hasMore`     | boolean | `true` if further pages exist. Continue requesting until this is `false`                              |
| `pageSize`    | integer | The page size applied to this response                                                                |
| `nextAfterId` | integer | Pass as `nextAfterId` on the next request to retrieve the next page. `null` when `hasMore` is `false` |

{% hint style="info" %}
Full pull results exclude soft-deleted records (`deleted: true`). Use the delta endpoint to receive deletions.
{% endhint %}

***

### Delta Pull — Get Changed Tasks by Season

Retrieves task assignments that have been created, updated, or deleted since a given UTC timestamp. Use this for ongoing incremental sync after an initial full pull.

```http
GET {api-url}/api/schedule/tasks/{seasonId}/delta
```

**Path Parameters**

| Parameter  | Type    | Required | Description                                          |
| ---------- | ------- | -------- | ---------------------------------------------------- |
| `seasonId` | integer | Yes      | Season identifier — retrieve from GlobalSettings API |

**Query Parameters**

| Parameter                 | Type     | Required | Description                                                                                           |
| ------------------------- | -------- | -------- | ----------------------------------------------------------------------------------------------------- |
| `updatedAfterUtcDateTime` | datetime | **Yes**  | Only return tasks updated after this UTC timestamp (ISO 8601: `YYYY-MM-DDTHH:mm:ssZ`)                 |
| `nextAfterId`             | integer  | No       | Pagination cursor — pass the `nextAfterId` value from the previous response to retrieve the next page |
| `pageSize`                | integer  | No       | Number of records per page. Maximum and default: `1000`                                               |

**Example Request — First Delta Page**

```http
GET {api-url}/api/schedule/tasks/18/delta?updatedAfterUtcDateTime=2025-01-01T00:00:00Z
Authorization: Bearer {access_token}
```

**Example Request — Subsequent Delta Page**

```http
GET {api-url}/api/schedule/tasks/18/delta?updatedAfterUtcDateTime=2025-01-10T14:22:00Z&nextAfterId=50500
Authorization: Bearer {access_token}
```

**Response Format**

```json
{
  "data": [
    {
      "taskAssignmentId": 98765,
      "employeeId": 42,
      "payrollIdentifier": "EMP123456",
      "posIdentifier": "POS789",
      "taskId": 11,
      "assignmentName": "Group Lesson AM",
      "taskType": "GroupLesson",
      "scheduledDate": "2025-01-15",
      "startTime": "09:00:00",
      "endTime": "11:00:00",
      "comment": null,
      "abilityLevelId": 3,
      "abilityLevelName": "Beginner",
      "resortLocationId": 7,
      "resortLocationName": "Base Lodge",
      "isInConflict": false,
      "conflictCreatedByScopeWorkId": null,
      "associatedClassManagementClassId": 5012,
      "sequenceOrderingNumber": "1",
      "updatedUtc": "2025-01-10T14:22:00Z",
      "deleted": false,
      "disciplineCode": 1,
      "disciplineDescription": "Alpine Skiing",
      "disciplinePosId": "SKI"
    }
  ],
  "hasMore": true,
  "pageSize": 1000,
  "nextAfterId": 50500,
  "nextUpdatedAfterUtcDateTime": "2025-01-10T14:22:00Z"
}
```

**Response Wrapper Fields**

| Field                         | Type     | Description                                                                                                                                                                                                                                              |
| ----------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `data`                        | array    | Page of task assignment records, including soft-deleted records                                                                                                                                                                                          |
| `hasMore`                     | boolean  | `true` if further pages exist. Continue requesting until this is `false`                                                                                                                                                                                 |
| `pageSize`                    | integer  | The page size applied to this response                                                                                                                                                                                                                   |
| `nextAfterId`                 | integer  | Pass as `nextAfterId` on the next request. `null` when `hasMore` is `false`                                                                                                                                                                              |
| `nextUpdatedAfterUtcDateTime` | datetime | Pass as `updatedAfterUtcDateTime` on the next request when paginating a large delta result. Only populated when `hasMore` is `true` — you must pass both this and `nextAfterId` together to avoid missing or duplicating records at a timestamp boundary |

{% hint style="warning" %}
When paginating a delta result, always pass **both** `nextUpdatedAfterUtcDateTime` and `nextAfterId` together. Omitting `nextAfterId` can cause duplicate or missing records at a timestamp boundary.
{% endhint %}

***

## Task Record Fields

| Field                              | Type     | Description                                                                                               |
| ---------------------------------- | -------- | --------------------------------------------------------------------------------------------------------- |
| `taskAssignmentId`                 | integer  | Unique task assignment identifier                                                                         |
| `employeeId`                       | integer  | Flaik employee identifier                                                                                 |
| `payrollIdentifier`                | string   | Employee identifier in your payroll system                                                                |
| `posIdentifier`                    | string   | Employee identifier in your POS system                                                                    |
| `taskId`                           | integer  | Scheduling product (task definition) identifier                                                           |
| `assignmentName`                   | string   | Display name of the task assignment                                                                       |
| `taskType`                         | string   | Type of task — see [Task Types](#task-types) below                                                        |
| `scheduledDate`                    | date     | Date the task is scheduled (`YYYY-MM-DD`)                                                                 |
| `startTime`                        | time     | Scheduled start time (`HH:mm:ss`)                                                                         |
| `endTime`                          | time     | Calculated end time (`HH:mm:ss`) based on start time and duration                                         |
| `comment`                          | string   | Optional comment on the assignment (nullable)                                                             |
| `abilityLevelId`                   | integer  | Ability level identifier (nullable)                                                                       |
| `abilityLevelName`                 | string   | Ability level display name — empty string if not set                                                      |
| `resortLocationId`                 | integer  | Resort location identifier (nullable)                                                                     |
| `resortLocationName`               | string   | Resort location display name — empty string if not set                                                    |
| `isInConflict`                     | boolean  | `true` if this assignment has a scheduling conflict                                                       |
| `conflictCreatedByScopeWorkId`     | integer  | Identifier of the scope of work that created the conflict (nullable)                                      |
| `associatedClassManagementClassId` | integer  | Associated class management class identifier (nullable)                                                   |
| `sequenceOrderingNumber`           | string   | Position of this task within a multi-task sequence (nullable)                                             |
| `updatedUtc`                       | datetime | Last updated timestamp (UTC)                                                                              |
| `deleted`                          | boolean  | `true` if the assignment has been soft-deleted. Delta pull only — full pull never returns deleted records |
| `disciplineCode`                   | integer  | Discipline identifier (nullable)                                                                          |
| `disciplineDescription`            | string   | Discipline display name — empty string if not set                                                         |
| `disciplinePosId`                  | string   | Discipline POS code — empty string if not set                                                             |

## Task Types

The `taskType` field will contain one of the following string values:

| Value           | Description                    |
| --------------- | ------------------------------ |
| `PrivateLesson` | Private lesson assignment      |
| `GroupLesson`   | Group lesson assignment        |
| `ProgramLesson` | Program/camp lesson assignment |
| `Meeting`       | Staff meeting                  |
| `Training`      | Staff training session         |
| `Other`         | Other scheduled task           |

## Pagination

Both endpoints use the same cursor pattern documented in [Pagination and Delta Sync](https://knowledgebase.flaik.com/flaik-knowledge-base/for-it-specialists/3.-flaik-connect-api/overview/pagination-and-delta-sync).

**Quick reference for tasks:**

```
# Full pull — single cursor
GET /api/schedule/tasks/18
GET /api/schedule/tasks/18?nextAfterId={previous nextAfterId}
…loop until hasMore = false

# Delta pull — compound cursor; pass BOTH on continuations
GET /api/schedule/tasks/18/delta?updatedAfterUtcDateTime=2025-01-01T00:00:00Z
GET /api/schedule/tasks/18/delta
        ?updatedAfterUtcDateTime={previous nextUpdatedAfterUtcDateTime}
        &nextAfterId={previous nextAfterId}
…loop until hasMore = false
```

Soft-deleted task assignments appear only on the delta pull (`deleted: true`); use them to tombstone removed assignments in your store.

## Error Responses

| HTTP Status | Endpoint   | Description                                            |
| ----------- | ---------- | ------------------------------------------------------ |
| `400`       | Both       | The supplied `seasonId` does not exist for this resort |
| `400`       | Delta only | `updatedAfterUtcDateTime` was not provided             |
| `401`       | Both       | Missing or invalid access token                        |

Need help with task data integration? Contact <resortsupport@flaik.com>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://knowledgebase.flaik.com/flaik-knowledge-base/for-it-specialists/3.-flaik-connect-api/schedule/task-data-by-season.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
