Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Suggest meals for open slots

POST
/api/plan/suggest
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.

Media typeapplication/json
object
slots
required
Array<object>
>= 1 items <= 56 items
object
date
required
string
/^\d{4}-\d{2}-\d{2}$/

Example

2026-10-15
meal
required
string
Allowed values: breakfast lunch dinner snack
exclude

Recipes not to suggest: ideas already showing, or ones passed over.

Array<string>
<= 200 items

Example

{
"slots": [
{
"date": "2026-10-15",
"meal": "dinner"
},
{
"date": "2026-10-16",
"meal": "dinner"
}
]
}

Ideas, in the slots’ order.

Media typeapplication/json
object
suggestions
required
Array<object>
object
date
required
string
/^\d{4}-\d{2}-\d{2}$/
meal
required
string
Allowed values: breakfast lunch dinner snack
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
<= 5 items
One of:
object
kind
required
string
Allowed values: theme
label
required
string
<= 60 characters

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.