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
How to use TA Time Shifts
BioStar 2 TA shifts are required for you to use TA features. The first step is adding Time Codes and the second step will be on the shifts.
Part 1. Search All Shifts - API Parameters
[GET]: /tna/shifts?offset=0&limit=10
[Headers]
*offset & limit headers are required.
[Parameters]
Name | Type | *M/O | Explanation | Value |
|
|
|
|
|
* M – Mandatory, O – Optional
[Example Value/Parameters Model]
|
[Response: successful]
{ "message": "Processed Successfully", "message_key": "SUCCESSFUL", "language": "en", "status_code": "SUCCESSFUL", "total": 2, "records": [ { "name": "Shift 1", "description": "Shift 1", "id": 1, "type": "FIXED", "day_start_time": 300, "first_in_last_out": true, "created_perm_id": 1, "fixed_option": { "regular_pay_time_segment_option": { "grace": { "use": true, "in": 1, "out": 1 }, "punch_in_time_range": {} }, "punch_in_rounding": { "use": false, "unit": 0, "point": 0 }, "punch_out_rounding": { "use": false, "unit": 0, "point": 0 }, "time_segment_list": [ { "pay_code": { "id": 1, "color": "#00ff00", "count_as_attendance": true, "name": "Regular Time Code" }, "punch_in_rounding": {}, "punch_out_rounding": {}, "start_time": 480, "end_time": 1020, "min_minutes": 240 } ], "break_time": { "type": "NONE", "max_minutes": 0, "start_time": 1260, "end_time": 1290 }, "use_exception_handle": false, "meal_deduction_option": { "list": [ { "use": true, "auto_deduction": { "deduction_time": 60, "min_time_before_deduction": 240 }, "fixed_deduction": { "start_time": 720, "end_time": 780 } }, { "use": false, "auto_deduction": { "deduction_time": 60, "min_time_before_deduction": 480 }, "fixed_deduction": { "start_time": 1080, "end_time": 1140 } } ], "type": "BY_PUNCH" }, "day_start_time_excess_time": { "use": false, "prev_allowed_minutes": 0, "next_allowed_minutes": 0 }, "start_time": 480, "end_time": 1020 } ] } |
Part 2. Search Specific Shifts by its ID
[GET]: /tna/shifts /{shift_ID}
[Parameters]
Name | Type | *M/O | Explanation | Value |
|
|
|
|
|
* M – Mandatory, O – Optional
[Example Value/Parameters Model]
|
[Response: successful]
{ "id": 1, "message": "Processed Successfully", "message_key": "SUCCESSFUL", "language": "en", "status_code": "SUCCESSFUL", "name": "Shift 1", "description": "Shift 1", "type": "FIXED", "day_start_time": 300, "first_in_last_out": true, "created_perm_id": 1, "fixed_option": { "regular_pay_time_segment_option": { "grace": { "use": true, "in": 1, "out": 1 }, "punch_in_time_range": {} }, "punch_in_rounding": { "use": false, "unit": 0, "point": 0 }, "punch_out_rounding": { "use": false, "unit": 0, "point": 0 }, "time_segment_list": [ { "pay_code": { "id": 1, "color": "#00ff00", "count_as_attendance": true, "name": "Regular Time Code" }, "punch_in_rounding": {}, "punch_out_rounding": {}, "start_time": 480, "end_time": 1020, "min_minutes": 240 } ], "break_time": { "type": "NONE", "max_minutes": 0, "start_time": 1260, "end_time": 1290 }, "use_exception_handle": false, "meal_deduction_option": { "list": [ { "use": true, "auto_deduction": { "deduction_time": 60, "min_time_before_deduction": 240 }, "fixed_deduction": { "start_time": 720, "end_time": 780 } }, { "use": false, "auto_deduction": { "deduction_time": 60, "min_time_before_deduction": 480 }, "fixed_deduction": { "start_time": 1080, "end_time": 1140 } } ], "type": "BY_PUNCH" }, "day_start_time_excess_time": { "use": false, "prev_allowed_minutes": 0, "next_allowed_minutes": 0 }, "start_time": 480, "end_time": 1020 } } |
Part 3. Searching Shifts via POSTMAN
[Searching All Shifts]
[Search a specific Shift]