HealthChampion API

Expose API - Customer Document/Website 

Note: 
clientId and client secret key must get it from HC team. 

Get Metrics 

Get program enrollment metrics detail for the Organization. 
Overview 
Get program enrollment metrics for the Organization with the details like name, type, alert severity, and timestamp. 
The clientId and clientSecret key needs to give in the header to fetch the details. 
The above keys would be against for each organization. 
The child organizations will also be fetched for parent organization. 
Request 
GET <BASE_URL>/api/v1/metrics/export 
Query 
organizationId string required 
startDate string mm/dd/yyyy 
endDate string mm/dd/yyyy 
pageNo integer by default, it would be 1, user can alter 
cURL 
curl --location --request GET  
'https://healthdataservice-sandbox.api.myhealthchampion.com/api/v1/Metrics/export?organizationId=DDA7AC38-6345-4358-BD39-BF7348C0EBDB&pageNo=1' \ 
--header 'clientId: ZYDPLLBWSK3MVQJSIYHB1OR2JXCY0X2C5UJ2QAR2MAAIT5Q' \ 
--header 'clientSecret: GBAyfVL7YWtP6gudLIjbRZV_N0dW4f3xETiIxqtokEAZ6FAsBtgyIq0MpU1uQ7J08xOTO2zwP0OuO3pMVAUTid' 
Request URL 
Responses 
  • 200 
    • Success – A set of metrics 
Response body: 
  "totalRows": 3, 
  "programMetrics": [ 
    { 
      "organizationId": "fdfe5a6d-2a03-4e3a-8bde-8e66a2777b0a", 
      "programId": "60b90e5a-f62c-4487-b7db-f2abc866e88d", 
      "id": "055f4e42-f5b9-4d4b-9d23-1be9f8c67b6e", 
      "profileId": "d60af29c-a673-4a2c-9a2f-409172290a30", 
      "programEnrollmentId": "fcf96b1e-0e66-4e47-af4a-4f2525df7414", 
      "programEnrollmentTaskId": "fe980098-6a23-4216-aa50-944908c919d3", 
      "sourceId": "10721117-6954-4713-a738-8530c21aea6a", 
      "timestamp": "2021-10-27T11:12:02.8435261+00:00", 
      "metricName": "hasTraveled", 
      "metricType": 2, 
      "unit": null, 
      "metricValueType": 1, 
      "alertSeverity": 3, 
      "alertSeverityUpdatedAt": "2021-10-27T11:12:07.923018+00:00", 
      "stringValue": null, 
      "numericValue": null, 
      "boolValue": true, 
      "dateTimeValue": null, 
      "ignored": null, 
      "ignoredReason": null, 
      "displayName": "Traveled", 
      "displayDescription": null, 
      "isHidden": false, 
      "recordedByIdentityId": "130f7f55-91e5-430c-8a79-c687952a24b3", 
      "copiedFromOriginalTimestamp": null, 
      "isCopied": null, 
      "attachedFileData": null 
    }, 
    { 
      "organizationId": "fdfe5a6d-2a03-4e3a-8bde-8e66a2777b0a", 
      "programId": "60b90e5a-f62c-4487-b7db-f2abc866e88d", 
      "id": "47359c1e-ae1c-47b4-93cb-e28bb9049615", 
      "profileId": "d60af29c-a673-4a2c-9a2f-409172290a30", 
      "programEnrollmentId": "fcf96b1e-0e66-4e47-af4a-4f2525df7414", 
      "programEnrollmentTaskId": "fe980098-6a23-4216-aa50-944908c919d3", 
      "sourceId": "10721117-6954-4713-a738-8530c21aea6a", 
      "timestamp": "2021-10-27T11:12:02.7620705+00:00", 
      "metricName": "hasTestedPositive", 
      "metricType": 2, 
      "unit": null, 
      "metricValueType": 1, 
      "alertSeverity": 5, 
      "alertSeverityUpdatedAt": "2021-10-27T11:12:07.9230313+00:00", 
      "stringValue": null, 
      "numericValue": null, 
      "boolValue": true, 
      "dateTimeValue": null, 
      "ignored": null, 
      "ignoredReason": null, 
      "displayName": "Covid Diagnosis", 
      "displayDescription": null, 
      "isHidden": false, 
      "recordedByIdentityId": "130f7f55-91e5-430c-8a79-c687952a24b3", 
      "copiedFromOriginalTimestamp": null, 
      "isCopied": null, 
      "attachedFileData": null 
    }, 
    { 
      "organizationId": "fdfe5a6d-2a03-4e3a-8bde-8e66a2777b0a", 
      "programId": "60b90e5a-f62c-4487-b7db-f2abc866e88d", 
      "id": "890677ff-7f8d-4c93-8594-c1bd8297c82a", 
      "profileId": "d60af29c-a673-4a2c-9a2f-409172290a30", 
      "programEnrollmentId": "fcf96b1e-0e66-4e47-af4a-4f2525df7414", 
      "programEnrollmentTaskId": "fe980098-6a23-4216-aa50-944908c919d3", 
      "sourceId": "10721117-6954-4713-a738-8530c21aea6a", 
      "timestamp": "2021-10-27T11:12:02.657317+00:00", 
      "metricName": "hasIntentToGoToOffice", 
      "metricType": 2, 
      "unit": null, 
      "metricValueType": 1, 
      "alertSeverity": 1, 
      "alertSeverityUpdatedAt": "2021-10-27T11:12:07.9230343+00:00", 
      "stringValue": null, 
      "numericValue": null, 
      "boolValue": true, 
      "dateTimeValue": null, 
      "ignored": null, 
      "ignoredReason": null, 
      "displayName": "Planning to be On-Site", 
      "displayDescription": null, 
      "isHidden": false, 
      "recordedByIdentityId": "130f7f55-91e5-430c-8a79-c687952a24b3", 
      "copiedFromOriginalTimestamp": null, 
      "isCopied": null, 
      "attachedFileData": null 
    } 
  ] 

