/api/v1/meal-plans
Create a shared meal plan
/api/v1/meal-plansSession cookie set by POST /api/v1/auth/login.
In: cookie
Query Parameters
First day (YYYY-MM-DD) of the entries to answer with; with to left out too, the current week
dateLast day (YYYY-MM-DD), inclusive, at most 62 days after from
dateThe reader's today (YYYY-MM-DD): unlisted leaves out the days before it; left out, today in the server's time zone
dateRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
curl -X POST "https://example.com/api/v1/meal-plans" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "$schema": "https://example.com/api/v1/schemas/Plan.json", "entries": [ { "createdBy": { "avatarId": "string", "color": "string", "displayName": "string", "id": "string" }, "day": "string", "id": "string", "lists": [ { "entries": 0, "id": "string", "name": "string", "openCount": 0 } ], "photo": "string", "photoFocus": { "x": 0, "y": 0 }, "photoHeight": 0, "photoWidth": 0, "position": 0, "recipeId": "string", "recipeSlug": "string", "servings": 0, "title": "string" } ], "from": "string", "hasEntries": true, "id": "string", "lists": [ { "entries": 0, "id": "string", "name": "string", "openCount": 0 } ], "members": [ { "avatarId": "string", "color": "string", "displayName": "string", "id": "string" } ], "name": "string", "owner": { "avatarId": "string", "color": "string", "displayName": "string", "id": "string" }, "pending": [ { "avatarId": "string", "color": "string", "displayName": "string", "id": "string" } ], "personal": true, "revision": 0, "to": "string", "unlisted": 0}/api/v1/meal-plans GET
List the caller's meal plans and invitations
/api/v1/meal-plans/week GET
The plans as list-meal-plans orders them, each with the entries on the days of the range, the lists the caller can access that they and the tray are on, and how many recipe entries are on none; and the pending invitations. One request for the plans page, however many plans. Left out, the range is the current week in the server's time zone, so a client passes its own; it passes its today too, since unlisted leaves out the days before it. Each plan also says how many entries lie on a day after the range (later) and which comes first (next), so an empty week can say what comes later.