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 Create Schedule Templates

BioStar 2 TA Schedule Templates can be made by using TA API.

 

테이블이(가) 표시된 사진

자동 생성된 설명


 

 You can find the /tna/Schedule Template API in your TA Swagger.

 

 

Part 1. Create Schedule Templates

 

[POST]: /tna/schedule_templates

[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’

 

   * M – Mandatory, O – Optional

[Example Value/Parameters Model]

{

    "cycle_in_days": 7,

    "weekend_index": "0,6",

    "description": "Schedule Template 3",

    "name": "Schedule Template 3",

    "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]

{

    "id": 3,

    "message": "Created successfully",

       "message_key": "CREATED",

    "language": "en",

       "status_code": "CREATED"

}

 

 

 

 

Part 2. Create a Schedule Templates via POSTMAN

텍스트, 스크린샷, 모니터, 실내이(가) 표시된 사진

자동 생성된 설명

텍스트, 스크린샷, 모니터, 화면이(가) 표시된 사진

자동 생성된 설명