curl --request POST \
--url https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Risotto alla Milanese",
"description": "A description of the resource.",
"category": "Main Course",
"image_name": "burger",
"ingredients": [
{
"ingredient_id": "66294b2a4475a41f3e709bc5",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc6",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc7",
"is_essential": false
}
],
"preparation_time": 45,
"price": 999,
"station": "hot"
}
'import requests
url = "https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes"
payload = {
"name": "Risotto alla Milanese",
"description": "A description of the resource.",
"category": "Main Course",
"image_name": "burger",
"ingredients": [
{
"ingredient_id": "66294b2a4475a41f3e709bc5",
"is_essential": True
},
{
"ingredient_id": "66294b2a4475a41f3e709bc6",
"is_essential": True
},
{
"ingredient_id": "66294b2a4475a41f3e709bc7",
"is_essential": False
}
],
"preparation_time": 45,
"price": 999,
"station": "hot"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Risotto alla Milanese',
description: 'A description of the resource.',
category: 'Main Course',
image_name: 'burger',
ingredients: [
{ingredient_id: '66294b2a4475a41f3e709bc5', is_essential: true},
{ingredient_id: '66294b2a4475a41f3e709bc6', is_essential: true},
{ingredient_id: '66294b2a4475a41f3e709bc7', is_essential: false}
],
preparation_time: 45,
price: 999,
station: 'hot'
})
};
fetch('https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Risotto alla Milanese',
'description' => 'A description of the resource.',
'category' => 'Main Course',
'image_name' => 'burger',
'ingredients' => [
[
'ingredient_id' => '66294b2a4475a41f3e709bc5',
'is_essential' => true
],
[
'ingredient_id' => '66294b2a4475a41f3e709bc6',
'is_essential' => true
],
[
'ingredient_id' => '66294b2a4475a41f3e709bc7',
'is_essential' => false
]
],
'preparation_time' => 45,
'price' => 999,
'station' => 'hot'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes"
payload := strings.NewReader("{\n \"name\": \"Risotto alla Milanese\",\n \"description\": \"A description of the resource.\",\n \"category\": \"Main Course\",\n \"image_name\": \"burger\",\n \"ingredients\": [\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc5\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc6\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc7\",\n \"is_essential\": false\n }\n ],\n \"preparation_time\": 45,\n \"price\": 999,\n \"station\": \"hot\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Risotto alla Milanese\",\n \"description\": \"A description of the resource.\",\n \"category\": \"Main Course\",\n \"image_name\": \"burger\",\n \"ingredients\": [\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc5\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc6\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc7\",\n \"is_essential\": false\n }\n ],\n \"preparation_time\": 45,\n \"price\": 999,\n \"station\": \"hot\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Risotto alla Milanese\",\n \"description\": \"A description of the resource.\",\n \"category\": \"Main Course\",\n \"image_name\": \"burger\",\n \"ingredients\": [\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc5\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc6\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc7\",\n \"is_essential\": false\n }\n ],\n \"preparation_time\": 45,\n \"price\": 999,\n \"station\": \"hot\"\n}"
response = http.request(request)
puts response.read_body{
"id": "674d0bf5c28b69001f8e03a1",
"created_at": "2024-04-22T10:00:00Z",
"name": "Risotto alla Milanese",
"description": "A description of the resource.",
"category": "Main Course",
"image_name": "burger",
"ingredients": [
{
"ingredient_id": "66294b2a4475a41f3e709bc5",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc6",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc7",
"is_essential": false
}
],
"preparation_time": 999,
"price": 999,
"station": "hot"
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}Create a dish
Create a dish and define the dish’s 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.
curl --request POST \
--url https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Risotto alla Milanese",
"description": "A description of the resource.",
"category": "Main Course",
"image_name": "burger",
"ingredients": [
{
"ingredient_id": "66294b2a4475a41f3e709bc5",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc6",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc7",
"is_essential": false
}
],
"preparation_time": 45,
"price": 999,
"station": "hot"
}
'import requests
url = "https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes"
payload = {
"name": "Risotto alla Milanese",
"description": "A description of the resource.",
"category": "Main Course",
"image_name": "burger",
"ingredients": [
{
"ingredient_id": "66294b2a4475a41f3e709bc5",
"is_essential": True
},
{
"ingredient_id": "66294b2a4475a41f3e709bc6",
"is_essential": True
},
{
"ingredient_id": "66294b2a4475a41f3e709bc7",
"is_essential": False
}
],
"preparation_time": 45,
"price": 999,
"station": "hot"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Risotto alla Milanese',
description: 'A description of the resource.',
category: 'Main Course',
image_name: 'burger',
ingredients: [
{ingredient_id: '66294b2a4475a41f3e709bc5', is_essential: true},
{ingredient_id: '66294b2a4475a41f3e709bc6', is_essential: true},
{ingredient_id: '66294b2a4475a41f3e709bc7', is_essential: false}
],
preparation_time: 45,
price: 999,
station: 'hot'
})
};
fetch('https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Risotto alla Milanese',
'description' => 'A description of the resource.',
'category' => 'Main Course',
'image_name' => 'burger',
'ingredients' => [
[
'ingredient_id' => '66294b2a4475a41f3e709bc5',
'is_essential' => true
],
[
'ingredient_id' => '66294b2a4475a41f3e709bc6',
'is_essential' => true
],
[
'ingredient_id' => '66294b2a4475a41f3e709bc7',
'is_essential' => false
]
],
'preparation_time' => 45,
'price' => 999,
'station' => 'hot'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes"
payload := strings.NewReader("{\n \"name\": \"Risotto alla Milanese\",\n \"description\": \"A description of the resource.\",\n \"category\": \"Main Course\",\n \"image_name\": \"burger\",\n \"ingredients\": [\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc5\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc6\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc7\",\n \"is_essential\": false\n }\n ],\n \"preparation_time\": 45,\n \"price\": 999,\n \"station\": \"hot\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Risotto alla Milanese\",\n \"description\": \"A description of the resource.\",\n \"category\": \"Main Course\",\n \"image_name\": \"burger\",\n \"ingredients\": [\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc5\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc6\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc7\",\n \"is_essential\": false\n }\n ],\n \"preparation_time\": 45,\n \"price\": 999,\n \"station\": \"hot\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://reimagined-journey-g45xxv4v6gwhvrrr-80.app.github.dev/dishes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Risotto alla Milanese\",\n \"description\": \"A description of the resource.\",\n \"category\": \"Main Course\",\n \"image_name\": \"burger\",\n \"ingredients\": [\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc5\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc6\",\n \"is_essential\": true\n },\n {\n \"ingredient_id\": \"66294b2a4475a41f3e709bc7\",\n \"is_essential\": false\n }\n ],\n \"preparation_time\": 45,\n \"price\": 999,\n \"station\": \"hot\"\n}"
response = http.request(request)
puts response.read_body{
"id": "674d0bf5c28b69001f8e03a1",
"created_at": "2024-04-22T10:00:00Z",
"name": "Risotto alla Milanese",
"description": "A description of the resource.",
"category": "Main Course",
"image_name": "burger",
"ingredients": [
{
"ingredient_id": "66294b2a4475a41f3e709bc5",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc6",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc7",
"is_essential": false
}
],
"preparation_time": 999,
"price": 999,
"station": "hot"
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}{
"title": "Human-readable error title.",
"detail": "Human-readable error details."
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The request body to create a new dish in the client app requires the following properties:
categorydescriptionimage_nameingredientsingredients.ingredient_idingredients.is_essential
preparation_timenamepricestation
The name of the dish to display in the client app.
"Risotto alla Milanese"
"A description of the resource."
Used to indicate where in the client app the dish should appear for ordering and used by the expediter to prioritize dishes for preparation.
Appetizer, Main Course, Dessert, Drinks "Main Course"
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.
"burger"
The list of ingredients related to a specific dish.
Show child attributes
Show child attributes
[
{
"ingredient_id": "66294b2a4475a41f3e709bc5",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc6",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc7",
"is_essential": false
}
]
The amount of time, in minutes, it takes to prepate the dish. Used by the expeditor and staff to prioritize dish preparation at the various stations.
45
The price used by the client app to calculate order cost.
999
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.
cold, hot, beverages "hot"
Response
Dish successfully created
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.
"674d0bf5c28b69001f8e03a1"
The date and time the resource was created. Timestamp uses ISO 8601 format, Ex: 2025-04-05T14:55:03.824Z
"2024-04-22T10:00:00Z"
The name of the dish that appears in the client app and for the KDS.
"Risotto alla Milanese"
"A description of the resource."
Used to indicate where in the client app the dish should appear for ordering and used by the expediter to prioritize dishes for preparation.
Appetizer, Main Course, Dessert, Drinks "Main Course"
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.
"burger"
The list of ingredients related to a specific dish.
Show child attributes
Show child attributes
[
{
"ingredient_id": "66294b2a4475a41f3e709bc5",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc6",
"is_essential": true
},
{
"ingredient_id": "66294b2a4475a41f3e709bc7",
"is_essential": false
}
]
The price used by the client app to calculate order cost.
999
The price used by the client app to calculate order cost.
999
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.
cold, hot, beverages "hot"