An open API for developers building healthcare apps and devices

Build interoperable and secure apps using our API

“The opening up of APIs is part of the government’s overall approach to open ICT and user centred digital services.”

- Government ICT strategy
Developers are using our open APIs to facilitate the sharing of data between systems, healthcare professionals and patients, as well to store and retrieve clinical data and deploy critical care services cost-effectively and with scalability and reliability.
  • GET
    User's basic information
    • Ruby
    • JavaScript
    • Code Sample: Ruby
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      require 'oauth'
      require 'json'
      
      CONSUMER_KEY = "6aa8d2199357db6670b03653f35a2e91"
      CONSUMER_SECRET = "8fa254320524c355da88df808fc4c25e"
      
      consumer = OAuth::Consumer.new(
        CONSUMER_KEY,
        CONSUMER_SECRET,
        :site         => "https://api.howareyou.com",
      )
      
      # These values are required to decrypt data
      # You will have to obtain a new session id and key from the authentication endpoint
      headers = {
        "X-CHID-SESSION" => JSON.dump({
          "id"  => "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key" => "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c=",
        }),
      }
      
      access_token = OAuth::AccessToken.new(consumer)
      
      response = access_token.get("/users/c5323558d6750f5571655b71ae2a2380", headers)
      
      p JSON.parse(response.body)
      
      # =>
      # {
      #     "user" => {
      #                 "id" => "c5323558d6750f5571655b71ae2a2380",
      #              "email" => "demo@howareyou.com",
      #         "first_name" => "Demo",
      #          "last_name" => "User",
      #               "type" => "patient",
      #         "patient_id" => "658e810c58653ddf197e13e2fae4cd8a"
      #     }
      # }
      
    • Code Sample: JavaScript
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      • 39
      • 40
      • 41
      (function () {
        var auth = ohauth.headerGenerator({
          consumer_key:    '6aa8d2199357db6670b03653f35a2e91',
          consumer_secret: '8fa254320524c355da88df808fc4c25e'
        });
      
        var url = 'https://api.howareyou.com/users/7b33dbb398811023a8512cbda455c0c9.json';
      
        var xhr = new XMLHttpRequest();
      
        xhr.onreadystatechange = function () {
          if (xhr.readyState == 4) {
            console.log(xhr.responseText);
          }
        }
      
        xhr.open('GET', url);
        xhr.setRequestHeader('Authorization', auth('GET', url));
      
        // These values are required to decrypt data
        // You will have to obtain a new session id and key from the authentication endpoint
        xhr.setRequestHeader('X-CHID-SESSION', JSON.stringify({
          "id":  "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key": "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c="
        }));
      
        xhr.send();
      })();
      
      /*
       * {
       *     "user": {
       *         "id":         "c5323558d6750f5571655b71ae2a2380",
       *         "email":      "demo@howareyou.com",
       *         "first_name": "Demo",
       *         "last_name":  "User",
       *         "type":       "patient",
       *         "patient_id": "658e810c58653ddf197e13e2fae4cd8a"
       *     }
       * }
      */
      
  • POST
    Authenticate user
    • Ruby
    • JavaScript
    • Code Sample: Ruby
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      require 'json'
      require 'net/https'
      
      params = {'email' => 'demo@howareyou.com', 'password' => 'Password1'}
      
      uri = URI.parse('https://api.howareyou.com/users/authenticate')
      
      http = Net::HTTP.new(uri.host, uri.port)
      http.use_ssl = true
      
      req = Net::HTTP::Post.new(uri.path, params)
      req.set_form_data(params)
      
      response = http.request(req)
      
      p JSON.parse(response.body)
      
      # =>
      # {
      #   "user" => {
      #                  "id" => "c5323558d6750f5571655b71ae2a2380",
      #               "email" => "demo@howareyou.com",
      #          "first_name" => "Demo",
      #           "last_name" => "User",
      #                "type" => "patient",
      #          "patient_id" => "658e810c58653ddf197e13e2fae4cd8a"
      #   },
      #   "consumer_token" => {
      #                 "key" => "6aa8d2199357db6670b03653f35a2e91",
      #              "secret" => "8fa254320524c355da88df808fc4c25e",
      #             "user_id" => "c5323558d6750f5571655b71ae2a2380"
      #   },
      #   "session" => {
      #                  "id" => "pnduY3LKi1VDU/zFKMFQNJW2Whkuq9girqVCiSQnTTs=",
      #                 "key" => "22E7lsPE44GoIVBNVjPNgWHlfOD6urHpN53Clh7NNUA=",
      #              "expiry" => 1378834967
      #   }
      # }
      
    • Code Sample: JavaScript
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      • 39
      • 40
      • 41
      • 42
      • 43
      (function () {
        var url = 'https://api.howareyou.com/users/authenticate.json';
      
        var xhr = new XMLHttpRequest();
      
        xhr.onreadystatechange = function () {
          if (xhr.readyState == 4) {
            console.log(xhr.responseText);
          }
        }
      
        var data = {
          email:    'demo@howareyou.com',
          password: 'Password1'
        };
      
        xhr.open('POST', url);
        xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
        xhr.send(ohauth.qsString(data));
      })();
      
      /*
       * {
       *     "user": {
       *         "id":         "c5323558d6750f5571655b71ae2a2380",
       *         "email":      "demo@howareyou.com",
       *         "first_name": "Demo",
       *         "last_name":  "User",
       *         "type":       "patient",
       *         "patient_id": "658e810c58653ddf197e13e2fae4cd8a"
       *     },
       *     "consumer_token": {
       *         "key":     "6aa8d2199357db6670b03653f35a2e91",
       *         "secret":  "8fa254320524c355da88df808fc4c25e",
       *         "user_id": "c5323558d6750f5571655b71ae2a2380"
       *     },
       *     "session": {
       *         "id":    "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
       *         "key":   "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c=",
       *         "expiry": 1378831979
       *     }
       * }
       */
      
  • PUT
    Update user's meta data
    • Ruby
    • JavaScript
    • Code Sample: Ruby
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      require 'oauth'
      require 'json'
      
      CONSUMER_KEY = "6aa8d2199357db6670b03653f35a2e91"
      CONSUMER_SECRET = "8fa254320524c355da88df808fc4c25e"
      
      consumer = OAuth::Consumer.new(
        CONSUMER_KEY,
        CONSUMER_SECRET,
        :site         => "https://api.howareyou.com",
      )
      
      access_token = OAuth::AccessToken.new(consumer)
      
      params = {"key" => "meta-key", "value" => "meta-value"}
      
      # These values are required to decrypt data
      # You will have to obtain a new session id and key from the authentication endpoint
      headers = {
        "X-CHID-SESSION" => JSON.dump({
          "id"  => "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key" => "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c=",
        }),
      }
      
      response = access_token.put("/users/c5323558d6750f5571655b71ae2a2380/meta_data.json", params, headers)
      
      p JSON.parse(response.body)
      
      # =>
      # {
      #     "key"     => "meta_key",
      #     "value"   => "meta_value",
      #     "user_id" => "c5323558d6750f5571655b71ae2a2380",
      # }
      
    • Code Sample: JavaScript
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      • 39
      (function () {
        var auth = ohauth.headerGenerator({
          consumer_key:    '6aa8d2199357db6670b03653f35a2e91',
          consumer_secret: '8fa254320524c355da88df808fc4c25e'
        });
      
        var url = 'https://api.howareyou.com/users/c5323558d6750f5571655b71ae2a2380/meta_data.json';
      
        var xhr = new XMLHttpRequest();
      
        xhr.onreadystatechange = function () {
          if (xhr.readyState == 4) {
            console.log( xhr.responseText );
          }
        }
      
        var params = { key:'meta-key', value:'meta-value' }
      
        xhr.open('PUT', url);
        xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');
        xhr.setRequestHeader('Authorization', auth('PUT', url, params));
      
        // These values are required to decrypt data
        // You will have to obtain a new session id and key from the authentication endpoint
        xhr.setRequestHeader('X-CHID-SESSION', JSON.stringify({
          "id":  "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key": "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c="
        }));
      
        xhr.send(ohauth.qsString(params));
      })();
      
      /*
       * {
       *     "key":     "meta_key",
       *     "value":   "meta_value",
       *     "user_id": "c5323558d6750f5571655b71ae2a2380",
       * }
       */
      
  • GET
    Medications lookup
    • Ruby
    • JavaScript
    • Code Sample: Ruby
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      require 'oauth'
      require 'json'
      
      CONSUMER_KEY = "6aa8d2199357db6670b03653f35a2e91"
      CONSUMER_SECRET = "8fa254320524c355da88df808fc4c25e"
      
      consumer = OAuth::Consumer.new(
        CONSUMER_KEY,
        CONSUMER_SECRET,
        :site         => "https://api.howareyou.com",
      )
      
      # These values are required to decrypt data
      # You will have to obtain a new session id and key from the authentication endpoint
      headers = {
        "X-CHID-SESSION" => JSON.dump({
          "id"  => "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key" => "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c=",
        }),
      }
      
      access_token = OAuth::AccessToken.new(consumer)
      
      response = access_token.get("/medications/lookup.json?ids=421161003", headers)
      
      p JSON.parse(response.body)
      
      # =>
      # [
      #     {
      #         "snomed_concept_id" => 421161003,
      #                      "term" => "Beeswax",
      #                  "synonyms" => []
      #     }
      # ]
      
    • Code Sample: JavaScript
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      (function () {
        var auth = ohauth.headerGenerator({
          consumer_key:    '6aa8d2199357db6670b03653f35a2e91',
          consumer_secret: '8fa254320524c355da88df808fc4c25e'
        });
      
        var url = 'https://api.howareyou.com/medications/lookup.json?ids=421161003';
      
        var xhr = new XMLHttpRequest();
      
        xhr.onreadystatechange = function () {
          if (xhr.readyState == 4) {
            console.log(xhr.responseText);
          }
        }
      
        xhr.open('GET', url);
        xhr.setRequestHeader('Authorization', auth('GET', url));
      
        // These values are required to decrypt data
        // You will have to obtain a new session id and key from the authentication endpoint
        xhr.setRequestHeader('X-CHID-SESSION', JSON.stringify({
          "id":  "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key": "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c="
        }));
      
        xhr.send();
      })();
      
      /*
       * [
       *     {
       *         "snomed_concept_id": 421161003,
       *         "term": "Beeswax",
       *         "synonyms": []
       *     }
       * ]
       */
      
  • GET
    Medications search
    • Ruby
    • JavaScript
    • Code Sample: Ruby
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      require 'oauth'
      require 'json'
      
      CONSUMER_KEY = "6aa8d2199357db6670b03653f35a2e91"
      CONSUMER_SECRET = "8fa254320524c355da88df808fc4c25e"
      
      consumer = OAuth::Consumer.new(
        CONSUMER_KEY,
        CONSUMER_SECRET,
        :site         => "https://api.howareyou.com",
      )
      
      # These values are required to decrypt data
      # You will have to obtain a new session id and key from the authentication endpoint
      headers = {
        "X-CHID-SESSION" => JSON.dump({
          "id"  => "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key" => "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c=",
        }),
      }
      
      access_token = OAuth::AccessToken.new(consumer)
      
      response = access_token.get("/medications/search.json?term=bees", headers)
      
      p JSON.parse(response.body)
      
      # =>
      # [
      #     {
      #         "snomed_concept_id" => 421161003,
      #                      "term" => "Beeswax",
      #                  "synonyms" => []
      #     }
      # ]
      
    • Code Sample: JavaScript
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      (function () {
        var auth = ohauth.headerGenerator({
          consumer_key:    '6aa8d2199357db6670b03653f35a2e91',
          consumer_secret: '8fa254320524c355da88df808fc4c25e'
        });
      
        var url = 'https://api.howareyou.com/medications/search.json?term=bees';
      
        var xhr = new XMLHttpRequest();
      
        xhr.onreadystatechange = function () {
          if (xhr.readyState == 4) {
            console.log(xhr.responseText);
          }
        }
      
        xhr.open('GET', url);
        xhr.setRequestHeader('Authorization', auth('GET', url));
      
        // These values are required to decrypt data
        // You will have to obtain a new session id and key from the authentication endpoint
        xhr.setRequestHeader('X-CHID-SESSION', JSON.stringify({
          "id":  "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key": "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c="
        }));
      
        xhr.send();
      })();
      
      /*
       * [
       *     {
       *         "snomed_concept_id": 421161003,
       *         "term": "Beeswax",
       *         "synonyms": []
       *     }
       * ]
       */
      
  • POST
    Add medication
    • Ruby
    • JavaScript
    • Code Sample: Ruby
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      require 'oauth'
      require 'json'
      
      CONSUMER_KEY = "6aa8d2199357db6670b03653f35a2e91"
      CONSUMER_SECRET = "8fa254320524c355da88df808fc4c25e"
      
      consumer = OAuth::Consumer.new(
        CONSUMER_KEY,
        CONSUMER_SECRET,
        :site         => "https://api.howareyou.com",
      )
      
      # These values are required to decrypt data
      # You will have to obtain a new session id and key from the authentication endpoint
      headers = {
        "X-CHID-SESSION" => JSON.dump({
          "id"  => "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key" => "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c=",
        }),
      }
      
      params = {"concept_id" => "421161003", "started_at" => "2014-01-13T12:24:29+00:00"}
      
      access_token = OAuth::AccessToken.new(consumer)
      
      # Note that this is the patient_id rather than the user id
      # The patient_id must be used for all clinical data interations
      response = access_token.post("/patients/658e810c58653ddf197e13e2fae4cd8a/medications.json", params, headers)
      
      p response.body
      
      # =>
      #   {
      #     "id" => "7e0f54c3-98b6-41a8-9e95-06958eebdf2c"
      #   }
      
    • Code Sample: JavaScript
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      • 39
      (function () {
        var auth = ohauth.headerGenerator({
          consumer_key:    '6aa8d2199357db6670b03653f35a2e91',
          consumer_secret: '8fa254320524c355da88df808fc4c25e'
        });
      
        // Note that f1dc85[…] is the patient_id rather than the user_id
        // The patient_id must be used for all clinical data interations
        var url = 'https://api.howareyou.com/patients/658e810c58653ddf197e13e2fae4cd8a/medications.json';
      
        var xhr = new XMLHttpRequest();
      
        xhr.onreadystatechange = function () {
          if (xhr.readyState == 4) {
            console.log(xhr.responseText);
          }
        }
      
        var params = { concept_id: '421161003', started_at: '2014-01-13T12:24:29+00:00"'};
      
        xhr.open('POST', url);
        xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
        xhr.setRequestHeader('Authorization', auth('POST', url, params));
      
        // These values are required to decrypt data
        // You will have to obtain a new session id and key from the authentication endpoint
        xhr.setRequestHeader('X-CHID-SESSION', JSON.stringify({
          "id":  "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key": "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c="
        }));
      
        xhr.send(ohauth.qsString(params));
      })();
      
      /*
       *   {
       *     "id": "7e0f54c3-98b6-41a8-9e95-06958eebdf2c"
       *   }
       */
      
  • DELETE
    Delete medication
    • Ruby
    • JavaScript
    • Code Sample: Ruby
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      require 'oauth'
      require 'json'
      
      CONSUMER_KEY = "6aa8d2199357db6670b03653f35a2e91"
      CONSUMER_SECRET = "8fa254320524c355da88df808fc4c25e"
      
      consumer = OAuth::Consumer.new(
        CONSUMER_KEY,
        CONSUMER_SECRET,
        :site         => "https://api.howareyou.com",
      )
      
      # These values are required to decrypt data
      # You will have to obtain a new session id and key from the authentication endpoint
      headers = {
        "X-CHID-SESSION" => JSON.dump({
          "id"  => "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key" => "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c=",
        }),
      }
      
      access_token = OAuth::AccessToken.new(consumer)
      
      # Note that this is the patient_id rather than the user id
      # The patient_id must be used for all clinical data interations
      response = access_token.delete("/patients/658e810c58653ddf197e13e2fae4cd8a/medications/7e0f54c3-98b6-41a8-9e95-06958eebdf2c.json", headers)
      
      # The response body is either empty if no deletion happens
      # or {} if it is deleted.
      p response.body
      
    • Code Sample: JavaScript
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      (function () {
        var auth = ohauth.headerGenerator({
          consumer_key:    '6aa8d2199357db6670b03653f35a2e91',
          consumer_secret: '8fa254320524c355da88df808fc4c25e'
        });
      
        // Note that f1dc85[…] is the patient_id rather than the user_id
        // The patient_id must be used for all clinical data interations
        var url = 'https://api.howareyou.com/patients/658e810c58653ddf197e13e2fae4cd8a/medications/7e0f54c3-98b6-41a8-9e95-06958eebdf2c.json';
      
        var xhr = new XMLHttpRequest();
      
        xhr.onreadystatechange = function () {
          if (xhr.readyState == 4) {
            console.log(xhr.responseText);
          }
        }
      
        xhr.open('DELETE', url);
        xhr.setRequestHeader('Content-type','application/x-www-form-urlencoded');
        xhr.setRequestHeader('Authorization', auth('DELETE', url));
      
        // These values are required to decrypt data
        // You will have to obtain a new session id and key from the authentication endpoint
        xhr.setRequestHeader('X-CHID-SESSION', JSON.stringify({
          "id":  "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key": "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c="
        }));
      
        xhr.send();
      })();
      
      // The response body is either empty if no deletion happens
      // or {} if it is deleted.
      
  • GET
    Blood glucose
    • Ruby
    • JavaScript
    • Code Sample: Ruby
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      • 39
      • 40
      • 41
      require 'oauth'
      require 'json'
      
      CONSUMER_KEY = "6aa8d2199357db6670b03653f35a2e91"
      CONSUMER_SECRET = "8fa254320524c355da88df808fc4c25e"
      
      consumer = OAuth::Consumer.new(
        CONSUMER_KEY,
        CONSUMER_SECRET,
        :site         => "https://api.howareyou.com",
        :http_method  => :get,
      )
      
      # These values are required to decrypt data
      # You will have to obtain a new session id and key from the authentication endpoint
      headers = {
        "X-CHID-SESSION" => JSON.dump({
          "id"  => "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key" => "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c=",
        }),
      }
      
      access_token = OAuth::AccessToken.new(consumer)
      
      # Note that f1dc85[…] is the patient_id rather than the user_id
      # The patient_id must be used for all clinical data interations
      response = access_token.get("/patients/658e810c58653ddf197e13e2fae4cd8a/blood_glucose?limit=1", headers)
      
      p JSON.parse(response.body)
      
      # =>
      #
      # [
      #     {
      #             "value" => 5.0,
      #         "timestamp" => 1378894473,
      #              "unit" => "mmol/L",
      #                "id" => "1378894473:50",
      #              "type" => "Serum"
      #     }
      # ]
      
    • Code Sample: JavaScript
      • 1
      • 2
      • 3
      • 4
      • 5
      • 6
      • 7
      • 8
      • 9
      • 10
      • 11
      • 12
      • 13
      • 14
      • 15
      • 16
      • 17
      • 18
      • 19
      • 20
      • 21
      • 22
      • 23
      • 24
      • 25
      • 26
      • 27
      • 28
      • 29
      • 30
      • 31
      • 32
      • 33
      • 34
      • 35
      • 36
      • 37
      • 38
      • 39
      • 40
      • 41
      • 42
      (function () {
        var auth = ohauth.headerGenerator({
          consumer_key:    '6aa8d2199357db6670b03653f35a2e91',
          consumer_secret: '8fa254320524c355da88df808fc4c25e'
        });
      
        // Note that f1dc85[…] is the patient_id rather than the user_id
        // The patient_id must be used for all clinical data interations
        var url = 'https://api.howareyou.com/patients/658e810c58653ddf197e13e2fae4cd8a/blood_glucose?limit=1';
      
        var xhr = new XMLHttpRequest();
      
        xhr.onreadystatechange = function () {
          if (xhr.readyState == 4) {
            console.log(xhr.responseText);
          }
        }
      
        xhr.open('GET', url);
        xhr.setRequestHeader('Authorization', auth('GET', url));
      
        // These values are required to decrypt data
        // You will have to obtain a new session id and key from the authentication endpoint
        xhr.setRequestHeader('X-CHID-SESSION', JSON.stringify({
          "id":  "DMjIvrewGtwVKkD/UIVAUwrtrnNi81U7BSv8MR4YIBU=",
          "key": "h0058POWHRm95zMYMh8uEvdLDcoTYKOssdmQzwnc60c="
        }));
      
        xhr.send();
      })();
      
      /*
       * [
       *     {
       *             "value": 5.0,
       *         "timestamp": 1378894473,
       *              "unit": "mmol/L",
       *                "id": "1378894473:50",
       *              "type": "Serum"
       *     }
       * ]
       */
      

