Albert Heijn: Bonus Offers
ah_get_bonus_offersRetrieve Albert Heijn bonus and promotional offers for the current or next week, with optional keyword, category, and previously bought filters to find relevant discounts.
Instructions
Get Albert Heijn bonus/promotional offers. Use this (not ah_search_products) when the user asks what is on bonus/sale/discount. Returns this week's bonus by default; set period='next' for next week's bonus, which AH publishes a few days before the new bonus week starts. Every answer says which week it covers (period, valid_from, valid_until). Supports optional keyword filter to find e.g. cheese on bonus: set query='kaas'. Every offer has a category (AH's bonus category): the answer's categories lists every category of the week with its number of offers (offer_count, before any filter), so set categories to a list of those names to get only those, and food_only=true to leave out the non-food categories (household, drugstore, cooking and table items). Set previously_bought=true for offers on products the user bought before (AH's 'Eerder gekocht'). Group deals (e.g. '2+1 gratis', 'Alle yoghurt 25% korting') have no id but a bonus_segment_id — pass that to ah_get_bonus_group_products to see the individual products in the group. Returns id, bonus_segment_id, title, category, original_price, bonus_price, discount_percentage, bonus_mechanism, and the price fields pack_price, deal_min_quantity, deal_total, deal_price_per_pack, unit_price, unit_price_unit (use these for a shopping line: original_price and bonus_price can be for two packs). When you mention a product or recipe from the result, link its name to its url.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of results to return (default 20) | |
| query | No | Optional keyword filter (Dutch or English) applied client-side, e.g. 'kaas', 'vlees', 'bier' | |
| period | No | Which bonus week to return: 'current' (default) or 'next' | |
| food_only | No | Leave out the non-food categories (default false). With categories, only the food ones of them come back | |
| categories | No | Only offers in these bonus categories, by name as in the categories of the answer (case does not matter; an unknown name is an error) | |
| previously_bought | No | Only offers on products the user bought before |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| offers | Yes | ||
| period | Yes | The bonus week this answer is for | |
| categories | Yes | Every bonus category of the week with its number of offers, before any filter | |
| valid_from | No | First day of the bonus week (YYYY-MM-DD, inclusive); absent when next week is not published yet | |
| valid_until | No | Last day of the bonus week (YYYY-MM-DD, inclusive); absent when next week is not published yet |