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

# Retrieve a list of dishes

> Retrieve a list of dishes and the dish details.

The client app will display the `name`, `description`, and `price` and will use the `category` to determine where to display the dish in the menu. The server will check the dish's `ingredient_id` to ensure essential ingredients are in stock (if not in stock, the dish will be disabled in the client app). 

The KDS will use the `station`, `preparation_time`, and `ingredients` array when prioritizing and prepping the dish. 




## OpenAPI

````yaml openapi.yaml get /dishes
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:
  /dishes:
    get:
      tags:
        - Dishes
      summary: Retrieve a list of dishes
      description: >
        Retrieve a list of dishes and the dish details.


        The client app will display the `name`, `description`, and `price` and
        will use the `category` to determine where to display the dish in the
        menu. The server will check the dish's `ingredient_id` to ensure
        essential ingredients are in stock (if not in stock, the dish will be
        disabled in the client app). 


        The KDS will use the `station`, `preparation_time`, and `ingredients`
        array when prioritizing and prepping the dish. 
      operationId: getDishList
      parameters:
        - name: sort
          in: query
          description: >-
            Sort the list in the response by a specific property. Used with the
            `order` parameter.
          schema:
            type: string
          example: name
        - name: order
          in: query
          description: >-
            Set the sort order to `asc` for ascending or `desc` for descending.
            Must be used with the `sort` parameter.
          schema:
            type: string
          example: asc
        - name: fields
          in: query
          description: Restrict which properties are returned in the response.
          schema:
            type: string
          example: name|ingredients|station
        - name: filter
          in: query
          description: >-
            Filter the response to include only items that have properties equal
            to the specified value.
          schema:
            type: string
            example: created_at.gt~2024-05-07|price.lte~19.99
        - name: limit
          in: query
          description: Limit the number of objects in the response.
          schema:
            type: integer
            maximum: 30
          example: 10
        - name: offset
          in: query
          description: Offsets the start of the list by the set value. Defaults to 0.
          schema:
            type: integer
            example: 0
      responses:
        '200':
          description: Request successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/Dish'
                  total_results:
                    type: integer
                    example: 20
                    description: >-
                      The total number of objects in the results array that were
                      returned in the response.
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '403':
          description: Access denied
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    Dish:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Id'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        name:
          type: string
          example: Risotto alla Milanese
          description: The name of the dish that appears in the client app and for the KDS.
        description:
          $ref: '#/components/schemas/Description'
        category:
          $ref: '#/components/schemas/Category'
        image_name:
          $ref: '#/components/schemas/ImageName'
        ingredients:
          $ref: '#/components/schemas/Ingredients'
        preparation_time:
          $ref: '#/components/schemas/Price'
        price:
          $ref: '#/components/schemas/Price'
        station:
          $ref: '#/components/schemas/Station'
    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
    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` 
    Description:
      type: string
      example: A description of the resource.
    Category:
      type: string
      enum:
        - Appetizer
        - Main Course
        - Dessert
        - Drinks
      example: Main Course
      description: >
        Used to indicate where in the client app the dish should appear for
        ordering and used by the expediter to prioritize dishes for preparation.
    ImageName:
      type: string
      description: >
        The name of the image file related to a specific dish. When present, the
        image for the dish will appear in the client app with the other dish
        details.
      example: burger
    Ingredients:
      type: array
      description: The list of ingredients related to a specific dish.
      items:
        type: object
        properties:
          ingredient_id:
            type: string
            example: 66294b2a4475a41f3e709bc5
            description: >-
              The unique ingredient identifier, generated when the ingredient
              was created.
          is_essential:
            type: boolean
            example: true
            description: >
              When `true` the ingredient is required to prepare the dish. For
              essential ingredients, if the ingredient quantity is a
              non-positive value, the client app will disable the related dishes
              in the client app.
      example:
        - ingredient_id: 66294b2a4475a41f3e709bc5
          is_essential: true
        - ingredient_id: 66294b2a4475a41f3e709bc6
          is_essential: true
        - ingredient_id: 66294b2a4475a41f3e709bc7
          is_essential: false
    Price:
      type: number
      format: float
      example: 999
      description: The price used by the client app to calculate order cost.
    Station:
      type: string
      description: >
        The prep station responsible for preparing the dish. This value is used
        by the expeditor to prioritize and triage order preparation for the KDS
        stations.
      enum:
        - cold
        - hot
        - beverages
      example: hot

````