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

Export Time Attendance Roster Report Data via API Integration

Download your Time Attendance Roster report from brioHR as CSV or JSON, with one row per employee per roster day, for use in your own systems or Power BI.

Audience & Scope

Audience: HR Admin / Time Attendance Admin / IT Admin
Module: Time Attendance
Country: All countries
Pre-requisites: Time Attendance module with rosters set up, and the Time Attendance Roster report module enabled for your API integration.

Note: For a comprehensive overview of the BrioHR API integration flow, please refer to the article BrioHR API Integration Flow. If you already export time logs through the API, see Export Employee Time Log Report Data (API Integration).

IMPORTANT: To enable this integration, you will need to contact our support team via email at support@briohr.com or live chat (9 am - 6 pm, Kuala Lumpur working days).
Note: If you are still in the implementation stage, please reach out to your implementation manager for support.

 

Prerequisites & Setup

  1. IP Whitelisting: The client system's outbound IP address must be whitelisted by brioHR.
  2. API Credentials: Request username, password and company ID from brioHR.
  3. Integration Enabled: brioHR has ticked the Time Attendance Roster report module for your integration. If you also need salary in the report, ask for Include Salary Data? to be turned on for this module.

 

Overview & Operational Behavior

The Time Attendance Roster report is available on the same public reports API as the other brioHR reports. It returns the same rows as the Time Attendance Roster report in Report Builder for the same date range, so you can pull roster data into your own systems on a schedule instead of exporting it by hand.

  • One Row per Employee per Roster Day: Each row is one employee on one roster day. A day with several shifts gives one row per shift.
  • Same Rows and Order as Report Builder: Rows are sorted by date, then by employee, in the same order as the report in Report Builder. Only the column order can differ.
  • Full Roster Population: Every roster in the date range is returned, including employees who resigned within the range.
  • Current Employee Values: Employee columns (name, department, job title and so on) show the employee's current values, repeated on each of their rows.
  • Separate Integration Module: The roster report has its own integration module. An integration that only has the time log report module cannot download the roster report.
  • Salary Controlled per Module: The Salary column is included only when Include Salary Data? is on for this module.
  • CSV or JSON: Choose the output format with the format parameter. CSV is the default.

 

API Specification & Request Headers

  • Endpoint URL: https://static.api.briohr.com/v2/api/external/reports/time-attendance-roster-report/download
  • HTTP Method: GET
  • Response Format: text/csv (default) or application/json, set with the format parameter
Header Type Value/Description
Authorization String Basic <base64_encode(username:password)>
x-api-context-company String <company id> (Target brioHR Company ID)
x-resource-type String Must strictly equal time-attendance-roster-report

Security Guardrail: The x-resource-type header must match the report in the URL. The roster report needs its own Time Attendance Roster report module on the integration. An API key that only holds the time log report module (time-log-report) does not give access to it.

 

Query Parameters

Parameter Mandatory/Optional Example Value Description
format Optional csv | json Output format. Default is csv.
fromDate Optional 2026-09-01 Start of the date range (Date From), in YYYY-MM-DD.
toDate Optional 2026-09-30 End of the date range (Date To), in YYYY-MM-DD. Must be on or after fromDate.
query Optional (instead of fromDate and toDate) periodRange|gte|2026-09-01T00:00:00.000Z AND periodRange|lte|2026-09-30T00:00:00.000Z The same date filter the time log report uses. gte is greater than or equal, lte is less than or equal, and dates use ISO 8601.
company Power BI only <company id> Replaces the x-api-context-company header for tools that cannot send custom headers.
resource Power BI only time-attendance-roster-report Replaces the x-resource-type header for tools that cannot send custom headers.

 

