Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Add to what a recipe goes with

POST
/api/recipes/{recipe}/pairings
curl --request POST \
--url http://localhost:3000/api/recipes/lemon-chicken/pairings \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "recipes": [ "garlic-rice" ] }'

Recipes, or every recipe with a tag, so new ones join by themselves. Ones it already goes with, and the recipe itself, are skipped. With an API key, it needs the recipes: write permission.

recipe
required

The recipe’s id, or its slug.

string

Example

lemon-chicken

The recipe’s id, or its slug.

Media typeapplication/json
object
recipes

Recipes it goes with, by id or slug.

Array<string>
<= 100 items
tag

Or every recipe with this tag, now and later.

string
>= 1 characters <= 40 characters

Example

{
"recipes": [
"garlic-rice"
]
}

What it goes with now.

Media typeapplication/json
object
pairings
required

What it goes with, as set.

Array
One of:
object
id
required
string
kind
required
string
Allowed values: recipe
recipe
required
object
id
required
string
slug
required
string
name
required
string
photo
required

Its card-sized photo, or null.

string | null
servings
required
number | null
totalMinutes
required
number | null
options
required

Every recipe that adds up to: picked ones first, then tagged ones by name.

Array<object>
object
id
required
string
slug
required
string
name
required
string
photo
required

Its card-sized photo, or null.

string | null
servings
required
number | null
totalMinutes
required
number | null
pairsWith
required

Recipes it’s offered with: the other way round.

Array<object>
object
id
required
string
slug
required
string
name
required
string
photo
required

Its card-sized photo, or null.

string | null
servings
required
number | null
totalMinutes
required
number | null

Example

{
"pairings": [
{
"id": "0199e8b0-5a10-7a01-8b00-00000000000e",
"kind": "recipe",
"recipe": {
"id": "0199e8b0-5a10-7a01-8b00-000000000007",
"slug": "garlic-rice",
"name": "Garlic Rice",
"photo": null,
"servings": 4,
"totalMinutes": 25
}
},
{
"id": "0199e8b0-5a10-7a01-8b00-00000000000f",
"kind": "tag",
"tag": "salad"
}
],
"options": [
{
"id": "0199e8b0-5a10-7a01-8b00-000000000007",
"slug": "garlic-rice",
"name": "Garlic Rice",
"photo": null,
"servings": 4,
"totalMinutes": 25
}
],
"pairsWith": []
}

Nothing picked, or no tag by that name.

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 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 recipe, or one of those to pair isn’t there.

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.