> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usequanta.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set Task Completion



## OpenAPI

````yaml https://app.usequanta.com/openapi/quanta-services-api/openapi.json put /admin_api/tasks/{occurrence_qid}/completion
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://app.usequanta.com
    description: Production
security:
  - HTTPBearer: []
paths:
  /admin_api/tasks/{occurrence_qid}/completion:
    put:
      tags:
        - tasks
        - quanta-services-api
      summary: Set Task Completion
      operationId: setTaskCompletion
      parameters:
        - name: occurrence_qid
          in: path
          required: true
          schema:
            type: string
            title: Occurrence Qid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskCompletionRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskDetailResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TaskCompletionRequest:
      properties:
        done:
          type: boolean
          title: Done
        reason:
          anyOf:
            - type: string
              maxLength: 500
              minLength: 1
            - type: 'null'
          title: Reason
      additionalProperties: false
      type: object
      required:
        - done
      title: TaskCompletionRequest
    TaskDetailResponse:
      properties:
        occurrence_qid:
          type: string
          title: Occurrence Qid
        leaf_key:
          type: string
          title: Leaf Key
        leaf_version_qid:
          type: string
          title: Leaf Version Qid
        title:
          type: string
          title: Title
        enabled:
          type: boolean
          title: Enabled
        stage:
          $ref: '#/components/schemas/TaskStage'
        display_order:
          anyOf:
            - type: integer
            - type: 'null'
          title: Display Order
        schedule_type:
          $ref: '#/components/schemas/TaskScheduleType'
        schedule_offset_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Schedule Offset Days
        auto_run:
          type: boolean
          title: Auto Run
        state:
          $ref: '#/components/schemas/TaskOccurrenceState'
        due_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Due At
        done_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Done At
        latest_run_qid:
          anyOf:
            - type: string
            - type: 'null'
          title: Latest Run Qid
        run_count:
          type: integer
          title: Run Count
        open_action_count:
          type: integer
          title: Open Action Count
        workbook_period_qid:
          type: string
          title: Workbook Period Qid
        done_by_user_qid:
          anyOf:
            - type: string
            - type: 'null'
          title: Done By User Qid
        leaf_version_no:
          type: integer
          title: Leaf Version No
        instructions_md:
          type: string
          title: Instructions Md
        period_key:
          type: string
          title: Period Key
        period_name:
          type: string
          title: Period Name
        feedback:
          items:
            $ref: '#/components/schemas/TaskFeedbackResponse'
          type: array
          title: Feedback
      type: object
      required:
        - occurrence_qid
        - leaf_key
        - leaf_version_qid
        - title
        - enabled
        - stage
        - display_order
        - schedule_type
        - schedule_offset_days
        - auto_run
        - state
        - due_at
        - done_at
        - latest_run_qid
        - run_count
        - open_action_count
        - workbook_period_qid
        - done_by_user_qid
        - leaf_version_no
        - instructions_md
        - period_key
        - period_name
        - feedback
      title: TaskDetailResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TaskStage:
      type: string
      enum:
        - RECONCILIATIONS
        - MANUAL_TASKS
        - REVIEWS
        - FINAL_REVIEW
      title: TaskStage
    TaskScheduleType:
      type: string
      enum:
        - MANUAL
        - PERIOD_END_OFFSET
      title: TaskScheduleType
    TaskOccurrenceState:
      type: string
      enum:
        - UPCOMING
        - READY
        - RUNNING
        - NEEDS_REVIEW
        - BLOCKED
        - FAILED
        - COMPLETE
      title: TaskOccurrenceState
    TaskFeedbackResponse:
      properties:
        qid:
          type: string
          title: Qid
        occurrence_qid:
          type: string
          title: Occurrence Qid
        feedback:
          type: string
          title: Feedback
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - qid
        - occurrence_qid
        - feedback
        - created_at
      title: TaskFeedbackResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Quanta Services API scoped bearer token. Supported only on Services API
        routes.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.