Merran documentation API & integrations
Suggest meals for open slots
const url = 'http://localhost:3000/api/plan/suggest';const options = { method: 'POST', headers: { cookie: 'merran.session_token=<merran.session_token>', 'Content-Type': 'application/json' }, body: '{"slots":[{"date":"2026-10-15","meal":"dinner"},{"date":"2026-10-16","meal":"dinner"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/api/plan/suggest \ --header 'Content-Type: application/json' \ --cookie merran.session_token=<merran.session_token> \ --data '{ "slots": [ { "date": "2026-10-15", "meal": "dinner" }, { "date": "2026-10-16", "meal": "dinner" } ] }'A recipe for each slot, saying why: Fill the week and Something else. Keeps to the household’s tastes and theme nights, doesn’t repeat a dish within two weeks, and pairs a side when one goes with it. Nothing is planned; slots with nothing suitable are left out. Asking again gives other ideas. With an API key, it needs the plan: read permission.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Example
2026-10-15Recipes not to suggest: ideas already showing, or ones passed over.
Example
{ "slots": [ { "date": "2026-10-15", "meal": "dinner" }, { "date": "2026-10-16", "meal": "dinner" } ]}Responses
Section titled “Responses”Ideas, in the slots’ order.
object
object
object
Its photo as a small square, for small tiles.
object
Why a meal was picked: the night’s theme (“Taco night”), or one nothing fitted; food at home it uses up; food on sale at the household’s store; never made; not had in so many weeks; rated so many stars; quick enough for a weeknight. And, after those, the foods to leave out of it for someone who doesn’t like them.
object
object
object
object
One is the lowest it’s been in a while.
object
object
object
object
object
object
Example
{ "suggestions": [ { "date": "2026-10-15", "meal": "dinner", "recipe": { "id": "0199e8b0-5a10-7a01-8b00-000000000006", "slug": "lemon-chicken", "name": "Lemon Chicken", "photo": null, "thumb": null, "servings": 4, "totalMinutes": 50 }, "withRecipe": { "id": "0199e8b0-5a10-7a01-8b00-000000000007", "slug": "garlic-rice", "name": "Garlic Rice" }, "why": [ { "kind": "notLately", "weeks": 5 }, { "kind": "rated", "stars": 5 } ] } ]}Not signed in.
object
object
object
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}Not allowed.
object
object
object
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.