> ## 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.

# Resequence a train

> Used for resequence of active trains. For editing the consist of Pending trains, use UpdateWorkOrder.



## OpenAPI

````yaml /user-docs/api-reference/work_order.swagger.json post /t/v1/resequence-train
openapi: 3.0.1
info:
  title: protobuf/arms/work_order.proto
  version: version not set
servers:
  - description: Production (US)
    url: https://api-lg-k-h1.arms.cedarai.com
  - description: Production (EU)
    url: https://api-lg-k-h1.arms.cedarai.se
security:
  - ApiKeyAuth: []
    AssumeUserAuth: []
tags:
  - name: WorkOrderService
paths:
  /t/v1/resequence-train:
    post:
      tags:
        - WorkOrderService
      summary: Resequence a train
      description: >-
        Used for resequence of active trains. For editing the consist of Pending
        trains, use UpdateWorkOrder.
      operationId: ReSequenceTrain
      parameters:
        - description: Carrier ID
          in: header
          name: Carrier
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/armsReSequenceTrainRequest'
        description: >-
          Request message for resequencing a train's consist order. Used when
          the actual train consist order differs from the planned order, such as
          after an EDI scanner detects changes.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
          description: A successful response.
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rpcStatus'
          description: An unexpected error response.
components:
  schemas:
    armsReSequenceTrainRequest:
      description: >-
        Request message for resequencing a train's consist order. Used when the
        actual train consist order differs from the planned order, such as after
        an EDI scanner detects changes.
      example:
        auto_setout_pickup: true
        exception: Scanner detected different consist order
        ignore_cars_with_completed_setout: false
        train_consist_equipment_uuids:
          - uuid_car1
          - uuid_car2
          - uuid_car3
        work_order_id: '12345'
      properties:
        autoSetoutPickup:
          description: >-
            Whether to automatically pickup new cars being added to consist and
            setout cars being removed from consist.
          type: boolean
        exception:
          description: >-
            Optional exception message that will be set on any Pickup requests
            that come from the resequence.
          type: string
        ignoreCarsWithCompletedSetout:
          description: >-
            Whether to ignore cars that have a completed setout task when
            resequencing.These cars will be removed from the consist.
          type: boolean
        lostTrackId:
          description: >-
            Track ID where lost equipment should be placed if detected during
            resequencing.
          format: int64
          type: string
        trainConsistEquipmentUuids:
          description: >-
            Ordered list of equipment UUIDs representing the new consist
            sequence of the train.
          items:
            type: string
          type: array
        workOrderId:
          type: string
      required:
        - autoSetoutPickup
        - trainConsistEquipmentUuids
        - workOrderId
      title: Resequence Train Request
      type: object
    rpcStatus:
      properties:
        code:
          format: int32
          type: integer
        details:
          items:
            $ref: '#/components/schemas/protobufAny'
          type: array
        message:
          type: string
      type: object
    protobufAny:
      additionalProperties:
        type: object
      properties:
        '@type':
          type: string
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: x-arms-api-key
      type: apiKey
    AssumeUserAuth:
      in: header
      name: x-arms-assume-user
      type: apiKey

````