Date Range Rules

  1. Default Range: With no dates, the API returns the current week, Monday to Sunday.
  2. One Date Only: Only fromDate returns the 7 days starting on it. Only toDate returns the 7 days ending on it.
  3. Maximum 31 Days per Call: A longer range is cut to fromDate + 30 days. For a longer period, make one call per month.
  4. Date Validation: toDate before fromDate, or a date in another format, returns 400 with the reason. These checks run only for fromDate and toDate.
  5. One Option per Call: Use either query or fromDate and toDate, not both. The current-week default and the 31-day limit apply to both options.

 

Output Columns

Roster columns (one row per day, or per shift)

CSV Header JSON Key Content
Date date Roster date (YYYY-MM-DD)
Scheduled scheduled Hours scheduled for the shift, or for the day on flexible hours, e.g. 8h. Empty on a rest day
Status status Roster status: Open, Published or Locked
Rest Day restDay YES or NO
Off Day offDay YES or NO
Shift Name shiftName Shift name. Empty on flexible hours days and on days without a shift
Earliest Clock In shiftEarliestIn Earliest clock-in time for the shift (HH:mm)
Actual Clock In shiftActualIn Shift start time (HH:mm)
Late Clock In shiftLateIn Late clock-in limit (HH:mm)
Scheduled Break Duration shiftBreakDuration Break length, e.g. 1h
Earliest Clock Out shiftEarliestOut Earliest clock-out time (HH:mm)
Actual Clock Out shiftActualOut Shift end time (HH:mm)
Late Clock Out shiftLateOut Late clock-out limit (HH:mm)
Scheduled Hours scheduledHours Same value as Scheduled
Shift Tags shiftTags Shift tags, comma separated
Shift Location shiftLocation Work locations of the shift, comma separated
Shift Activity shiftActivity Activity of the shift
Shift Workstation shiftWorkstation Workstation of the shift
Public Holiday publicHoliday YES or NO
Public Holiday Name publicHolidayName Holiday name, e.g. Malaysia Day
Leave leave YES or NO
Leave Type leaveType Leave type name

