Getting iHealth Data

iHealth OpenAPI V2 Endpoints

Once you've registered your client it's easy to start requesting data from iHealth.
All endpoints are only accessible via https and are located at api.iHealthLabs.com:8443.

Important Note

The URL examples throughout this documentation include an access_token that represents YOUR account tied to a generic iHealth client. DO NOT use this access_token in production or for anything other than testing as they will change often. For your application, you should have each user go through an authentication and authorization flow in order to receive a valid access_token.

Limits

Be nice. If you're sending too many requests too quickly, we'll send back a 503 error code (server unavailable).
The recently paid client_id is limited to 5000 requests per hour. Unpaid clint_id is limited to 500 requests per hour.

The sample of the response:

{
"BackValue": "null",
"Client_Para":" null",
"Error": "limits_hour_error,
"ErrorCode": "503",
"ErrorDescription": "Reached the one-hour access limit"
}

Structure

Unit
OpenAPI V2 server also provides unit-converting function for developers. By importing the corresponding parameters, developers can get the data with different unit base. Developers can also procure data with the unit pre-defined by the users according to users’ preferences. (see appendix)
Pagination
Sometimes you just can't get enough. For this reason, we've provided a convenient way to access more data in any request for sequential data. Simply call the url in the NextPageUrl and PrevPageUrl parameter and we'll respond with the next set of data.
On views where pagination is present, we also support the "count" parameter. Simply set this to the number of items you'd like to receive. Note that the default values should be fine for most applications - but if you decide to increase this number there is a maximum value defined on each endpoint.
Response Type
To make it more convenient and compatible, iHealth OpenAPI V2 provides two different formats of response data type, one is JSON, and the other is XML. Third party developers can select the type of format they need and do the advanced setting anytime.

JSONP

If you're writing an AJAX application, and you'd like to wrap our response with a callback, all you have to do is specify a callback parameter with any API call:
https://api.ihealthlabs.com:8443/openapiv2/user/05dffbe0dd*****/weight.json/&callback=callbackFunction
Would respond with:

callbackFunction({
...
});