This API will guide you through modifying a time code.
* API for Time Attendance has been added with BioStar 2.8.13. *
For a more general introduction to TA API (including how to access the TA Swagger), please refer to the link below:
[BioStar 2 TA API] Introduction to 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
Part 1. API Parameters
[PUT]: /tna/pay_codes/{id}
This API modifies a time code.
[Body Parameters]
Parameters | Type | Required | Description |
---|---|---|---|
accumulate_toward_overtime | Boolean | Y | True for overtime management |
color | String | Y | Color of time code |
count_as_attendance | Boolean | Y | True for attendance management |
description | String | N | Description |
name | String | Y | Name of time code |
time_rate | Double | Y | 0-10 rate |
track_on_leave_management | Boolean | Y | True for leave management |
type | String | N | ["WORKED" , "NOT_WORKED"] |
If you do not want to change some of the parameters, you can just fill it with existing data and it won't change.
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. API Example via Postman
*You must log-in to T&A to use [PUT] /tna/pay_codes/<id>
*Unlike be-session-id for AC New Local API, bs-ta-session-id is sent in the Cookie automatically once you log-in via TA log-in API. So there's no need for you to save and update it separately.
Before calling API to modify time code..
[Request Example]
I'm calling the API with modified name, time_rate, and description.
After calling API.. you can see that the Name, Description, and Time Rate has been modified.