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

# Transition order status

> Transitions an order to a new RFC status with appropriate side effects.

Available transitions:
- **received**: Reset all pick list items and equipment to pending. Deletes dispatch actions and bag items.
- **staged**: Mark pick lists as completed, move carts to receiving zone.
- **arrived**: Assign portal, execute staged actions, call customer_arrived RPC (creates dispatch action).
- **completed**: Same as the complete order endpoint.



## OpenAPI

````yaml api-reference/v1/openapi.yaml post /v1/orders/{id}/transition
openapi: 3.1.0
info:
  title: Goods API
  version: 1.0.0
  description: >-
    API for Goods grocery operations - scanner app, admin dashboard, and
    customer features
  contact:
    name: Goods Team
    url: https://goods.app
servers:
  - url: http://localhost:3000
    description: Local development
  - url: https://dev.api.switchyard.run
    description: Development
  - url: https://api.switchyard.run
    description: Production
security: []
tags:
  - name: v1
    description: API v1 - unified domain-based endpoints
  - name: Scanner
    description: Scanner app endpoints for drivers and pickers
  - name: Sweeps
    description: Sweep management - retail store pickup operations
  - name: RFC Picks
    description: Ready-for-checkout picking operations
  - name: Inventory
    description: Inventory management and barcode lookup
  - name: Admin
    description: Admin dashboard endpoints
  - name: Orders
    description: Order management
  - name: Products
    description: Product catalog management
  - name: Notifications
    description: Push, email, SMS, and Slack notification management
paths:
  /v1/orders/{id}/transition:
    post:
      tags:
        - Orders
      summary: Transition order status
      description: >-
        Transitions an order to a new RFC status with appropriate side effects.


        Available transitions:

        - **received**: Reset all pick list items and equipment to pending.
        Deletes dispatch actions and bag items.

        - **staged**: Mark pick lists as completed, move carts to receiving
        zone.

        - **arrived**: Assign portal, execute staged actions, call
        customer_arrived RPC (creates dispatch action).

        - **completed**: Same as the complete order endpoint.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                target_status:
                  type: string
                  enum:
                    - received
                    - staged
                    - arrived
                    - completed
                    - cancelled
                  description: Target RFC status to transition the order to
                portal_id:
                  type: string
                  description: Pickup portal ID, required when target_status is "arrived"
              required:
                - target_status
      responses:
        '200':
          description: Order transitioned successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  order_id:
                    type: string
                    format: uuid
                  message:
                    type: string
                  target_status:
                    type: string
                required:
                  - success
                  - order_id
                  - message
                  - target_status
        '400':
          description: Invalid transition or missing required fields
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Not found
                required:
                  - error
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Not found
                required:
                  - error
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error message
                    example: Not found
                required:
                  - error

````