Authentication and Keys

Zeal authenticates API requests using your partner account's API key. Your Test and Production API keys can be found under the API page on Zeal Partner dashboard. Your API key can be used to make any API call on behalf of any of your sub-employers' accounts. If you do not include your key when making an API request or use one that is incorrect or outdated, Zeal returns an error.

We recommend that you treat your secret API keys as you would any other password. Grant access only to those who need it and ensure they are kept out of any version control system you may be using.

Using Zeal credentials

Include the API key in the Authentication as a bearer token. Other parameters can be added, as specified in the API endpoints.

Authorization: Bearer <YOUR API KEY>
const request = require('request');

request({
  url: '<zeal-endpoint>',
  headers: {
     'Authorization': 'Bearer <API KEY>'
  },
}, function(err, res) {
      if(err) {
        console.error(err);
      } else {
        console.log(res.body);
      }
});
curl <zeal-endpoint>
   -H "Accept: application/json"
   -H "Authorization: Bearer <API KEY>"
import requests

url = "<zeal-endpoint>"

headers["Accept"] = "application/json"
headers["Authorization"] = "Bearer " + <API KEY>


resp = requests.get(url, headers=headers)

Test and Production API Keys

You can find Test and Production API Keys on your Zeal dashboard on the API page.

API calls to the below endpoints using the Test key will result in responses reflecting Test data or changes to the Test data (test employees, test employer checks, test employee checks).

API calls to the below endpoints using the Production key will result in responses reflecting Live data or changes to the Live data β€” payrolls will be run and money will be disbursed.