Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Put a receipt's lines in the pantry

POST
/api/pantry/receipts/{receiptId}/add
curl --request POST \
--url http://localhost:3000/api/pantry/receipts/0199e8b0-5a10-7a01-8b00-00000000002e/add \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "items": [ { "id": "0d1b5c2a9e44", "name": "whole milk", "amount": "1 gal" } ] }'

The lines picked, named and measured as looked over, go in the pantry like shopping put away: in the fridge, freezer or cupboard with a use-by guess, kept for the meals the list item was for, and noted for usual buys. The list items they were bought for come off the list. The receipt’s done with after. With an API key, it needs the pantry: write permission.

receiptId
required
string

Example

0199e8b0-5a10-7a01-8b00-00000000002e
Media typeapplication/json
object
items
required
Array<object>
>= 1 items <= 300 items
object
id
required
string
>= 1 characters <= 40 characters
name
required
string
>= 1 characters <= 200 characters
amount
required
string | null
<= 60 characters

Example

{
"items": [
{
"id": "0d1b5c2a9e44",
"name": "whole milk",
"amount": "1 gal"
}
]
}

Added.

Media typeapplication/json
object
added
required
integer
offTheList
required

Shopping list items taken off with them.

integer

Example

{
"added": 12,
"offTheList": 4
}

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

No such receipt waiting.

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.