AlayaCare Tasks API

The Tasks API from AlayaCare — 10 operation(s) for tasks.

Operations 18

GET /tasks Get a list of tasks.
POST /tasks Create a task.
GET /tasks/{id} Get task details by task ID.
PUT /tasks/{id} Update a task.
POST /tasks/{id}/change_status Update a task status.
GET /tasks/count Retrieve total number of tasks by various criteria
GET /tasks/{task_id} Retrieve a task by id
PUT /tasks/{task_id} Update a task
PATCH /tasks/{task_id} Patch a task
DELETE /tasks/{task_id} Delete a task
PATCH /tasks/{task_id}/status/{status} Change the status of a task by id
POST /tasks/clone Clone a task
GET /tasks/{task_id}/sub_tasks Retrieve sub tasks
POST /tasks/{task_id}/sub_tasks Add a sub task
DELETE /tasks/bulk_action Delete multiple tasks
PATCH /tasks/bulk_action Update multiple tasks
PUT /tasks/bulk_action Update multiple tasks
PATCH /tasks/bulk_action/status Change the status of multiple tasks

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/alayacare-tasks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

alayacare-tasks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Alayacare Tasks API
  version: '1.0'
  description: 'Operations tagged Tasks across 2 of this provider''s published API definitions: alayacare-tasks-openapi.yml, alayacare-tasks-v2-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://homecare.alayacare.ca/ext/api/v2/tasks
- url: https://homecare.alayacare.com
  description: Production server
- url: https://homecare.staging.alayacare.com
  description: Staging server
- url: https://homecare.uat.alayacare.com
  description: UAT server
