Get recipes of an item
This endpoint is deprecated.
POST
/api/RPC.common.Api.Recipes.get?token=<TOKEN>Parameters
| Field | Type | Description |
|---|---|---|
skurequired | String | Item code |
include_archived | Boolean | Include archived recipes |
Request example
Get Recipes By SKU:
{
"data" : [
{
"sku" : "CAKE-01"
}
]
}
Get Recipes By Item Id:
{
"data" : [
{
"id" : 1234
}
]
}
Get Recipes Including Archived:
{
"data" : [
{
"sku" : "CAKE-01"
}
],
"include_archived" : 1
}
Get BOM Recipe By SKU:
{
"data" : [
{
"sku" : "MENU-01"
}
]
}cURL
Get Recipes By SKU:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{"data":[{"sku":"CAKE-01"}]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Recipes.get?token=<TOKEN>"
Get Recipes By Item Id:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{"data":[{"id":1234}]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Recipes.get?token=<TOKEN>"
Get Recipes Including Archived:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{"include_archived":1, "data":[{"sku":"CAKE-01"}]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Recipes.get?token=<TOKEN>"
Get BOM Recipe By SKU:
curl -X POST -H 'Content-Type: application/json; charset=utf-8' -d '{"data":[{"sku":"MENU-01"}]}' "https://<DOMAIN_NAME>/api/RPC.common.Api.Recipes.get?token=<TOKEN>"Response example
// Success-Response (product recipes):
HTTP/1.1 200 OK
{
"result" : [
{
"name" : "Chocolate cake",
"id" : 1234,
"sku" : "CAKE-01",
"type" : "product",
"recipes" : [
{
"quantity" : 10,
"description" : "",
"type" : "product",
"id" : 5678,
"is_default" : 1,
"materials" : [
{
"sku" : "FLOUR-01",
"measure" : "kg",
"name" : "Flour",
"quantity" : "2.5",
"position" : 2,
"type" : "item",
"description" : ""
},
{
"quantity" : "0.4",
"position" : 3,
"description" : "",
"type" : "item",
"name" : "Cocoa",
"measure" : "kg",
"sku" : "COCOA-01"
},
{
"name" : "Baking (labour)",
"measure" : "h",
"sku" : "BAKING",
"type" : "operation",
"description" : "",
"position" : 4,
"quantity" : 1
}
],
"measure" : "pcs",
"name" : "Main",
"products" : [
{
"quantity" : 10,
"position" : 1,
"description" : "",
"cost_percentage" : 100,
"sku" : "CAKE-01",
"measure" : "pcs",
"name" : "Chocolate cake"
}
],
"active" : 1,
"instant" : 0
}
]
}
],
"count" : 1
}
// Success-Response (BOM recipe):
HTTP/1.1 200 OK
{
"count" : 1,
"result" : [
{
"recipes" : [
{
"is_default" : 1,
"name" : "BOM recipe",
"measure" : "pcs",
"products" : [
{
"description" : "",
"position" : 1,
"quantity" : 1,
"sku" : "MENU-01",
"measure" : "pcs",
"name" : "Burger menu",
"cost_percentage" : 100
}
],
"instant" : 0,
"active" : 1,
"materials" : [
{
"quantity" : 1,
"position" : 1,
"type" : "item",
"description" : "",
"price_percentage" : 70,
"sku" : "BURGER",
"name" : "Burger",
"measure" : "pcs"
},
{
"price_percentage" : 30,
"position" : 2,
"type" : "item",
"description" : "",
"quantity" : 1,
"measure" : "pcs",
"name" : "Cola 330 ml",
"sku" : "COLA"
},
{
"name" : "Fanta 330 ml",
"measure" : "pcs",
"sku" : "FANTA",
"quantity" : 1,
"price_percentage" : 30,
"description" : "",
"type" : "item",
"position" : 2
},
{
"name" : "Sprite 330 ml",
"measure" : "pcs",
"sku" : "SPRITE",
"quantity" : 1,
"price_percentage" : 30,
"description" : "",
"position" : 2,
"type" : "item"
}
],
"quantity" : 1,
"type" : "bom",
"description" : ""
}
],
"type" : "bom",
"sku" : "MENU-01",
"id" : 4321,
"name" : "Burger menu"
}
]
}