Skip to main content

Overview

The CreateOrderRequest model is used to submit a new order to the kitchen. It contains the table number and a list of products to be prepared.

Fields

tableNumber
string
required
The table number where the order was placed. This is used to identify which table the prepared items should be delivered to.
products
ProductRequest[]
required
Array of products included in the order. Each product must specify a name and type.

Validation Rules

  • tableNumber: Must be provided and non-null
  • products: Must be a non-empty array
  • product.name: Must be provided for each product
  • product.type: Must be one of the valid ProductType enum values (DRINK, HOT_DISH, COLD_DISH)
The product type is case-sensitive and must match exactly one of the enum values. Invalid types will result in a validation error.

Example

{
  "tableNumber": "12",
  "products": [
    {
      "name": "Caesar Salad",
      "type": "COLD_DISH"
    },
    {
      "name": "Grilled Salmon",
      "type": "HOT_DISH"
    },
    {
      "name": "Mojito",
      "type": "DRINK"
    }
  ]
}

Build docs developers (and LLMs) love