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

# Complete class list tasks

> Marks one or more class list tasks as completed.

Usage notes:
- Each item in the request specifies a taskId and optionally a finalTrackId (the track the equipment was moved to).
- When all tasks on a class list are completed, the class list is automatically archived.
- Use this endpoint after moving equipment (via the Move Equipment API) to mark the corresponding class list tasks as done.
- The completedAt timestamp defaults to the current time if not specified.



## OpenAPI

````yaml /user-docs/api-reference/external-openapi.json post /ims/work-orders/tasks/complete
openapi: 3.1.0
info:
  title: ARMS External API
  version: 1.0.0
  description: >-
    OpenAPI specification generated from external API schemas. Endpoints require
    query parameter carrierId and headers x-arms-api-key and x-arms-assume-user.
  license:
    name: Proprietary
    url: https://cedarai.com
servers:
  - url: https://api-lg.arms.cedarai.com
    description: Production (US)
  - url: https://api-lg.arms.cedarai.se
    description: Production (EU)
security:
  - ApiKeyAuth: []
    AssumeUser: []
paths:
  /ims/work-orders/tasks/complete:
    post:
      summary: Complete class list tasks
      description: >-
        Marks one or more class list tasks as completed.


        Usage notes:

        - Each item in the request specifies a taskId and optionally a
        finalTrackId (the track the equipment was moved to).

        - When all tasks on a class list are completed, the class list is
        automatically archived.

        - Use this endpoint after moving equipment (via the Move Equipment API)
        to mark the corresponding class list tasks as done.

        - The completedAt timestamp defaults to the current time if not
        specified.
      operationId: completeClassListTasks
      parameters:
        - $ref: '#/components/parameters/CarrierId'
        - $ref: '#/components/parameters/ViewAsUserGroup'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CompleteClassListTasksInput'
            examples:
              completeSingleTask:
                summary: Complete a single task
                value:
                  carrierId: 1234
                  items:
                    - taskId: 5678
                      finalTrackId: 42
              completeMultipleTasks:
                summary: Complete multiple tasks at once
                value:
                  carrierId: 1234
                  items:
                    - taskId: 5678
                      finalTrackId: 42
                    - taskId: 5679
                      finalTrackId: 43
              completeWithTimestamp:
                summary: Complete with explicit timestamp
                value:
                  carrierId: 1234
                  completedAt: '2026-03-25T20:00:00Z'
                  items:
                    - taskId: 5678
                      finalTrackId: 42
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompleteClassListTasksOutput'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '500':
          description: Internal Server Error
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    CarrierId:
      name: carrierId
      in: query
      required: true
      schema:
        type: integer
      description: Carrier identifier; required for all endpoints
    ViewAsUserGroup:
      name: viewAsUserGroup
      in: query
      required: false
      schema:
        type: string
      description: Optional user group context
  schemas:
    CompleteClassListTasksInput:
      type: object
      required:
        - carrierId
        - items
      description: Request body for completing class list tasks.
      properties:
        carrierId:
          type: integer
          description: Carrier identifier.
        items:
          type: array
          description: List of tasks to complete.
          items:
            $ref: '#/components/schemas/CompleteSingleTaskInput'
        completedAt:
          type: string
          format: date-time
          description: Override completion timestamp. Defaults to current time if omitted.
        noReturn:
          type: boolean
          default: false
          description: If true, do not return the updated tasks in the response.
    CompleteClassListTasksOutput:
      type: object
      description: Response after completing class list tasks.
      properties:
        tasks:
          type: array
          description: Updated tasks after completion.
          items:
            $ref: '#/components/schemas/ClassListTask'
    Error:
      type: object
      properties:
        message:
          type: string
    CompleteSingleTaskInput:
      type: object
      required:
        - taskId
      description: Completion details for a single task.
      properties:
        taskId:
          type: integer
          description: ID of the task to complete.
        finalTrackId:
          type: integer
          description: Track the equipment was moved to.
        finalSpotId:
          type: integer
          description: Spot the equipment was moved to.
        completedById:
          type: integer
          description: Service template ID that performed the completion.
    ClassListTask:
      type: object
      description: >-
        A task within a class list representing a switching operation for a
        single piece of equipment.
      properties:
        resourceId:
          type: integer
        uuid:
          type: string
          description: UUID that complements the legacy numeric resourceId.
        carrier:
          $ref: '#/components/schemas/CarrierResource'
        equipment:
          $ref: '#/components/schemas/EquipmentResource'
        equipmentId:
          type: integer
          description: Equipment resource ID
        taskType:
          type: string
          enum:
            - SWITCH
          description: Type of task (always SWITCH for class lists)
        status:
          type: string
          enum:
            - NOT_STARTED
            - COMPLETED
            - CANCELED
          description: Status of the task
        currentTrack:
          $ref: '#/components/schemas/GroupingResource'
        assignedTrack:
          $ref: '#/components/schemas/GroupingResource'
        assignedSpot:
          $ref: '#/components/schemas/SpotResource'
        finalTrack:
          $ref: '#/components/schemas/GroupingResource'
        finalSpot:
          $ref: '#/components/schemas/SpotResource'
        createdAt:
          type: string
          format: date-time
          description: When the task was created
        completedAt:
          type: string
          format: date-time
          description: When the task was completed
        customer:
          $ref: '#/components/schemas/CustomerResource'
    CarrierResource:
      type: object
      properties:
        resourceType:
          type: string
          enum:
            - Carrier
        resourceId:
          type: integer
        uuid:
          type: string
          description: UUID that complements the legacy numeric resourceId.
        carrierCode:
          type: string
        name:
          type: string
    EquipmentResource:
      type: object
      properties:
        resourceType:
          type: string
          enum:
            - Equipment
        resourceId:
          type: integer
        uuid:
          type: string
          description: UUID that complements the legacy numeric resourceId.
        equipmentInitial:
          type: string
        equipmentNumber:
          type: integer
    GroupingResource:
      type: object
      properties:
        resourceType:
          type: string
          enum:
            - Grouping
        resourceId:
          type: integer
        uuid:
          type: string
          description: UUID that complements the legacy numeric resourceId.
        name:
          type: string
        groupingType:
          type: string
        sortOrder:
          type: integer
        colorToken:
          type: string
    SpotResource:
      type: object
      properties:
        resourceType:
          type: string
          enum:
            - Spot
        resourceId:
          type: integer
        uuid:
          type: string
          description: UUID that complements the legacy numeric resourceId.
        name:
          type: string
    CustomerResource:
      type: object
      properties:
        resourceType:
          type: string
          enum:
            - Customer
        resourceId:
          type: integer
        uuid:
          type: string
          description: UUID that complements the legacy numeric resourceId.
        name:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-arms-api-key
      description: Your ARMS API key
    AssumeUser:
      type: apiKey
      in: header
      name: x-arms-assume-user
      description: Email of a user assigned to the appropriate user group

````