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

# Update Order

> Update an existing order's items and details



## OpenAPI

````yaml /openapi.json put /api/v1/orders
openapi: 3.0.0
info:
  title: Authentication API
  description: API for user authentication and token generation
  version: 1.0.0
servers:
  - url: https://api.retailreadyai.com
    description: Production server
  - url: https://stg.retailreadyai.com
    description: Staging server
security: []
paths:
  /api/v1/orders:
    put:
      tags:
        - Orders
      summary: Update Order
      description: Update an existing order's items and details
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                po_number:
                  type: string
                  description: Purchase order number
                  example: some-po-number
                picksheet_code:
                  type: string
                  description: Picksheet Code/Warehouse Order Number
                  example: some-picksheet-code
                brand_id:
                  type: string
                  format: uuid
                  description: UUID of the brand
                  example: 14e517b3-5091-4748-8a25-c497aec2ce98
                facility_id:
                  type: string
                  format: uuid
                  description: UUID of the facility
                  example: 14e517b3-5091-4748-8a25-c497aec2ce9z
                retailer_id:
                  type: string
                  format: uuid
                  description: UUID of the retailer
                  example: 14e517b3-5091-4748-8a25-c497aec2ce98
                items:
                  type: array
                  items:
                    type: object
                    properties:
                      quantity:
                        type: integer
                        description: Quantity of items
                        example: 5
                      sku:
                        type: string
                        description: Stock Keeping Unit
                        example: pillow-sku
                      upc:
                        type: string
                        description: Universal Product Code
                        example: pillow-upc
                      trackers:
                        type: array
                        minItems: 1
                        description: >-
                          Splits the item's quantity into separate lots that add
                          up to the item's total quantity
                        items:
                          type: object
                          properties:
                            lot_number:
                              type: string
                              nullable: true
                              description: Lot number
                              example: lot_number1
                            exp_date:
                              type: string
                              format: date
                              nullable: true
                              description: Expiration date
                              example: '2027-04-22'
                            quantity:
                              type: integer
                              description: Number of units in this lot
                              example: 5
                            pass_through:
                              type: object
                              nullable: true
                              description: >-
                                Optional per-tracker pass-through data (e.g.
                                lot_id)
                              example:
                                lot_id: lot_id_1
                          required:
                            - quantity
                      pass_through:
                        type: object
                        nullable: true
                        description: >-
                          Optional item-level pass-through data that will be
                          stored with the item
                        example:
                          line_id: line_1
                          stock_number: stock_number_1
                          pull_id: pull_id_1
                    required:
                      - sku
                      - upc
                      - quantity
                      - trackers
              required:
                - picksheet_code
                - brand_id
                - facility_id
                - retailer_id
                - items
            example:
              po_number: some-po-number
              picksheet_code: some-picksheet-code
              brand_id: 14e517b3-5091-4748-8a25-c497aec2ce98
              facility_id: 14e517b3-5091-4748-8a25-c497aec2ce9z
              retailer_id: 14e517b3-5091-4748-8a25-c497aec2ce98
              items:
                - quantity: 5
                  sku: pillow-sku
                  upc: pillow-upc
                  trackers:
                    - lot_number: lot_number1
                      exp_date: '2027-04-22'
                      quantity: 5
                      pass_through:
                        lot_id: lot_id_1
                  pass_through:
                    line_id: line_1
                    stock_number: stock_number_1
                    pull_id: pull_id_1
      responses:
        '200':
          description: Order updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Order updated successfully
                  data:
                    type: object
                    example:
                      order_id: 14e517b3-5091-4748-8a25-c497aec2ce98
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        example: INVALID_REQUEST
                      details:
                        type: string
                        example: Picksheet code is required
              example:
                message: Invalid request body
                error:
                  code: INVALID_REQUEST
                  details: Picksheet code is required
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````