tags:
- name: Tasks
paths:
  /tasks:
    get:
      tags:
      - Tasks
      summary: Get a list of tasks.
      description: '- Requires permission `View all tasks` to view tasks for any employee.

        - Requires permission `View employee tasks` to view tasks for the current employee.

        - `client_id` and `external_client_id` are mutually exclusive, specifying both is an invalid request.

        - `employee_id` and `external_employee_id` are mutually exclusive, specifying both is an invalid request.

        - `include_unassigned` is ignored unless `employee_id` is specified.

        - Results are ordered by the due date and created date, in descending order.

        '
      parameters:
      - $ref: '#/components/parameters/page'
      - $ref: '#/components/parameters/count'
      - description: Filter tasks by type of report form.
        name: form_id
        in: query
        schema:
          type: integer
      - description: 'Filter tasks by creation date greater or equal than specified value.

          Expected format is ISO 8601.

          Note that the timezone will be ignored and will be assumed to be equal to that of the branch associated to the task.

          Ex: `2018-02-03T08:00:00-05:00`

          '
        name: created_at
        in: query
        schema:
          type: string
          format: date-time
      - description: 'Filter tasks by due date greater or equal than specified value.

          Expected format is ISO 8601.

          Note that the timezone will be ignored and will be assumed to be equal to that of the branch associated to the task.

          Ex: `2018-02-03T08:00:00-05:00`

          '
        name: due_date
        in: query
        schema:
          type: string
          format: date-time
      - description: Filter tasks by priority
        name: priority
        in: query
        schema:
          type: string
      - description: Filter tasks by status
        name: status
        in: query
        schema:
          type: string
      - description: 'Filter tasks by assigned employee.

          This will also include tasks indirectly associated to the employee (e.g. Vital Alerts).

          '
        name: employee_id
        in: query
        schema:
          type: integer
      - description: Filter tasks by assigned employee's external ID
        name: external_employee_id
        in: query
        schema:
          type: string
      - description: Filter tasks by assigned client
        name: client_id
        in: query
        schema:
          type: integer
      - description: Filter tasks by assigned client's external ID
        name: external_client_id
        in: query
        schema:
          type: string
      - description: Filter tasks to include tasks that are not assigned to an employee. This is ignored unless employee_id is specified.
        name: include_unassigned
        in: query
        schema:
          type: boolean
      responses:
        200:
          description: A list of tasks
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskList'
        400:
          $ref: '#/components/responses/ErrorResponseTaskIdInvalidRequest'
        401:
          $ref: '#/components/responses/AuthChallenge'
    post:
      tags:
      - Tasks
      summary: Create a task.
      description: '- Requires permission `Create Tasks`.

        - If `employee_id` and `form_id` are provided, requires that the employee has permission to submit the form.

        - If `form_id` is provided, then `client_id` must be provided.

        - If `priority` is not defined, default value is `low`.

        - Value of task `status` will be `open` upon creation.

        - `client_id` and `external_client_id` are mutually exclusive, specifying both is an invalid request.

        - `employee_id` and `external_employee_id` are mutually exclusive, specifying both is an invalid request.

        '
      responses:
        201:
          description: Task successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        400:
          $ref: '#/components/responses/InvalidRequest'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskCreate'
        description: New task data
        required: true
    servers:
    - url: https://homecare.alayacare.ca/ext/api/v2/tasks
  /tasks/{id}:
    parameters:
    - description: Task ID
      name: id
      in: path
      required: true
      schema:
        type: integer
    get:
      tags:
      - Tasks
      summary: Get task details by task ID.
      description: '- Requires permission `View all tasks` to view the task if not assigned to the current user.

        - Requires permission `View employee tasks` to view the task if assigned to the current user.

        '
      responses:
        200:
          description: Task details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        404:
          $ref: '#/components/responses/ErrorResponseTaskNotFound'
    put:
      tags:
      - Tasks
      summary: Update a task.
      description: '- Requires permission `Edit Tasks`.

        - If `form_id` is already set, then it cannot be changed. This means that if `form_id` is set, then `client_id` cannot be changed.

        - `client_id` and `external_client_id` are mutually exclusive, specifying both is an invalid request.

        - `employee_id` and `external_employee_id` are mutually exclusive, specifying both is an invalid request.

        '
      responses:
        200:
          description: Task successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
        400:
          $ref: '#/components/responses/InvalidRequest'
        404:
          $ref: '#/components/responses/ErrorResponseTaskNotFound'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskUpdate'
        description: Task data
        required: true
    servers:
    - url: https://homecare.alayacare.ca/ext/api/v2/tasks
  /tasks/{id}/change_status:
    parameters:
    - description: Task ID
      name: id
      in: path
      required: true
      schema:
        type: integer
    post:
      tags:
      - Tasks
      summary: Update a task status.
      description: '- Requires permission `Edit Tasks` for all statuses other than `rejected`.

        - Requires permission `Reject Tasks` if the status is `rejected`.

        '
      responses:
        200:
          description: Task successfully updated.
        400:
          $ref: '#/components/responses/InvalidRequest'
        404:
          $ref: '#/components/responses/ErrorResponseTaskNotFound'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                status:
                  type: string
                  example: closed
        description: Task Status
        required: true
    servers:
    - url: https://homecare.alayacare.ca/ext/api/v2/tasks
  /tasks/count:
    get:
      summary: Retrieve total number of tasks by various criteria
      description: Retrieve number of tasks by using various criteria.
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/branches'
      - $ref: '#/components/parameters/branch_id'
      - $ref: '#/components/parameters/created_at_min'
      - $ref: '#/components/parameters/created_at_max'
      - $ref: '#/components/parameters/created_by'
      - $ref: '#/components/parameters/due_at_min'
      - $ref: '#/components/parameters/due_at_max'
      - $ref: '#/components/parameters/no_due_at'
      - $ref: '#/components/parameters/assigned_to_group_id'
      - $ref: '#/components/parameters/assigned_to_user_ids'
      - $ref: '#/components/parameters/assigned_to_external_employee_ids'
      - $ref: '#/components/parameters/assigned_to_user_id_groups'
      - $ref: '#/components/parameters/assigned_to_user_id_groups_mode'
      - $ref: '#/components/parameters/priorities'
      - $ref: '#/components/parameters/tags'
      - $ref: '#/components/parameters/statuses'
      - $ref: '#/components/parameters/is_assigned'
      - $ref: '#/components/parameters/is_assigned_to_user'
      - $ref: '#/components/parameters/contexts'
      - $ref: '#/components/parameters/context_external_client_id'
      - $ref: '#/components/parameters/client_group_ids'
      - $ref: '#/components/parameters/client_group_ids_mode'
      - $ref: '#/components/parameters/context_external_employee_id'
      - $ref: '#/components/parameters/employee_group_ids'
      - $ref: '#/components/parameters/employee_group_ids_mode'
      - $ref: '#/components/parameters/task_sources'
      - $ref: '#/components/parameters/task_text'
      responses:
        '200':
          $ref: '#/components/schemas/TaskCount'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
      security:
      - BasicAuth: []
    servers:
    - url: https://homecare.alayacare.com
      description: Production server
    - url: https://homecare.staging.alayacare.com
      description: Staging server
    - url: https://homecare.uat.alayacare.com
      description: UAT server
  /tasks/{task_id}:
    get:
      summary: Retrieve a task by id
      description: Get the full details of a task by using the `task_id` column.
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/task_id'
      responses:
        '200':
          $ref: '#/components/schemas/Task_2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
      security:
      - BasicAuth: []
    put:
      summary: Update a task
      description: Update a Task
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/task_id'
      - $ref: '#/components/parameters/update_contexts'
      - $ref: '#/components/parameters/update_escalation_dates'
      - $ref: '#/components/parameters/update_extensions'
      - $ref: '#/components/parameters/update_tags'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task_2'
        description: Task
        required: true
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task_2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
      security:
      - BasicAuth: []
    patch:
      summary: Patch a task
      description: 'Patch a task, only replacing those fields that are specified and retaining

        the existing value for fields that are not specified.'
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/task_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskPatchRequest'
        description: Fields to patch
        required: true
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task_2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
      security:
      - BasicAuth: []
    delete:
      summary: Delete a task
      description: Delete a task
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/task_id'
      responses:
        '204':
          description: success, no content
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
      security:
      - BasicAuth: []
    servers:
    - url: https://homecare.alayacare.com
      description: Production server
    - url: https://homecare.staging.alayacare.com
      description: Staging server
    - url: https://homecare.uat.alayacare.com
      description: UAT server
  /tasks/{task_id}/status/{status}:
    patch:
      summary: Change the status of a task by id
      description: Change the status of a task by id
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/task_id'
      - $ref: '#/components/parameters/status_in_path'
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task_2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
      security:
      - BasicAuth: []
    servers:
    - url: https://homecare.alayacare.com
      description: Production server
    - url: https://homecare.staging.alayacare.com
      description: Staging server
    - url: https://homecare.uat.alayacare.com
      description: UAT server
  /tasks/clone:
    post:
      summary: Clone a task
      description: Clone a task, creating a new task with the same details as the original task, including all sub tasks. Some fields, such as creator, created_at, assigned user and group, and status will be set to defaults instead.
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CloneTaskRequest'
        description: Clone Task Request
        required: true
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task_2'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
      security:
      - BasicAuth: []
    servers:
    - url: https://homecare.alayacare.com
      description: Production server
    - url: https://homecare.staging.alayacare.com
      description: Staging server
    - url: https://homecare.uat.alayacare.com
      description: UAT server
  /tasks/{task_id}/sub_tasks:
    get:
      summary: Retrieve sub tasks
      description: Retrieve sub tasks for a task.
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/task_id'
      - $ref: '#/components/parameters/page_2'
      - $ref: '#/components/parameters/count_2'
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedSubTaskList'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
      security:
      - BasicAuth: []
    post:
      summary: Add a sub task
      description: Add a sub task to a task.
      tags:
      - Tasks
      parameters:
      - $ref: '#/components/parameters/task_id'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubTask'
        description: Sub Task
        required: true
      responses:
        '201':
          description: created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubTask'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
        '404':
          $ref: '#/components/responses/404NotFound'
      security:
      - BasicAuth: []
    servers:
    - url: https://homecare.alayacare.com
      description: Production server
    - url: https://homecare.staging.alayacare.com
      description: Staging server
    - url: https://homecare.uat.alayacare.com
      description: UAT server
  /tasks/bulk_action:
    delete:
      summary: Delete multiple tasks
      description: 'Delete multiple tasks at once. All tasks specified in the payload will be deleted.

        This operation either succeeds as a whole or fails as a whole. If any of the

        tasks does not exist or is inaccessible, the entire operation will fail.'
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkDeleteActionRequest'
      responses:
        '204':
          description: success, no content
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
      security:
      - BasicAuth: []
    patch:
      summary: Update multiple tasks
      description: 'Update multiple tasks at once, changing only the values that are specified.

        All tasks specified in the payload will be updated. This operation either

        succeeds as a whole or fails as a whole. If any of the tasks does not exist or

        is inaccessible, the entire operation will fail.'
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdatePatchActionRequest'
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateActionResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
      security:
      - BasicAuth: []
    put:
      summary: Update multiple tasks
      description: 'Update multiple tasks at once. All tasks specified in the payload will be updated.

        This operation either succeeds as a whole or fails as a whole. If any of the

        tasks does not exist or is inaccessible, the entire operation will fail.'
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateActionRequest'
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateActionResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
      security:
      - BasicAuth: []
    servers:
    - url: https://homecare.alayacare.com
      description: Production server
    - url: https://homecare.staging.alayacare.com
      description: Staging server
    - url: https://homecare.uat.alayacare.com
      description: UAT server
  /tasks/bulk_action/status:
    patch:
      summary: Change the status of multiple tasks
      description: 'Change the status of multiple tasks at once. All tasks specified in the payload

        will be updated. This operation either succeeds as a whole or fails as a whole.

        If any of the tasks does not exist or is inaccessible, the entire operation

        will fail.'
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkUpdateStatusActionRequest'
      responses:
        '200':
          description: success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkUpdateActionResponse'
        '400':
          $ref: '#/components/responses/400BadRequest'
        '401':
          $ref: '#/components/responses/401Unauthorized'
        '403':
          $ref: '#/components/responses/403Forbidden'
      security:
      - BasicAuth: []
    servers:
    - url: https://homecare.alayacare.com
      description: Production server
    - url: https://homecare.staging.alayacare.com
      description: Staging server
    - url: https://homecare.uat.alayacare.com
      description: UAT server
