Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Clear the rest of the week

POST
/api/plan/clear
curl --request POST \
--url http://localhost:3000/api/plan/clear \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "week": "2026-10-11" }'

Takes off the meals still planned for the rest of the week (from today, in this week; all of it, in another) and its pool. Cooked and skipped meals stay. The answer is what went, to put back with /plan/restore. With an API key, it needs the plan: write permission.

Media typeapplication/json
object
week
required

The week’s first day.

string
/^\d{4}-\d{2}-\d{2}$/

Example

2026-10-15

Example

{
"week": "2026-10-11"
}

Cleared.

Media typeapplication/json
object
before
required

The meals taken off, for Undo.

Array<object>

A meal as it was, to put back with /plan/restore: what taking it off or changing it answers with.

object
id
required
string format: uuid
date
required
string
/^\d{4}-\d{2}-\d{2}$/
anyDay
required
boolean
meal
required
string
Allowed values: breakfast lunch dinner snack
position
required
integer
status
required
string
Allowed values: planned cooked skipped
recipe
required
string | null
withRecipe
required
string | null
note
required
string | null
<= 200 characters
servings
required
number | null
> 0 <= 1000
listedAt
required
string | null format: date-time
why
Array | null
<= 5 items
One of:
object
kind
required
string
Allowed values: theme
label
required
string
<= 60 characters
cookedAt

When it was marked cooked: put back cooked, its recipe and side were made then.

string | null format: date-time

Example

{
"before": [
{
"id": "0199e8b0-5a10-7a01-8b00-00000000001b",
"date": "2026-10-15",
"anyDay": false,
"meal": "dinner",
"position": 0,
"status": "planned",
"recipe": "0199e8b0-5a10-7a01-8b00-000000000006",
"withRecipe": "0199e8b0-5a10-7a01-8b00-000000000007",
"note": null,
"servings": null,
"listedAt": null,
"why": null,
"cookedAt": null
}
]
}

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.