Fiidmi API

If there is need to separately fetch ingredient data specific to a restaurant, this action can be used for it.

For many cases, especially for mobile and other applications, most efficient way is to locally cache this data from /restaurant/get. Even web page applications can consider whether local cache server would be feasible option in order to make application respond faster to client.

In case you don’t want to implement caching solution (for a website), you may instead want to use /restaurant/product with ingredient_groups=true.

Request

POST nameValueRequired?
restaurant_idintegerYes

Response

{
  "1":[
    {
      "id":"48564",
      "name":"Ananas",
      "price":"1.00",
      "comment":"If this is 1, ingredient will be free to use regardless of price.",
      "is_free":"0",
      "comment":"If this is zero, user can’t choose this ingredient (add to product, change a ingredient to it and similar),
      but may still exist in existing products. An example for such is Salaatti(Salad) in Kotipizzas’ kotzones.",
      "choosable":"1"
    },
    ".."
  ],
  "48616":[
    {
      "id":"48617",
      "name":"Sinappikastike",
      "price":"1.00",
      "is_free":"0",
      "choosable":"1"
    },
    ".."
  ],
  "comment":"Ingredients that belongs to fantasia products, like ingredients of make-your-own pizza.",
  "fantasia_ingredients":[
    {
      "id":"48611",
      "group_id":"1",
      "name":"Valitse täyte 1",
      "price":"1.00"
    },
    ".."
  ]
}

Ingredient price calculation

Information about calculating final price of an ingredient can be found at examples.

ingredient_groups

Details of all ingredients related to restaurant.

The ingredients are grouped by group id, with exception of fantasia_ingredients. These groups can be used to get details of ingredients.

fantasia_ingredients

There is special group fantasia_ingredients which contains special ingredients that can are not usable in orders by themselves, but needs instead to be changed to a real ingredient, from specific group specified in the ingredient, in attribute group_id.

Expectable errors

See error conventions section for explanation how error system works.

Label Additional data Description
NO_GROUPSNoneIn case restaurant is completely broken, or restaurant id is wrong, this is shown.