Get Organization 

Get organization info along with child organizations 
Overview 
Get organization details with the child organizations along with status info. 
The clientId and clientSecret key needs to give in the header to fetch the details. 
The above keys would be against for each organization. 
The child organizations will also be fetched for parent organization. 
Request 
GET <BASE_URL>/api/v1/organizations/getall 
Query 
organizationId string required 
cURL 
--header 'clientId: ZYDPLLBWSK3MVQJSIYHB1OR2JXCY0X2C5UJ2QAR2MAAIT5Q' \ 
--header 'clientSecret: GBAyfVL7YWtP6gudLIjbRZV_N0dW4f3xETiIxqtokEAZ6FAsBtgyIq0MpU1uQ7J08xOTO2zwP0OuO3pMVAUTid' 
Request URL 
Responses 
  • 200 
    • Success – A set of organizations 
Response body: 
    "id": "dda7ac38-6345-4358-bd39-bf7348c0ebdb", 
    "name": "Test Org 2", 
    "status": "Active", 
    "childOrganizations": [ 
        { 
            "id": "2282834b-4800-4199-88b0-1408930c3d71", 
            "name": "Reichel - Goodwin", 
            "status": "Active", 
            "childOrganizations": [] 
        }, 
        { 
            "id": "997cdddd-8adc-4951-9466-76cc5210a2b4", 
            "name": "Jaskolski, Gottlieb and Johns", 
            "status": "Active", 
            "childOrganizations": [] 
        }, 
        { 
            "id": "8e363409-1e7d-4b82-b1a3-8f6db6ec8e12", 
            "name": "Test Org Group", 
            "status": "Active", 
            "childOrganizations": [] 
        }, 
        { 
            "id": "1ce0e5c2-b6fd-4c8e-8e50-9f3f3e3ea62a", 
            "name": "Champlin Inc", 
            "status": "Active", 
            "childOrganizations": [ 
                { 
                    "id": "ba6ec7f3-bb14-4716-8a5d-4c9643c89f84", 
                    "name": "Child Org 2", 
                    "status": "Active", 
                    "childOrganizations": [] 
                }, 
                { 
                    "id": "12c2626a-4290-4005-8e7b-ff26a45ac2ed", 
                    "name": "child org", 
                    "status": "Active", 
                    "childOrganizations": [] 
                } 
            ] 
        }, 
        { 
            "id": "011a5a0d-5972-439c-888c-d3d86fa31352", 
            "name": "Hilpert - Quitzon", 
            "status": "Active", 
            "childOrganizations": [] 
        }, 
        { 
            "id": "4314d81c-303c-4c1b-b2be-d65ee6c2d577", 
            "name": "Weber - Brown", 
            "status": "Active", 
            "childOrganizations": [] 
        }, 
        { 
            "id": "0e9545e7-a7b8-4e95-909e-ebb2bc256ff5", 
            "name": "Mann - Dickinson", 
            "status": "Active", 
            "childOrganizations": [] 
        } 
    ] 

