Opply Tasks API

The Tasks API from Opply — 17 operation(s) for tasks.

OpenAPI Specification

opply-tasks-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Opply Activity Feed Tasks API
  version: 0.0.0
tags:
- name: Tasks
paths:
  /api/v1/chat/:
    get:
      operationId: api_v1_chat_list
      description: Comments on tasks (channel-neutral ``Message`` rows).
      summary: List a task's chat messages
      parameters:
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - in: query
        name: task_uuid
        schema:
          type: string
          format: uuid
        description: UUID of the task whose chat to list.
        required: true
      - in: query
        name: thread
        schema:
          type: string
          enum:
          - main
          - plan
          default: main
        description: 'Which of the task''s chat threads to target: `main` (default — the task conversation) or `plan` (the plan-discussion thread on the Plan tab).'
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedMessageReadList'
          description: ''
    post:
      operationId: api_v1_chat_create
      description: Comments on tasks (channel-neutral ``Message`` rows).
      summary: Post a chat message
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageWrite'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/MessageWrite'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/MessageWrite'
        required: true
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageRead'
          description: ''
  /api/v1/chat/{uuid}/react/:
    post:
      operationId: api_v1_chat_react_create
      description: POST adds the caller's reaction (idempotent); DELETE removes it. The emoji (a query param) must be one of the fixed MessageReactionEmoji palette. Returns the message with its updated aggregated reactions.
      summary: Add or remove an emoji reaction on a chat message
      parameters:
      - in: query
        name: emoji
        schema:
          type: string
          enum:
          - ✅
          - ❤️
          - 🎉
          - 👀
          - 👍
          - 😂
        description: The reaction emoji (fixed palette).
        required: true
      - in: path
        name: uuid
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageRead'
          description: ''
    delete:
      operationId: api_v1_chat_react_destroy
      description: POST adds the caller's reaction (idempotent); DELETE removes it. The emoji (a query param) must be one of the fixed MessageReactionEmoji palette. Returns the message with its updated aggregated reactions.
      summary: Add or remove an emoji reaction on a chat message
      parameters:
      - in: query
        name: emoji
        schema:
          type: string
          enum:
          - ✅
          - ❤️
          - 🎉
          - 👀
          - 👍
          - 😂
        description: The reaction emoji (fixed palette).
        required: true
      - in: path
        name: uuid
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageRead'
          description: ''
  /api/v1/chat/mark-read/:
    post:
      operationId: api_v1_chat_mark_read_create
      description: 'Advance the caller''s read cursor on a task''s chat to now.


        Anyone who can see the task (and thus its chat) may mark it read for

        themselves — read-state is per-user and innocuous. Resolves the task

        caller-scoped, so an out-of-scope uuid is a 404. ``thread`` picks

        which conversation''s cursor advances (main default | plan).'
      summary: Mark a task's chat read
      parameters:
      - in: query
        name: task_uuid
        schema:
          type: string
          format: uuid
        description: UUID of the task whose chat to mark read.
        required: true
      - in: query
        name: thread
        schema:
          type: string
          enum:
          - main
          - plan
          default: main
        description: 'Which of the task''s chat threads to target: `main` (default — the task conversation) or `plan` (the plan-discussion thread on the Plan tab).'
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                additionalProperties: {}
          description: ''
  /api/v1/task-recurrences/{uuid}/:
    get:
      operationId: api_v1_task_recurrences_retrieve
      description: 'Manage an existing recurring-task series (the template''s recurrence).


        Creation happens implicitly when a task is created with a ``recurrence``

        block (see ``TaskSerializer``); this surface is for reading the series,

        editing its schedule / default assignee for *future* occurrences, and

        pausing / resuming it. Hard-scoped to the caller''s company via the

        queryset — a leaked UUID can''t reach another tenant''s series.'
      summary: Get a recurring-task series
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRecurrence'
          description: ''
    patch:
      operationId: api_v1_task_recurrences_partial_update
      description: 'Manage an existing recurring-task series (the template''s recurrence).


        Creation happens implicitly when a task is created with a ``recurrence``

        block (see ``TaskSerializer``); this surface is for reading the series,

        editing its schedule / default assignee for *future* occurrences, and

        pausing / resuming it. Hard-scoped to the caller''s company via the

        queryset — a leaked UUID can''t reach another tenant''s series.'
      summary: Partially update a recurring-task series
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedTaskRecurrence'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedTaskRecurrence'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedTaskRecurrence'
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRecurrence'
          description: ''
  /api/v1/task-recurrences/{uuid}/disable/:
    post:
      operationId: api_v1_task_recurrences_disable_create
      description: 'Manage an existing recurring-task series (the template''s recurrence).


        Creation happens implicitly when a task is created with a ``recurrence``

        block (see ``TaskSerializer``); this surface is for reading the series,

        editing its schedule / default assignee for *future* occurrences, and

        pausing / resuming it. Hard-scoped to the caller''s company via the

        queryset — a leaked UUID can''t reach another tenant''s series.'
      summary: Pause a recurring-task series (Turn off repeat)
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRecurrence'
          description: ''
  /api/v1/task-recurrences/{uuid}/enable/:
    post:
      operationId: api_v1_task_recurrences_enable_create
      description: 'Manage an existing recurring-task series (the template''s recurrence).


        Creation happens implicitly when a task is created with a ``recurrence``

        block (see ``TaskSerializer``); this surface is for reading the series,

        editing its schedule / default assignee for *future* occurrences, and

        pausing / resuming it. Hard-scoped to the caller''s company via the

        queryset — a leaked UUID can''t reach another tenant''s series.'
      summary: Resume a recurring-task series
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
          format: uuid
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskRecurrence'
          description: ''
  /api/v1/tasks/:
    get:
      operationId: api_v1_tasks_list
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: List tasks
      parameters:
      - name: page
        required: false
        in: query
        description: A page number within the paginated result set.
        schema:
          type: integer
      - name: page_size
        required: false
        in: query
        description: Number of results to return per page.
        schema:
          type: integer
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedTaskList'
          description: ''
    post:
      operationId: api_v1_tasks_create
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: Create a task
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Task'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Task'
        required: true
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: ''
  /api/v1/tasks/{uuid}/:
    get:
      operationId: api_v1_tasks_retrieve
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: Get a task
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: ''
    put:
      operationId: api_v1_tasks_update
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: Update a task
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Task'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Task'
        required: true
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: ''
    patch:
      operationId: api_v1_tasks_partial_update
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: Partially update a task
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedTask'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedTask'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedTask'
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: ''
    delete:
      operationId: api_v1_tasks_destroy
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: Delete a task
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '204':
          description: No response body
  /api/v1/tasks/{uuid}/attachments/:
    get:
      operationId: api_v1_tasks_attachments_retrieve
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: List task attachments
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskAttachment'
          description: ''
    post:
      operationId: api_v1_tasks_attachments_create
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: List task attachments
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskAttachment'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskAttachment'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskAttachment'
        required: true
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskAttachment'
          description: ''
  /api/v1/tasks/{uuid}/attachments/{attachment_uuid}/:
    delete:
      operationId: api_v1_tasks_attachments_destroy
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: Delete a task attachment
      parameters:
      - in: path
        name: attachment_uuid
        schema:
          type: string
        required: true
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '204':
          description: No response body
  /api/v1/tasks/{uuid}/plan/approve/:
    post:
      operationId: api_v1_tasks_plan_approve_create
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: Approve the pending agent plan (version-pinned)
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskPlanApprove'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskPlanApprove'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskPlanApprove'
        required: true
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskPlan'
          description: ''
  /api/v1/tasks/{uuid}/plan/reject/:
    post:
      operationId: api_v1_tasks_plan_reject_create
      description: 'ViewSet for managing tasks.


        Tasks can be attached to entities (companies) or standalone.

        MoR users can only see tasks for companies they manage.'
      summary: Reject the pending agent plan (task returns to humans, agent unassigned)
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskPlanReject'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TaskPlanReject'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TaskPlanReject'
        required: true
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskPlan'
          description: ''
  /api/v1/tasks/{uuid}/repeat/:
    post:
      operationId: api_v1_tasks_repeat_create
      description: "Make an existing task recurring, change its rule, or stop it repeating.\n\n- ``POST`` with a recurrence config: if the task already belongs to a\n  series, update that series' rule; otherwise promote it in place (mint a\n  template, make this task occurrence #1).\n- ``DELETE``: \"Does not repeat\" — stop the series (occurrences survive)."
      summary: Set, update, or clear a task's recurrence
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: ''
    delete:
      operationId: api_v1_tasks_repeat_destroy
      description: "Make an existing task recurring, change its rule, or stop it repeating.\n\n- ``POST`` with a recurrence config: if the task already belongs to a\n  series, update that series' rule; otherwise promote it in place (mint a\n  template, make this task occurrence #1).\n- ``DELETE``: \"Does not repeat\" — stop the series (occurrences survive)."
      summary: Set, update, or clear a task's recurrence
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '204':
          description: No response body
  /api/v1/tasks/{uuid}/route/:
    post:
      operationId: api_v1_tasks_route_create
      description: Reassign a task routed to 'Opply' to the resolved worker for the given role (account_manager / mor_agent / buyer_agent / return_to_buyer). The backend resolves the concrete user; agent targets are dispatched via a fresh run. Router-agent (or MoR-side current assignee) only.
      summary: Route a MoR-routed task to a worker (by role)
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RouteTaskInput'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/RouteTaskInput'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RouteTaskInput'
        required: true
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: ''
  /api/v1/tasks/{uuid}/route-targets/:
    get:
      operationId: api_v1_tasks_route_targets_retrieve
      description: Which account manager / MoR agents / buyer agents this routed task can be routed to. Router-agent (or MoR-side current assignee) only.
      summary: List the routable targets for a MoR-routed task
      parameters:
      - in: path
        name: uuid
        schema:
          type: string
        required: true
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RouteTargetsResponse'
          description: ''
  /api/v1/tasks/me/:
    get:
      operationId: api_v1_tasks_me_retrieve
      description: 'List tasks assigned to the current user.


        Returns tasks from two sources:

        1. Task records (activities app) - where assignee is current user

        2. OrderActivity records (app_orders) - where task_assignee is current user


        Both are merged into a unified response format.'
      summary: List tasks assigned to current user
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task'
          description: ''
  /api/v1/tasks/related-search/:
    get:
      operationId: api_v1_tasks_related_search_list
      description: 'Unified "Related to" search across the caller''s orders, suppliers,

        contracts, ingredients and tasks. Returns a flat list grouped client-side

        by ``type``; empty without a `search` query (except for MoR callers).'
      summary: Search linkable related items
      parameters:
      - in: query
        name: exclude_task
        schema:
          type: string
        description: UUID of the task currently being edited, excluded from task results so it can't be related to itself.
      - in: query
        name: search
        schema:
          type: string
        description: Search text used to match linkable related items (orders, suppliers, contracts, ingredients, tasks). Results are empty without it.
      tags:
      - Tasks
      security:
      - tokenAuth: []
      - cookieAuth: []
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RelatedTarget'
          description: ''
