Price a shopping list or receipt
price_basketRead-onlyIdempotent
Price a whole shopping list, or every line of a grocery receipt (up to 100 lines in one call), at Aldi, Tesco, SuperValu and Dunnes Stores: each item matched to the same product at every store, the cheapest store for each item, each store's basket total, and a cheaper product of the same kind (often own-label) where one exists.
Each line takes name (plain words with brand and size, e.g. "avonmore fresh
milk 2l"; receipt abbreviations such as "AVNMR FRSH MLK 2L" match poorly)
and optionally sku (the retailer's item number as printed on its receipts;
the name is used when the number is not found), barcode, store, quantity,
and paid (the line total, which gives the saving against what was paid).
Irish product names say "low fat milk" for what the UK calls "semi
skimmed". Bags, deposits, discounts and totals are not products.
Returns, per line, the match and matched_by (sku, barcode or name), the
cheapest store and price, a cheaper alternative with its pack size and, for
a receipt, price_at_store_bought; then each store's total with its
items_missing, cheapest_complete_store, mix_and_match_total and not_found.
Prices are each retailer's online shelf price from the overnight
collection; in-store prices can differ. Tesco Clubcard prices are reported
separately. Each matched item costs one credit; items not found are free.
Args:
items: e.g. [{"sku": "100685955", "name": "dunnes baked beans",
"quantity": 2, "paid": 1.30}, {"name": "brennans wholemeal bread"}].
store: the receipt's supermarket (aldi, tesco, supervalu or dunnes),
used for any line that does not name its own.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | ||
| store | No |
Output Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| note | No | ||
| as_of | No | Price date, YYYY-MM-DD | |
| items | No | ||
| not_found | No | Items with no match | |
| paid_total | No | ||
| saving_vs_paid | No | ||
| totals_by_store | No | ||
| mix_and_match_total | No | Each item bought at its cheapest store | |
| tesco_clubcard_total | No | Tesco total using Clubcard prices where Tesco has one | |
| cheapest_complete_store | No | The cheapest store among those stocking every matched item | |
| with_alternatives_total | No | As mix_and_match_total, taking each cheaper alternative where there is one |