Recipe detail
GET
https://api.prezo.es/public/v1/recipes/{recipe}
所需模块:配方
One recipe with its ingredients costed for one restaurant.
参数
路径参数
recipe
integer必填
查询参数
restaurantId
integer可选
Narrows to one restaurant.
请求示例
import os
import requests
response = requests.get(
"https://api.prezo.es/public/v1/recipes/8842",
headers={
"Authorization": f"Bearer {os.environ['PREZO_API_KEY']}",
"Accept": "application/json",
},
)
print(response.json())响应
Successful response.
{
"data": {
"id": 8842,
"name": "Hamburguesa de la casa",
"type": "sale",
"portions": 1,
"yieldQuantity": "1.000",
"yieldUnit": "ud",
"targetFoodCostPercent": "30.00",
"posProducts": [
{
"integration": {
"id": 7,
"name": "Revo"
},
"code": "PLU-42",
"restaurantId": 1204
}
],
"restaurants": [
{
"restaurant": {
"id": 1204,
"name": "Local Gràcia"
},
"totalCost": "4.6100",
"foodCost": "3.4200",
"labourCost": "0.9000",
"fixedCost": "0.2500",
"materialCost": "0.0400",
"salePrice": "13.50",
"vatRate": "10.00",
"salePriceWithoutVat": "12.2727",
"foodCostPercent": "27.87",
"marginPercent": "62.44",
"suggestedSalePrice": "12.54"
}
],
"ingredients": [
{
"source": "master_product",
"sourceId": 20311,
"name": "CARNE PICADA DE TERNERA",
"unit": "kg",
"grossQuantity": "0.1800",
"netQuantity": "0.1700",
"wastePercent": "5.56",
"unitCost": "11.9000",
"cost": "2.1420"
},
{
"source": "recipe",
"sourceId": 8810,
"name": "Salsa de la casa",
"unit": "kg",
"grossQuantity": "0.0300",
"netQuantity": "0.0300",
"wastePercent": "0.00",
"unitCost": "6.4000",
"cost": "0.1920"
}
]
}
}