Welcome to TR API.

Total Reader API will provide the abilities to do the followings:

Endpoints

To view request/response data format of each API endpoint, please visit API Test Utility.

Authentication

API uses HMAC (hash-based message authentication code) SHA256 method to encode the request and authenticate information.
For authentication information, please contact CustomerSupport@TotalReader.com.
Below is an example to create a user. <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/hmac-sha256.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/enc-base64.js"></script> </head> <script> $(document).ready(function () { function callAPI() { //provided by TR var partner = 'my partner name'; var apiKey = 'my api key'; var secretKey = 'my secret key'; var d = new Date(); var timestamp = d.getTime(); var urlPath = ''; // for PROD, urlPath = 'https://api.totalreader.com/users' // for QA, urlPath = 'http://api-qa.totalreader.com/users' var path = '/users'; var headerData = path + '?api_key=' + apiKey + '&datetime=' + timestamp; var hash = CryptoJS.HmacSHA256(headerData, secretKey); var base64 = CryptoJS.enc.Base64.stringify(hash); var headers = { 'x-hash': base64, 'x-timestamp': timestamp, 'x-partner': partner }; var userData = { "firstName": "", "lastName":"", "grade": 8, "refId": "" }; $.ajax({ dataType: 'json', contentType: 'application/json', url: urlPath, crossDomain: true, type: 'POST', headers: headers, data: JSON.stringify(userData), success: function () { alert('Success!'); }, error: function (jqXHR, textStatus, errorThrown) { alert('Failed'); console.log(textStatus); } }); } callAPI(); }); </script> <body> TR API Test </body> </html>