openapi: 3.0.0
info:
  title: Tasks
  description: Tasks are the to-dos that you and your users have to complete. You can set reminders for tasks that need your attention. Reminders help you stay organized by alerting you about due or upcoming tasks.
  contact: {}
  version: 1.0.0
servers:
  - url: https://www.zohoapis.in/erp/v3
    description: API Endpoint
tags:
  - name: tasks
    description: Task Module
paths:
  /tasks:
    post:
      tags:
        - tasks
      operationId: add_task
      summary: Add a task
      description: Add a task.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-a-task-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-a-task-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.CREATE
    get:
      tags:
        - tasks
      operationId: list_tasks
      summary: List tasks
      description: List a task.
      parameters:
        - name: entity_id
          in: query
          description: Search tasks by entity ID.
          required: false
          schema:
            type: string
          example: 982000000567114
        - name: sub_entity_id
          in: query
          description: Search tasks by sub entity ID.
          required: false
          schema:
            type: string
          example: 982000000567115
        - name: owner_id
          in: query
          description: Search tasks by owner ID.
          required: false
          schema:
            type: string
          example: 982000000567116
        - name: contact_id
          in: query
          description: Search tasks by contact ID.
          required: false
          schema:
            type: string
          example: 982000000567117
        - name: client_id
          in: query
          description: Search tasks by client ID.
          required: false
          schema:
            type: string
          example: 982000000567118
        - name: status
          in: query
          description: Search tasks by status. Allowed values are <code>open</code>, <code>ongoing</code>, <code>yet_to_started</code>, <code>in_progress</code>, <code>completed</code>, <code>deferred</code>, <code>waiting_for_input</code> and <code>any custom status</code>
          required: false
          schema:
            type: string
          example: open
        - name: parent_status
          in: query
          description: Search tasks by parent status. Allowed formats are <code>parent_status</code>, <code>parent_status_equal</code> and <code>parent_status_not_equal</code>. Allowed values are <code>open</code>, <code>ongoing</code> and <code>completed</code>
          required: false
          schema:
            type: string
          example: open
        - name: search_text
          in: query
          description: Search tasks based on a search text.
          required: false
          schema:
            type: string
          example: sample
        - name: priority
          in: query
          description: Search tasks by priority of the task. Allowed values are <code>normal</code>, <code>low</code>, <code>high</code>, <code>lowest</code> and <code>highest</code>.
          required: false
          schema:
            type: string
          example: high
        - name: entity_type
          in: query
          description: Search tasks by entity type.
          required: false
          schema:
            type: string
          example: invoice
        - name: title
          in: query
          description: Search tasks by their title.
          required: false
          schema:
            type: string
          example: Sample Task
        - name: task_description
          in: query
          description: Search tasks their description.
          required: false
          schema:
            type: string
          example: Sample Task Description
        - name: is_overdue
          in: query
          description: Filter overdue tasks.
          required: false
          schema:
            type: string
          example: 'true'
        - name: created_by
          in: query
          description: Search tasks by the person who created them.
          required: false
          schema:
            type: string
          example: 982000000567118
        - name: is_accountant_task
          in: query
          description: Filter accountant tasks.
          required: false
          schema:
            type: string
          example: 'false'
        - name: contact_ids
          in: query
          description: Search tasks by contact IDs separated by comma.
          required: false
          schema:
            type: string
          example: 982000000567118,982000000567119,982000000567120
        - name: client_ids
          in: query
          description: Search tasks by client IDs separated by comma.
          required: false
          schema:
            type: string
          example: 982000000567118,982000000567119,982000000567120
        - name: owner_ids
          in: query
          description: Search tasks by owner IDs separated by comma.
          required: false
          schema:
            type: string
          example: 982000000567118,982000000567119,982000000567120
        - name: date_start
          in: query
          description: Search tasks by start date.
          required: false
          schema:
            type: string
          example: '2025-01-01'
        - name: date_end
          in: query
          description: Search tasks by end date.
          required: false
          schema:
            type: string
          example: '2025-12-31'
        - name: task_number
          in: query
          description: Search tasks by task number.
          required: false
          schema:
            type: string
          example: T-001
        - name: sort_column
          in: query
          description: Sort tasks. Allowed values are <code>owner_name</code>, <code>contact_name</code>, <code>client_name</code>, <code>due_date</code>, <code>title</code>, <code>created_time</code>, <code>completion_percentage</code> and <code>task_number</code>
          required: false
          schema:
            type: string
          example: owner_name
        - name: filter_by
          in: query
          description: Filter tasks by status. Allowed values are <code>TaskStatus.All</code>, <code>TaskStatus.Overdue</code>, <code>TaskStatus.InProgress</code>, <code>TaskStatus.Completed</code>, <code>TaskStatus.YetToStarted</code>, <code>TaskStatus.MyPending</code>, <code>TaskStatus.DueToday</code>, <code>TaskStatus.PriorityOverdue</code> and <code>TaskStatus.Unassigned</code> .
          required: false
          schema:
            type: string
          example: open
        - name: page
          in: query
          description: Page number to be fetched. Default value is 1.
          required: false
          schema:
            type: integer
            default: 1
          example: 1
        - name: per_page
          in: query
          description: Number of records to be fetched per page. Default value is 200.
          required: false
          schema:
            type: integer
            default: 200
          example: 200
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-tasks-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.READ
    put:
      tags:
        - tasks
      operationId: update_tasks
      summary: Update tasks
      description: Update tasks.
      parameters:
        - name: bulk_update
          in: query
          description: Indicate whether the request is for bulk update. Allowed values are <code>true</code> and <code>false</code>.
          required: true
          schema:
            type: boolean
          example: 'true'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-tasks-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-tasks-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.UPDATE
    delete:
      tags:
        - tasks
      operationId: delete_tasks
      summary: Delete tasks
      description: Delete tasks.
      parameters:
        - name: task_ids
          in: query
          description: Comma separated list of task IDs to be deleted.
          required: true
          schema:
            type: string
          example: 982000000567114,982000000567115,982000000567116
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-tasks-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.DELETE
    parameters:
      - $ref: '#/components/parameters/organization_id'
  /tasks/{task_id}:
    get:
      tags:
        - tasks
      operationId: get_task
      summary: Get a task
      description: Get a task.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-a-task-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.READ
    put:
      tags:
        - tasks
      operationId: update_a_task
      summary: Update a tasks
      description: Update a tasks.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-a-task-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-a-task-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.UPDATE
    delete:
      tags:
        - tasks
      operationId: delete_task
      summary: Delete a tasks
      description: Delete a tasks.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-a-task-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.DELETE
    parameters:
      - name: task_id
        in: path
        description: Unique identifier of the task.
        required: true
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /tasks/{task_id}/percentage:
    post:
      tags:
        - tasks
      operationId: update_percentage_task
      summary: Update completed percentage
      description: Update completed percentage of a task.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/update-percentage-task-request'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/update-percentage-task-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.CREATE
    parameters:
      - name: task_id
        in: path
        description: Unique identifier of the task.
        required: true
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /tasks/{task_id}/markasopen:
    post:
      tags:
        - tasks
      operationId: mark_task_as_open
      summary: Mark task as open
      description: Mark a task as open.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mark-open-task-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.CREATE
    parameters:
      - name: task_id
        in: path
        description: Unique identifier of the task.
        required: true
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /tasks/{task_id}/markasongoing:
    post:
      tags:
        - tasks
      operationId: mark_task_as_ongoing
      summary: Mark task as ongoing
      description: Mark a task as ongoing.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mark-ongoing-task-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.CREATE
    parameters:
      - name: task_id
        in: path
        description: Unique identifier of the task.
        required: true
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /tasks/{task_id}/markascompleted:
    post:
      tags:
        - tasks
      operationId: mark_task_as_completed
      summary: Mark task as completed
      description: Mark a task as completed.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/mark-completed-task-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.CREATE
    parameters:
      - name: task_id
        in: path
        description: Unique identifier of the task.
        required: true
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /tasks/{task_id}/comments:
    post:
      tags:
        - tasks
      operationId: add_task_comment
      summary: Add comment to task
      description: Add comment to a task.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/add-task-comment-request'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-task-comment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.CREATE
    get:
      tags:
        - tasks
      operationId: list_task_comments
      summary: List comments of task
      description: List comments of a task.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/list-task-comments-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.READ
    parameters:
      - name: task_id
        in: path
        description: Unique identifier of the task.
        required: true
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /tasks/{task_id}/comments/{comment_id}:
    delete:
      tags:
        - tasks
      operationId: delete_task_comment
      summary: Delete comment of task
      description: Delete a comment of a task.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-task-comment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.DELETE
    parameters:
      - name: task_id
        in: path
        description: Unique identifier of the task.
        required: true
        schema:
          type: string
        example: 982000000567114
      - name: comment_id
        in: path
        description: Unique identifier of the comment associated with the task.
        required: true
        schema:
          type: string
        example: 982000000567116
      - $ref: '#/components/parameters/organization_id'
  /tasks/{task_id}/attachment:
    post:
      tags:
        - tasks
      operationId: add_task_attachment
      summary: Add attachment to task
      description: Add attachment to a task.
      parameters:
        - name: attachment
          in: query
          description: 'The file to be attached. Allowed Extensions: <code>gif</code>, <code>png</code>, <code>jpeg</code>, <code>jpg</code>, <code>bmp</code>, <code>pdf</code>, <code>xls</code>, <code>xlsx</code>, <code>doc</code>, <code>docx</code>, <code>xml</code>, <code>csv</code>, <code>txt</code>, <code>tif</code> and <code>tiff</code>'
          required: false
          schema:
            type: string
            format: binary
          example: ''
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/add-task-attachment-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.CREATE
    parameters:
      - name: task_id
        in: path
        description: Unique identifier of the task.
        required: true
        schema:
          type: string
        example: 982000000567114
      - $ref: '#/components/parameters/organization_id'
  /tasks/{task_id}/documents/{document_id}:
    get:
      tags:
        - tasks
      operationId: get_task_document
      summary: Get document of task
      description: Get a document of a task.
      parameters:
        - name: image_size
          in: query
          description: Size of the image to be fetched. Allowed values are <code>xlarge</code>, <code>large</code>, <code>small</code> and <code>tiny</code>.
          required: false
          schema:
            type: string
          example: large
        - name: inline
          in: query
          description: Indicate whether the document should be displayed inline. Allowed values are <code>true</code> and <code>false</code>.
          required: false
          schema:
            type: boolean
          example: 'false'
        - name: print
          in: query
          description: Indicates whether the document should be printed. Allowed values are <code>true</code> and <code>false</code>.
          required: false
          schema:
            type: boolean
          example: 'false'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/get-a-task-document-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.READ
    delete:
      tags:
        - tasks
      operationId: delete_task_document
      summary: Delete document of task
      description: Delete a document of a task.
      parameters:
        - name: un_associate
          in: query
          description: Indicates whether the document should be unassociated from the task. Allowed values are <code>true</code> and <code>false</code>.
          required: false
          schema:
            type: boolean
          example: 'false'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/delete-task-document-response'
      deprecated: false
      security:
        - Zoho_Auth:
            - ERP.settings.DELETE
    parameters:
      - name: task_id
        in: path
        description: Unique identifier of the task.
        required: true
        schema:
          type: string
        example: 982000000567114
      - name: document_id
        in: path
        description: Unique identifier of the document attached to the task.
        required: true
        schema:
          type: string
        example: 982000000567118
      - $ref: '#/components/parameters/organization_id'
