Recipes

GET
https://api.prezo.es/public/v1/recipes
Modulo richiesto:Recipes

The business's recipes with cost and sale figures per restaurant, and the POS codes they are sold under. Figures are for the whole recipe.

Parametri

Parametri di query
restaurantId
integerfacoltativo

Narrows to one restaurant.

page
integerfacoltativo

Page, from 1.

perPage
integerfacoltativo

Items per page: 100 by default, up to 500.

Esempio di richiesta

import os

import requests

response = requests.get(
    "https://api.prezo.es/public/v1/recipes",
    headers={
        "Authorization": f"Bearer {os.environ['PREZO_API_KEY']}",
        "Accept": "application/json",
    },
)

print(response.json())

Risposte

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"
        }
      ]
    }
  ],
  "meta": {
    "currentPage": 1,
    "perPage": 100,
    "total": 1,
    "lastPage": 1
  },
  "links": {
    "first": "https://api.prezo.es/public/v1/...?page=1",
    "prev": null,
    "next": null,
    "last": "https://api.prezo.es/public/v1/...?page=1"
  }
}