# meal planner

## &#x20;get every mealplan

<mark style="color:blue;">`GET`</mark> `https://api.eatmeup.me/calendar/mealplan`

#### Headers

| Name    | Type   | Description            |
| ------- | ------ | ---------------------- |
| cookies | string | token(access, refresh) |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}

```
{
    success: true,
    mealPlan: [
    {
    id: 1,
    date: "2021-03-03"
    ...
    mealplanBreakfast: [
        recipe...],
    mealplanLunch: [
        recipe...],
    mealplanDinner: [
        recipe...]
    }...],
    message: load success
}
```

{% endtab %}

{% tab title="400 Could not find a cake matching this query." %}

```
{
    success: false,
    message: load fail,
    error: error
}
```

{% endtab %}
{% endtabs %}

## get one mealplan

<mark style="color:blue;">`GET`</mark> `https://api.eapmeup.me/calendar/mealplan/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | string | mealplan id |

#### Headers

| Name    | Type   | Description            |
| ------- | ------ | ---------------------- |
| cookies | string | token(access, refresh) |

{% tabs %}
{% tab title="200 " %}

```
{
    success: true,
    mealPlan: [
    {
    id: 1,
    date: "2021-03-03"
    ...
    mealplanBreakfast: [
        recipe...],
    mealplanLunch: [
        recipe...],
    mealplanDinner: [
        recipe...]
    }],
    message: "load success"
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    success: false,
    message: "load fail",
    error: error
}
```

{% endtab %}
{% endtabs %}

## add mealplan

<mark style="color:green;">`POST`</mark> `https://api.eatmeup.me/calendar/mealplan`

#### Headers

| Name    | Type   | Description            |
| ------- | ------ | ---------------------- |
| cookies | string | token(access, refresh) |

#### Request Body

| Name      | Type   | Description        |
| --------- | ------ | ------------------ |
| date      | string | date               |
| breakfast | array  | array of recipe id |
| lunch     | array  |                    |
| dinner    | array  |                    |

{% tabs %}
{% tab title="201 " %}

```
{
      success: true,
      message: "add success"
}
```

{% endtab %}

{% tab title="400 " %}

```
{
      success: false,
      message: "add fail",
      error: error
}
```

{% endtab %}
{% endtabs %}

## delete mealplan

<mark style="color:red;">`DELETE`</mark> `https://api.eatmeup.me/calendar/mealplan/:id`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | string | mealplan id |

#### Headers

| Name    | Type   | Description            |
| ------- | ------ | ---------------------- |
| cookies | string | token(access, refresh) |

{% tabs %}
{% tab title="200 " %}

```
{
      success: true,
      message: "delete success"
}
```

{% endtab %}

{% tab title="400 " %}

```
{
      success: false,
      message: "delete fail",
      error: error
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://juy5437.gitbook.io/eatmeup/meal-planner.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
