Null Values
Metrics that are not reported by a specific device or app will not be present within the Validic API data resource. Absent values is an indication of non-availability by a data source. For example, if a user logs a 5-mile run, a metric of type “distance” will be included in the workout record. If that user later logs 30 minutes of yoga, the “distance” metric will not be included in the workout record.
Below is an example of both a running and a yoga record:
{
"data": [
{
"id": "0478641667fa8905679c219884dfc6d8",
"name": "Yoga",
"type": "workout",
"user": {
"uid": "demotestuser1",
"user_id": "58dbc86SAMPLE001e6b7c7",
"organization_id": "58cb5SAMPLEda50001f75db3"
},
"log_id": "6836694774",
"source": {
"type": "fitbit",
"device": null
},
"metrics": [
{
"type": "active_duration",
"unit": "s",
"value": 157,
"origin": "device"
},
{
"type": "steps",
"unit": "count",
"value": 0,
"origin": "device"
},
{
"type": "energy_burned",
"unit": "kcal",
"value": 3,
"origin": "device"
},
{
"type": "avg_heart_rate",
"unit": "bpm",
"value": 80,
"origin": "device"
},
{
"type": "heart_rate_zone_high",
"unit": "s",
"value": 180,
"origin": "device"
},
{
"type": "heart_rate_zone_low",
"unit": "s",
"value": 0,
"origin": "device"
},
{
"type": "heart_rate_zone_medium",
"unit": "s",
"value": 0,
"origin": "device"
},
{
"type": "heart_rate_zone_very_low",
"unit": "s",
"value": 0,
"origin": "device"
}
],
"version": "1.0",
"category": "other",
"checksum": "30d6d40b241eafc8e541693db423081c",
"end_time": "2017-03-29T15:28:02Z",
"segments": [],
"created_at": "2017-03-29T15:28:52.626Z",
"start_time": "2017-03-29T15:25:24Z",
"utc_offset": -14400,
"offset_origin": "profile"
},
{
"id": "0ad278a0df9b84ec2ebc2601097791a9",
"name": "Running (jogging), 9 mph (6.5 min mile) (MyFitnessPal)",
"type": "workout",
"user": {
"uid": "demotestuser1",
"user_id": "58dbc86SAMPLE001e6b7c7",
"organization_id": "58cb5SAMPLEda50001f75db3"
},
"log_id": "6836934989",
"source": {
"type": "fitbit",
"device": null
},
"metrics": [
{
"type": "distance",
"unit": "m",
"value": 237.05,
"origin": "device"
},
{
"type": "active_duration",
"unit": "s",
"value": 301,
"origin": "device"
},
{
"type": "steps",
"unit": "count",
"value": 354,
"origin": "device"
},
{
"type": "energy_burned",
"unit": "kcal",
"value": 59,
"origin": "device"
},
{
"type": "avg_speed",
"unit": "m/s",
"value": 2835.14950166113,
"origin": "device"
},
{
"type": "avg_heart_rate",
"unit": "bpm",
"value": 135,
"origin": "device"
},
{
"type": "heart_rate_zone_high",
"unit": "s",
"value": 300,
"origin": "device"
},
{
"type": "heart_rate_zone_low",
"unit": "s",
"value": 0,
"origin": "device"
},
{
"type": "heart_rate_zone_medium",
"unit": "s",
"value": 0,
"origin": "device"
},
{
"type": "heart_rate_zone_very_low",
"unit": "s",
"value": 0,
"origin": "device"
}
],
"version": "1.0",
"category": "other",
"checksum": "c4ea34820ed4fd3cefc34a71fd861626",
"end_time": "2017-03-29T15:08:18Z",
"segments": [],
"created_at": "2017-03-29T15:11:50.355Z",
"start_time": "2017-03-29T15:03:16Z",
"utc_offset": -14400,
"offset_origin": "profile"
}
]
}
Updated about 7 years ago
What’s Next