Skip to content
merran
GitHubInstall

Merran documentation API & integrations

Tidy up many recipes

POST
/api/recipes/tidy
curl --request POST \
--url http://localhost:3000/api/recipes/tidy \
--header 'Content-Type: application/json' \
--cookie merran.session_token=<merran.session_token> \
--data '{ "ids": [ "0199e8b0-5a10-7a01-8b00-000000000006", "0199e8b0-5a10-7a01-8b00-000000000007" ] }'

Tidies recipes in the background, one at a time, with the suggestions left in the Review queue: the ones picked, or every recipe not tidied yet (household admins only), say after moving from another app. It stops if there’s no AI, this month’s limit is reached, a key runs out of credit, or three recipes in a row fail. Follow it at GET /recipes/tidy. With an API key, it needs the recipes: write permission.

Media typeapplication/json
object
ids

The recipes to tidy. Left out, every recipe not tidied yet, which only household admins can start.

Array<string>
>= 1 items <= 200 items

Example

{
"ids": [
"0199e8b0-5a10-7a01-8b00-000000000006",
"0199e8b0-5a10-7a01-8b00-000000000007"
]
}

Started, or the one already going.

Media typeapplication/json
object
id
required
string
status
required
string
Allowed values: queued running done failed cancelled
library
required

Every recipe not tidied yet, rather than ones picked.

boolean
total
required
number
done
required
number
suggested
required

Recipes with suggestions waiting in Review.

number
fine
required

Recipes with nothing to change.

number
failed
required
number
stopped
required

Why it stopped before the end, when it did: no AI, this month’s limit, no credit, or three failures in a row.

string | null
startedAt
required
string | null format: date-time
finishedAt
required
string | null format: date-time

Example

{
"id": "0199e8b0-5a10-7a01-8b00-00000000002a",
"status": "running",
"library": true,
"total": 52,
"done": 12,
"suggested": 9,
"fine": 3,
"failed": 0,
"stopped": null,
"startedAt": "2026-10-01T17:30:00.000Z",
"finishedAt": null
}

Nothing to tidy.

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

© 2026 Kyle Johnson. Documentation: CC BY 4.0. Merran: AGPL-3.0-or-later.