API Conventions

127 views 0

There are a few simple conventions to follow when working with ZivaCare API, this section covers them in detail.

Making a basic query

ZivaCare API lets query user’s health data with and access_token query parameter. For details on how to authorize users and retrive those tokens please see this section

Example of an API call with a query parameter (replace demo with the appropriate token):


Media types

ZivaCare API uses JSON (Javascript Object Notation) for all payloads. To query data you should set your Accespt Header to application/json and when sending data you should set the Content-Type to application/json

API versions

The different versions of ZivaCare API can be used by specifiyng the version number in the url, i.e. /v1[version]/human/weights

The most current version of ZivaCare API is v1.

Query options conventions

The standard query options for the ZivaCare API are as described in the table below. These parameters make it easier for you to implement smart synchronization for your application. These are the availabke query options in ZivaCare API:

limit The max number of records to return in one query. Default is 10
offset The index of the first record to return. Default is 0
start Returns records that are created after the specified date. The format is YYYY-MM-DD
end Returns records that are udpated before the specified date. The format is YYYY-MM-DD

Discrete measurements conventions

A discrete measurement is a unit of data that is captured at a point in time and has a timestamp, a value, and a type. A measurement can also have an optional location or other meta data. To retrieve the discrete measurements you can follow the following pattern:

To retrieve the latest recordings:[type]

To retrieve a reading by ID:[type]/{code}

To retrieve a list of recordings for a specific date:[type]/daily/{date}

Periodic data conventions

Periodic data, unlike discrete data, always has a start and end date. This type of data can be retrieved as a list of objects for a specific date or time period.

To retrieve a list of recordings for a period:[type]/period/{YYYY-MM-DD}/{YYYY-MM-DD}

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.