Read Ingredients

GET /ingredients

Read the Ingredients used in Calculations. An Ingredient can have its own price or be linked to an existing Item. Use the Ingredient ID from the list to read its details. API tokens can read, but cannot create or change, Ingredients through these endpoints.

List Ingredients

GET /ingredients returns total matching Ingredients and an entries array. Optional query parameters:

  • search_term: Search by Ingredient name.
  • group: Ingredient Group ID from GET /ingredient-groups.
  • offset, limit: Page offset and size; defaults are 0 and 25.

Entries include id, group, name, size, unit, waste, waste_type and a calculated price. If linked to an Item, an item object may be included. Other optional properties can also be present.

Use GET /ingredients/{id} with an id from the list to read one Ingredient. The response is the Ingredient object itself, not an entries array.

A list request can return 202 with empty entries, total: 0 and cache_status while the search index is being prepared. Retry after a short delay; this is not an empty Ingredient collection.

Status codes

  • 200 on success, including an empty list.
  • 202 while the list index is being prepared.
  • 404 if a requested Ingredient ID does not exist.

Example

curl 'https://app.yourbarmate.com/api/ingredients?limit=25' \
  --header 'accept: application/json' \
  --header 'authorization: token YOUR_API_TOKEN'