Hosted by ALDI

Recipe-to-Cart Chatbot Challenge

Tell the bot a dish you love. It suggests recipes, picks the right ALDI products, and maps the shortest, smartest route through the store to grab every ingredient — ending at the checkout. Everything you need is in this API.

16
Categories
119
Products
10
Recipes
5
Stores (9×9)
The Challenge

Build a shopping assistant chatbot

Using the endpoints below, build a chatbot with this flow:

1

Say what you like

The user names a dish or ingredient (“I fancy pasta”, “something with chicken”). The bot returns matching recipe options.

2

Pick a recipe

For the chosen recipe, resolve every ingredient to real ALDI products — each with multiple size & price options.

3

Get the route

For a selected store, generate the shortest, most effective path through the 9×9 grid to collect each ingredient and reach the checkout.

Bonus points 🏆

Maximise ALDI profit

Every product has a price and a wholesale_price. Recommend the basket that maximises ALDI’s margin while keeping the customer happy. The recipe endpoint already returns a profit-optimised pick per ingredient.

Ask smart questions

Ask how many portions are needed (amounts scale), and skip common household staples (salt, oil, sugar…) the user probably already owns. Both are built into /api/recipes/{id}.

Data model

How the data fits together

Recipes reference ingredients → ingredients map to products in a category → categories live in cells of a store grid. The route planner connects ingredient categories to grid coordinates.

Recipe
 └─ ingredient (amount, unit, category, pantry_staple?)
      └─ Products  (≥2 size/price options per ingredient)
           └─ category_id ──┐
                            ▼
Store ─ 9×9 Grid ─ Cell { x, y, categories[] }
                            ▲
        Route plan visits the cells ─┘  → ends at Checkout

Guarantees

✔ Every store grid contains all 16 categories.
✔ Exactly one cell is the checkout (one is the entrance).
✔ Every recipe ingredient has multiple ALDI products in different sizes & prices.
✔ Every product carries a wholesale_price for profit logic.

VegetablesFruitsDairy & EggsMeat & PoultryFish & SeafoodBakeryFrozenPantry & Dry GoodsPasta & RiceCanned & JarredSpices & BakingSnacksBeveragesCondiments & SaucesCheese & DeliHousehold
REST API

Endpoints

Base URL is this site. All responses are JSON, CORS is open, no auth required. See the interactive docs or the OpenAPI schema.

GET/api/categoriesAll 16 product categoriestry →
GET/api/productsProducts (filter by category, price, name, sort by margin)try →
GET/api/recipesRecipes (search & filter by tag)try →
GET/api/recipes/{id}Recipe + ALDI product options, portion scaling, profit pick
GET/api/storesAll ALDI storestry →
GET/api/stores/{id}A single store
GET/api/stores/{id}/grid9×9 store grid: x/y cells, categories, checkout
GET/api/stores/{id}/route-planShortest route to collect ingredients → checkout
GET/api/openapiOpenAPI 3.0 document (JSON)try →
Tip: /api/recipes/1?portions=6&exclude_pantry=true scales a recipe to 6 portions and drops household staples. /api/stores/1/route-plan?recipe_id=1 returns the full in-store route for that recipe.
Quick start

Example requests

Find a pasta recipe

curl "$BASE/api/recipes?q=pasta"

Recipe for 6 people, no staples

curl "$BASE/api/recipes/1?portions=6\
  &exclude_pantry=true"

Cheapest products in a category

curl "$BASE/api/products?category_id=4&sort=price"

Store grid layout

curl "$BASE/api/stores/2/grid"

Route for a recipe through a store

curl "$BASE/api/stores/2/route-plan\
  ?recipe_id=3&exclude_pantry=true"

Highest-margin products for ALDI

curl "$BASE/api/products?sort=margin"