A new API for Time Attendance has been added with BioStar 2.8.13.
For ‘How to use TA API swagger’, please refer to the link below:
[BioStar 2 TA API] How to use and start BioStar 2 TA API
For other articled related to BioStar 2 TA Time Codes:
[BioStar 2 TA API] CreateTime Codes
[BioStar 2 TA API] Search Time Codes
[BioStar 2 TA API] Delete Time Codes
How to use TA Time Code
The most basic part of BioStar 2 TA is the Time Code. As you can see in the below screenshot, you must create a TIME CODE in order to start with BioStar 2 TA.
Part 1. API Parameters
[PUT]: /tna/pay_codes/{id}
[Parameters]
Name | Type | *M/O | Explanation | Value |
Accumulate_toward_overtime | Boolean | O | Overtime management | True/False |
Color | String | O | Color |
|
Count_as_attendance | Boolean | O | Attendance management | True/False |
Description | String | O | Description |
|
Name | String | M | Name |
|
Time_rate | Double | O | 0-10 rate |
|
Track_on_leave_management | Boolean | O | Leave management | True/False |
Type | String | M | ‘WORKED’ or ‘NOT_WORKED’ |
|
* M – Mandatory, O – Optional
Part 2. Request Body & Response Model
[Example Value/Parameters Model]
{ "accumulate_toward_overtime": true, "color": "#00ff00", "count_as_attendance": true, "description": "Made by API", "name": "Time Code Made by API", "time_rate": 1, "track_on_leave_management": false, "type": "WORKED" } |
[Response: successful]
{ "message": "Processed Successfully", "message_key": "SUCCESSFUL", "language": "en", "status_code": "SUCCESSFUL" } |
[Response: Fail: missing required input]
{ "message": "name is required.", "message_key": "REQUIRED_FIELD", "language": "en", "status_code": "REQUIRED_FIELD" } |
Part 3. POST /tna/pay_codes via Postman
[Request Example: Headers]
*You must log-in to use [POST] /tna/pay_codes
*Unlike be-session-id for AC New Local API, bs-ta-session-id has to be sent in the Cookie. Bs-ta-session-id is sent in the Cookie automatically once you log-in via TA log-in API.
[Request Example]
[Response Example: body]