API Reference

Steps

54 views 0

The Step resource is a measurement of steps taken.

Overview

Property Type Description
code String The id of the step measurement
user_code String The global code 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 number of steps
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/steps?access_token=demo
{
  "steps": [
    {
      "code": "32359dc7-a9d1-4ad5-8cdc-3358dff52af0",
      "value": 0,
      "record_time": "2015-03-05 08:00:00+00",
      "source": "fitbit",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-03-05 00:00:16+00",
      "updated_at": "2015-03-06 00:00:10+00"
    },
    {
      "code": "bea07603-5e8c-402e-8816-4cb371a9fa82",
      "value": 0,
      "record_time": "2015-03-04 08:00:00+00",
      "source": "fitbit",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-03-04 00:00:10+00",
      "updated_at": "2015-03-05 00:00:17+00"
    }
  ], 
  "total": 2
}
curl -X POST -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/steps?access_token=demo -d '{ 
  "value": 2500,
  "source": "fitbit",
  "record_time": "2014-09-16T15:52:01+0000"
}'
GET https://api.zivacare.com/api/v2/human/steps/daily/2015-03-05?access_token=demo
{
  "steps": [
    {
      "code": "32359dc7-a9d1-4ad5-8cdc-3358dff52af0",
      "value": 0,
      "record_time": "2015-03-05 08:00:00+00",
      "source": "fitbit",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-03-05 00:00:16+00",
      "updated_at": "2015-03-06 00:00:10+00"
    }
  ], 
  "total": 1
}
GET https://api.zivacare.com/api/v2/human/steps/period/2015-03-05/2015-05-06?access_token=demo
{
  "steps": [
    {
      "code": "32359dc7-a9d1-4ad5-8cdc-3358dff52af0",
      "value": 0,
      "record_time": "2015-03-05 08:00:00+00",
      "source": "fitbit",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-03-05 00:00:16+00",
      "updated_at": "2015-03-06 00:00:10+00"
    }
  ], 
  "total": 1
}
GET https://api.zivacare.com/api/v2/human/steps/32359dc7-a9d1-4ad5-8cdc-3358dff52af0?access_token=demo

 

{
  "step": 
    {
      "code": "32359dc7-a9d1-4ad5-8cdc-3358dff52af0",
      "value": 0,
      "record_time": "2015-03-05 08:00:00+00",
      "source": "fitbit",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-03-05 00:00:16+00",
      "updated_at": "2015-03-06 00:00:10+00"
}
curl -X PUT -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/steps/32359dc7-a9d1-4ad5-8cdc-3358dff52af0?access_token=demo -d '{ 
  "value": 2500,
  "source": "fitbit",
  "record_time": "2014-09-16T15:52:01+0000"
}'

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