Skip to main content

Overview

The CreateOrderResponse model is returned when an order is successfully processed. It confirms the order details and indicates how many preparation tasks were created in the kitchen.

Fields

tableNumber
string
required
The table number for which the order was created. This matches the table number from the request.
tasksCreated
integer
required
The number of kitchen tasks that were created from this order. Each task represents work assigned to a specific kitchen station.
Tasks are automatically distributed to appropriate stations based on product types:
  • DRINK products → BAR station
  • HOT_DISH products → HOT_KITCHEN station
  • COLD_DISH products → COLD_KITCHEN station
message
string
required
A success message confirming the order was processed. Typically returns "Order processed successfully".

Example

{
  "tableNumber": "12",
  "tasksCreated": 3,
  "message": "Order processed successfully"
}

Usage Context

This response is returned with HTTP status 201 Created when you successfully POST to the /api/orders endpoint.

Example Request/Response Flow

Request:
POST /api/orders
{
  "tableNumber": "12",
  "products": [
    {"name": "Caesar Salad", "type": "COLD_DISH"},
    {"name": "Grilled Salmon", "type": "HOT_DISH"},
    {"name": "Mojito", "type": "DRINK"}
  ]
}
Response (201 Created):
{
  "tableNumber": "12",
  "tasksCreated": 3,
  "message": "Order processed successfully"
}

Build docs developers (and LLMs) love