Core API

Weekly discoveries

A curated set of recipe ideas refreshed each week, generated around the user’s dietary profile and pantry. Great for a “discover” tab or re-engagement push.

Endpoints

GET/v1/discoveries/weeklyGet this week’s set (filtered for the user)
POST/v1/discoveries/weekly/generateTrigger generation (admin only)

Get the current set

GET /v1/discoveries/weekly

Returns this week’s discovery content, filtered for the authenticated user’s dietary profile and pantry. The response is cached server-side for 5 minutes, so rapid polling is cheap. Each card contains a teaser title, why-it-was-picked, and a one-tap generate action.

Trigger generation

POST /v1/discoveries/weekly/generate

Queues a background job to regenerate the weekly discovery set. This is an admin-only action, so a normal user token returns 403. If generation is already running for the week, the endpoint returns 409. On success it responds with 202 Accepted.