Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Plan the week ahead now

POST
/api/plan/autoplan/run
curl --request POST \
--url http://localhost:3000/api/plan/autoplan/run \
--cookie merran.session_token=<merran.session_token>

What the autoplan does, now: the next week starting today or later, its empty meals filled, and onto the list if the autoplan says so. That week counts as planned, so the autoplan won’t plan it again. With an API key, it needs the plan: write permission.

Planned.

Media typeapplication/json
object
week
required

The first day of the week it planned.

string
/^\d{4}-\d{2}-\d{2}$/
at
required
string format: date-time
planned
required

Meals it filled.

integer
empty
required

Meals that were empty to fill.

integer
listed
required

Lines it put on the list, new or added to.

integer

Example

{
"week": "2026-10-19",
"at": "2026-10-17T16:00:00.000Z",
"planned": 6,
"empty": 7,
"listed": 18
}

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.