Returns a list of nutrition for specified user
GET /organizations/:org_id/users/:uid/nutrition

Request Information

Request Parameters

NameRequired FieldTypeDescription
start_dateoptionalstringThe start date to retrieve user data for. Format: YYYY-MM-DD. Default is current UTC day. Max date range is 30 days.
end_dateoptionalstringThe end date to retrieve user data for. Format: YYYY-MM-DD. Default is current UTC day. Max date range is 30 days.
sourceoptionalstringUsed to filter records to source(s).
Example:
“...?source=fitbit,garmin”
or
“...?source=fitbit”

HTTP Response Status

Response CodeDescription
200 (Ok)Indicates the request was received and a result was returned.
400 (Bad Request)Indicates that there was an error with request

Field Description

versionstringIndicates the resource payload version. Validic will make future updates to the structure of the resource payload where breaking changes will receive a new version.
idstringUnique identifier for the record.
checksumstringA derived value useful when comparing records with the same id for data updates.
typestringThe Validic Resource type. For Measurement records the type will be measurements.
start_timestringThe start time of the event represented in UTC. Format: YYYY-MM-DDThh:mm:ssZ.
end_timestringThe end time of the event represented in UTC. Format: YYYY-MM-DDThh:mm:ssZ.
utc_offsetintegerThe offset in seconds from UTC.
offset_originstringThe source of the UTC offset. Valid values: source (UTC offset received from the original record), profile (UTC offset received from the source's user profile), user_defined (UTC offset provided by user's time zone selection upon authorization through the Validic Marketplace)
userobjectA User object that contains identifiers related to the user.
user>uidstringThe customer's user ID.
user>user_idstringValidic user ID.
user>organization_idstringValidic organization ID.
log_idstringThe unique identifier for the record provided by the source.
sourceA source object that contains source specific information.
source>typestringThe source Validic retrieved the data from.
source>deviceobjectA device object containing information about the device that generated the data if available.
source>device>namestringThe name of the device.
source>device>typestringThe type of the device.
namestringA free form field that defines the meal type or food type for the record.
categorystringThe category of the meal. Valid values: food, meal, other.
metricsarrayAn array of Metrics. Refer to the Metrics documentation for further information.
segmentsarrayAn array of Segments. A more granular view of the items that compose the nutrition event.
segment>namestringA free form field that defines the food type for the segment.
segment>metricsarrayMetrics for the given segment.
created_atstringThe record processed time represented in UTC. Format: YYYY-MM-DDThh:mm:ssZ.

Due to the size of the sample and the HTML limitations of our API Docs, the /nutrition code sample is repeated here.

{
    "data": [
        {
            "category": "other",
            "checksum": "fa410e0f007ca9d73533a36149559dc4",
            "created_at": "2020-01-16T17:10:44.370Z",
            "deleted_at": null,
            "end_time": "2020-01-17T04:59:59Z",
            "id": "a08a2a394Samplea47ef43802",
            "log_id": "2020-01-16",
            "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
                }
            ],
            "name": "Unknown",
            "offset_origin": "profile",
            "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": "fitbit",
                "device": null
            },
            "start_time": "2020-01-16T05:00:00Z",
            "tags": [],
            "type": "nutrition",
            "user": {
                "organization_id": "59775233sample014a1f9a",
                "user_id": "5dcf7145Sample0001b11f51",
                "uid": "ewdw08420ds"
            },
            "user_notes": [],
            "utc_offset": -18000,
            "version": "1.0"
        }
    ]
}
Language
Click Try It! to start a request and see the response here!