Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Put something in the pantry

POST
/api/pantry/items
curl --request POST \
--url http://localhost:3000/api/pantry/items \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "text": "2 cans black beans" }'

As typed: “2 lb chicken thighs” or just “rice”. It goes in the fridge, freezer or cupboard as the food suggests, with a use-by guess for fresh food, and joins the same food already there when the amounts add up. With an API key, it needs the pantry: write permission.

Media typeapplication/json
object
text
required

“2 cans black beans”, or just “rice”.

string
>= 1 characters <= 200 characters
storedIn

Where it’s kept; a guess from the food when left out.

string | null
Allowed values: fridge freezer cupboard

Example

{
"text": "2 cans black beans"
}

At home.

Media typeapplication/json
object
id
required
string
name
required
string
amount
required

How much, as it shows: “2 lb”, “half a bag”, or empty for just “have it”.

string
quantity
required
number | null
unit
required
string | null
amountText
required
string | null
storedIn
required

Where it’s kept.

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

The planned meals it’s set aside for.

Array<object>
object
id
required
string
name
required
string
date
required
string
/^\d{4}-\d{2}-\d{2}$/
status
required
string
Allowed values: planned cooked skipped
useSoon
required
One of:
object
kind
required
string
Allowed values: past
date
required
string
/^\d{4}-\d{2}-\d{2}$/
createdAt
required
string format: date-time

Example

{
"id": "0199e8b0-5a10-7a01-8b00-000000000026",
"name": "chicken thighs",
"amount": "2 lb",
"quantity": 2,
"unit": "pound",
"amountText": null,
"storedIn": "fridge",
"aisle": "0199e8b0-5a10-7a01-8b00-000000000021",
"useBy": "2026-10-18",
"meals": [
{
"id": "0199e8b0-5a10-7a01-8b00-00000000001b",
"name": "Lemon Chicken",
"date": "2026-10-17",
"status": "planned"
}
],
"useSoon": {
"kind": "soon",
"date": "2026-10-18"
},
"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.