Merran documentation API & integrations
Put meals back as they were
const url = 'http://localhost:3000/api/plan/restore';const options = { method: 'POST', headers: { cookie: 'merran.session_token=<merran.session_token>', 'Content-Type': 'application/json' }, body: '{"entries":[{"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}]}'};
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/restore \ --header 'Content-Type: application/json' \ --cookie merran.session_token=<merran.session_token> \ --data '{ "entries": [ { "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 } ] }'Undo: meals as other changes said they were. Ones taken off come back with the same id; ones changed go back to how they were. A meal whose recipe is gone is passed over. With an API key, it needs the plan: write permission.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
A meal as it was, to put back with /plan/restore: what taking it off or changing it answers with.
object
Example
2026-10-15object
object
object
object
One is the lowest it’s been in a while.
object
object
object
object
object
object
When it was marked cooked: put back cooked, its recipe and side were made then.
Example
{ "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}Example
{ "entries": [ { "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 } ]}Responses
Section titled “Responses”As they were.
object
object
Its day, or for the week’s pool, the week’s first day.
In the week’s pool: for any day of the week.
Its place among the meal’s dishes.
Null for a note.
object
In a serving, when its nutrition is known.
What it’s made with: “with peanut sauce”.
object
A meal that isn’t a recipe: “leftovers”.
Null for the recipe’s own servings.
Why it was picked, when Fill the week picked it: none otherwise.
object
object
object
object
One is the lowest it’s been in a while.
object
object
object
object
object
object
Example
{ "entries": [ { "id": "0199e8b0-5a10-7a01-8b00-00000000001b", "date": "2026-10-15", "anyDay": false, "meal": "dinner", "position": 0, "status": "planned", "recipe": { "id": "0199e8b0-5a10-7a01-8b00-000000000006", "slug": "lemon-chicken", "name": "Lemon Chicken", "photo": null, "servings": 4, "totalMinutes": 50, "calories": 412 }, "withRecipe": { "id": "0199e8b0-5a10-7a01-8b00-000000000007", "slug": "garlic-rice", "name": "Garlic Rice", "calories": 210 }, "note": null, "servings": null, "why": [ { "kind": "theme", "label": "Taco night" } ], "createdAt": "2026-10-15T18:30:00.000Z" } ]}Not signed in.
object
object
object
Example
{ "error": { "code": "not_found", "message": "There's nothing here.", "fields": { "name": "Give it a name." } }}Not allowed.
object
object
object
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.