> For the complete documentation index, see [llms.txt](https://docs.suggestic.com/graphql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.suggestic.com/graphql/query/mutations/meal-plan/simplified-meal-tracking/create-a-meal-entry.md).

# Create a Meal Tracker Entry

Meal Tracking is a simplified version of food logging that only works for meal plan meals.

Use the `createMealEntry` mutation to add a meal entry for a specific meal. These created meal entries can be tracked by using the  [`mealTracker`](https://docs.suggestic.com/graphql/query/queries/meal-tracker) query.&#x20;

Meal entries can have an assigned value. For instance, if you want to skip a meal, you can send the `value: SKIPPED` as a parameter. Below you will find all the possible values a meal entry can have.

{% hint style="danger" %}
**Note:** Currently tracking service only supports [JWT authentication](https://docs.suggestic.com/graphql/graphql/authentication#jwt-authentication)
{% endhint %}

### **Required Arguments**

| Field    | Type   | Note                                                                                                                                                                                |
| -------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `mealId` | ID     | The meal ID (from the [meal plan](https://docs.suggestic.com/graphql/query/queries/meal-plan/meal-plan-1))                                                                          |
| `value`  | String | <p>Value of the meal. Possible values:</p><p><code>SKIPPED</code>, <code>ATE</code>, <code>OTHER\_FOLLOWING</code>, <code>OTHER\_NOT\_FOLLOWING</code>, and <code>DELETE</code></p> |

### Available Fields

The following fields will be displayed in the response:

| Field     | Type    | Note                                                                        |
| --------- | ------- | --------------------------------------------------------------------------- |
| `success` | Boolean | **True** if a meal entry has been created. Otherwise, it displays **False** |
| `message` | String  | Description of the result                                                   |

## Examples

The following examples will create a *skipped* meal entry&#x20;

### GraphQL Example

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

```graphql
mutation
{ createMealEntry(mealId:"TWVhbDoxMzUyMzE0" value: SKIPPED)
  {
    success
    message
  } 
  
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "createMealEntry": {
      "success": true,
      "message": "Meal plan entry was successfully saved"
    }
  }
}
```

{% endtab %}
{% endtabs %}

### curl Example

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

```java
curl -XPOST 'https://production.suggestic.com/graphql' \
  -H 'Authorization: Bearer <User-JWT>' \
  -H 'Content-Type: application/json' \
--data-raw '{"query":"mutation { createMealEntry(mealId:\"TWVhbDoxMzUyMzE0\", value: SKIPPED) { success message } }"}'
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
    "data": {
        "createMealEntry": {
            "success": true,
            "message": "Meal plan entry was successfully saved"
        }
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.suggestic.com/graphql/query/mutations/meal-plan/simplified-meal-tracking/create-a-meal-entry.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
