Skip To Main Content
All modules

Groceries

Fields marked * are required. Updates keep every field they are not given. An AI app can ask vritto_describe for the same details, filtered to what its connection may use.

Grocery Itemgrocery_item

One thing on a grocery list. The same operations reach shopping lists for a day and store (type 'list'), food and supplies on hand in the pantry, fridge or freezer (type 'inventory'), stores (type 'store') and receipts (type 'receipt').

groceries_findFindthrough vritto_find

Read Groceries: one record by id, or records of a type filtered by list, dates, status, storage or text; view 'low_stock', 'expiring' or 'restock'. No filter gives the week's lists, needed items, low stock and expiring food. A search with no type reads every type.

Note: Set type for lists, pantry items, stores or receipts. view 'low_stock', 'expiring' or 'restock' reads the pantry; no filter gives the week's overview.

FieldTypeDescription
typeone of item, list, inventory, store, receiptWhich records to read. Omit for the overview, or with query to search every type.
idstringReturn just this record.
viewone of needed, low_stock, expiring, restock'needed' items still to buy; 'low_stock' pantry items at or below their threshold; 'expiring' pantry items expiring within a week; 'restock' suggested restocks.
listNamestringType 'item': the items on this list, by the name the person uses.
listIdstringType 'item': the items on this list.
storeIdstringRecord ID from a prior groceries_find result, never invented.
statusone of planned, active, shopping, completed, archived, needed, bought, skipped, moved, draft, needs_review, applied, failedA list is planned, active, shopping or completed; an item needed, bought or skipped; a receipt draft, needs_review, applied or failed.
storageLocationone of pantry, fridge, freezer, household, otherType 'inventory': only what is kept here.
fromstringEarliest date, inclusive: a list's shopping day, a pantry item's expiry, a receipt's purchase day.
tostringLatest date, inclusive, on the same dates. ALWAYS pass from/to when the question concerns a period.
querystringText to match: a name, store, category or note.
includeArchivedboolean
limitintegerRows to return.
startstringOlder form of from, for lists.
endstringOlder form of to, for lists.
expiringBeforestringOlder form of to, for pantry items.
lowStockOnlybooleanOlder form of view 'low_stock'.
Example input
{
  "type": "item",
  "listName": "Costco run"
}
groceries_addCreatethrough vritto_create

Add one record: an item on a list (name, plus listName as the person said it; no lookup first), a list (type 'list': title, shoppingDate, store), a pantry item (type 'inventory'), a store, or a receipt (rawText is parsed into lines for review).

Note: Pass an item's list by name (listName) as the person said it; no lookup needed. Set type for a list, pantry item, store or receipt.

