From e5ce510fdcefa28acfdd4c2fe51961a3d45c76c3 Mon Sep 17 00:00:00 2001 From: Erich Blume Date: Tue, 17 Mar 2026 11:10:48 -0700 Subject: [PATCH] Fix plan-a-meal random recipe API queries Mealie's orderBy=random requires a paginationSeed parameter, otherwise the API returns 422. Added the seed to all random query examples. Co-Authored-By: Claude Opus 4.6 (1M context) --- docs/changelog.d/+fix-plan-a-meal-random-query.bugfix.md | 1 + docs/how-to/mealie/plan-a-meal.md | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 docs/changelog.d/+fix-plan-a-meal-random-query.bugfix.md diff --git a/docs/changelog.d/+fix-plan-a-meal-random-query.bugfix.md b/docs/changelog.d/+fix-plan-a-meal-random-query.bugfix.md new file mode 100644 index 0000000..179a9fe --- /dev/null +++ b/docs/changelog.d/+fix-plan-a-meal-random-query.bugfix.md @@ -0,0 +1 @@ +Fix plan-a-meal random recipe queries — add required `paginationSeed` parameter diff --git a/docs/how-to/mealie/plan-a-meal.md b/docs/how-to/mealie/plan-a-meal.md index c21a861..1e6eb48 100644 --- a/docs/how-to/mealie/plan-a-meal.md +++ b/docs/how-to/mealie/plan-a-meal.md @@ -47,16 +47,18 @@ Select one recipe from each tag category to build a balanced dinner: Query by tag: ```fish +set SEED (date +%s) + # Get a random protein -curl -sf "https://meals.ops.eblu.me/api/recipes?tags=protein&orderBy=random&perPage=1" \ +curl -sf "https://meals.ops.eblu.me/api/recipes?tags=protein&orderBy=random&paginationSeed=$SEED&perPage=1" \ -H "Authorization: Bearer $MEALIE_TOKEN" # Get a random carb -curl -sf "https://meals.ops.eblu.me/api/recipes?tags=carb&orderBy=random&perPage=1" \ +curl -sf "https://meals.ops.eblu.me/api/recipes?tags=carb&orderBy=random&paginationSeed=$SEED&perPage=1" \ -H "Authorization: Bearer $MEALIE_TOKEN" # Get a random vegetable -curl -sf "https://meals.ops.eblu.me/api/recipes?tags=vegetable&orderBy=random&perPage=1" \ +curl -sf "https://meals.ops.eblu.me/api/recipes?tags=vegetable&orderBy=random&paginationSeed=$SEED&perPage=1" \ -H "Authorization: Bearer $MEALIE_TOKEN" ```