components:
  schemas:
    ErrorResponse:
      description: Error response
      type: object
      properties:
        code:
          type: integer
          description: Response code
        message:
          type: string
          description: Detailed error message
      required:
      - code
      - message
    TaskPriority:
      type: string
      description: Task priority. Not a required field; default value is `low`.
      enum:
      - low
      - normal
      - important
      - urgent
    FormRead:
      type: object
      required:
      - id
      - name
      properties:
        id:
          type: integer
          description: Report form ID of the task.
          example: 1604
        name:
          type: string
          description: 'Name of the report form. Limited to 256 chars.

            '
          example: New Client Assessment
    ReportFieldCreate:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          description: The form field identifier.
          example: field_1234
        value:
          type: string
          description: The form field value.
          example: Client input data.
    TaskStatus:
      type: string
      description: Task status.
      enum:
      - open
      - on_hold
      - pending
      - closed
      - rejected
    FormCreate:
      type: object
      required:
      - id
      properties:
        id:
          type: integer
          description: Report form ID of the task.
          example: 1604
    TaskUpdate:
      type: object
      properties:
        description:
          type: string
          description: Task description.
          example: Call client for assessment.
        due_date:
          type: string
          format: date-time
          description: Date and/or time when task is due. (ISO 8601).
          example: '2017-07-08T14:00:00+00:00'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        employee_id:
          type: integer
          description: ID of the employee assigned to the task.
          example: 104
        external_employee_id:
          type: string
          description: External ID of the employee assigned to the task.
          example: sor_id_1
        client_id:
          type: integer
          description: AlayaCare ID of the client assigned to the task.
          example: 5432
        external_client_id:
          type: string
          description: External client ID.
          example: sor_id_1
        details:
          type: string
          description: Details of the task.
          example: Client prefers mobile phone after 4pm.
    ReportRead:
      type: object
      required:
      - id
      - form_id
      - fields
      properties:
        id:
          type: integer
          description: The Report ID.
          example: 1234
        form_id:
          type: integer
          description: The ID of the Report Form field.
          example: 4567
        fields:
          type: array
          description: The Report field values.
          items:
            $ref: '#/components/schemas/ReportField'
    ReportCreate:
      type: object
      required:
      - fields
      properties:
        fields:
          type: array
          description: The Report fied values.
          items:
            $ref: '#/components/schemas/ReportFieldCreate'
    Task:
      type: object
      required:
      - branch_id
      - description
      - created_at
      - create_user_id
      - update_user_id
      - updated_by
      - priority
      - status
      properties:
        id:
          type: integer
          description: ID of the task.
          example: 1718
        form:
          $ref: '#/components/schemas/FormRead'
        report:
          $ref: '#/components/schemas/ReportRead'
        description:
          type: string
          description: Task description.
          example: Call client for assessment.
        created_at:
          type: string
          format: date-time
          description: Date task was created (ISO 8601)
          example: '2017-07-08T13:30:00+00:00'
        create_user_id:
          type: integer
          description: AlayaCare ID of the employee who created the task.
          example: 100
        create_user_name:
          type: string
          description: Name of the employee that created the task.
          example: Amanda Atkins
        updated_at:
          type: string
          format: date-time
          description: Date task was updated (ISO 8601)
          example: '2017-07-08T13:30:00+00:00'
        update_user_id:
          type: integer
          description: AlayaCare ID of the employee who updated the task.
          example: 100
        update_user_name:
          type: string
          description: Name of the employee that updated the task.
          example: Amanda Atkins
        due_date:
          type: string
          format: date-time
          description: Date and/or time when task is due. (ISO 8601)
          example: '2017-07-08T14:00:00+00:00'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        status:
          $ref: '#/components/schemas/TaskStatus'
        employee_id:
          type: integer
          description: ID of the employee assigned to the task.
          example: 104
        employee_name:
          type: string
          description: Name of the employee assigned to the task.
          example: Amanda Atkins
        external_employee_id:
          type: string
          description: External ID of the employee assigned to the task.
          example: sor_id_1
        client_id:
          type: integer
          description: AlayaCare ID of the client assigned to the task.
          example: 5432
        client_name:
          type: string
          description: Name of the client assigned to the task.
          example: Steve Rogers
        external_client_id:
          type: string
          description: External client ID.
          example: sor_id_1
        details:
          type: string
          description: Details of the task.
          example: Client prefers mobile phone after 4pm.
        branch_id:
          type: integer
          description: ID of the task branch.
          example: 1000
    ReportField:
      type: object
      required:
      - id
      - field_id
      - name
      - type
      - label
      properties:
        id:
          type: integer
          description: The report field identifier.
          example: 321
        field_id:
          type: integer
          description: The form field identifier.
          example: 1234
        name:
          type: string
          description: The form field identifier name.
          example: field_1234
        type:
          type: string
          description: The form field type.
          example: text
        label:
          type: string
          description: The form field label describing the field.
          example: Record the client condition
        value:
          type: string
          description: The form field value entered by the user.
          example: Client condition has improved
    TaskList:
      type: object
      properties:
        count:
          type: integer
          description: Number of items in the response
          example: 1
        page:
          type: integer
          description: Current page number
          example: 1
        total_pages:
          type: integer
          description: Total number of pages available
          example: 1
        items:
          type: array
          items:
            $ref: '#/components/schemas/Task'
    TaskCreate:
      type: object
      required:
      - description
      properties:
        form:
          $ref: '#/components/schemas/FormCreate'
        report:
          $ref: '#/components/schemas/ReportCreate'
        description:
          type: string
          description: 'Task description. Limited to 256 chars.

            '
          example: Call client for assessment.
        due_date:
          type: string
          format: date-time
          description: Date and/or time when task is due. (ISO 8601).
          example: '2017-07-08T14:00:00+00:00'
        priority:
          $ref: '#/components/schemas/TaskPriority'
        employee_id:
          type: integer
          description: ID of the employee assigned to the task.
          example: 104
        external_employee_id:
          type: string
          description: External ID of the employee assigned to the task.
          example: sor_id_1
        client_id:
          type: integer
          description: AlayaCare ID of the client assigned to the task.
          example: 5432
        external_client_id:
          type: string
          description: External client ID.
          example: sor_id_1
        details:
          type: string
          description: Details of the task.
          example: Client prefers mobile phone after 4pm.
    ErrorResponse_2:
      title: Error response
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        request_id:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
            required:
            - message
      required:
      - message
      - request_id
    SubTask:
      type: object
      description: 'Tasks can have 0 or more sub tasks. Progress on a parent task is tracked by

        reviewing the status of sub tasks.'
      title: Sub Task
      properties:
        subtask_id:
          type: integer
          example: 12
        due_at:
          nullable: true
          type: string
          format: datetime
          example: '2023-02-27T10:00:00.000Z'
          description: When the sub task is due.
        name:
          type: string
          example: Update chart with results
          nullable: false
          description: Free-form entered by user
        details:
          type: string
          example: '- Validate results.

            - Update most recent chart with new results.'
        created_at:
          type: string
          format: datetime
          

# --- truncated at 32 KB (63 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/alayacare/refs/heads/main/openapi/alayacare-tasks-api-openapi.yml