Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Change the weekly autoplan

PUT
/api/plan/autoplan
curl --request PUT \
--url http://localhost:3000/api/plan/autoplan \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "enabled": true, "day": 6, "hour": 9, "meals": [ "dinner" ], "addToList": true }'

Household admins only. On its day and hour it fills the week ahead’s empty meals the way Fill the week does, saying why for each, and can put what they need on the list. Turning it on plans nothing straight away: it waits for its day and hour. A run that’s late, with the server off, plans what’s left of its week.

Media typeapplication/json
object
enabled
required
boolean
day
required

The day it runs, 0 for Sunday, in the household’s time zone.

integer
<= 6
hour
required

The hour it runs, 0 to 23, in the household’s time zone.

integer
<= 23
meals
required

The meals it fills, of those the household plans.

Array<string>
>= 1 items <= 4 items
Allowed values: breakfast lunch dinner snack
addToList
required

Whether it puts what the week needs on the list too.

boolean

Example

{
"enabled": true,
"day": 6,
"hour": 9,
"meals": [
"dinner"
],
"addToList": true
}

Saved.

Media typeapplication/json
object
enabled
required
boolean
day
required

The day it runs, 0 for Sunday, in the household’s time zone.

integer
<= 6
hour
required

The hour it runs, 0 to 23, in the household’s time zone.

integer
<= 23
meals
required

The meals it fills, of those the household plans.

Array<string>
>= 1 items <= 4 items
Allowed values: breakfast lunch dinner snack
addToList
required

Whether it puts what the week needs on the list too.

boolean
next
required

When it runs next; none while it’s off.

string | null format: date-time
last
required
Any of:
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

{
"enabled": true,
"day": 6,
"hour": 9,
"meals": [
"dinner"
],
"addToList": true,
"next": "2026-10-24T16:00:00.000Z",
"last": {
"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.