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

# Update a specific order

> Add or remove `dish_ids` or update the order's `priority` and `status`. 




## OpenAPI

````yaml openapi.yaml put /orders/{id}
openapi: 3.0.3
info:
  title: Point of Service (POS) API
  version: '1.0'
  description: >
    An example of a restaurant point of sale API, used to learn how to make API
    calls using Swagger, Github codespaces, and Postman, and to learn API
    documentation best practices.
  contact:
    name: Course Discord server
    url: https://discord.gg/dPsnz5u9
    email: mark.wentowski@docsgeek.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev
    description: The server URL used for the point of service API
    variables:
      gh-codespaces-server-url:
        default: https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev
        description: >-
          Codespace URL used by Sarah Holdgrafer for Mastering API Documentation
          course.
  - url: http://localhost:80/
    description: Local URL for testing
security: []
tags:
  - name: Orders
    description: Methods for creating and managing orders in the client app.
  - name: Dishes
    description: Methods for creating and managing dishes in the client app.
  - name: Ingredients
    description: Methods used for creating and managing ingredients in the client app .
  - name: Users
    description: >-
      Methods for creating and managing the user accounts allowed to access the
      client app.
  - name: Auth
    description: Authentication endpoints for the client app (all methods use Basic auth).
paths:
  /orders/{id}:
    put:
      tags:
        - Orders
      summary: Update a specific order
      description: |
        Add or remove `dish_ids` or update the order's `priority` and `status`. 
      operationId: putOrder
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          example: 66294b2a4475a41f3e709bcd
          description: The unique order identifier, generated when the order was created.
      requestBody:
        $ref: '#/components/requestBodies/UpdateOrderRequest'
      responses:
        '200':
          description: Order updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Order'
                  total_results:
                    type: integer
                    example: 1
        '204':
          description: Request successful
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '403':
          description: Access denied
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Unable to complete request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
      security:
        - AccessToken: []
components:
  requestBodies:
    UpdateOrderRequest:
      description: >
        The request body to update an order requires only the properties to be
        updated.


        Order properties that can be updated: `dish_ids`, `priority`, and
        `status`.
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              dish_ids:
                $ref: '#/components/schemas/DishIds'
              priority:
                $ref: '#/components/schemas/Priority'
              status:
                $ref: '#/components/schemas/Status'
  schemas:
    Order:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Id'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
        name:
          type: string
          pattern: ^[^\s]*$
          example: John
          description: The name associated with the order, which will appear in the KDS.
        table_number:
          $ref: '#/components/schemas/TableNumber'
        dish_ids:
          $ref: '#/components/schemas/DishIds'
        special_requests:
          $ref: '#/components/schemas/SpecialRequests'
        priority:
          $ref: '#/components/schemas/Priority'
        scheduled_at:
          $ref: '#/components/schemas/ScheduledAt'
        status:
          $ref: '#/components/schemas/Status'
    Problem:
      type: object
      properties:
        title:
          type: string
          description: >-
            A short summary of the error or problem encountered with the
            request.
          example: Human-readable error title.
        detail:
          type: string
          description: >-
            A more detailed description of the error or problem to indicate the
            source and the solution, if possible.
          example: Human-readable error details.
      required:
        - title
        - detail
    DishIds:
      type: array
      items:
        type: string
      example:
        - 692a4a34a46ecf001f35ac6f
        - 6a4a857c022eb7001f9b8972
        - 6b7c2441a0db43001f9bf377
      description: |
        The list of unique dish ids included in an order.
    Priority:
      type: integer
      minimum: 0
      maximum: 5
      default: 3
      description: >
        The priority of an order. Defaults to 3 but can be changed as needed.
        Highest priority is 0, lowest is 5.


        Orders will often be sorted by priority to ensure highest priority
        orders are prepared first. 
    Status:
      type: string
      nullable: true
      enum:
        - Draft
        - Received
        - In Progress
        - Ready for Assembly
        - On the Way
        - Ready for Pickup
      example: Received
      description: >
        Indicates the status of the order preparation. 


        The expeditor will use this field to sort incoming orders and determine
        what dishes are ready to be prepared and assembled by station. 
    Id:
      type: string
      example: 674d0bf5c28b69001f8e03a1
      readOnly: true
      description: >
        A unique alpha-numeric string generated by the system when creating a
        resource (e.g., dishes, ingredients, etc). Ids are required for
        retrieving the properties of a specific resource.
    CreatedAt:
      type: string
      format: date-time
      example: '2024-04-22T10:00:00Z'
      readOnly: true
      description: >
        The date and time the resource was created. Timestamp uses ISO 8601
        format, Ex: `2025-04-05T14:55:03.824Z` 
    UpdatedAt:
      type: string
      format: date-time
      example: '2024-04-22T10:00:00Z'
      readOnly: true
      description: |
        The date and time the resource was last updated. 

        Timestamp uses ISO 8601 format, Ex: `2025-04-05T14:55:03.824Z` 
    TableNumber:
      type: integer
      example: 8
      nullable: true
      description: The table number that should be associated with an order.
    SpecialRequests:
      type: string
      nullable: true
      description: >
        Indicates special requests for an order, like excluding an ingredient
        due to allergy. 
    ScheduledAt:
      type: string
      format: date-time
      description: >
        Indicate the date and time an order should be ready. These orders fall
        outside the typical order flow as they may be orders for later in the
        day or for a future date.


        Timestamp uses ISO 8601 format, Ex: `2025-04-05T14:55:03.824Z` 
      nullable: true
      example: null
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer

````