Merran documentation API & integrations
Put things on the list back as they were
const url = 'http://localhost:3000/api/list/restore';const options = { method: 'POST', headers: { cookie: 'merran.session_token=<merran.session_token>', 'Content-Type': 'application/json' }, body: '{"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"}],"putAway":null,"createdAt":"2026-10-15T18:30:00.000Z"}]}'};
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/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" } ], "putAway": null, "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. Items in remove weren’t there before, and come off again. With the household’s put-away setting on, one put back checked or unchecked goes in the pantry or comes back out as checking or unchecking it would; one that was taken off comes back with what it put in the pantry, which stayed there, so it doesn’t go in again. With an API key, it needs the list: write permission.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
An item as it was, to put it back (Undo).
object
How it got on the list: from the plan, typed in, every week, a usual buy, or the assistant.
object
What checking it off put in the pantry, so unchecking takes it back out.
object
The pantry item it went into; null for household things and staples.
It made that pantry item, rather than joining one already there.
It gave an amount to a pantry item that was there with none, so taking it back leaves that item with none again.
object
The purchase it recorded.
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" } ], "putAway": null, "createdAt": "2026-10-15T18:30:00.000Z"}Items that weren’t there, by id, to take off again.
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" } ], "putAway": null, "createdAt": "2026-10-15T18:30:00.000Z" } ]}Responses
Section titled “Responses”Back as they were.
object
object
The list it’s on.
How much, as it shows: “1 ½ cups”, “half a bag”, or empty.
A unit id, like “cup” or “pound”; null for a count.
An amount in words (“half a bag”), when it isn’t a number.
Its aisle’s id.
How it got on the list: from the plan, typed in, every week, a usual buy, or the assistant.
The planned meals it’s for.
object
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.
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.