Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Recipes and planned meals behind a shopping substitution

GET
/api/list/items/{itemId}/substitutions
curl --request GET \
--url http://localhost:3000/api/list/items/0199e8b0-5a10-7a01-8b00-00000000001d/substitutions

Signed-in household members only. Finds actual main-dish and side ingredient lines, scaled to planned servings, with saved meal variants and conflict tokens.

itemId
required
string

Example

0199e8b0-5a10-7a01-8b00-00000000001d

Ingredient contexts.

Media typeapplication/json
object
targets
required
Array<object>
object
mealId
required
string
mealName
required
string
date
required
string
anyDay
required
boolean
revision
required
string
recipe
required

Ingredients and instructions saved for one planned meal; the library recipe stays separate. Nutrition must be recalculated for substitutions.

object
recipeId
required
string
name
required
string
<= 500 characters
servings
required
number | null
> 0
basedOn
required
string
needs
required
Array<string>
<= 100 items
ingredients
required
Array
<= 500 items
object
id
required
string
section
required
string | null
text
required

The line as written.

string
quantity
required
number | null
quantityMax
required
number | null
unit
required
string | null
food
required
string | null
note
required
string | null
mark
required

What it is to the dish, as tidy up marked it: needed, swappable or optional. A dislike is left out of lines that aren’t needed. None until marked.

string | null
Allowed values: needed swappable optional
foodKey
string | null
steps
required
Array<object>
<= 500 items
object
id
required
string
section
required
string | null
text
required
string
ingredientId
required
string
factor
required
number
state
required
string
canSaveToLibrary
required
boolean

Example

{
"targets": [
{
"mealId": "0199e8b0-5a10-7a01-8b00-00000000001b",
"mealName": "Lemon Chicken",
"date": "2026-10-15",
"anyDay": false,
"revision": "2026-10-15T18:30:00.000Z",
"recipe": {
"recipeId": "0199e8b0-5a10-7a01-8b00-000000000006",
"name": "Lemon Chicken",
"servings": 4,
"basedOn": "2026-10-15T18:30:00.000Z",
"needs": [],
"ingredients": [
{
"id": "0199e8b0-5a10-7a01-8b00-000000000011",
"section": null,
"text": "2 lb chicken thighs",
"quantity": 2,
"quantityMax": null,
"unit": "pound",
"food": "chicken thighs",
"note": null,
"mark": "needed"
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000012",
"section": null,
"text": "1 tbsp olive oil",
"quantity": 1,
"quantityMax": null,
"unit": "tablespoon",
"food": "olive oil",
"note": null,
"mark": "optional"
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000013",
"section": null,
"text": "2 lemons, juiced",
"quantity": 2,
"quantityMax": null,
"unit": null,
"food": "lemons",
"note": "juiced",
"mark": "needed"
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000014",
"section": null,
"text": "4 cloves garlic, smashed",
"quantity": 4,
"quantityMax": null,
"unit": "clove",
"food": "garlic",
"note": "smashed",
"mark": "swappable"
}
],
"steps": [
{
"id": "0199e8b0-5a10-7a01-8b00-000000000015",
"section": null,
"text": "Heat the oven to 425°F."
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000016",
"section": null,
"text": "Toss the chicken with the oil, lemon juice, garlic, salt and pepper."
},
{
"id": "0199e8b0-5a10-7a01-8b00-000000000017",
"section": null,
"text": "Roast skin side up for 40 minutes, until crisp."
}
]
},
"ingredientId": "0199e8b0-5a10-7a01-8b00-000000000011",
"factor": 1,
"state": "example-state",
"canSaveToLibrary": true
}
]
}

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

Item not found.

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.