Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Put what planned meals are short of on the list

POST
/api/list/for-meals
curl --request POST \
--url http://localhost:3000/api/list/for-meals \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "items": [ "0199e8b0-5a10-7a01-8b00-000000000026" ] }'

For planned meals on the list that are still to come: everything set aside for them in things used up, and what things at home don’t have enough of any more, which stops being set aside. Each goes on the list as those meals’ share, so the list follows the plan for it. The answer says what the list and the pantry were, for Undo with /list/restore and /pantry/restore. With an API key, it needs the list: write permission.

Media typeapplication/json
object
removed

Things used up, as removing them said they were: all they were set aside for goes on the list.

Array<object>
<= 500 items

Something at home as it was, to put it back (Undo).

object
id
required
string
name
required
string
>= 1 characters <= 200 characters
foodKey
required
string
<= 200 characters
quantity
required
number | null
unit
required
string | null
<= 40 characters
amountText
required
string | null
<= 60 characters
aisle
required
string | null
storedIn
required

Where it’s kept.

string | null
Allowed values: fridge freezer cupboard
useBy
required
string | null
/^\d{4}-\d{2}-\d{2}$/

Example

2026-10-20
forMeals
required
Array<object> | null
<= 100 items
object
meal
required
string
quantity
required
number | null
unit
required
string | null
counted

How much of it was counted on when the meal went on the list, keeping that much off the list.

object
quantity
required
number | null
unit
required
string | null
createdAt
required
string format: date-time

Example

{
"id": "0199e8b0-5a10-7a01-8b00-000000000026",
"name": "chicken thighs",
"foodKey": "chicken thigh",
"quantity": 2,
"unit": "pound",
"amountText": null,
"aisle": "0199e8b0-5a10-7a01-8b00-000000000021",
"storedIn": "fridge",
"useBy": "2026-10-18",
"forMeals": [
{
"meal": "0199e8b0-5a10-7a01-8b00-00000000001b",
"quantity": 2,
"unit": "pound",
"counted": {
"quantity": 2,
"unit": "pound"
}
}
],
"createdAt": "2026-10-15T18:30:00.000Z"
}
items

Things at home, by id: what there isn’t enough of any more goes on the list, and stops being set aside.

Array<string>
<= 500 items

Example

{
"items": [
"0199e8b0-5a10-7a01-8b00-000000000026"
]
}

On the list.

Media typeapplication/json
object
added
required

New lines on the list.

integer
merged
required

Lines added to ones already there.

integer
before
required

The lines added to, as they were: for Undo with /list/restore.

Array<object>

An item as it was, to put it back (Undo).

object
id
required
string
list
required
string
name
required
string
>= 1 characters <= 200 characters
foodKey
required
string | null
<= 200 characters
quantity
required
number | null
unit
required
string | null
<= 40 characters
amountText
required
string | null
<= 60 characters
aisle
required
string | null
checked
required
boolean
source
required

How it got on the list: from the plan, typed in, every week, a usual buy, or the assistant.

string
Allowed values: plan typed every-week usual assistant
forMeals
required
Array<object> | null
<= 100 items
object
meal
required
string
quantity
required
number | null
unit
required
string | null
putAway

What checking it off put in the pantry, so unchecking takes it back out.

object
pantryItem
required

The pantry item it went into; null for household things and staples.

string | null format: uuid
quantity
required
number | null
unit
required
string | null
<= 40 characters
amountText
required
string | null
<= 60 characters
created
required

It made that pantry item, rather than joining one already there.

boolean
filledEmpty

It gave an amount to a pantry item that was there with none, so taking it back leaves that item with none again.

boolean
forMeals
required
Array<object>
<= 100 items
object
meal
required
string
quantity
required
number | null
unit
required
string | null
purchase
required

The purchase it recorded.

string format: uuid
lookedOverAt
required
string | null format: date-time
createdAt
required
string format: date-time
remove
required

The new lines’ ids: for Undo with /list/restore.

Array<string>
pantry
required

Things at home as they were, for Undo with /pantry/restore.

Array<object>

Something at home as it was, to put it back (Undo).

object
id
required
string
name
required
string
>= 1 characters <= 200 characters
foodKey
required
string
<= 200 characters
quantity
required
number | null
unit
required
string | null
<= 40 characters
amountText
required
string | null
<= 60 characters
aisle
required
string | null
storedIn
required

Where it’s kept.

string | null
Allowed values: fridge freezer cupboard
useBy
required
string | null
/^\d{4}-\d{2}-\d{2}$/
forMeals
required
Array<object> | null
<= 100 items
object
meal
required
string
quantity
required
number | null
unit
required
string | null
counted

How much of it was counted on when the meal went on the list, keeping that much off the list.

object
quantity
required
number | null
unit
required
string | null
createdAt
required
string format: date-time

Example

{
"added": 1,
"merged": 0,
"before": [],
"remove": [
"0199e8b0-5a10-7a01-8b00-00000000001d"
],
"pantry": []
}

Nothing to put on the list.

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 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.