Mango Connect Health API Platform

Mango Connect API is a simple HTTP REST API for retrieving your clients vitals, health, fitness, and nutrition data from the Mango Connect platform in one of two simple file formats.


    "MC Demo 01": {
      "85": {
        "Apple Health": {
          "Steps": [
              "date": "2019-09-12 00:00",
              "unit": "steps",
              "value": 4458
              "date": "2019-09-13 00:00",
              "unit": "steps",
              "value": 2421
              "date": "2019-09-14 00:00",
              "unit": "steps",
              "value": 6155


"Client Code","User Id","Health  Category","Widget Name","Date","Value","Unit","Timezone"
"MC Demo 01","85","Apple Health","Steps","2019-09-12 00:00","4458.0","steps","America/Toronto","
"MC Demo 01","85","Apple Health","Steps","2019-09-13 00:00","2421.0","steps","America/Toronto","
"MC Demo 01","85","Apple Health","Steps","2019-09-14 00:00","6155.0","steps","America/Toronto","

It can help you answer questions like:

  • How many steps did my client take per day?
  • What is the blood glucose and blood pressure readings for my client?
  • What is the ongoning weight, nutrition and heart rate readings for my clients?

You can filter with any combination of the following criteria:

  • Client Code. Eg: find all health data for a specific client using their client code
  • Dates. Eg: get all health data between a provided start and end date.
  • Number of days. Eg: get all health data for the last 10 days
  • Response Type. Eg: get the data output in a JSON or a CSV format.

You need an API key to use the Mango Connect API – this is a unique key that identifies your requests. You can get one by subscribing to Mango Connect here.

Mango Connect API endpoint

Mango Connect API Request parameters

  • startDate: The start date from which you want to retrieve the data.
    • Format: yyyy-mm-dd. Example: 2019-09-21 
    • Required: no, if the numberOfDays param are used.
    • Note: you can’t mix this param with the numberOfDays param.
  • endDate: The end date from which you want to retrieve the data.
    • Format: yyyy-mm-dd. Example: 2019-09-29 
    • Required: no, if the numberOfDays param are used.
    • Note: you can’t mix this param with the numberOfDays param.
  • numberOfDays: The last X number of days starting from today for which you want to retrieve the data.
    • Format: int. Example: 10 
    • Required: no, if the startDate and endDate param are used.
    • Note: you can’t use this parameter together with the startDate and endDate parameters. If used together, the startDate and endDate values provided will be ignored.
  • apiKey: Your api key. Provided to you when you sign up for Mango Connect.
    • Example: fcrt640f0a51567c9ec698e5bb8c9d55 
    • Required: yes
  • clientCode: uniquely identifies a specific client of yours. This code is provided by you directly to your client and is entered by them when they connect to Mango Connect on the Mango Mirror app. This ensures that no personally identifiable data of your client is transferred over the api. You will use the client code to match it back to your systems internally so you can identify the client.
    • Example: PC102345 
    • Required: no, if not provided it will return data for all your clients on the Mango Connect platform, not a specific client.
  • responseType: Identifies the format in which you want the data returned. We offer two formats JSON or CSV.
  • Format: csv or json. Example: json 
  • Required: yes

Response Object

“Client Code”:{
           User Id: {
                              “Widget Name” :[
                                                   DateTime: “yyyy-mm-dd hh:mm” 
                                                   unit: String,
                                                   value: int/double
                  “Fitbit_{{fitbitId}}”:{ },
                  “Fitbit_{{fitbitId}}”:{ },
                      “TimeZone”: String
"Client Code","User Id","Health  Category","Widget Name","Date","Value","Unit","Timezone"

Response Object Description

    status codes
  • 201- Success. Data retrieved successfully
  • 401 – Unauthorized. Mango Connect API Key is inactive or does not exist.
  • 500 – Failure. Error retrieving data

Client Code: Parent key of the response object. It uniquely identifies your client, and is provided exactly as entered by the client when they use Mango Connect to connect to your Organization in the Mango Mirror iOS App.

User Id: This is an internal system User Id and is used for troubleshooting purposes only.

Health Category: This identifies the source of the health information. ‘AppleHealth’ value represents data which is collected from ‘Health’ app on iPhone. ‘Fitbit*’ value represents data which is collected from the users Fitbit account, if setup.

Widget Name: This represent collection of objects for particular health category. Will contain values like steps, sleep, heart-rate, blood pressure, etc.

DateTime: This field is in yyyy-mm-dd HH:mm format and represents the date (and time if applicable) of when the data was recorded or aggregated. For example you will get one record with total steps recorded for a particular date, but for Blood Glucose you will get the actual DateTime that it was recorded.

Unit: This field represents a unit of measurement for particular health widget. Examples cal, km, steps, bpm, ml etc.

Value: This field represents the daily aggregated (sum) value for widgets that can be aggregated- example steps, sleep minutes, calories, etc. And point-in-time recorded values (not aggregated) for widgets that should not be aggregated – example weight, blood glucose, heart-rate, etc. Some examples are 50981 for the Steps widget, or 117.1 for the Blood Glucose widget.

Timezone: This field represents the client’s Timezone that the DateTime value represents. example: “America/Toronto”, “Asia/Kolkata”