Skip to content
English
  • There are no suggestions because the search field is empty.

Export Who-is-Away (On Leave) Data via API Integration

This article is a guide on how to create a Who-is-away API integration to export leave details from the BrioHR Leave module.

Note: For a comprehensive overview of the BrioHR API integration flow, please refer to the article here.

IMPORTANT:

To enable this integration, you will need to contact our support team via email or live chat so we can provide the necessary access. Please contact us via: 

Note: If you are still in the implementation stage, please reach out to your implementation manager for support.

The integration flow with BrioHR will consist of the steps below: 

  1. Client request for the APIs/integration access together with the list of IPs (recommended for securing the line of integration).
  2. BrioHR will create the credentials for client. Consists of: Authentication credentials and client’s ID. 
  3. Client can try to connect to BrioHR API using the link, authentication & ID.

Report API URL: 

https://static.api.briohr.com/v2/api/external/reports/recruitment-report/download

Header Value
Authorization

Basic base64_encode(<username:password>)

x-api-context-company <company id>
x-resource-type leave-summaries
Query Parameter Mandatory/Optional Example Value
format Optional (Default json) json | csv
fromDate Mandatory 2020-01-12T00:00:00Z
toDate  Mandatory  2022-01-11T00:00:00Z
arePendingLeavesIncluded  Optional (Default false true | false

 

For Power BI & other 3rd party that cannot inject the x-api-context-company in the header:

https://static.api.briohr.com/v2/api/external/reports/who-is-away?format=csv&fromDate=2016-01-12T00:00:00Z&toDate=2026-01-11T00:00:00Z&company=&resource=leave-summaries

Expected output: list_of_leave.csv


Example of CURL 

curl -o claim.csv --location 'https://static.api.briohr.com/v2/api/external/reports/who-isaway?
format=json&fromDate=2016-01-12T00%3A00%3A00Z&toDate=2026-01-
11T00%3A00%3A00Z&arePendingLeavesIncluded=true' \
--header 'Authorization: Basic aHotYXBwOmJyaW9ocg==' \
--header 'x-api-context-company: 412cc8a9d90158c489b83e83' \
--header 'x-resource-type: leave-summaries'

Example of CURL for PowerBI

curl -o claim.csv --location 'https://static.api.briohr.com/v2/api/external/reports/who-isaway?
format=json&fromDate=2016-01-12T00%3A00%3A00Z&toDate=2026-01-
11T00%3A00%3A00Z&arePendingLeavesIncluded=true&company=412cc8a9d90158c489b83e83&resource=leav
e-summaries' \
--header 'Authorization: Basic aHotYXBwOmJyaW9ocg=='

Example of CSV Output

"employeeId","firstName","lastName","email","profileImage","internalId","startDate","endDate"
,"isHalfDayStartDate","isHalfDayEndDate","value","leaveTypeName"
"62847241ac43e800083f4983","EmployeeThree","Resignering","employee3active@yopmail.com","http:
//gateway:8001/v2/api/storage/serve/c31dd740-d660-11ec-b81b-55e24d0749b7.jpg","003","2022-08-
18T00:00:00.000Z","2022-08-18T00:00:00.000Z","false","false",1,"annual"
"62846db44478260008bea1a0","Employee1","Active","one1@yopmail.com","http://gateway:8001/v2/ap
i/storage/serve/0c2df0d0-d65e-11ec-9c82-5528b3d9d106.jpg","001","2022-11-
28T00:00:00.000Z","2022-11-28T00:00:00.000Z","false","true",0.5,"annual"
"62846db44478260008bea1a0","Employee1","Active","one1@yopmail.com","http://gateway:8001/v2/ap
i/storage/serve/0c2df0d0-d65e-11ec-9c82-5528b3d9d106.jpg","001","2022-11-
29T00:00:00.000Z","2022-11-29T00:00:00.000Z","true","false",0.5,"annual"
"629464b9377fd700091dce74","Employee6","Active","employee6active@yopmail.com","http://gateway
:8001/v2/api/storage/serve/d58ce8a0-dfe1-11ec-a3a1-f9176dc971bb.jpg","006","2022-06-
03T00:00:00.000Z","2022-06-03T00:00:00.000Z","false","false",1,"unpaid"
"62847111ac43e800083f4982","Employee2 Employee2 Employee2
Employee2","Resign","employee2resign@yopmail.com","http://gateway:8001/v2/api/storage/serve/9
c4b9900-d65f-11ec-b81b-55e24d0749b7.jpg","002","2022-06-03T00:00:00.000Z","2022-06-
03T00:00:00.000Z","false","false",1,"unpaid"
"628e0944f281990009337363","Employee5","Active","employee5active@yopmail.com","http://gateway
:8001/v2/api/storage/serve/0d168bf0-dc18-11ec-be9d-192e5e00d57c.jpg","005","2022-06-
03T00:00:00.000Z","2022-06-03T00:00:00.000Z","false","false",1,"unpaid"
"62d67d212321580008fba246","Employee31","Active","employee31active@yopmail.com","","015","202
2-06-03T00:00:00.000Z","2022-06-03T00:00:00.000Z","false","false",1,"unpaid"

IMPORTANT:
Kindly be informed that BrioHR will need to whitelist the client's IP and then provide the client with the username, password and company ID. 

 

Need Assistance?

If you have any questions regarding the API above or require assistance, please reach out to our support team via live chat or email us at support@briohr.com.