ByteHR API Documentation
1. Get All Employees
GET /api/employees
Fetches a list of all employees.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| currentPage | integer | No | Page number for pagination. Default is 1. |
| limit | integer | No | Number of records per page. Default is 10 and maximum is 100. |
Responses
200 OK
Successful retrieval of employees.
Content type: application/json
{
"currentPage": "int",
"limit": "int",
"total": "int",
"data": [
{
"companyName": "string",
"companyNameThai": "string",
"branchName": "string",
"branchNameThai": "string",
"employeeID": "string",
"systemID": "string",
"salutationName": "string",
"salutationNameThai": "string",
"firstName": "string",
"lastName": "string",
"firstNameThai": "string",
"lastNameThai": "string",
"email": "string",
"phone": "string",
"employeeType": "string",
"scanId": "string",
"taxNo": "string",
"passportNumber": "string",
"providentFundID": "string",
"birthDate": "datetime",
"gender": "string",
"maritalStatus": "string",
"nationality": "string",
"workPermitNumber": "string",
"socialSecurity": {
"socialSecurityNo": "string",
"disability": "bool",
"disabilityType": "byte",
"hospital1": "string",
"hospital2": "string",
"hospital3": "string",
},
"managers": [
{
"managerName": "string",
"managerNameThai": "string",
"managerLevel": "int"
},
],
"address": {
"buildingName": "string",
"unitNo": "string",
"floor": "string",
"village": "string",
"houseNo": "string",
"moo": "string",
"soi": "string",
"roadStreet": "string",
"subDistrict": "string",
"district": "string",
"province": "string",
"postalCode": "string",
"country": "string",
},
"bank": {
"bank": "string",
"accountType": "string",
"accountName": "string",
"branchName": "string",
"accountNumber": "string",
"swiftCode": "string",
"customerCode": "string",
"customerReferenceID": "string",
"branchAddress": "string",
}
}
]
}
401 Unauthorized
User authentication failed or missing API Key.
{
"StatusCode": 401,
"Message": "Unauthorized client!",
"Data": null
}
429 Too Many Requests
The request client error response status code indicates the client has sent too many requests in a given amount of time.
{
"StatusCode": 429,
"Message": "Rate limit exceeded. Try again later!",
"Data": null
}
Test API
No response yet...