GET
/
v2
/
summary
/
meal
/
{user_id}
curl --request GET \
     --url {{BASE_URL}}/v2/summary/meal/{user_id}?start_date={{START_DATE}}&end_date={{END_DATE}} \
     --header 'Accept: application/json' \
     --header 'x-vital-api-key: <API_KEY>'
{
  "meals": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
      "priority_id": 42,
      "source_id": 10,
      "provider_id": "123456",
      "timestamp": "2019-08-24T14:15:22Z",
      "name": "Dinner",
      "data": {
        "Chiken coquet starter": {
          "energy": {
            "unit": "kcal",
            "value": 400
          },
          "macros": {
            "carbs": 75,
            "protein": 10,
            "fats": {
              "saturated": 98,
              "monounsaturated": 1,
              "polyunsaturated": 1,
              "omega3": 0,
              "omega6": 0,
              "total": 100
            },
            "sugar": 25
          },
          "micros": {
            "minerals": {
              "sodium": 500
            }
          }
        },
        "Coffee, black, 1 tbsp(s)": {
          "energy": {
            "unit": "kcal",
            "value": 0
          },
          "macros": {
            "carbs": 0,
            "protein": 0,
            "fats": {
              "total": 0
            },
            "sugar": 0
          },
          "micros": {
            "minerals": {
              "sodium": 0
            }
          }
        }
      },
      "source": {
        "name": "MyFitnessPal",
        "slug": "my_fitness_pal",
        "logo": "https://logo_url.com"
      },
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}

All values in the returned model are supplied in the following units:

  • meals[*].data[*].energy.value in calories kcal
  • meals[*].data[*].macros.carbs in grams g
  • meals[*].data[*].macros.protein in grams g
  • meals[*].data[*].macros.fats.saturated in grams g
  • meals[*].data[*].macros.fats.monounsaturated in grams g
  • meals[*].data[*].macros.fats.polyunsaturated in grams g
  • meals[*].data[*].macros.fats.omega3 in grams g
  • meals[*].data[*].macros.fats.omega6 in grams g
  • meals[*].data[*].macros.alcohol in litres lt
  • meals[*].data[*].macros.water in litres lt
  • meals[*].data[*].macros.fibre in grams g
  • meals[*].data[*].macros.sugar in grams g
  • meals[*].data[*].micros.minerals key: value pairs in milligrams mg
  • meals[*].data[*].micros.trace_elements key: value pairs in milligrams mg
  • meals[*].data[*].micros.vitamins key: value pairs in milligrams mg

Authorizations

x-vital-api-key
string
headerrequired

API key based authentication

Path Parameters

user_id
string
required

Query Parameters

provider
string
default:

Provider oura/strava etc

start_date
string
required

Date from in YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 00:00:00

end_date
string

Date to YYYY-MM-DD or ISO formatted date time. If a date is provided without a time, the time will be set to 23:59:59

Response

200 - application/json
meals
object[]
required