Submitting Nutrition to Inform Connect

The nutrition endpoint provides a summary of nutritional intake, and detailed meal information.

nutrition reports a daily summary of nutrition (for example, calories, fiber, sugars, and saturated fat for the day). Nutrition also reports the summary information about each meal (for example, calories, fiber, sugars, and saturated fat for breakfast) and it acts as a container for the foods which make up a given meal (for example, calories, fiber, sugars, and saturated fat for eggs).

📘

A user will only have one nutrition per Data Source for a given day.

Nutrition must include a name and category.

  • Name: A free form field that defines the workout type for the record.
  • Category: The category of the nutrition event. Use other if your nutrition record represents a period of time larger than a single meal. Valid values: food, meal, other.

Nutrition may contain segments to break down the daily nutrition summary into individual items (for example, breakfast, lunch, and dinner). A Segment is an array that provides a more granular view of the items that compose the nutrition summary. Generally nutrition segments align with meal designations (breakfast, lunch, dinner, snack).

Further, a nutrition segment may contain food to break down the segment into individual items (for example, a breakfast segment could contain foods for eggs, bacon, and toast).

Due to the complexity of nutrition, we recommend working with our Inform Connect team to ensure you understand this complicated endpoint and map your data points correctly, however, here's a sample of how to use this endpoint.


Example Nutrition POST

