One of the best features of Zeal is our reporting. Our white-label components and APIs give easy access to complex reports on demand. In this example we’ll show how to get a standard Payroll Journal Report, but there are many more reports available. See our API Reference for a full view of what is available.



API

  1. Call Create Payroll Journal Report. This will return a job_id.

🚧

Code Samples

Remember to replace the placeholders such as {{testApiKey}} in the code samples below.

curl --request POST \
     --url https://api.zeal.com/reports/payroll-journal \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {{testApiKey}}' \
     --header 'Content-Type: application/json' \
     --data '
{
     "start_date": "2022-01-01",
     "end_date": "2022-03-28",
     "companyID": "{{companyID}}",
     "media_type": "csv"
}
'
  1. Include the job_id in a call to Get Job Status. This returns a JSON object about the status of the report.
curl --request GET \
     --url 'https://api.zeal.com/reports?job_id=ID&companyID={{companyID}}' \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {{testApiKey}}'
  1. If the status is pending, wait a few moments before making another call to Get Job Status. If the status is complete, use the link included in the payload to download the report.


White-Label

Admin/Employer Dashboard

If you are using our white-label Employer Dashboard, reports can be accessed through the Reports page.

  1. Navigate to the Reports page.
28802880
  1. Click the Payroll Journal card.
  2. Fill the information on the following page and then click Generate.
  3. A success alert will appear indicating that the browser will automatically download the report when it is ready in a few moments. Please ensure pop-ups are enabled in the browser.
28662866
  1. Once the report has downloaded, we can open it to view the payroll journal.
26062606

Embedding the Reports Page

If you’ve built your own custom dashboards using our APIs, you can embed the Reports white-label component directly in your dashboard.

  1. Call Get Reports Link.
curl --request POST \
     --url https://api.zeal.com/authLinks/reports \
     --header 'Accept: application/json' \
     --header 'Authorization: Bearer {{testApiKey}}' \
     --header 'Content-Type: application/json' \
     --data '
{
     "partnerID": "{{partnerID}}",
     "companyID": "{{companyID}}"
}
'
  1. Embed the link in your application through and iframe or open it up in a new tab.
28782878

What’s Next

Learn how reports and more fit together in your Admin/Employer Dashboard.

Did this page help you?