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

Import Employee Time Attendance Data (API Integration) for Clock-In and Clock-Out

This article is a guide on how to create a timelog API integration to import employee clock-in and clock-out data into BrioHR for accurate timesheet records in the Time Attendance module.

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

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/timelogs
 

HTTP METHOD: POST

Header Value
Authorization

Basic

base64_encode(<username:password>)

x-api-context-company <company id>
x-resource-type timelogs
Content-Type application/json

 

Request:

Payload Example:

[
{
"employeeInternalId": "EMP001",
"timestamp": "2024-05-28T10:30:00Z",
"action": "clock_in"
},
{
"employeeInternalId": "EMP002",
"timestamp": "2024-05-28T10:36:21Z",
"action": "clock_in"
}
]

Fields:

Important:

  • Timestamp must be in ISO 8601 UTC format (with 'Z' suffix).
  • Action field accepts only "clock_in" or "clock_out" values.

Response: 

Success 

{
"status": "success",
"data": [
{
"referenceId": "6836948c32c9522cf819e11d",
"employeeInternalId": "EMP001",
"timestamp": "2024-05-28T10:30:00Z",
"action": "clock_in"
},
{
"referenceId": "6836948c32c9522cf819f19g",
"employeeInternalId": "EMP002",
"timestamp": "2024-05-28T10:36:21Z",
"action": "clock_in"
}
]
}

Error:

Bad Request

[
{
"employeeInternalId": "", // will trigger error (Missing required field)
"timestamp": "225-05-28T10:30:00Z", // will trigger error (Invalid timestamp format)
"action": "clock_in"
},
{
"employeeInternalId": "EMP002",
"timestamp": "2025-05-28T10:36:21Z",
"action": "invalid_action" // will trigger error (Invalid action value)
}
]

Response:

{
"status": "error",
"errors": [
{
"code": "Missing required field",
"field": "[0].employeeInternalId"
},
{
"code": "Invalid timestamp format",
"field": "[0].timestamp"
},
{
"code": "Invalid action value. Must be 'clock_in' or 'clock_out'",
"field": "[1].action"
}
]
}

 

Example of CURL 

curl --location 'https://static.api.briohr.com/v2/api/external/timelogs' \
--header 'Authorization: Basic aHotYXBw0mJyaW9ocg==' \
--header 'x-api-context-company: 412cc8a9d90158c489b83e83' \
--header 'x-resource-type: timelogs' \
--header 'Content-Type: application/json' \
--data '[
{
"employeeInternalId": "EMP001",
"timestamp": "2024-05-28T10:30:00Z",
"action": "clock_in"
},
{
"employeeInternalId": "EMP002",
"timestamp": "2024-05-28T10:36:21Z",
"action": "clock_in"
}
]'

 

NOTE:
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.