components:
  schemas:
    Task:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
          readOnly: true
        number:
          type: integer
          readOnly: true
          nullable: true
          description: 'Per-company task number (human-facing id, e.g. #12).'
        title:
          type: string
          maxLength: 512
        description:
          type: string
        due_date:
          type: string
          format: date
          nullable: true
        status:
          $ref: '#/components/schemas/TaskStatusEnum'
        completed_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        priority:
          $ref: '#/components/schemas/TaskPriorityEnum'
        is_private:
          type: boolean
        assignee:
          allOf:
          - $ref: '#/components/schemas/UserMinimal'
          readOnly: true
        assignee_uuid:
          type: string
          format: uuid
          writeOnly: true
          nullable: true
        created_by:
          allOf:
          - $ref: '#/components/schemas/UserMinimal'
          readOnly: true
        watchers:
          type: array
          items:
            $ref: '#/components/schemas/UserMinimal'
          readOnly: true
        watcher_uuids:
          type: array
          items:
            type: string
            format: uuid
          writeOnly: true
        show_buyer_chat_notice:
          type: boolean
          description: 'True only for a MoR-side viewer of a buyer task routed to "Opply".


            The MoR handler needs to know the task chat is cross-tenant: the buyer

            can read it (MoR authors are masked as "Opply" on the buyer side, but the

            messages themselves are visible). Buyer-side viewers get ``False`` — the

            task is already theirs and the notice would be meaningless to them. Keyed

            off the same ``viewer_is_buyer_side`` helper the assignee/watcher masking

            uses, so the notice and the masking never disagree.'
          readOnly: true
        requester:
          type: object
          nullable: true
          properties:
            uuid:
              type: string
              format: uuid
            name:
              type: string
          readOnly: true
        targets:
          type: array
          items:
            type: object
            additionalProperties: {}
          readOnly: true
        target_items:
          type: array
          items:
            $ref: '#/components/schemas/RelatedItemInput'
          writeOnly: true
        parent_task:
          type: object
          additionalProperties: {}
          nullable: true
          readOnly: true
        parent_task_uuid:
          type: string
          format: uuid
          writeOnly: true
          nullable: true
        subtasks:
          type: array
          items:
            type: object
            additionalProperties: {}
          readOnly: true
        attachments:
          type: array
          items:
            type: object
            additionalProperties: {}
          readOnly: true
          description: List of task attachments
        unread_chat_count:
          type: integer
          description: 'Caller''s unread in-app chat count — present only when the queryset was

            annotated (list / `/me`); 0 on retrieve / create responses.'
          readOnly: true
        unread_mention_count:
          type: integer
          description: 'How many of the caller''s unread messages @-mention them — drives the

            red attention badge. Annotated on list / `/me`; 0 elsewhere.'
          readOnly: true
        plan_awaiting_revision:
          type: boolean
          description: 'True while the task waits for plan approval AND the newest

            post-version plan-thread message is human-authored — i.e. a human

            requested changes and the chat-dispatch hook guarantees the agent

            answers, so "action required" attention cues can pause. Mirrors the

            detail panel''s ``awaitingRevision`` derivation (an agent reply — even

            without a revision — hands the turn back). Annotated on list / `/me`;

            False elsewhere.'
          readOnly: true
        status_locked:
          type: boolean
          description: 'True while the DB status is ``waiting_approval`` — server-managed

            by the plan gate. Clients key status-control read-only-ness on THIS

            (not on the rendered ``status``, which is masked to ``in_progress``

            for viewers without decision rights and would otherwise re-enable

            controls whose PATCH the gate rejects).'
          readOnly: true
        recurrence_summary:
          type: object
          nullable: true
          properties:
            uuid:
              type: string
              format: uuid
            is_template:
              type: boolean
            is_enabled:
              type: boolean
            frequency:
              type: string
            interval:
              type: integer
            weekdays:
              type: array
              items:
                type: string
            monthly_mode:
              type: string
            weekday_ordinal:
              type: integer
              nullable: true
            cron_expression:
              type: string
              nullable: true
            starts_at:
              type: string
              format: date-time
              nullable: true
            ends_mode:
              type: string
            ends_on:
              type: string
              format: date
              nullable: true
            ends_after_count:
              type: integer
              nullable: true
            overlap_policy:
              type: string
            next_run_at:
              type: string
              format: date-time
              nullable: true
            last_run_at:
              type: string
              format: date-time
              nullable: true
            occurrences_created:
              type: integer
          readOnly: true
        plan:
          type: object
          nullable: true
          properties:
            uuid:
              type: string
              format: uuid
            version:
              type: integer
            status:
              type: string
              enum:
              - pending_approval
              - approved
              - rejected
              - superseded
            body:
              type: string
            feedback:
              type: string
            approver_kind:
              type: string
              enum:
              - task_participants
              - merchant_of_record
            decided_by_name:
              type: string
              nullable: true
            decided_at:
              type: string
              format: date-time
              nullable: true
            created:
              type: string
              format: date-time
            viewer_can_decide:
              type: boolean
            versions:
              type: array
              items:
                type: object
                properties:
                  uuid:
                    type: string
  

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