GET
/meal-plan
Get the meal plan for a week
This week by default. Pass week_start as any date (YYYY-MM-DD) to get the week that contains it: weeks
start on the day the family chose, so any day of a week returns that week.
Parameters
| Field | Type | Notes |
|---|---|---|
| week_start Any date in the week you want, as YYYY-MM-DD. Leave it out for this week. | string | Any date in the week you want, as YYYY-MM-DD. Leave it out for this week. |
Example request
curl -X GET https://thesaucery.nz/api/v1/meal-plan \ -H "Authorization: Bearer sc_key_..."
Response 200 · OK
| Field | Type | Notes |
|---|---|---|
| data | object | |
| data.id | string | |
| data.family_id | any | |
| data.week_start_date | string | |
| data.entries | object[]optional | |
| data.entries[].id | string | |
| data.entries[].date | string | |
| data.entries[].meal_type | string | |
| data.entries[].recipe | objectoptional | |
| data.entries[].recipe.id | string | |
| data.entries[].recipe.family_id | any | |
| data.entries[].recipe.web_url | string | |
| data.entries[].recipe.title | string | |
| data.entries[].recipe.description | string or null | |
| data.entries[].recipe.cuisine | string or null | |
| data.entries[].recipe.tags | any | |
| data.entries[].recipe.source_type | string | |
| data.entries[].recipe.source_url | string or null | |
| data.entries[].recipe.source_name | string or null | |
| data.entries[].recipe.prep_time_minutes | integer or null | |
| data.entries[].recipe.cook_time_minutes | integer or null | |
| data.entries[].recipe.total_time_minutes | integer or null | |
| data.entries[].recipe.servings | integer | |
| data.entries[].recipe.photos | string[] | |
| data.entries[].recipe.is_stylizing_hero | boolean | |
| data.entries[].recipe.sketch_url | string or null | |
| data.entries[].recipe.is_sketching | boolean | |
| data.entries[].recipe.notes | string or null | |
| data.entries[].recipe.image_prompt | string or null | |
| data.entries[].recipe.visibility | string | |
| data.entries[].recipe.is_favourite | boolean | |
| data.entries[].recipe.needs_review | boolean | |
| data.entries[].recipe.ingredients | object[]optional | |
| data.entries[].recipe.steps | object[]optional | |
| data.entries[].recipe.last_cooked_at | stringoptional | |
| data.entries[].recipe.times_cooked | integeroptional | |
| data.entries[].recipe.comments | object[]optional | |
| data.entries[].recipe.created_by | objectoptional | |
| data.entries[].recipe.lab_items | string | |
| data.entries[].recipe.created_at | string or null | |
| data.entries[].recipe.updated_at | string or null | |
| data.entries[].recipe.is_starter True for one of the sample recipes every new family's book starts with, which the family did not add. Always present. | boolean | True for one of the sample recipes every new family's book starts with, which the family did not add. Always present. |
| data.entries[].recipe.byline Where the recipe came from when it is not the family's own, ready to show under the title, e.g. "From The Saucery". Null for the family's own recipes. | string or null | Where the recipe came from when it is not the family's own, ready to show under the title, e.g. "From The Saucery". Null for the family's own recipes. |
| data.entries[].recipe.scales True when a planned meal of this recipe is cooked for the household and starts at the family's default servings. False for a batch, such as a cake or a loaf, which is planned at the recipe's own servings. Always present. | boolean | True when a planned meal of this recipe is cooked for the household and starts at the family's default servings. False for a batch, such as a cake or a loaf, which is planned at the recipe's own servings. Always present. |
| data.entries[].recipe.shared_by_name The name of the person who sent the link this recipe was saved from, e.g. "Grace". Null for a recipe that was not saved from a share link. Separate from source_name, which says where the recipe originally came from. | string or null | The name of the person who sent the link this recipe was saved from, e.g. "Grace". Null for a recipe that was not saved from a share link. Separate from source_name, which says where the recipe originally came from. |
| data.entries[].recipe.added_byline Who in the family added the recipe, ready to show under the title: "Added by you" to the person who added it, "Added by Hemi" to anyone else, with " from Grace’s link" on the end when it was saved from a share link. Null for a sample recipe, which has byline instead. | string or null | Who in the family added the recipe, ready to show under the title: "Added by you" to the person who added it, "Added by Hemi" to anyone else, with " from Grace’s link" on the end when it was saved from a share link. Null for a sample recipe, which has byline instead. |
| data.entries[].recipe.cost What the recipe costs to cook at the family's store, for what goes in the pot rather than the packs it comes in: a teaspoon of salt costs a teaspoon's worth. Null when the family's plan does not include grocery prices, or it has not chosen a store. `line_count` is the ingredient lines with an amount, `priced_count` how many of those have a price, and `coverage` the share priced, 0 to 1. `unquantified_count` is the lines with no amount, such as "salt to taste", which are in neither the total nor the coverage. `total` and `per_serving` (the total over the recipe's servings, null when it has none) are NZD to the cent, and are null unless `is_complete`, which is true once at least 80% of the lines with an amount are priced, so a client can say "7 of 11 priced" instead of a total that is short. | object or nulloptional | What the recipe costs to cook at the family's store, for what goes in the pot rather than the packs it comes in: a teaspoon of salt costs a teaspoon's worth. Null when the family's plan does not include grocery prices, or it has not chosen a store. `line_count` is the ingredient lines with an amount, `priced_count` how many of those have a price, and `coverage` the share priced, 0 to 1. `unquantified_count` is the lines with no amount, such as "salt to taste", which are in neither the total nor the coverage. `total` and `per_serving` (the total over the recipe's servings, null when it has none) are NZD to the cent, and are null unless `is_complete`, which is true once at least 80% of the lines with an amount are priced, so a client can say "7 of 11 priced" instead of a total that is short. |
| data.entries[].recipe.is_draft True for a draft: a recipe the assistant wrote for the signed-in person that is not in the family's book yet, and that only they can see. Keep it with POST /api/recipes/{recipe}/keep, or discard it with DELETE /api/recipes/{recipe}. Always present. | boolean | True for a draft: a recipe the assistant wrote for the signed-in person that is not in the family's book yet, and that only they can see. Keep it with POST /api/recipes/{recipe}/keep, or discard it with DELETE /api/recipes/{recipe}. Always present. |
| data.entries[].recipe.draft_expires_at When an unkept draft is discarded, as an ISO-8601 timestamp. Null for a recipe that is kept. | string | When an unkept draft is discarded, as an ISO-8601 timestamp. Null for a recipe that is kept. |
| data.entries[].recipe.chapter The cookbook chapter the recipe sits in, as a slug: breakfast, mains, sides, snacks, baking, desserts, basics or drinks. GET /api/recipes/chapters lists them in order with their names. Null for a recipe not filed yet, which happens shortly after it is saved. Set it with POST or PUT /api/recipes; null hands it back to be filed again. | string or null | The cookbook chapter the recipe sits in, as a slug: breakfast, mains, sides, snacks, baking, desserts, basics or drinks. GET /api/recipes/chapters lists them in order with their names. Null for a recipe not filed yet, which happens shortly after it is saved. Set it with POST or PUT /api/recipes; null hands it back to be filed again. |
| data.entries[].recipe.chapter_chosen_by_user True when a person chose the chapter, rather than it being filed automatically. A chosen chapter is never changed by anything automatic. Always present. | boolean | True when a person chose the chapter, rather than it being filed automatically. A chosen chapter is never changed by anything automatic. Always present. |
| data.entries[].recipe.grocery_specials | object[] or null | |
| data.entries[].recipe_id | string | |
| data.entries[].recipe_link_source 'user' if someone picked the recipe, 'auto' if we inferred it from the label they typed. Clients can use it to offer an "not this one?" escape hatch on a link they didn't ask for; the label stays the display string either way. | string or null | 'user' if someone picked the recipe, 'auto' if we inferred it from the label they typed. Clients can use it to offer an "not this one?" escape hatch on a link they didn't ask for; the label stays the display string either way. |
| data.entries[].label | string or null | |
| data.entries[].generating True while Whisp is writing this night's recipe, after a new idea from Fill my week: the night has its title in `label` and no recipe yet. The recipe is attached to this same entry and `mealplan.updated` is broadcast when it lands, or when writing fails, which leaves the title with no recipe and this false. | boolean | True while Whisp is writing this night's recipe, after a new idea from Fill my week: the night has its title in `label` and no recipe yet. The recipe is attached to this same entry and `mealplan.updated` is broadcast when it lands, or when writing fails, which leaves the title with no recipe and this false. |
| data.entries[].servings | integer or null | |
| data.entries[].postponed_from_entry_id Kept for clients shipped before the day a postponed meal left was freed. Always null now — read postponed_from_date. | string or null | Kept for clients shipped before the day a postponed meal left was freed. Always null now — read postponed_from_date. |
| data.entries[].postponed_from_date The day this meal was first planned on, if it was postponed from there. Later moves keep it, and it clears when the meal goes back to that day or a different meal takes its place. Its ingredients were bought for the original week, so it is deliberately absent from this week's shopping list. | string | The day this meal was first planned on, if it was postponed from there. Later moves keep it, and it clears when the meal goes back to that day or a different meal takes its place. Its ingredients were bought for the original week, so it is deliberately absent from this week's shopping list. |
| data.entries[].leftovers_from_entry_id The dinner this lunch is the leftovers of, by entry id, or null. The lunch has the dinner's recipe, and adds nothing to the shopping list: the dinner is bought for both. It moves to the day after the dinner when the dinner moves, and goes when the dinner is taken off the plan or loses its recipe. | string or null | The dinner this lunch is the leftovers of, by entry id, or null. The lunch has the dinner's recipe, and adds nothing to the shopping list: the dinner is bought for both. It moves to the day after the dinner when the dinner moves, and goes when the dinner is taken off the plan or loses its recipe. |
| data.entries[].leftovers_from_date The day of that dinner, or null. | string or null | The day of that dinner, or null. |
| data.entries[].ingredients_already_purchased | boolean | |
| data.entries[].cooked_at | string | |
| data.entries[].cook Who is cooking this meal, or null when nobody has been named. It moves with the meal: a move, swap or postpone takes it along, and a different meal on the same night keeps it. Set it with PUT /meal-plan/entry/{id}/cook. `user_id` is the member's user id (equal to `id`) when the cook is in the family, or null for someone without the app, whose `id` is one of the family's `cooks`. `pending` is true while that person is invited and has not joined. | any | Who is cooking this meal, or null when nobody has been named. It moves with the meal: a move, swap or postpone takes it along, and a different meal on the same night keeps it. Set it with PUT /meal-plan/entry/{id}/cook. `user_id` is the member's user id (equal to `id`) when the cook is in the family, or null for someone without the app, whose `id` is one of the family's `cooks`. `pending` is true while that person is invited and has not joined. |
| data.entries[].cook_user_id The cook's user id (the same id as the family's members), or null, including when the cook is someone without the app. | string or null | The cook's user id (the same id as the family's members), or null, including when the cook is someone without the app. |
| data.created_at | string or null | |
| data.updated_at | string or null |
Other responses
| Status | Meaning |
|---|---|
| 422 | Validation error |