Merran documentation API & integrations
Suggest meals for open slots
POST
/api/plan/suggest
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”Media typeapplication/json
object
slots
required
Array<object>
object
date
required
string
Example
2026-10-15meal
required
string
exclude
Recipes not to suggest: ideas already showing, or ones passed over.
Array<string>
Example
{ "slots": [ { "date": "2026-10-15", "meal": "dinner" }, { "date": "2026-10-16", "meal": "dinner" } ]}Responses
Section titled “Responses”Ideas, in the slots’ order.
Media typeapplication/json
object
suggestions
required
Array<object>
object
date
required
string
meal
required
string
recipe
required
object
id
required
string
slug
required
string
name
required
string
photo
required
string | null
servings
required
number | null
totalMinutes
required
integer | null
withRecipe
required
object
id
required
string
slug
required
string
name
required
string
why
required
Array
One of:
object
kind
required
string
label
required
string
object
kind
required
string
label
required
string
object
kind
required
string
foods
required
Array<string>
object
kind
required
string
foods
required
Array<string>
lowest
required
One is the lowest it’s been in a while.
boolean
object
kind
required
string
object
kind
required
string
weeks
required
integer
object
kind
required
string
stars
required
integer
object
kind
required
string
minutes
required
integer
object
kind
required
string
foods
required
Array<object>
object
food
required
string
who
required
string | null
Example
{ "suggestions": [ { "date": "2026-10-15", "meal": "dinner", "recipe": { "id": "0199e8b0-5a10-7a01-8b00-000000000006", "slug": "lemon-chicken", "name": "Lemon Chicken", "photo": 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.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}Not allowed.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
fields
object
key
additional properties
string
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.