Conventions

Unit System

83 views 0

The API user is responsible with storing the unit of measure for that value.
When retrieving data, ZivaCare offers automatic unit measure conversions by supporting (via the custom X-Unit-System HTTP Header) three unit systems: metricus and uk. When storing data, the units of measure given by the data sources are used. If you will POST your own data, it is recommended to use the Metric unit system. You are allowed to use any unit of measure you want but, automatic unit measure conversions will apply only according to what is known in the below table.

metric us uk
Activities km mi mi
Blood Glucose mmol/L mg/dL mg/dL
Blood Oxygen SpO2 SpO2 SpO2
Blood Pressure mmHg mmHg mmHg
Body Mass Index kg/m2 kg/m2 kg/m2
Body Fat % % %
Height cm inches cm
Heart Rate bpm bpm bpm
Respiration Rate breaths per minute breaths per minute breaths per minute
Weight kg pounds pounds
Water ml oz ml
Example:
curl -X GET -H 'Content-type: application/json' https://api.zivacare.com/api/v2/human/weights?access_token=demo
{
 code: "5490dd17-1771-49de-9d49-db53c805de01",
 user_code: "e231e984-2209-4a10-b634-2257b89c200f",
 record_time: "2015-03-06 08:00:00+00",
 source: "fitbit",
 value: 82,
 unit: "kg",
 created_at: "2015-03-06 00:00:08+00",
 updated_at: "2015-03-06 17:00:05+00"
}
curl -X GET -H 'Content-type: application/json' -H 'X-Unit-System: us' https://api.zivacare.com/api/v2/human/weights?access_token=demo
{
 code: "5490dd17-1771-49de-9d49-db53c805de01",
 user_code: "e231e984-2209-4a10-b634-2257b89c200f",
 record_time: "2015-03-06 08:00:00+00",
 source: "fitbit",
 value: 189.544,
 unit: "pounds",
 created_at: "2015-03-06 00:00:08+00",
 updated_at: "2015-03-06 17:00:05+00"
}

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