Get Organization Members 

Get all members from current and child organizations 
Overview 
Get organization member details with the child organizations along with status info. 
The clientId and clientSecret key needs to give in the header to fetch the details. 
The above keys would be against for each organization. 
The child organizations will also be fetched for parent organization. 
Request 
GET <BASE_URL>/api/v1/organizations/getmembers 
Query 
organizationId string required 
pageNo integer optional 
cURL 
--header 'clientId: ZYDPLLBWSK3MVQJSIYHB1OR2JXCY0X2C5UJ2QAR2MAAIT5Q' \ 
--header 'clientSecret: GBAyfVL7YWtP6gudLIjbRZV_N0dW4f3xETiIxqtokEAZ6FAsBtgyIq0MpU1uQ7J08xOTO2zwP0OuO3pMVAUTid' 
Request URL 
Responses 
  • 200 
    • Success – A set of organization members 
Response body: 
    { 
        "status": "Active", 
        "profileName": "Kay Greenholt", 
        "email": "test1@myhealthchampion.com" 
    }, 
    { 
        "status": "Pending", 
        "profileName": null, 
        "email": " test2@myhealthchampion.com" 
    }, 
    { 
        "status": "Active", 
        "profileName": null, 
        "email": " test3@myhealthchampion.com" 
    }, 
    { 
        "status": "Pending", 
        "profileName": null, 
        "email": " test4@myhealthchampion.com" 
    }, 
    { 
        "status": "Active", 
        "profileName": " test5@myhealthchampion.com", 
        "email": "test5@myhealthchampion.com" 
    }, 
    { 
        "status": "Active", 
        "profileName": null, 
        "email": " test6@myhealthchampion.com" 
    }, 
    { 
        "status": "Active", 
        "profileName": "test7@myhealthchampion.com", 
        "email": "test7@myhealthchampion.com" 
    }, 
    { 
        "status": "Pending", 
        "profileName": null, 
        "email": "test8@myhealthchampion.com" 
    }, 
    { 
        "status": "Active", 
        "profileName": "Terri Robel", 
        "email": " test9@myhealthchampion.com" 
    }, 
    { 
        "status": "Active", 
        "profileName": "test10@myhealthchampion.com", 
        "email": "test10@myhealthchampion.com" 
    }, 
    { 
        "status": "Active", 
        "profileName": "Sherry Schuppe", 
        "email": " test11@myhealthchampion.com" 
    }, 
    { 
        "status": "Active", 
        "profileName": "Elbert Harris", 
        "email": " test12@myhealthchampion.com " 
    }, 
    { 
        "status": "Active", 
        "profileName": "Diana Kihn", 
        "email": " test13@myhealthchampion.com " 
    } 

Error Code Response 

  • 400 
    • Bad Request - The server cannot or will not process the request due to something that is perceived to be a client error. 
  • 401 
    • Unauthrorized - Bad or invalid clientid or secret key. This could happen if the user entered invalid clientid and secret key. You should re-authenticate the user. 
  • 403 
    • Forbidden - Bad OAuth request (wrong key, expired timestamp...). Unfortunately, re-authenticating the user won't help here. 
  • 500 
    • Error: Internal Server Error - The server encountered an unexpected condition that prevented it from fulfilling the request. 
Response Body: 
    “Message”: “Execution Timeout Expired. The timeout elapsed prior to completion of the operation of the server is not responding.” 
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us