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 modify Schedule Templates
BioStar 2 TA Schedule Templates can be modified by using TA API.
You can find the /tna/Schedule Template API in your TA Swagger.
Part 1. Modify Schedule Templates
[PUT]: /tna/schedule_templates/{schedule_template_ID}
[Headers]
[Parameters]
Name | Type | *M/O | Explanation | Value |
Cycle_in_days | Integer | O | Cycle length in days. Used only for daily type | 7 |
Description | String | O | Description |
|
Name | String | M | Name |
|
Shift_list | Array[SimpleStringId] | O | Shift list ( only 7 items are allowed for weekly type ) | Shift information |
Type | String | M | ‘WEEKLY’ or ‘DAILY’ |
|
*You can use the values retrieved from GET /shifts in the ‘Shift_list’ of the parameters.
* M – Mandatory, O – Optional
[Example Value/Parameters Model]
{ "cycle_in_days": 7, "weekend_index": "0,6", "description": "Schedule Template 35", "name": "Schedule Template 35", "shift_list": [ { "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": "#ff0000", "count_as_attendance": true, "name": "Regular" }, "punch_in_rounding": {}, "punch_out_rounding": {}, "start_time": 480, "end_time": 1020, "min_minutes": 240, "timeInfo": { "timeStartPosition": 33.33333333333333, "timeBar": 37.5, "nextDayTimeStartPosition": 0, "nextDayTimeBar": 0, "timeDuration": "9 hours 0 minutes", "timeDurationMinutes": 540 } } ], "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 } }, { "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": "#ff0000", "count_as_attendance": true, "name": "Regular" }, "punch_in_rounding": {}, "punch_out_rounding": {}, "start_time": 480, "end_time": 1020, "min_minutes": 240, "timeInfo": { "timeStartPosition": 33.33333333333333, "timeBar": 37.5, "nextDayTimeStartPosition": 0, "nextDayTimeBar": 0, "timeDuration": "9 hours 0 minutes", "timeDurationMinutes": 540 } } ], "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 } }, { "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": "#ff0000", "count_as_attendance": true, "name": "Regular" }, "punch_in_rounding": {}, "punch_out_rounding": {}, "start_time": 480, "end_time": 1020, "min_minutes": 240, "timeInfo": { "timeStartPosition": 33.33333333333333, "timeBar": 37.5, "nextDayTimeStartPosition": 0, "nextDayTimeBar": 0, "timeDuration": "9 hours 0 minutes", "timeDurationMinutes": 540 } } ], "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 } }, { "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": "#ff0000", "count_as_attendance": true, "name": "Regular" }, "punch_in_rounding": {}, "punch_out_rounding": {}, "start_time": 480, "end_time": 1020, "min_minutes": 240, "timeInfo": { "timeStartPosition": 33.33333333333333, "timeBar": 37.5, "nextDayTimeStartPosition": 0, "nextDayTimeBar": 0, "timeDuration": "9 hours 0 minutes", "timeDurationMinutes": 540 } } ], "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 } }, { "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": "#ff0000", "count_as_attendance": true, "name": "Regular" }, "punch_in_rounding": {}, "punch_out_rounding": {}, "start_time": 480, "end_time": 1020, "min_minutes": 240, "timeInfo": { "timeStartPosition": 33.33333333333333, "timeBar": 37.5, "nextDayTimeStartPosition": 0, "nextDayTimeBar": 0, "timeDuration": "9 hours 0 minutes", "timeDurationMinutes": 540 } } ], "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 } }, {}, {} ], "type": "WEEKLY" } |
[Response: successful]
{ "message": "Processed Successfully", "message_key": "SUCCESSFUL", "language": "en", "status_code": "SUCCESSFUL" } |
Before modifying the Schedule Template Name & Description
After modifying the Schedule Template Name & Description
Part 2. Create a Schedule Templates via POSTMAN