FieldTypeDescription
typeone of item, list, inventory, store, receiptRecord type: 'item' (default) one thing on a shopping list; 'list' a shopping list for a day and store; 'inventory' food or supplies on hand in the pantry, fridge or freezer; 'store' a store the person shops at; 'receipt' a captured receipt and its lines.
recordobjectThe record's fields.
record.namestringThe item, pantry item or store's name. Required for those.
record.titlestringType 'list': its title, e.g. 'Saturday Costco run'. Required for a list.
record.listNamestringType 'item': the list as the person names it ('grocery list', 'Costco run'), matched against open lists; never look a list up just to get its ID.
record.listIdstringType 'item': the list's ID, only when already known; else listName.
record.shoppingDatestringType 'list': the planned shopping day.
record.storeIdstringLists, items and receipts: the store's ID when known.
record.storeNamestringLists, items and receipts: the store as named.
record.statusone of planned, active, shopping, completed, archived, needed, bought, skipped, moved, draft, needs_review, applied, failedA list is planned, active, shopping or completed; an item needed, bought or skipped; a receipt draft, needs_review, applied or failed.
record.priorityone of low, normal, high, urgentLists and items, only when the person signals urgency: 'we're out' urgent, 'running low' high, 'no rush' low.
record.quantitynumberType 'item': how many to buy (default 1).
record.unitstring
record.categorystringDepartment or category.
record.aislestringType 'item': aisle or section.
record.priceEstimatenumberType 'item': expected price, with priceCurrency.
record.priceCurrencystringISO currency of priceEstimate.
record.barcodestring
record.productTypeone of food, beauty, pet_food, household, general, other
record.productIdstringProduct cache or provider product ID.
record.inventoryItemIdstringType 'item': the pantry item it restocks.
record.positionnumberType 'item': manual order on its list.
record.sortRanknumberType 'list': manual order.
record.reminderAtstringLists and items: ISO date-time of a shopping reminder.
record.sourceobjectType 'item': the record in another module it came from (a recipe).
record.quantityOnHandnumberType 'inventory': how much is on hand (default 1).
record.storageLocationone of pantry, fridge, freezer, household, otherType 'inventory': where it is kept (default pantry).
record.storageDetailstringType 'inventory': shelf or bin.
record.expiryDatestringType 'inventory': schedules a reminder reminderLeadDays before (default 3).
record.openedDatestringCalendar date, YYYY-MM-DD.
record.reminderLeadDaysinteger
record.lowStockThresholdnumberType 'inventory': at or below this it is low stock.
record.targetStockLevelnumber
record.autoAddToListbooleanType 'inventory': suggest it for every restock.
record.lastPurchasedAtstringCalendar date, YYYY-MM-DD.
record.productobjectType 'inventory': product data from a barcode or catalog lookup.
record.retailerKeystringType 'store': retailer key, e.g. 'target'.
record.addressstring
record.placeKeystringType 'store': Places key when known.
record.aisleOrderlist of stringType 'store': aisle names in walking order.
record.preferredboolean
record.purchasedOnstringType 'receipt': purchase day.
record.totalnumberType 'receipt': with currency.
record.currencystringType 'receipt': ISO currency as printed.
record.rawTextstringType 'receipt': receipt text, parsed into lines for review when no lines are sent.
record.imageAssetIdstringRecord ID from a prior groceries_find result, never invented.
record.lineslist of objectType 'receipt': line items. On a change, sent lines REPLACE the stored set.
record.notesstring
record.tagslist of string
record.idempotencyKeystringStable dedupe key; a retry with it never duplicates.
itemobjectOlder form of record, for an item or a pantry item.
item.namestring
listobjectOlder form of record, for a list.
list.titlestring
storeobjectOlder form of record, for a store.
store.namestring
receiptobjectOlder form of record, for a receipt.
receipt.storeNamestring
Example input
{
  "record": {
    "listName": "Costco",
    "name": "Oat milk",
    "quantity": 2,
    "unit": "cartons"
  }
}
groceries_changeUpdatethrough vritto_update

Change one record by record.id; sent fields merge. An item bought is status 'bought'; a pantry item used up is delta (-2); finish true completes a list and checks off its needed items; itemIds with targetListId moves items; apply true applies a reviewed receipt. Resolve ids with groceries_find first.

Note: A receipt's sent lines replace the stored lines. finish true completes a list; delta adjusts a pantry item; apply true applies a reviewed receipt.