Third Party Apps

Anyone can build an app on top of our platform, for browser based JS apps we support CORS.

API Documentation

Documentation for describing, producing, consuming, and visualising our RESTful web services.

Biometric Endpoints

Distributed, redundant and on demand clinical data storage within the NHS N3 network or cloud.

Secure

256-bit encryption, hosted within the NHS N3 and ISO/IEC 20000 accredited and ICO compliant.

Enterprise Health Analytics

Gain a new level of insight into your apps and customers with real-time health analytics.

Real-time analysis of health transactions within your app, as well as data collected from sensors, patient monitoring systems, medical instruments and handheld devices.
Find out more

Clinical Codings

SNOMED CT and dm+d endpoints for medications, conditions, immunisations, allergies and labs.

N3 Hosted

All apps and data are hosted within the NHS' secure high-speed N3 network and ISO/IEC 20000 accredited.

Personal / Clinical Record

Synchronise data within your apps to and from patients' personal and clinical records.

App Store

The UK's first Health App Store, a patient-reviewed and personalised collection of health apps.

API Call
SNOMED CT Lookup
Returns JSON
Display Content

Easily add syndicated content from NHS Choices to your app

Use our SNOMED CT lookup to find syndicated NHS Choices content relating to SNOMED Clinical Terms and Concept IDs.

Embed syndicated NHS Choices content (including multimedia tools and more than 900 videos) on conditions, common health questions, services and live well topics.

API Explorer