Meal Goals
A Meal Goal can be used to set a personal user goal for meal.
Overview
Property | Type | Description |
---|---|---|
code | String | The id of the meal measurement |
user_code | String | The global Id of the user |
calories | Number | The target amount of calories to be consumed |
source | String | The source service for the measurement, where it was created |
created_at | Datetime with Timezone | The time the measurement was created on the ZivaCare API server |
updated_at | Datetime with Timezone | The time the measurement was updated on the ZivaCare API server |
Example
GET https://api.zivacare.com/api/v2/human/meal_goals?access_token=demo
{
"mealGoals": [
{
"code": "c9096419-7bc3-48dd-af1d-1be9fd84a07f",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"fat": 75.00,
"source": "fitbit",
"created_at": "2016-06-01 13:03:54+00",
"updated_at": "2016-06-02 07:21:56+00"
}
],
"total": 1
}
curl -i POST -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/meal_goals?access_token=demo -d '{
"source": "fitbit",
"calories": 70.00
}'
curl -i PUT -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/meal_goals/c9096419-7bc3-48dd-af1d-1be9fd84a07f?access_token=demo -d '{
"source": "fitbit",
"calories": 75.00
}'