Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Put things on the list back as they were

POST
/api/list/restore
curl --request POST \
--url http://localhost:3000/api/list/restore \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "items": [ { "id": "0199e8b0-5a10-7a01-8b00-00000000001d", "list": "0199e8b0-5a10-7a01-8b00-00000000001c", "name": "chicken thighs", "foodKey": "chicken thigh", "quantity": 3, "unit": "pound", "amountText": null, "aisle": "0199e8b0-5a10-7a01-8b00-000000000021", "checked": false, "source": "plan", "forMeals": [ { "meal": "0199e8b0-5a10-7a01-8b00-00000000001b", "quantity": 3, "unit": "pound" } ], "createdAt": "2026-10-15T18:30:00.000Z" } ] }'

Undo: items as taking them off or changing them said they were. One taken off comes back with its id. An aisle that’s gone is left empty. With an API key, it needs the list: write permission.

Media typeapplication/json
object
items
required
Array<object>
>= 1 items <= 500 items

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
createdAt
required
string format: date-time

Example

{
"id": "0199e8b0-5a10-7a01-8b00-00000000001d",
"list": "0199e8b0-5a10-7a01-8b00-00000000001c",
"name": "chicken thighs",
"foodKey": "chicken thigh",
"quantity": 3,
"unit": "pound",
"amountText": null,
"aisle": "0199e8b0-5a10-7a01-8b00-000000000021",
"checked": false,
"source": "plan",
"forMeals": [
{
"meal": "0199e8b0-5a10-7a01-8b00-00000000001b",
"quantity": 3,
"unit": "pound"
}
],
"createdAt": "2026-10-15T18:30:00.000Z"
}

Example

{
"items": [
{
"id": "0199e8b0-5a10-7a01-8b00-00000000001d",
"list": "0199e8b0-5a10-7a01-8b00-00000000001c",
"name": "chicken thighs",
"foodKey": "chicken thigh",
"quantity": 3,
"unit": "pound",
"amountText": null,
"aisle": "0199e8b0-5a10-7a01-8b00-000000000021",
"checked": false,
"source": "plan",
"forMeals": [
{
"meal": "0199e8b0-5a10-7a01-8b00-00000000001b",
"quantity": 3,
"unit": "pound"
}
],
"createdAt": "2026-10-15T18:30:00.000Z"
}
]
}

Back as they were.

Media typeapplication/json
object
items
required
Array<object>
object
id
required
string
list
required

The list it’s on.

string
name
required
string
amount
required

How much, as it shows: “1 ½ cups”, “half a bag”, or empty.

string
quantity
required
number | null
unit
required

A unit id, like “cup” or “pound”; null for a count.

string | null
amountText
required

An amount in words (“half a bag”), when it isn’t a number.

string | null
aisle
required

Its aisle’s id.

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
meals
required

The planned meals it’s for.

Array<object>
object
id
required
string
name
required
string
createdAt
required
string format: date-time

Example

{
"items": [
{
"id": "0199e8b0-5a10-7a01-8b00-00000000001d",
"list": "0199e8b0-5a10-7a01-8b00-00000000001c",
"name": "chicken thighs",
"amount": "3 lb",
"quantity": 3,
"unit": "pound",
"amountText": null,
"aisle": "0199e8b0-5a10-7a01-8b00-000000000021",
"checked": false,
"source": "plan",
"meals": [
{
"id": "0199e8b0-5a10-7a01-8b00-00000000001b",
"name": "Lemon Chicken"
}
],
"createdAt": "2026-10-15T18:30:00.000Z"
}
]
}

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.