Merran documentation API & integrations
Put a receipt's lines in the pantry
POST
/api/pantry/receipts/{receiptId}/add
const url = 'http://localhost:3000/api/pantry/receipts/0199e8b0-5a10-7a01-8b00-00000000002e/add';const options = { method: 'POST', headers: { cookie: 'merran.session_token=<merran.session_token>', 'Content-Type': 'application/json' }, body: '{"items":[{"id":"0d1b5c2a9e44","name":"whole milk","amount":"1 gal"}]}'};
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/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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”receiptId
required
string
Example
0199e8b0-5a10-7a01-8b00-00000000002eRequest Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
items
required
Array<object>
object
id
required
string
name
required
string
amount
required
string | null
Example
{ "items": [ { "id": "0d1b5c2a9e44", "name": "whole milk", "amount": "1 gal" } ]}Responses
Section titled “Responses”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.