Skip to main content

Overview

The TaskResponse model represents a single preparation task assigned to a kitchen station. Tasks are automatically created when orders are processed and distributed to the appropriate station based on product types.

Fields

id
long
required
Unique identifier for the task.
orderId
long
required
The ID of the order this task belongs to. Multiple tasks can belong to the same order if products need to be prepared at different stations.
station
string
required
The kitchen station responsible for this task.Possible values:
  • BAR - For drinks
  • HOT_KITCHEN - For hot dishes
  • COLD_KITCHEN - For cold dishes
tableNumber
string
required
The table number this task is for. Used to deliver the prepared items to the correct table.
products
array
required
Array of products included in this task. All products in a task are prepared at the same station.
createdAt
string (ISO 8601)
required
Timestamp when the task was created.Format: YYYY-MM-DDTHH:mm:ss
status
string
required
Current status of the task.Possible values:
  • PENDING - Task is waiting to be started
  • IN_PREPARATION - Task is currently being prepared
  • COMPLETED - Task has been finished
startedAt
string (ISO 8601)
Timestamp when preparation started. Will be null if the task hasn’t been started yet.Format: YYYY-MM-DDTHH:mm:ss
completedAt
string (ISO 8601)
Timestamp when the task was completed. Will be null if the task hasn’t been completed yet.Format: YYYY-MM-DDTHH:mm:ss

Task Lifecycle

1

Task Created

Task is created with status PENDING when an order is submitted. The createdAt timestamp is set.
2

Preparation Started

When a kitchen worker starts preparing the task, status changes to IN_PREPARATION and startedAt is set.
3

Task Completed

When preparation is finished, status changes to COMPLETED and completedAt is set.

Example - Pending Task

{
  "id": 101,
  "orderId": 45,
  "station": "HOT_KITCHEN",
  "tableNumber": "12",
  "products": [
    {
      "name": "Grilled Salmon",
      "type": "HOT_DISH"
    }
  ],
  "createdAt": "2026-03-06T14:30:00",
  "status": "PENDING",
  "startedAt": null,
  "completedAt": null
}

Example - Task In Preparation

{
  "id": 102,
  "orderId": 45,
  "station": "BAR",
  "tableNumber": "12",
  "products": [
    {
      "name": "Mojito",
      "type": "DRINK"
    },
    {
      "name": "Margarita",
      "type": "DRINK"
    }
  ],
  "createdAt": "2026-03-06T14:30:00",
  "status": "IN_PREPARATION",
  "startedAt": "2026-03-06T14:32:15",
  "completedAt": null
}

Example - Completed Task

{
  "id": 103,
  "orderId": 45,
  "station": "COLD_KITCHEN",
  "tableNumber": "12",
  "products": [
    {
      "name": "Caesar Salad",
      "type": "COLD_DISH"
    }
  ],
  "createdAt": "2026-03-06T14:30:00",
  "status": "COMPLETED",
  "startedAt": "2026-03-06T14:31:00",
  "completedAt": "2026-03-06T14:35:30"
}

Build docs developers (and LLMs) love