API Reference

Heart Rate

98 views 0

The Heart Rate resource is a heart rate measurement from a specific point in time.

Overview

Property Type Description
code String The code of the weight 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 value of the measurement in the unit specified
unit String The unit of the measurement value. See Unit System.
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/heart_rates?access_token=demo
{
  "heartRates": [
    {
      "code": "354c5396-5e8b-4ae1-bcbe-fb110c11fc33",
      "value": 90,
      "unit": "bpm",
      "source": "fitbit",
      "record_time": "2016-01-01 15:52:01+00",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2016-01-07 12:13:31+00"
    },
    {
      "code": "031f6f82-e4e8-4cd4-a71d-78f737809968",
      "value": 99,
      "unit": "bpm",
      "source": "fitbit",
      "record_time": "2015-12-31 09:55:01+00",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-12-31 08:04:47+00"
    },
    {
      "code": "a19c41b7-ef67-4a1a-9e9b-4c83a3e2e855",
      "value": 90,
      "unit": "bpm",
      "source": "fitbit",
      "record_time": "2015-12-31 09:52:01+00",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-12-31 08:04:47+00"
    }
  ], 
  "total": 3
}
curl -X POST -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/heart_rates?access_token=demo -d '{ 
  "value": 90,
  "unit": "bpm",
  "source": "fitbit",
  "record_time": "2014-09-16T15:52:01+0000"
}'
GET https://api.zivacare.com/api/v2/human/heart_rates/daily/2016-01-01?access_token=demo
{
  "heartRates": [
    {
      "code": "354c5396-5e8b-4ae1-bcbe-fb110c11fc33",
      "value": 90,
      "unit": "bpm",
      "source": "fitbit",
      "record_time": "2016-01-01 15:52:01+00",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2016-01-07 12:13:31+00"
    }
  ], 
  "total": 1
}
GET https://api.zivacare.com/api/v2/human/heart_rates/period/2015-12-31/2016-01-01?access_token=demo
{
  "heartRates":
    {
      "code": "354c5396-5e8b-4ae1-bcbe-fb110c11fc33",
      "value": 90,
      "unit": "bpm",
      "source": "fitbit",
      "record_time": "2016-01-01 15:52:01+00",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2016-01-07 12:13:31+00"
    },
    {
      "code": "031f6f82-e4e8-4cd4-a71d-78f737809968",
      "value": 99,
      "unit": "bpm",
      "source": "fitbit",
      "record_time": "2015-12-31 09:55:01+00",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-12-31 08:04:47+00"
    },
    {
      "code": "a19c41b7-ef67-4a1a-9e9b-4c83a3e2e855",
      "value": 90,
      "unit": "bpm",
      "source": "fitbit",
      "record_time": "2015-12-31 09:52:01+00",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-12-31 08:04:47+00"
    }
  ], 
  "total": 3
}
GET https://api.zivacare.com/api/v2/human/heart_rates/031f6f82-e4e8-4cd4-a71d-78f737809968?access_token=demo
{
  "heartRate":
    {
      "code": "031f6f82-e4e8-4cd4-a71d-78f737809968",
      "value": 99,
      "unit": "bpm",
      "source": "fitbit",
      "record_time": "2015-12-31 09:55:01+00",
      "user_code": "e231e984-2209-4a10-b634-2257b89c200f",
      "created_at": "2015-12-31 08:04:47+00"
    }
}
curl -X PUT -H 'Content-Type: application/json' https://api.zivacare.com/api/v2/human/heart_rates/031f6f82-e4e8-4cd4-a71d-78f737809968?access_token=demo -d '{ 
  "value": 90,
  "unit": "bpm",
  "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