The Blood Glucose resource is a blood glucose measurement from a specific point in time.
Overview
Property | Type | Description |
---|---|---|
code | String | The id of the blood glucose reading |
user_code | String | The global Id of the user |
record_time | Datetime with Timezone | The original date and time of the measurement |
source | String | The source service for the measurement, where it was created |
value | Number | The value of the measurement in the unit specified |
unit | String | The unit of the measurement value. See Unit System. |
notes | String | User created notes |
meal_tag | String | Indication if value was captured before/after a meal |
medication_tag | String | Indication if value was captured before/after taking medication |
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/blood_glucoses?access_token=demo
{
"bloodGlucoses": [
{
"code": "902fbf4a-43d3-4d1c-a530-9c51d4bf5523",
"value": 18,
"unit": "mmol/L",
"record_time": "2016-01-16 15:52:01+00",
"source": "fitbit",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"created_at": "2016-02-04 10:19:40+00"
},
{
"code": "c5f215b9-9f31-4283-a473-53f6a9dd420b",
"value": 99,
"unit": "mmol/L",
"record_time": "2014-09-16 15:52:01+00",
"source": "fitbit",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"created_at": "2015-04-07 14:00:48+00"
}
],
"total": 2
}
curl -X POST -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/blood_glucoses?access_token=demo
-d '{ "value": 18, "unit": "mg/dl", "source": "fitbit", "record_time": "2014-09-16T15:52:01+0000" }'
GET https://api.zivacare.com/api/v2/human/blood_glucoses/daily/2014-09-16?access_token=demo
{
"bloodGlucoses": [
{
"code": "902fbf4a-43d3-4d1c-a530-9c51d4bf5523",
"value": 18,
"unit": "mmol/L",
"record_time": "2016-01-16 15:52:01+00",
"source": "fitbit",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"created_at": "2016-02-04 10:19:40+00"
},
{
"code": "c5f215b9-9f31-4283-a473-53f6a9dd420b",
"value": 99,
"unit": "mmol/L",
"record_time": "2014-09-16 15:52:01+00",
"source": "fitbit",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"created_at": "2015-04-07 14:00:48+00"
}
],
"total": 2
}
GET https://api.zivacare.com/api/v2/human/blood_glucoses/period/2015-04-07/2016-02-04?access_token=demo
{
"bloodGlucoses": [
{
"code": "902fbf4a-43d3-4d1c-a530-9c51d4bf5523",
"value": 18,
"unit": "mmol/L",
"record_time": "22016-01-16 15:52:01+00",
"source": "pegaso",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"created_at": "2016-02-04 10:19:40+00"
}
],
"total": 1
}
GET https://api.zivacare.com/api/v2/human/blood_glucoses/902fbf4a-43d3-4d1c-a530-9c51d4bf5523?access_token=demo
{
"bloodGlucose":
{
"code": "902fbf4a-43d3-4d1c-a530-9c51d4bf5523",
"value": 18,
"unit": "mmol/L",
"record_time": "22016-01-16 15:52:01+00",
"source": "pegaso",
"user_code": "e231e984-2209-4a10-b634-2257b89c200f",
"created_at": "2016-02-04 10:19:40+00"
}
}
curl -X PUT -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/blood_glucoses/902fbf4a-43d3-4d1c-a530-9c51d4bf5523?access_token=demo
-d '{ "value": 17, "unit": "mmol/L", "source": "fitbit", "record_time": "2014-09-16T15:52:01+0000" }'