Authentication and Keys

Zeal authenticates API requests using the employer account’s CompanyID and the employer or partner account's API key. The Zeal CompanyID and secret API key are necessary for authorized consumption of any endpoints. If you do not include your key when making an API request, or use one that is incorrect or outdated, Zeal returns a 401 error.

For employers: The CompanyID and API keys can be found under the 'API' Page on Zeal's dashboard. Your secret API key can be used to make any API call on behalf of your account.

For partners: An employer's Company ID can be found on the Zeal Partner dashboard or in the API Page of the employer's dashboard. Your API keys can be found under the 'API' Page on Zeal's Partner dashboard. Your secret API key can be used to make any API call on behalf of any of your sub-employers' accounts.

Treat your secret API keys as you would any other password. Grant access only to those who need it. Ensure it is 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': '<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 Live API Keys

You can find Test and Live 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 Live key will result in responses reflecting Live data or changes to the Live data — payrolls will be run and money will be disbursed.