components:
  parameters:
    organization_id:
      name: organization_id
      description: ID of the organization
      in: query
      required: true
      schema:
        type: string
      example: '10234695'
  schemas:
    task_id:
      description: ID of the task.
      type: string
      example: 982000000567114
    recurring_task_id:
      description: ID of the recurring task.
      type: string
      example: 982000000567115
    owner_id:
      description: ID of the owner of the task.
      type: string
      example: 982000000567116
    owner_ids:
      description: Comma separated list of owner IDs of the task.
      type: string
      example: 982000000567116,982000000567117
    owner_name:
      description: Name of the owner of the task.
      type: string
      example: John Doe
    owners:
      description: List of owners of the task.
      type: array
      items:
        type: object
        properties:
          owner_id:
            $ref: '#/components/schemas/owner_id'
          owner_name:
            $ref: '#/components/schemas/owner_name'
          owner_mail:
            description: Email of the owner of the task.
            type: string
            example: johndoe@example.com
          photo_url:
            description: URL of the photo of the owner of the task.
            type: string
            example: https://example.in/photo.jpg
    title:
      description: Title of the task.
      type: string
      example: Sample Task
    due_date:
      description: Due date of the task.
      type: string
      format: date
      example: '2025-12-31'
    due_date_formatted:
      description: Formatted due date of the task.
      type: string
      example: 31-12-2025
    is_overdue:
      description: Indicates whether the task is overdue.
      type: boolean
      example: true
    contact_type:
      description: Type of the contact associated with the task. Allowed values are <code>customer</code> and <code>vendor</code>
      type: string
      example: customer
    contact_id:
      description: ID of the contact associated with the task.
      type: string
      example: 982000000567118
    color_code:
      description: Color code of the task.
      type: string
      example: '#FF5733'
    contact_name:
      description: Name of the contact associated with the task.
      type: string
      example: Jane Smith
    parent_task_id:
      description: ID of the parent task.
      type: string
      example: 982000000567119
    related_entity_id:
      description: ID of the related entity associated with the task.
      type: string
      example: 982000000567120
    related_entity_type:
      description: Type of the related entity associated with the task.
      type: string
      example: invoice
    related_entity:
      description: Unique value assigned to each entity.
      type: integer
      example: 20
    related_entity_value:
      description: Value of the related entity associated with the task.
      type: string
      example: INV-001
    parent_status:
      description: Parent status of the task.
      type: string
      example: open
    status:
      description: Status of the task.
      type: string
      example: open
    custom_status_id:
      description: ID of the custom status of the task.
      type: string
      example: 982000000567121
    billing_type:
      description: Billing type of the task.
      type: string
      example: based_on_task_hours
    is_billable:
      description: Indicates whether the task is billable.
      type: boolean
      example: true
    task_rate:
      description: Rate of the task.
      type: number
      format: double
      example: 50
    completion_percentage:
      description: Completion percentage of the task.
      type: integer
      example: 75
    is_subtask:
      description: Indicates whether the task is a subtask.
      type: boolean
      example: false
    priority:
      description: Priority of the task. Allowed values are <code>normal</code>, <code>low</code>, <code>high</code>, <code>lowest</code> and <code>highest</code>
      type: string
      example: high
    reminder:
      description: Details of the reminder set for the task.
      type: object
      properties:
        remind_before:
          description: Number of days, months or years before the task due date to send a reminder.
          type: integer
          example: 2
        remind_at:
          description: Specific date to send the reminder.
          type: string
          format: date
          example: '2025-12-29'
        remind_at_formatted:
          description: Formatted date to send the reminder.
          type: string
          example: 29-12-2025
        remind_type:
          description: Type of reminder which can be days, months or years.
          type: string
          example: days
        remind_type_formatted:
          description: Formatted type of reminder which can be days, months or years.
          type: string
          example: Days
        alert_type:
          description: Type of alert for the reminder.
          type: string
          example: email
        alert_type_formatted:
          description: Formatted type of alert for the reminder.
          type: string
          example: Email
    send_email_notification:
      description: Indicates whether to send email notification for the task.
      type: boolean
      example: true
    mail_id:
      description: Email ID to which the notification has to be sent.
      type: string
      example: johndoe@gmail.com
    email_account_type:
      description: Email account type to which the notification has to be sent.
      type: string
      example: gmail
    email_folder_id:
      description: Folder ID of the email account to which the notification has to be sent.
      type: string
      example: '982000000567126'
    email_account_id:
      description: Email account ID to which the notification has to be sent.
      type: string
      example: '982000000567127'
    mail_attachments:
      description: List of attachments to be sent along with the email notification.
      type: array
      items:
        type: object
        properties:
          attachment_id:
            description: ID of the attachment to be sent along with the email notification.
            type: string
            example: '982000000567128'
          file_name:
            description: Name of the file attached to the email notification.
            type: string
            example: document.pdf
    task_type:
      description: Type of the task.
      type: string
      example: accountant task
    is_sub_task:
      description: Indicates whether the task is a sub task.
      type: boolean
      example: false
    subtask_count:
      description: Number of subtasks under the task.
      type: integer
      example: 3
    related_sub_entity_id:
      description: ID of the related sub entity associated with the task.
      type: string
      example: 982000000567122
    related_sub_entity_type:
      description: Type of the related sub entity associated with the task.
      type: string
      example: expense_report
    client_id:
      description: ID of the client associated with the task.
      type: string
      example: 982000000567118
    client_name:
      description: Name of the client associated with the task.
      type: string
      example: Acme Corporation
    task_description:
      description: Description of the task.
      type: string
      example: This is a sample task description.
    is_accountant_task:
      description: Indicates whether the task is an accountant task.
      type: boolean
      example: false
    task_number:
      description: Unique number assigned to the task.
      type: string
      example: T-001
    task_number_prefix:
      description: Prefix of the task number.
      type: string
      example: T-
    task_number_suffix:
      description: Suffix of the task number.
      type: string
      example: '-001'
    can_push:
      description: Indicates if the task can be sync to client.
      type: boolean
      example: true
    created_by_id:
      description: ID of the user who created the task.
      type: string
      example: 982000000567122
    last_modified_by_id:
      description: ID of the user who last modified the task.
      type: string
      example: 982000000567123
    created_time:
      description: Creation time of the task.
      type: string
      format: date-time
      example: '2025-01-01T10:00:00Z'
    created_time_formatted:
      description: Formatted creation time of the task.
      type: string
      example: 01-01-2025 10:00:00
    template_id:
      description: ID of the template used for the task.
      type: string
      example: 982000000567124
    due_after:
      description: Number of days after which the task is due.
      type: integer
      example: 7
    parent_task_name:
      description: Name of the parent task.
      type: string
      example: Parent Task
    parent_task_number:
      description: Number of the parent task.
      type: string
      example: PT-001
    created_by_name:
      description: Name of the user who created the task.
      type: string
      example: John Doe
    can_show_in_portal:
      description: Indicates whether the document can be shown in the customer portal.
      type: boolean
      example: true
    file_name:
      description: Name of the file attached to the task.
      type: string
      example: document.pdf
    file_type:
      description: Type of the file attached to the task.
      type: string
      example: pdf
    file_size:
      description: Size of the file attached to the task in bytes.
      type: integer
      example: 204800
    file_size_formatted:
      description: Formatted size of the file attached to the task.
      type: string
      example: 200 KB
    document_id:
      description: ID of the document attached to the task.
      type: string
      example: 982000000567125
    attachment_order:
      description: Order of the attachment in the task.
      type: integer
      example: 1
    document:
      description: Details of the document attached to the task.
      type: object
      properties:
        can_show_in_portal:
          $ref: '#/components/schemas/can_show_in_portal'
        file_name:
          $ref: '#/components/schemas/file_name'
        file_type:
          $ref: '#/components/schemas/file_type'
        file_size:
          $ref: '#/components/schemas/file_size'
        file_size_formatted:
          $ref: '#/components/schemas/file_size_formatted'
        document_id:
          $ref: '#/components/schemas/document_id'
        attachment_order:
          $ref: '#/components/schemas/attachment_order'
    documents:
      description: List of files attached to a particular task.
      type: array
      items:
        type: object
        properties:
          can_show_in_portal:
            $ref: '#/components/schemas/can_show_in_portal'
          file_name:
            $ref: '#/components/schemas/file_name'
          file_type:
            $ref: '#/components/schemas/file_type'
          file_size:
            $ref: '#/components/schemas/file_size'
          file_size_formatted:
            $ref: '#/components/schemas/file_size_formatted'
          document_id:
            $ref: '#/components/schemas/document_id'
          attachment_order:
            $ref: '#/components/schemas/attachment_order'
    custom_fields:
      type: array
      description: List of custom fields associated with the task.
      items:
        type: object
        properties:
          customfield_id:
            type: string
            description: Unique identifier of the custom field.
            example: '46000000012845'
          edit_on_store:
            type: boolean
            description: Whether the custom field can be edited on store.
            example: 'false'
          show_in_all_pdf:
            type: boolean
            description: Whether to show this custom field in all PDF documents.
            example: 'true'
          search_entity:
            type: string
            description: Entity type to search when this is a lookup field.
            example: contacts
          value:
            type: object
            description: Value of the custom field, could be of any data type.
            example: Value123
          value_formatted:
            type: string
            description: Formatted string representation of the value.
            example: Value123
          show_in_store:
            type: boolean
            description: Whether to show this custom field in store.
            example: 'false'
          is_active:
            type: boolean
            description: Whether the custom field is active.
            example: 'true'
          order:
            type: integer
            description: Display order of the custom field.
            example: '1'
          label:
            type: string
            description: Display name of the custom field.
            example: Project Code
          api_name:
            type: string
            description: API name of the field.
            example: cf_project_code
          data_type:
            type: string
            description: Data type of the custom field.
            example: text
          is_dependent_field:
            type: boolean
            description: Whether the custom field depends on another field.
            example: 'false'
          show_in_portal:
            type: boolean
            description: Whether to show this custom field in the customer portal.
            example: 'true'
          show_on_pdf:
            type: boolean
            description: Whether to show this custom field in PDF documents.
            example: 'true'
          edit_on_portal:
            type: boolean
            description: Whether the custom field can be edited on the customer portal.
            example: 'false'
    statuses:
      description: List of statuses for the task.
      type: array
      items:
        type: string
      example:
        - open
        - closed
        - pending
    is_system_task:
      description: Indicates whether the task is a system task.
      type: boolean
      example: false
    system_task_type:
      description: Type of the system task.
      type: integer
      example: 2
    comment_id:
      description: ID of the comment on the task.
      type: string
      example: 982000000567126
    commented_by_id:
      description: ID of the user who commented on the task.
      type: string
      example: 982000000567127
    commented_by:
      description: Name of the user who commented on the task.
      type: string
      example: Jane Doe
    comment_type:
      description: Type of the comment.
      type: string
      example: internal
    date_description:
      description: Description of the date when the comment was made.
      type: string
      example: One month ago
    time:
      description: Time when the comment was made.
      type: string
      example: 12:00 PM
    operation_type:
      description: Type of operation performed on the task.
      type: string
      example: Added
    transaction_id:
      description: ID of the transaction associated with the task.
      type: string
      example: 982000000567128
    transaction_type:
      description: Type of transaction associated with the task.
      type: string
      example: invoice
    description:
      description: Description of the comment.
      type: string
      example: This is a sample comment.
    comment:
      description: Comment on the task.
      type: object
      properties:
        comment_id:
          $ref: '#/components/schemas/comment_id'
        description:
          $ref: '#/components/schemas/description'
        commented_by_id:
          $ref: '#/components/schemas/commented_by_id'
        commented_by:
          $ref: '#/components/schemas/commented_by'
        comment_type:
          $ref: '#/components/schemas/comment_type'
        date:
          description: Date when the comment was made.
          type: string
          format: date-time
          example: '2025-01-01T12:00:00Z'
        date_description:
          $ref: '#/components/schemas/date_description'
        time:
          $ref: '#/components/schemas/time'
        operation_type:
          $ref: '#/components/schemas/operation_type'
        transaction_id:
          $ref: '#/components/schemas/transaction_id'
        transaction_type:
          $ref: '#/components/schemas/transaction_type'
    comments:
      description: List of comments for the task.
      type: array
      items:
        type: object
        properties:
          comment_id:
            $ref: '#/components/schemas/comment_id'
          description:
            description: Description of the comment.
            type: string
            example: This is a sample comment.
          commented_by_id:
            $ref: '#/components/schemas/commented_by_id'
          commented_by:
            $ref: '#/components/schemas/commented_by'
          comment_type:
            $ref: '#/components/schemas/comment_type'
          date:
            description: Date when the comment was made.
            type: string
            format: date-time
            example: '2025-01-01T12:00:00Z'
          date_description:
            $ref: '#/components/schemas/date_description'
          time:
            $ref: '#/components/schemas/time'
          operation_type:
            $ref: '#/components/schemas/operation_type'
          transaction_id:
            $ref: '#/components/schemas/transaction_id'
          transaction_type:
            $ref: '#/components/schemas/transaction_type'
    parent_id:
      description: ID of the parent task.
      type: string
      example: 982000000567114
    entity_tags:
      description: List of tags associated with the task.
      type: array
      items:
        type: object
        properties:
          id:
            description: ID of the tag.
            type: string
            example: 982000000567129
          name:
            description: Name of the tag.
            type: string
            example: Important
          color:
            description: Color code of the tag.
            type: string
            example: FFB6C1
    dependencies:
      description: List of dependencies for the task.
      type: array
      items:
        type: object
        properties:
          dependency_id:
            description: ID of the dependency.
            type: string
            example: 982000000567192
          dependency_type:
            description: Type of the dependency.
            type: integer
            example: 1
          depends_on_id:
            description: ID of the entity on which the current task depends.
            type: string
            example: 982000000567193
          depends_on_entity_type:
            description: Type of the entity on which the current task depends.
            type: integer
            example: 20
    gendoc-attributes-schema:
      type: object
      properties:
        task_id:
          $ref: '#/components/schemas/task_id'
        recurring_task_id:
          $ref: '#/components/schemas/recurring_task_id'
        owner_id:
          $ref: '#/components/schemas/owner_id'
        owner_ids:
          $ref: '#/components/schemas/owner_ids'
        owner_name:
          $ref: '#/components/schemas/owner_name'
        owners:
          $ref: '#/components/schemas/owners'
        title:
          $ref: '#/components/schemas/title'
        due_date:
          $ref: '#/components/schemas/due_date'
        due_date_formatted:
          $ref: '#/components/schemas/due_date_formatted'
        is_overdue:
          $ref: '#/components/schemas/is_overdue'
        contact_type:
          $ref: '#/components/schemas/contact_type'
        contact_id:
          $ref: '#/components/schemas/contact_id'
        color_code:
          $ref: '#/components/schemas/color_code'
        contact_name:
          $ref: '#/components/schemas/contact_name'
        parent_task_id:
          $ref: '#/components/schemas/parent_task_id'
        related_entity_id:
          $ref: '#/components/schemas/related_entity_id'
        related_entity_type:
          $ref: '#/components/schemas/related_entity_type'
        related_entity:
          $ref: '#/components/schemas/related_entity'
        related_entity_value:
          $ref: '#/components/schemas/related_entity_value'
        parent_status:
          $ref: '#/components/schemas/parent_status'
        status:
          $ref: '#/components/schemas/status'
        custom_status_id:
          $ref: '#/components/schemas/custom_status_id'
        billing_type:
          $ref: '#/components/schemas/billing_type'
        is_billable:
          $ref: '#/components/schemas/is_billable'
        task_rate:
          $ref: '#/components/schemas/task_rate'
        completion_percentage:
          $ref: '#/components/schemas/completion_percentage'
        is_subtask:
          $ref: '#/components/schemas/is_subtask'
        priority:
          $ref: '#/components/schemas/priority'
        reminder:
          $ref: '#/components/schemas/reminder'
        task_description:
          $ref: '#/components/schemas/task_description'
        is_accountant_task:
          $ref: '#/components/schemas/is_accountant_task'
        task_number:
          $ref: '#/components/schemas/task_number'
        task_number_prefix:
          $ref: '#/components/schemas/task_number_prefix'
        task_number_suffix:
          $ref: '#/components/schemas/task_number_suffix'
        can_push:
          $ref: '#/components/schemas/can_push'
        created_by_id:
          $ref: '#/components/schemas/created_by_id'
        last_modified_by_id:
          $ref: '#/components/schemas/last_modified_by_id'
        template_id:
          $ref: '#/components/schemas/template_id'
        due_after:
          $ref: '#/components/schemas/due_after'
        parent_task_name:
          $ref: '#/components/schemas/parent_task_name'
        parent_task_number:
          $ref: '#/components/schemas/parent_task_number'
        created_by_name:
          $ref: '#/components/schemas/created_by_name'
    add-a-task-request:
      type: object
      properties:
        task_id:
          $ref: '#/components/schemas/task_id'
        owner_ids:
          $ref: '#/components/schemas/owner_ids'
        owner_id:
          $ref: '#/components/schemas/owner_id'
        task_type:
          $ref: '#/components/schemas/task_type'
        title:
          $ref: '#/components/schemas/title'
        due_date:
          $ref: '#/components/schemas/due_date'
        contact_type:
          $ref: '#/components/schemas/contact_type'
        contact_id:
          $ref: '#/components/schemas/contact_id'
        can_push:
          $ref: '#/components/schemas/can_push'
        related_entity_type:
          $ref: '#/components/schemas/related_entity_type'
        related_entity_id:
          $ref: '#/components/schemas/related_entity_id'
        related_sub_entity_type:
          $ref: '#/components/schemas/related_sub_entity_type'
        related_sub_entity_id:
          $ref: '#/components/schemas/related_sub_entity_id'
        status:
          $ref: '#/components/schemas/status'
        billing_type:
          $ref: '#/components/schemas/billing_type'
        is_billable:
          $ref: '#/components/schemas/is_billable'
        task_rate:
          $ref: '#/components/schemas/task_rate'
        completion_percentage:
          $ref: '#/components/schemas/completion_percentage'
        priority:
          $ref: '#/components/schemas/priority'
        send_email_notification:
          $ref: '#/components/schemas/send_email_notification'
        mail_id:
          $ref: '#/components/schemas/mail_id'
        email_account_type:
          $ref: '#/components/schemas/email_account_type'
        email_folder_id:
          $ref: '#/components/schemas/email_folder_id'
        email_account_id:
          $ref: '#/components/schemas/email_account_id'
        mail_attachments:
          $ref: '#/components/schemas/mail_attachments'
        reminder:
          $ref: '#/components/schemas/reminder'
        task_description:
          $ref: '#/components/schemas/task_description'
        custom_fields:
          type: array
          description: Custom fields associated with the task.
          items:
            type: object
            properties:
              customfield_id:
                description: ID of the custom field.
                type: string
                example: 982000000567114
              index:
                description: Index of the custom field.
                type: integer
                example: 1
              label:
                description: Label of the custom field.
                type: string
                example: Custom Field Label
              value:
                description: Value of the custom field.
                type: string
                example: Custom Field Value
              value_formatted:
                description: Formatted value of the custom field.
                type: string
                example: Formatted Custom Field Value
              api_name:
                description: Name of the custom field.
                type: string
                example: CustomFieldAPIName
        due_after:
          $ref: '#/components/schemas/due_after'
        template_id:
          $ref: '#/components/schemas/template_id'
        task_number:
          $ref: '#/components/schemas/task_number'
        task_number_prefix:
          $ref: '#/components/schemas/task_number_prefix'
        task_number_suffix:
          $ref: '#/components/schemas/task_number_suffix'
        recurring_task_id:
          $ref: '#/components/schemas/recurring_task_id'
        is_sub_task:
          $ref: '#/components/schemas/is_sub_task'
        parent_id:
          $ref: '#/components/schemas/parent_id'
        dependencies:
          $ref: '#/components/schemas/dependencies'
        entity_tags:
          description: List of tags to be associated with the task.
          type: array
          items:
            type: object
            properties:
              name:
                description: Name of the tag.
                type: string
                example: Important
              color:
                description: Color code of the tag.
                type: string
                example: FFB6C1
    add-a-task-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Task created
          readOnly: true
        task:
          type: object
          properties:
            task_id:
              $ref: '#/components/schemas/task_id'
            recurring_task_id:
              $ref: '#/components/schemas/recurring_task_id'
            owner_id:
              $ref: '#/components/schemas/owner_id'
            owner_ids:
              $ref: '#/components/schemas/owner_ids'
            owner_name:
              $ref: '#/components/schemas/owner_name'
            owners:
              $ref: '#/components/schemas/owners'
            title:
              $ref: '#/components/schemas/title'
            due_date:
              $ref: '#/components/schemas/due_date'
            due_date_formatted:
              $ref: '#/components/schemas/due_date_formatted'
            is_overdue:
              $ref: '#/components/schemas/is_overdue'
            contact_type:
              $ref: '#/components/schemas/contact_type'
            contact_id:
              $ref: '#/components/schemas/contact_id'
            color_code:
              $ref: '#/components/schemas/color_code'
            contact_name:
              $ref: '#/components/schemas/contact_name'
            parent_task_id:
              $ref: '#/components/schemas/parent_task_id'
            related_entity_id:
              $ref: '#/components/schemas/related_entity_id'
            related_entity_type:
              $ref: '#/components/schemas/related_entity_type'
            related_entity:
              $ref: '#/components/schemas/related_entity'
            related_entity_value:
              $ref: '#/components/schemas/related_entity_value'
            parent_status:
              $ref: '#/components/schemas/parent_status'
            status:
              $ref: '#/components/schemas/status'
            custom_status_id:
              $ref: '#/components/schemas/custom_status_id'
            billing_type:
              $ref: '#/components/schemas/billing_type'
            is_billable:
              $ref: '#/components/schemas/is_billable'
            task_rate:
              $ref: '#/components/schemas/task_rate'
            completion_percentage:
              $ref: '#/components/schemas/completion_percentage'
            is_subtask:
              $ref: '#/components/schemas/is_subtask'
            priority:
              $ref: '#/components/schemas/priority'
            reminder:
              $ref: '#/components/schemas/reminder'
            task_description:
              $ref: '#/components/schemas/task_description'
            is_accountant_task:
              $ref: '#/components/schemas/is_accountant_task'
            task_number:
              $ref: '#/components/schemas/task_number'
            task_number_prefix:
              $ref: '#/components/schemas/task_number_prefix'
            task_number_suffix:
              $ref: '#/components/schemas/task_number_suffix'
            can_push:
              $ref: '#/components/schemas/can_push'
            created_by_id:
              $ref: '#/components/schemas/created_by_id'
            last_modified_by_id:
              $ref: '#/components/schemas/last_modified_by_id'
            template_id:
              $ref: '#/components/schemas/template_id'
            due_after:
              $ref: '#/components/schemas/due_after'
            parent_task_name:
              $ref: '#/components/schemas/parent_task_name'
            parent_task_number:
              $ref: '#/components/schemas/parent_task_number'
            created_by_name:
              $ref: '#/components/schemas/created_by_name'
            documents:
              $ref: '#/components/schemas/documents'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            statuses:
              $ref: '#/components/schemas/statuses'
            is_system_task:
              $ref: '#/components/schemas/is_system_task'
            system_task_type:
              $ref: '#/components/schemas/system_task_type'
            comments:
              $ref: '#/components/schemas/comments'
            dependencies:
              $ref: '#/components/schemas/dependencies'
            entity_tags:
              $ref: '#/components/schemas/entity_tags'
    list-tasks-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        tasks:
          type: array
          items:
            type: object
            properties:
              task_id:
                $ref: '#/components/schemas/task_id'
              task_number:
                $ref: '#/components/schemas/task_number'
              owner_id:
                $ref: '#/components/schemas/owner_id'
              owner_name:
                $ref: '#/components/schemas/owner_name'
              contact_id:
                $ref: '#/components/schemas/contact_id'
              billing_type:
                $ref: '#/components/schemas/billing_type'
              is_billable:
                $ref: '#/components/schemas/is_billable'
              task_rate:
                $ref: '#/components/schemas/task_rate'
              completion_percentage:
                $ref: '#/components/schemas/completion_percentage'
              contact_name:
                $ref: '#/components/schemas/contact_name'
              contact_type:
                $ref: '#/components/schemas/contact_type'
              client_id:
                $ref: '#/components/schemas/client_id'
              client_name:
                $ref: '#/components/schemas/client_name'
              title:
                $ref: '#/components/schemas/title'
              created_time:
                $ref: '#/components/schemas/created_time'
              created_time_formatted:
                $ref: '#/components/schemas/created_time_formatted'
              due_date:
                $ref: '#/components/schemas/due_date'
              is_accountant_task:
                $ref: '#/components/schemas/is_accountant_task'
              is_overdue:
                $ref: '#/components/schemas/is_overdue'
              parent_task_id:
                $ref: '#/components/schemas/parent_task_id'
              parent_status:
                $ref: '#/components/schemas/parent_status'
              priority:
                $ref: '#/components/schemas/priority'
              status:
                $ref: '#/components/schemas/status'
              color_code:
                $ref: '#/components/schemas/color_code'
              task_description:
                $ref: '#/components/schemas/task_description'
              subtask_count:
                $ref: '#/components/schemas/subtask_count'
              is_subtask:
                $ref: '#/components/schemas/is_subtask'
              parent_task_name:
                $ref: '#/components/schemas/parent_task_name'
              parent_task_number:
                $ref: '#/components/schemas/parent_task_number'
              custom_fields:
                $ref: '#/components/schemas/custom_fields'
              owners:
                $ref: '#/components/schemas/owners'
              entity_tags:
                $ref: '#/components/schemas/entity_tags'
    update-tasks-request:
      type: array
      description: List of tasks to be updated.
      items:
        type: object
        properties:
          task_id:
            $ref: '#/components/schemas/task_id'
          owner_ids:
            $ref: '#/components/schemas/owner_ids'
          owner_id:
            $ref: '#/components/schemas/owner_id'
          task_type:
            $ref: '#/components/schemas/task_type'
          title:
            $ref: '#/components/schemas/title'
          due_date:
            $ref: '#/components/schemas/due_date'
          contact_type:
            $ref: '#/components/schemas/contact_type'
          contact_id:
            $ref: '#/components/schemas/contact_id'
          can_push:
            $ref: '#/components/schemas/can_push'
          related_entity_type:
            $ref: '#/components/schemas/related_entity_type'
          related_entity_id:
            $ref: '#/components/schemas/related_entity_id'
          related_sub_entity_type:
            $ref: '#/components/schemas/related_sub_entity_type'
          related_sub_entity_id:
            $ref: '#/components/schemas/related_sub_entity_id'
          status:
            $ref: '#/components/schemas/status'
          billing_type:
            $ref: '#/components/schemas/billing_type'
          is_billable:
            $ref: '#/components/schemas/is_billable'
          task_rate:
            $ref: '#/components/schemas/task_rate'
          completion_percentage:
            $ref: '#/components/schemas/completion_percentage'
          priority:
            $ref: '#/components/schemas/priority'
          send_email_notification:
            $ref: '#/components/schemas/send_email_notification'
          mail_id:
            $ref: '#/components/schemas/mail_id'
          email_account_type:
            $ref: '#/components/schemas/email_account_type'
          email_folder_id:
            $ref: '#/components/schemas/email_folder_id'
          email_account_id:
            $ref: '#/components/schemas/email_account_id'
          mail_attachments:
            $ref: '#/components/schemas/mail_attachments'
          reminder:
            $ref: '#/components/schemas/reminder'
          task_description:
            $ref: '#/components/schemas/task_description'
          custom_fields:
            type: array
            description: List of custom fields associated with the task.
            items:
              type: object
              properties:
                customfield_id:
                  description: ID of the custom field.
                  type: string
                  example: 982000000567114
                index:
                  description: Index of the custom field.
                  type: integer
                  example: 1
                label:
                  description: Label of the custom field.
                  type: string
                  example: Custom Field Label
                value:
                  description: Value of the custom field.
                  type: string
                  example: Custom Field Value
                value_formatted:
                  description: Formatted value of the custom field.
                  type: string
                  example: Formatted Custom Field Value
                api_name:
                  description: Name of the custom field.
                  type: string
                  example: CustomFieldAPIName
          due_after:
            $ref: '#/components/schemas/due_after'
          template_id:
            $ref: '#/components/schemas/template_id'
          task_number:
            $ref: '#/components/schemas/task_number'
          task_number_prefix:
            $ref: '#/components/schemas/task_number_prefix'
          task_number_suffix:
            $ref: '#/components/schemas/task_number_suffix'
          recurring_task_id:
            $ref: '#/components/schemas/recurring_task_id'
          is_sub_task:
            $ref: '#/components/schemas/is_sub_task'
          parent_id:
            $ref: '#/components/schemas/parent_id'
          dependencies:
            $ref: '#/components/schemas/dependencies'
          entity_tags:
            description: List of tags to be associated with the task.
            type: array
            items:
              type: object
              properties:
                name:
                  description: Name of the tag.
                  type: string
                  example: Important
                color:
                  description: Color code of the tag.
                  type: string
                  example: FFB6C1
    update-tasks-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Task updated
          readOnly: true
        tasks:
          type: array
          description: List of tasks updated.
          items:
            type: object
            properties:
              task_id:
                $ref: '#/components/schemas/task_id'
              recurring_task_id:
                $ref: '#/components/schemas/recurring_task_id'
              owner_id:
                $ref: '#/components/schemas/owner_id'
              owner_ids:
                $ref: '#/components/schemas/owner_ids'
              owner_name:
                $ref: '#/components/schemas/owner_name'
              owners:
                $ref: '#/components/schemas/owners'
              title:
                $ref: '#/components/schemas/title'
              due_date:
                $ref: '#/components/schemas/due_date'
              due_date_formatted:
                $ref: '#/components/schemas/due_date_formatted'
              is_overdue:
                $ref: '#/components/schemas/is_overdue'
              contact_type:
                $ref: '#/components/schemas/contact_type'
              contact_id:
                $ref: '#/components/schemas/contact_id'
              color_code:
                $ref: '#/components/schemas/color_code'
              contact_name:
                $ref: '#/components/schemas/contact_name'
              parent_task_id:
                $ref: '#/components/schemas/parent_task_id'
              related_entity_id:
                $ref: '#/components/schemas/related_entity_id'
              related_entity_type:
                $ref: '#/components/schemas/related_entity_type'
              related_entity:
                $ref: '#/components/schemas/related_entity'
              related_entity_value:
                $ref: '#/components/schemas/related_entity_value'
              parent_status:
                $ref: '#/components/schemas/parent_status'
              status:
                $ref: '#/components/schemas/status'
              custom_status_id:
                $ref: '#/components/schemas/custom_status_id'
              billing_type:
                $ref: '#/components/schemas/billing_type'
              is_billable:
                $ref: '#/components/schemas/is_billable'
              task_rate:
                $ref: '#/components/schemas/task_rate'
              completion_percentage:
                $ref: '#/components/schemas/completion_percentage'
              is_subtask:
                $ref: '#/components/schemas/is_subtask'
              priority:
                $ref: '#/components/schemas/priority'
              reminder:
                $ref: '#/components/schemas/reminder'
              task_description:
                $ref: '#/components/schemas/task_description'
              is_accountant_task:
                $ref: '#/components/schemas/is_accountant_task'
              task_number:
                $ref: '#/components/schemas/task_number'
              task_number_prefix:
                $ref: '#/components/schemas/task_number_prefix'
              task_number_suffix:
                $ref: '#/components/schemas/task_number_suffix'
              can_push:
                $ref: '#/components/schemas/can_push'
              created_by_id:
                $ref: '#/components/schemas/created_by_id'
              last_modified_by_id:
                $ref: '#/components/schemas/last_modified_by_id'
              template_id:
                $ref: '#/components/schemas/template_id'
              due_after:
                $ref: '#/components/schemas/due_after'
              parent_task_name:
                $ref: '#/components/schemas/parent_task_name'
              parent_task_number:
                $ref: '#/components/schemas/parent_task_number'
              created_by_name:
                $ref: '#/components/schemas/created_by_name'
              documents:
                $ref: '#/components/schemas/documents'
              custom_fields:
                $ref: '#/components/schemas/custom_fields'
              statuses:
                $ref: '#/components/schemas/statuses'
              is_system_task:
                $ref: '#/components/schemas/is_system_task'
              system_task_type:
                $ref: '#/components/schemas/system_task_type'
              comments:
                $ref: '#/components/schemas/comments'
              dependencies:
                $ref: '#/components/schemas/dependencies'
              entity_tags:
                $ref: '#/components/schemas/entity_tags'
    delete-tasks-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Task deleted
          readOnly: true
    get-a-task-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        task:
          type: object
          properties:
            task_id:
              $ref: '#/components/schemas/task_id'
            recurring_task_id:
              $ref: '#/components/schemas/recurring_task_id'
            owner_id:
              $ref: '#/components/schemas/owner_id'
            owner_ids:
              $ref: '#/components/schemas/owner_ids'
            owner_name:
              $ref: '#/components/schemas/owner_name'
            owners:
              $ref: '#/components/schemas/owners'
            title:
              $ref: '#/components/schemas/title'
            due_date:
              $ref: '#/components/schemas/due_date'
            due_date_formatted:
              $ref: '#/components/schemas/due_date_formatted'
            is_overdue:
              $ref: '#/components/schemas/is_overdue'
            contact_type:
              $ref: '#/components/schemas/contact_type'
            contact_id:
              $ref: '#/components/schemas/contact_id'
            color_code:
              $ref: '#/components/schemas/color_code'
            contact_name:
              $ref: '#/components/schemas/contact_name'
            parent_task_id:
              $ref: '#/components/schemas/parent_task_id'
            related_entity_id:
              $ref: '#/components/schemas/related_entity_id'
            related_entity_type:
              $ref: '#/components/schemas/related_entity_type'
            related_entity:
              $ref: '#/components/schemas/related_entity'
            related_entity_value:
              $ref: '#/components/schemas/related_entity_value'
            parent_status:
              $ref: '#/components/schemas/parent_status'
            status:
              $ref: '#/components/schemas/status'
            custom_status_id:
              $ref: '#/components/schemas/custom_status_id'
            billing_type:
              $ref: '#/components/schemas/billing_type'
            is_billable:
              $ref: '#/components/schemas/is_billable'
            task_rate:
              $ref: '#/components/schemas/task_rate'
            completion_percentage:
              $ref: '#/components/schemas/completion_percentage'
            is_subtask:
              $ref: '#/components/schemas/is_subtask'
            priority:
              $ref: '#/components/schemas/priority'
            reminder:
              $ref: '#/components/schemas/reminder'
            task_description:
              $ref: '#/components/schemas/task_description'
            is_accountant_task:
              $ref: '#/components/schemas/is_accountant_task'
            task_number:
              $ref: '#/components/schemas/task_number'
            task_number_prefix:
              $ref: '#/components/schemas/task_number_prefix'
            task_number_suffix:
              $ref: '#/components/schemas/task_number_suffix'
            can_push:
              $ref: '#/components/schemas/can_push'
            created_by_id:
              $ref: '#/components/schemas/created_by_id'
            last_modified_by_id:
              $ref: '#/components/schemas/last_modified_by_id'
            template_id:
              $ref: '#/components/schemas/template_id'
            due_after:
              $ref: '#/components/schemas/due_after'
            parent_task_name:
              $ref: '#/components/schemas/parent_task_name'
            parent_task_number:
              $ref: '#/components/schemas/parent_task_number'
            created_by_name:
              $ref: '#/components/schemas/created_by_name'
            documents:
              $ref: '#/components/schemas/documents'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            statuses:
              $ref: '#/components/schemas/statuses'
            is_system_task:
              $ref: '#/components/schemas/is_system_task'
            system_task_type:
              $ref: '#/components/schemas/system_task_type'
            comments:
              $ref: '#/components/schemas/comments'
            dependencies:
              $ref: '#/components/schemas/dependencies'
            entity_tags:
              $ref: '#/components/schemas/entity_tags'
    update-a-task-request:
      type: object
      properties:
        task_id:
          $ref: '#/components/schemas/task_id'
        owner_ids:
          $ref: '#/components/schemas/owner_ids'
        owner_id:
          $ref: '#/components/schemas/owner_id'
        task_type:
          $ref: '#/components/schemas/task_type'
        title:
          $ref: '#/components/schemas/title'
        due_date:
          $ref: '#/components/schemas/due_date'
        contact_type:
          $ref: '#/components/schemas/contact_type'
        contact_id:
          $ref: '#/components/schemas/contact_id'
        can_push:
          $ref: '#/components/schemas/can_push'
        related_entity_type:
          $ref: '#/components/schemas/related_entity_type'
        related_entity_id:
          $ref: '#/components/schemas/related_entity_id'
        related_sub_entity_type:
          $ref: '#/components/schemas/related_sub_entity_type'
        related_sub_entity_id:
          $ref: '#/components/schemas/related_sub_entity_id'
        status:
          $ref: '#/components/schemas/status'
        billing_type:
          $ref: '#/components/schemas/billing_type'
        is_billable:
          $ref: '#/components/schemas/is_billable'
        task_rate:
          $ref: '#/components/schemas/task_rate'
        completion_percentage:
          $ref: '#/components/schemas/completion_percentage'
        priority:
          $ref: '#/components/schemas/priority'
        send_email_notification:
          $ref: '#/components/schemas/send_email_notification'
        mail_id:
          $ref: '#/components/schemas/mail_id'
        email_account_type:
          $ref: '#/components/schemas/email_account_type'
        email_folder_id:
          $ref: '#/components/schemas/email_folder_id'
        email_account_id:
          $ref: '#/components/schemas/email_account_id'
        mail_attachments:
          $ref: '#/components/schemas/mail_attachments'
        reminder:
          $ref: '#/components/schemas/reminder'
        task_description:
          $ref: '#/components/schemas/task_description'
        custom_fields:
          type: array
          description: List of custom fields associated with the task.
          items:
            type: object
            properties:
              customfield_id:
                description: ID of the custom field.
                type: string
                example: 982000000567114
              index:
                description: Index of the custom field.
                type: integer
                example: 1
              label:
                description: Label of the custom field.
                type: string
                example: Custom Field Label
              value:
                description: Value of the custom field.
                type: string
                example: Custom Field Value
              value_formatted:
                description: Formatted value of the custom field.
                type: string
                example: Formatted Custom Field Value
              api_name:
                description: Name of the custom field.
                type: string
                example: CustomFieldAPIName
        due_after:
          $ref: '#/components/schemas/due_after'
        template_id:
          $ref: '#/components/schemas/template_id'
        task_number:
          $ref: '#/components/schemas/task_number'
        task_number_prefix:
          $ref: '#/components/schemas/task_number_prefix'
        task_number_suffix:
          $ref: '#/components/schemas/task_number_suffix'
        recurring_task_id:
          $ref: '#/components/schemas/recurring_task_id'
        is_sub_task:
          $ref: '#/components/schemas/is_sub_task'
        parent_id:
          $ref: '#/components/schemas/parent_id'
        dependencies:
          $ref: '#/components/schemas/dependencies'
        entity_tags:
          description: List of tags to be associated with the task.
          type: array
          items:
            type: object
            properties:
              name:
                description: Name of the tag.
                type: string
                example: Important
              color:
                description: Color code of the tag.
                type: string
                example: FFB6C1
    update-a-task-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Task updated
          readOnly: true
        task:
          type: object
          properties:
            task_id:
              $ref: '#/components/schemas/task_id'
            recurring_task_id:
              $ref: '#/components/schemas/recurring_task_id'
            owner_id:
              $ref: '#/components/schemas/owner_id'
            owner_ids:
              $ref: '#/components/schemas/owner_ids'
            owner_name:
              $ref: '#/components/schemas/owner_name'
            owners:
              $ref: '#/components/schemas/owners'
            title:
              $ref: '#/components/schemas/title'
            due_date:
              $ref: '#/components/schemas/due_date'
            due_date_formatted:
              $ref: '#/components/schemas/due_date_formatted'
            is_overdue:
              $ref: '#/components/schemas/is_overdue'
            contact_type:
              $ref: '#/components/schemas/contact_type'
            contact_id:
              $ref: '#/components/schemas/contact_id'
            color_code:
              $ref: '#/components/schemas/color_code'
            contact_name:
              $ref: '#/components/schemas/contact_name'
            parent_task_id:
              $ref: '#/components/schemas/parent_task_id'
            related_entity_id:
              $ref: '#/components/schemas/related_entity_id'
            related_entity_type:
              $ref: '#/components/schemas/related_entity_type'
            related_entity:
              $ref: '#/components/schemas/related_entity'
            related_entity_value:
              $ref: '#/components/schemas/related_entity_value'
            parent_status:
              $ref: '#/components/schemas/parent_status'
            status:
              $ref: '#/components/schemas/status'
            custom_status_id:
              $ref: '#/components/schemas/custom_status_id'
            billing_type:
              $ref: '#/components/schemas/billing_type'
            is_billable:
              $ref: '#/components/schemas/is_billable'
            task_rate:
              $ref: '#/components/schemas/task_rate'
            completion_percentage:
              $ref: '#/components/schemas/completion_percentage'
            is_subtask:
              $ref: '#/components/schemas/is_subtask'
            priority:
              $ref: '#/components/schemas/priority'
            reminder:
              $ref: '#/components/schemas/reminder'
            task_description:
              $ref: '#/components/schemas/task_description'
            is_accountant_task:
              $ref: '#/components/schemas/is_accountant_task'
            task_number:
              $ref: '#/components/schemas/task_number'
            task_number_prefix:
              $ref: '#/components/schemas/task_number_prefix'
            task_number_suffix:
              $ref: '#/components/schemas/task_number_suffix'
            can_push:
              $ref: '#/components/schemas/can_push'
            created_by_id:
              $ref: '#/components/schemas/created_by_id'
            last_modified_by_id:
              $ref: '#/components/schemas/last_modified_by_id'
            template_id:
              $ref: '#/components/schemas/template_id'
            due_after:
              $ref: '#/components/schemas/due_after'
            parent_task_name:
              $ref: '#/components/schemas/parent_task_name'
            parent_task_number:
              $ref: '#/components/schemas/parent_task_number'
            created_by_name:
              $ref: '#/components/schemas/created_by_name'
            documents:
              $ref: '#/components/schemas/documents'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            statuses:
              $ref: '#/components/schemas/statuses'
            is_system_task:
              $ref: '#/components/schemas/is_system_task'
            system_task_type:
              $ref: '#/components/schemas/system_task_type'
            comments:
              $ref: '#/components/schemas/comments'
            dependencies:
              $ref: '#/components/schemas/dependencies'
            entity_tags:
              $ref: '#/components/schemas/entity_tags'
    delete-a-task-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Task deleted
          readOnly: true
    update-percentage-task-request:
      required:
        - completion_percentage
      type: object
      properties:
        completion_percentage:
          $ref: '#/components/schemas/completion_percentage'
    update-percentage-task-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Task percentage updated
          readOnly: true
        task:
          type: object
          properties:
            task_id:
              $ref: '#/components/schemas/task_id'
            recurring_task_id:
              $ref: '#/components/schemas/recurring_task_id'
            owner_id:
              $ref: '#/components/schemas/owner_id'
            owner_ids:
              $ref: '#/components/schemas/owner_ids'
            owner_name:
              $ref: '#/components/schemas/owner_name'
            owners:
              $ref: '#/components/schemas/owners'
            title:
              $ref: '#/components/schemas/title'
            due_date:
              $ref: '#/components/schemas/due_date'
            due_date_formatted:
              $ref: '#/components/schemas/due_date_formatted'
            is_overdue:
              $ref: '#/components/schemas/is_overdue'
            contact_type:
              $ref: '#/components/schemas/contact_type'
            contact_id:
              $ref: '#/components/schemas/contact_id'
            color_code:
              $ref: '#/components/schemas/color_code'
            contact_name:
              $ref: '#/components/schemas/contact_name'
            parent_task_id:
              $ref: '#/components/schemas/parent_task_id'
            related_entity_id:
              $ref: '#/components/schemas/related_entity_id'
            related_entity_type:
              $ref: '#/components/schemas/related_entity_type'
            related_entity:
              $ref: '#/components/schemas/related_entity'
            related_entity_value:
              $ref: '#/components/schemas/related_entity_value'
            parent_status:
              $ref: '#/components/schemas/parent_status'
            status:
              $ref: '#/components/schemas/status'
            custom_status_id:
              $ref: '#/components/schemas/custom_status_id'
            billing_type:
              $ref: '#/components/schemas/billing_type'
            is_billable:
              $ref: '#/components/schemas/is_billable'
            task_rate:
              $ref: '#/components/schemas/task_rate'
            completion_percentage:
              $ref: '#/components/schemas/completion_percentage'
            is_subtask:
              $ref: '#/components/schemas/is_subtask'
            priority:
              $ref: '#/components/schemas/priority'
            reminder:
              $ref: '#/components/schemas/reminder'
            task_description:
              $ref: '#/components/schemas/task_description'
            is_accountant_task:
              $ref: '#/components/schemas/is_accountant_task'
            task_number:
              $ref: '#/components/schemas/task_number'
            task_number_prefix:
              $ref: '#/components/schemas/task_number_prefix'
            task_number_suffix:
              $ref: '#/components/schemas/task_number_suffix'
            can_push:
              $ref: '#/components/schemas/can_push'
            created_by_id:
              $ref: '#/components/schemas/created_by_id'
            last_modified_by_id:
              $ref: '#/components/schemas/last_modified_by_id'
            template_id:
              $ref: '#/components/schemas/template_id'
            due_after:
              $ref: '#/components/schemas/due_after'
            parent_task_name:
              $ref: '#/components/schemas/parent_task_name'
            parent_task_number:
              $ref: '#/components/schemas/parent_task_number'
            created_by_name:
              $ref: '#/components/schemas/created_by_name'
            documents:
              $ref: '#/components/schemas/documents'
            custom_fields:
              $ref: '#/components/schemas/custom_fields'
            statuses:
              $ref: '#/components/schemas/statuses'
            is_system_task:
              $ref: '#/components/schemas/is_system_task'
            system_task_type:
              $ref: '#/components/schemas/system_task_type'
            comments:
              $ref: '#/components/schemas/comments'
            dependencies:
              $ref: '#/components/schemas/dependencies'
            entity_tags:
              $ref: '#/components/schemas/entity_tags'
    mark-open-task-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Task status updated
          readOnly: true
    mark-ongoing-task-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Task status updated
          readOnly: true
    mark-completed-task-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Task status updated
          readOnly: true
    add-task-comment-request:
      required:
        - description
      type: object
      properties:
        description:
          description: Description of the comment.
          type: string
          example: This is a sample comment.
    add-task-comment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Comments added
          readOnly: true
        comment:
          $ref: '#/components/schemas/comment'
    list-task-comments-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        comments:
          $ref: '#/components/schemas/comments'
    delete-task-comment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Comments deleted
          readOnly: true
    add-task-attachment-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: File uploaded
          readOnly: true
        documents:
          $ref: '#/components/schemas/documents'
    get-a-task-document-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: success
          readOnly: true
        documents:
          $ref: '#/components/schemas/document'
    delete-task-document-response:
      type: object
      properties:
        code:
          type: integer
          example: 0
          readOnly: true
        message:
          type: string
          example: Attachment deleted
          readOnly: true
  securitySchemes:
    Zoho_Auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.zoho.in/oauth/v2/auth
          scopes:
            ERP.projects.CREATE: Create Projects
            ERP.projects.UPDATE: Update Projects
            ERP.projects.READ: Read Projects
            ERP.projects.DELETE: Delete Projects