FieldTypeDescription
typeone of item, list, inventory, store, receiptRecord type: 'item' (default) one thing on a shopping list; 'list' a shopping list for a day and store; 'inventory' food or supplies on hand in the pantry, fridge or freezer; 'store' a store the person shops at; 'receipt' a captured receipt and its lines.
recordobjectThe record's id plus the fields to change.
record.id*stringRecord ID from a prior groceries_find result, never invented.
record.namestringThe item, pantry item or store's name. Required for those.
record.titlestringType 'list': its title, e.g. 'Saturday Costco run'. Required for a list.
record.listNamestringType 'item': the list as the person names it ('grocery list', 'Costco run'), matched against open lists; never look a list up just to get its ID.
record.listIdstringType 'item': the list's ID, only when already known; else listName.
record.shoppingDatestringType 'list': the planned shopping day.
record.storeIdstringLists, items and receipts: the store's ID when known.
record.storeNamestringLists, items and receipts: the store as named.
record.statusone of planned, active, shopping, completed, archived, needed, bought, skipped, moved, draft, needs_review, applied, failedA list is planned, active, shopping or completed; an item needed, bought or skipped; a receipt draft, needs_review, applied or failed.
record.priorityone of low, normal, high, urgentLists and items, only when the person signals urgency: 'we're out' urgent, 'running low' high, 'no rush' low.
record.quantitynumberType 'item': how many to buy (default 1).
record.unitstring
record.categorystringDepartment or category.
record.aislestringType 'item': aisle or section.
record.priceEstimatenumberType 'item': expected price, with priceCurrency.
record.priceCurrencystringISO currency of priceEstimate.
record.barcodestring
record.productTypeone of food, beauty, pet_food, household, general, other
record.productIdstringProduct cache or provider product ID.
record.inventoryItemIdstringType 'item': the pantry item it restocks.
record.positionnumberType 'item': manual order on its list.
record.sortRanknumberType 'list': manual order.
record.reminderAtstringLists and items: ISO date-time of a shopping reminder.
record.sourceobjectType 'item': the record in another module it came from (a recipe).
record.quantityOnHandnumberType 'inventory': how much is on hand (default 1).
record.storageLocationone of pantry, fridge, freezer, household, otherType 'inventory': where it is kept (default pantry).
record.storageDetailstringType 'inventory': shelf or bin.
record.expiryDatestringType 'inventory': schedules a reminder reminderLeadDays before (default 3).
record.openedDatestringCalendar date, YYYY-MM-DD.
record.reminderLeadDaysinteger
record.lowStockThresholdnumberType 'inventory': at or below this it is low stock.
record.targetStockLevelnumber
record.autoAddToListbooleanType 'inventory': suggest it for every restock.
record.lastPurchasedAtstringCalendar date, YYYY-MM-DD.
record.productobjectType 'inventory': product data from a barcode or catalog lookup.
record.retailerKeystringType 'store': retailer key, e.g. 'target'.
record.addressstring
record.placeKeystringType 'store': Places key when known.
record.aisleOrderlist of stringType 'store': aisle names in walking order.
record.preferredboolean
record.purchasedOnstringType 'receipt': purchase day.
record.totalnumberType 'receipt': with currency.
record.currencystringType 'receipt': ISO currency as printed.
record.rawTextstringType 'receipt': receipt text, parsed into lines for review when no lines are sent.
record.imageAssetIdstringRecord ID from a prior groceries_find result, never invented.
record.lineslist of objectType 'receipt': line items. On a change, sent lines REPLACE the stored set.
record.notesstring
record.tagslist of string
record.idempotencyKeystringStable dedupe key; a retry with it never duplicates.
record.archivedbooleanType 'store' or 'receipt': archive or restore it.
deltanumberType 'inventory': signed change to the quantity on hand, floored at zero.
finishbooleanType 'list': true finishes the shopping run.
applybooleanType 'receipt': true applies its accepted lines (record.lines, when sent, instead of the stored ones), only after the person confirmed them.
itemIdslist of stringSeveral items to move together.
targetListIdstringWith itemIds: the list they move to.
targetStoreIdstringRecord ID from a prior groceries_find result, never invented.
targetStoreNamestring
targetPositionnumberWith itemIds: order position of the first.
expectedRevisionintegerConcurrency guard: the revision last read.
itemIdstringOlder name for the item or pantry item id.
listIdstringOlder name for the list id.
storeIdstringOlder name for the store id.
receiptIdstringOlder name for the receipt id.
patchobjectOlder form of record.
patch.notesstring
lineslist of objectOlder form of record.lines, with receiptId: the lines to apply.
statusone of planned, active, shopping, completed, archived, needed, bought, skipped, moved, draft, needs_review, applied, failedOlder form of record.status, with itemId.
shoppingDatestringOlder form of record.shoppingDate, with listId.
storeNamestringOlder form of record.storeName, with listId.
sortRanknumberOlder form of record.sortRank, with listId.
Example input
{
  "type": "item",
  "record": {
    "id": "gi_oatmilk",
    "status": "bought"
  }
}
groceries_removeDeletethrough vritto_delete

Delete (archive) one record by id: a grocery list, an item on one, a pantry item, a store or a receipt. Only for explicit removals: a bought item is a groceries_change. Resolve the id first.

Note: Archives the record. Set type for a list, pantry item, store or receipt.

FieldTypeDescription
typeone of item, list, inventory, store, receiptRecord type: 'item' (default) one thing on a shopping list; 'list' a shopping list for a day and store; 'inventory' food or supplies on hand in the pantry, fridge or freezer; 'store' a store the person shops at; 'receipt' a captured receipt and its lines.
idstringThe record to remove.
expectedRevisionintegerConcurrency guard: the revision last read.
itemIdstringOlder name for the item or pantry item id.
listIdstringOlder name for the list id.
storeIdstringOlder name for the store id.
receiptIdstringOlder name for the receipt id.

Food Product Catalogfood_catalog

Open Food Facts product reference data.

groceries_searchGroceryProductsLook Upthrough vritto_lookup

Searches the Open Food Facts catalog by name for product metadata.

FieldTypeDescription
query*stringProduct search text.
limitintegerMax results (default 10).

Kept in the Vritto app

  • groceries_analyzeGroceryReceipt: Runs Vritto's own AI; the calling assistant is already an AI.
  • groceries_lookupGroceryProductByBarcode: Background upkeep Vritto already runs on its own.