API Reference

Activity Summaries

33 views 0

Activity summaries are daily summaries of activities reported by the data sources.

Overview

Property Type Description
code String The Id of the resource
user_code String The global Id of the user
date Date The date of the activity
source String The name of the originating service
duration Number The duration in seconds
distance Number The distance in the specified unit of measure
steps Number The number of steps taken during the activity
vigorous Number The number of minutes of vigorous activity
moderate Number The number of minutes of moderate activity
light Number The number of minutes of light activity
sedentary Number The number of minutes of sedentary activity
calories Number The number of estimated calories burned during the activity
created_at Datetime with Timezone The time the activity was created on the ZivaCare API server
updated_at Datetime with Timezone The time the activity was updated on the ZivaCare API server
unit String The unit of the measurement value. See Unit System.

Example

GET https://api.zivacare.com/api/v2/human/activities_summary?access_token=demo
{
  "activitiesSummary": [
    {
      "code": "a26dc114-4c02-4c59-9b34-3a11aa6e8f97",
      "date": "2014-09-16",
      "source": "fitbit",
      "duration": 155,
      "distance": 144,
      "steps": 1000,
      "calories": 100.00,
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2014-09-10 07:59:03+00",
      "unit": "km"
    },
    {
      "code": "271e1ec6-ddf3-47be-b866-a434c12ea76a",
      "date": "2014-09-15",
      "source": "fitbit",
      "duration": 155,
      "distance": 144,
      "steps": 150,
      "vigorous": 10,
      "moderate": 13,
      "light": 1,
      "sedentary": 1,
      "calories": 100.00,
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2014-09-10  08:07:33+00",
      "unit": "km"
    },
    {
      "code": "1bd7e59e-ef08-43d9-9604-85dab6c001dc",
      "date": "2014-09-115",
      "source": "fitbit",
      "duration": 155,
      "distance": 144,
      "steps": 100,
      "vigorous": 10,
      "moderate": 13,
      "light": 1,
      "sedentary": 1,
      "calories": 100.00,
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2014-09-10 08:22:40+00",
      "unit": "km"
    }
  ], 
  "total": 3
}
curl -X POST -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/activities_summary?access_token=demo -d '{ 
  "source": "fitbit",
  "date": "2015-07-30",
  "distance": 1000,
  "steps":1100,
  "unit": "km"
}'
GET https://api.zivacare.com/api/v2/human/activities_summary/daily/2014-09-16?access_token=demo
{
  "activitiesSummary": [
    {
      "code": "a26dc114-4c02-4c59-9b34-3a11aa6e8f97",
      "date": "2014-09-16",
      "source": "fitbit",
      "duration": 155,
      "distance": 144,
      "steps": 1000,
      "calories": 100.00,
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2014-09-10 07:59:03+00",
      "unit": "km"
    } 
  ] ,
  "total": 1
}
GET https://api.zivacare.com/api/v2/human/activities_summary/period/2014-09-16/2015-09-16?access_token=demo
{
  "activitiesSummary": [
    {
      "code": "a26dc114-4c02-4c59-9b34-3a11aa6e8f97",
      "date": "2014-09-16",
      "source": "fitbit",
      "duration": 155,
      "distance": 144,
      "steps": 1000,
      "calories": 100.00,
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2014-09-10 07:59:03+00",
      "unit": "km"
    } 
  ], 
  "total": 1
}
GET https://api.zivacare.com/api/v2/human/activities_summary/a26dc114-4c02-4c59-9b34-3a11aa6e8f97?access_token=demo
{
  "activitySummary":
    {
      "code": "a26dc114-4c02-4c59-9b34-3a11aa6e8f97",
      "date": "2014-09-16",
      "source": "fitbit",
      "duration": 155,
      "distance": 144,
      "steps": 1000,
      "calories": 100.00,
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2014-09-10 07:59:03+00",
      "unit": "km"
    } 
}
curl -X PUT -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/activities_summary/a26dc114-4c02-4c59-9b34-3a11aa6e8f97?access_token=demo -d '{ "source": "fitbit", "date": "2015-07-30", "distance": 1000, "steps":1100, "unit": "km" }'

Was this helpful?

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close