Employee columns (current values, repeated on each of the employee's rows)

Group Columns
Identity Internal Id, First Name, Last Name, Preferred Name, Email
Personal Mobile phone, Birth Date, Gender, Nationality, Marital Status, Address, Age, and the company's personal custom fields (CSV: field name; JSON: field name in camelCase)
Employment Job Title, Employment Type, Job Grade, Manager, Office, Department, Cost Center ID, Cost Center Name, Joined Date, Years of service, Employment End Date, Termination Category, Termination Reason, Termination comment, Active/Inactive
Salary Basic Salary, only when brioHR enables this for your integration. By default, it is disabled. 

JSON rows also carry resourceId, the employee's brioHR ID. In JSON, a field with no value can be left out of the row instead of being sent as null.

 

Critical Operational Behaviors & Potential Blockers

Blocker 1: Date ranges longer than 31 days are cut short

A request for more than 31 days does not return an error. The API returns only fromDate + 30 days, so the rest of the period is missing from the file.

  • Behavior: A call for 1 September to 31 October returns 1 September to 1 October only.
  • Workaround: Make one call per month and combine the files in your system.

Blocker 2: The report is empty when the query is encoded twice

In cURL, the query value must be URL-encoded. Tools such as Postman and Bruno encode it themselves, so pasting the encoded version there encodes it twice and the report comes back empty.

  • Behavior: The call succeeds, but the file has no rows.
  • Workaround: In Postman or Bruno, type the query as plain text: periodRange|gte|2026-09-01T00:00:00.000Z AND periodRange|lte|2026-09-30T00:00:00.000Z. Or use fromDate and toDate instead.

Blocker 3: The Salary column is missing

Salary is controlled separately for each report module. Turning it on for another report, such as the time log report, does not add it to the roster report.

  • Behavior: The Salary column is left out. All other columns are unchanged.
  • Workaround: Ask brioHR support to turn on Include Salary Data? for the Time Attendance Roster report module.

 

Error Code & Troubleshooting Reference

Issue HTTP Status Cause Resolution
Invalid date order 400 toDate is before fromDate. Set toDate on or after fromDate. The response gives the reason.
Invalid date format 400 fromDate or toDate is not in YYYY-MM-DD. Send dates as YYYY-MM-DD, e.g. 2026-09-01.
Fewer days than requested 200 The range is longer than 31 days and was cut to fromDate + 30 days. Make one call per month (see Blocker 1).
Empty report 200 The query value was encoded twice, or there are no rosters in the range. Type the query as plain text in Postman or Bruno (see Blocker 2), and check that rosters exist for the dates.

Authentication Errors

Issue HTTP Status Message
Invalid username or password 403 No body
IP address not whitelisted 403 No body
Integration does not have the Time Attendance Roster report module (including keys with the time log report module only) 403 No body

 

Code Examples & Response Payloads

Sample cURL (fromDate and toDate)

Bash
curl -o time-attendance-roster-report.csv --location 'https://static.api.briohr.com/v2/api/external/reports/time-attendance-roster-report/download?format=csv&fromDate=2026-09-01&toDate=2026-09-30' \
--header 'Authorization: Basic <base64 of username:password>' \
--header 'x-api-context-company: <company id>' \
--header 'x-resource-type: time-attendance-roster-report'

Sample cURL (query)

Bash
curl -o time-attendance-roster-report.csv --location 'https://static.api.briohr.com/v2/api/external/reports/time-attendance-roster-report/download?format=csv&query=periodRange%7Cgte%7C2026-09-01T00:00:00.000Z%20AND%20periodRange%7Clte%7C2026-09-30T00:00:00.000Z' \
--header 'Authorization: Basic <base64 of username:password>' \
--header 'x-api-context-company: <company id>' \
--header 'x-resource-type: time-attendance-roster-report'

Sample cURL for Power BI and other third-party tools

For tools that cannot send the x-api-context-company header, pass the company ID and resource in the URL and send only the Authorization header.

Bash
curl -o time-attendance-roster-report.csv --location 'https://static.api.briohr.com/v2/api/external/reports/time-attendance-roster-report/download?format=csv&company=<company id>&resource=time-attendance-roster-report&fromDate=2026-09-01&toDate=2026-09-30' \
--header 'Authorization: Basic <base64 of username:password>'

Expected output: time-attendance-roster-report.csv, or JSON when format=json.

Example of CSV Output (trimmed to the identity and roster columns)

CSV
"Internal Id","First Name","Last Name","Date","Scheduled","Status","Rest Day","Off Day","Shift Name","Actual Clock In","Scheduled Break Duration","Actual Clock Out","Public Holiday","Public Holiday Name","Leave","Leave Type"
"001","Employee1","Demo","2026-09-01","8h","Published","NO","NO","Morning shift","09:00","1h","18:00","NO","","NO",""
"001","Employee1","Demo","2026-09-05","","Published","YES","NO","","","","","NO","","NO",""
"001","Employee1","Demo","2026-09-16","8h","Published","NO","NO","","","","","YES","Malaysia Day","NO",""

Error Response (400)

Returned when toDate is before fromDate, or a date is not in YYYY-MM-DD. The response body states the reason.

LIMITATION:

  • Maximum 31 days per call. Longer ranges are cut to fromDate + 30 days.

 

Common Issues/FAQ

Q1: I requested two months but only got one. Why?
A1: One call returns at most 31 days. Make one call per month. See Blocker 1.

Q2: My call works in cURL but returns an empty file in Postman.
A2: Postman encodes the query itself. Type the query value as plain text. See Blocker 2.

Q3: We already have the time log report API. Can we use the same key?
A3: Only if brioHR adds the Time Attendance Roster report module to that integration. The time log report module alone does not give access. Contact support to enable it.

Q4: Why does the API file have the columns in a different order from Report Builder?
A4: The rows and values match Report Builder, but the column order can differ. Map columns by header name (CSV) or key (JSON), not by position.

 

Related Articles

 

Ownership

By: Aqilah