{
    "log_id": "validic-test-nutrition-record-1",
    "start_time": "2025-02-24T12:30:09Z",
    "end_time": "2025-02-24T12:30:09Z",
    "utc_offset": -18000,
    "offset_origin": "source",
    "metrics": [
                {
                    "type": "energy_consumed",
                    "origin": "unknown",
                    "unit": "kcal",
                    "value": 1963.0
                },
                {
                    "type": "dietary_fiber",
                    "origin": "unknown",
                    "unit": "g",
                    "value": 14.94
                },
                {
                    "type": "water",
                    "origin": "unknown",
                    "unit": "mL",
                    "value": 0.0
                },
                {
                    "type": "carbohydrate",
                    "origin": "unknown",
                    "unit": "g",
                    "value": 225.46
                },
                {
                    "type": "fat",
                    "origin": "unknown",
                    "unit": "g",
                    "value": 94.13
                },
                {
                    "type": "protein",
                    "origin": "unknown",
                    "unit": "g",
                    "value": 81.04
                },
                {
                    "type": "sodium",
                    "origin": "unknown",
                    "unit": "mg",
                    "value": 3101.43
                }
            ],
    "segments": [
                {
                    "name": "Breakfast Summary",
                    "metrics": [
                        {
                            "type": "energy_consumed",
                            "origin": "unknown",
                            "unit": "kcal",
                            "value": 338.0
                        },
                        {
                            "type": "dietary_fiber",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 0.0
                        },
                        {
                            "type": "carbohydrate",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 0.5
                        },
                        {
                            "type": "fat",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 14.31
                        },
                        {
                            "type": "protein",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 6.2
                        },
                        {
                            "type": "sodium",
                            "origin": "unknown",
                            "unit": "mg",
                            "value": 405.77
                        }
                    ],
                    "food": [
                            {
                                "name": "Toast, Whole Wheat",
                                "brand": "La Cena",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 70.0
                                    }
                                ],
                                "serving": {
                                    "amount": 2,
                                    "unit_name": "piece"
                                }
                            },
                            {
                                "name": "Bacon",
                                "brand": "",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 158.0
                                    },
                                    {
                                        "type": "dietary_fiber",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 0.0
                                    },
                                    {
                                        "type": "carbohydrate",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 0.5
                                    },
                                    {
                                        "type": "fat",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 14.31
                                    },
                                    {
                                        "type": "protein",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 6.2
                                    },
                                    {
                                        "type": "sodium",
                                        "origin": "unknown",
                                        "unit": "mg",
                                        "value": 405.77
                                    }
                                ],
                                "serving": {
                                    "amount": 2,
                                    "unit_name": "slice"
                                }
                            },
                            {
                                "name": "Orange Juice",
                                "brand": "Simply Orange",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 110.0
                                    }
                                ],
                                "serving": {
                                    "amount": 8,
                                    "unit_name": "fl oz"
                                }
                            }
                    ]
                },
                {
                    "name": "Lunch Summary",
                    "metrics": [
                        {
                            "type": "energy_consumed",
                            "origin": "unknown",
                            "unit": "kcal",
                            "value": 767.0
                        },
                        {
                            "type": "dietary_fiber",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 4.69
                        },
                        {
                            "type": "carbohydrate",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 50.26
                        },
                        {
                            "type": "fat",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 22.85
                        },
                        {
                            "type": "protein",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 5.04
                        },
                        {
                            "type": "sodium",
                            "origin": "unknown",
                            "unit": "mg",
                            "value": 259.96
                        }
                    ],
                    "food": [
                            {
                                "name": "Chick-fil-A Nuggets, 6-Count",
                                "brand": "Chick-Fil-A",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 190.0
                                    }
                                ],
                                "serving": {
                                    "amount": 6,
                                    "unit_name": "nugget"
                                }
                            },
                            {
                                "name": "Pepsi Cola",
                                "brand": "Pepsi",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 150.0
                                    }
                                ],
                                "serving": {
                                    "amount": 12,
                                    "unit_name": "fl oz"
                                }
                            },
                            {
                                "name": "French Fries",
                                "brand": "",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 427.0
                                    },
                                    {
                                        "type": "dietary_fiber",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 4.69
                                    },
                                    {
                                        "type": "carbohydrate",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 50.26
                                    },
                                    {
                                        "type": "fat",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 22.85
                                    },
                                    {
                                        "type": "protein",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 5.04
                                    },
                                    {
                                        "type": "sodium",
                                        "origin": "unknown",
                                        "unit": "mg",
                                        "value": 259.96
                                    }
                                ],
                                "serving": {
                                    "amount": 1,
                                    "unit_name": "medium"
                                }
                            }
                    ]
                },
                {
                    "name": "Dinner Summary",
                    "metrics": [
                        {
                            "type": "energy_consumed",
                            "origin": "unknown",
                            "unit": "kcal",
                            "value": 718.0
                        },
                        {
                            "type": "dietary_fiber",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 5.25
                        },
                        {
                            "type": "carbohydrate",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 63.7
                        },
                        {
                            "type": "fat",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 39.980000000000004
                        },
                        {
                            "type": "protein",
                            "origin": "unknown",
                            "unit": "g",
                            "value": 41.8
                        },
                        {
                            "type": "sodium",
                            "origin": "unknown",
                            "unit": "mg",
                            "value": 1500.7
                        }
                    ],
                    "food": [
                            {
                                "name": "Baked Potato",
                                "brand": "",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 259.0
                                    },
                                    {
                                        "type": "dietary_fiber",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 5.25
                                    },
                                    {
                                        "type": "carbohydrate",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 48.2
                                    },
                                    {
                                        "type": "fat",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 14.5
                                    },
                                    {
                                        "type": "protein",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 6.5
                                    },
                                    {
                                        "type": "sodium",
                                        "origin": "unknown",
                                        "unit": "mg",
                                        "value": 841.2
                                    }
                                ],
                                "serving": {
                                    "amount": 1,
                                    "unit_name": "serving"
                                }
                            },
                            {
                                "name": "Green Beans, Cut",
                                "brand": "Green Giant",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 30.0
                                    }
                                ],
                                "serving": {
                                    "amount": 0,
                                    "unit_name": "cup"
                                }
                            },
                            {
                                "name": "Milk",
                                "brand": "",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 184.0
                                    },
                                    {
                                        "type": "dietary_fiber",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 0.0
                                    },
                                    {
                                        "type": "carbohydrate",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 15.5
                                    },
                                    {
                                        "type": "fat",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 8.48
                                    },
                                    {
                                        "type": "protein",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 12.0
                                    },
                                    {
                                        "type": "sodium",
                                        "origin": "unknown",
                                        "unit": "mg",
                                        "value": 159.5
                                    }
                                ],
                                "serving": {
                                    "amount": 1,
                                    "unit_name": "serving"
                                }
                            },
                            {
                                "name": "Chicken, Roasted",
                                "brand": "",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 245.0
                                    },
                                    {
                                        "type": "dietary_fiber",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 0.0
                                    },
                                    {
                                        "type": "carbohydrate",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 0.0
                                    },
                                    {
                                        "type": "fat",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 17.0
                                    },
                                    {
                                        "type": "protein",
                                        "origin": "unknown",
                                        "unit": "g",
                                        "value": 23.3
                                    },
                                    {
                                        "type": "sodium",
                                        "origin": "unknown",
                                        "unit": "mg",
                                        "value": 500.0
                                    }
                                ],
                                "serving": {
                                    "amount": 100,
                                    "unit_name": "gram"
                                }
                            }
                    ]
                },
                {
                    "name": "Snack Summary",
                    "metrics": [
                        {
                            "type": "energy_consumed",
                            "origin": "unknown",
                            "unit": "kcal",
                            "value": 140.0
                        }
                    ],
                    "food": [
                            {
                                "name": "Breyers Chocolate Ice Cream",
                                "brand": "Domino's",
                                "metrics": [
                                    {
                                        "type": "energy_consumed",
                                        "origin": "unknown",
                                        "unit": "kcal",
                                        "value": 140.0
                                    }
                                ],
                                "serving": {
                                    "amount": 0,
                                    "unit_name": "cup"
                                }
                            }
                    ]
                }
            ],
    "source": {
        "type": "validic_connect_test",
        "device": {
            "id": null,
            "model": "Validic App",
            "manufacturer": "Validic Inc."
        }
    },
    "type": "nutrition",
   "category": "other",
    "name": "Food Log - 02/24/2025",
    "version": "1.0"
}