ByteHR API Documentation

1. Get All Timesheets

GET /api/timesheets

Fetches a list of available timesheets.

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.
startDate Date Yes The starting date of the range for which the records are to be retrieved. This date defines the earliest point in time from which data should be included. The format should be YYYY-MM-DD.
endDate Date Yes The ending date of the range for which the records are to be retrieved. This date defines the latest point in time up to which data should be included. The format should be YYYY-MM-DD.

Responses

200 OK

Successful retrieval of timesheets.

Content type: application/json


                {
                    "currentPage": "int",
                    "limit": "int",
                    "total": "int",
                    "data": [
                        {
                            "employeeID": "string",
                            "systemID": "string",
                            "firstName": "string",
                            "lastName": "string",
                            "firstNameThai": "string",
                            "lastNameThai": "string",
                            "dateOfWork": "datetime",
                            "shiftName": "string",
                            "shiftPattern": "string",
                            "startTime": "datetime",
                            "endTime": "datetime",
                            "breakStart": "datetime",
                            "breakEnd": "datetime",
                            "signIn": "datetime",
                            "signOut": "datetime",
                            "regularHours": "decimal",
                            "extraHours": "decimal",
                            "oT10": "decimal",
                            "oT15": "decimal",
                            "oT20": "decimal",
                            "oT30": "decimal",
                            "compensateHour": "decimal",
                            "totalOTHours": "decimal",
                            "absent": "bool",
                            "dayOff": "bool",
                            "holiday": "bool",
                            "holidayName": "string",
                            "leave": "bool",
                            "leaveName": "string",
                            "totalLeaveHours": "decimal",
                            "totalLeaveDays": "decimal",
                            "leaveName2": "string",
                            "totalLeaveHours2": "decimal",
                            "totalLeaveDays2": "decimal",
                            "invalid": "bool",
                            "lateMinutes": "decimal",
                            "outEarlyMinutes": "decimal",
                            "lateMinutesBreak": "decimal",
                            "outEarlyMinutesBreak": "decimal",
                            "timestamps": "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...