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 Add a new Modified Punch Log

BioStar 2 TA allows the users to add modified punch logs to the existing event logs.

 

 


  You can search for your logs and click on them to add/edit punch logs. 텍스트, 스크린샷, 실내, 모니터이(가) 표시된 사진

자동 생성된 설명


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

자동 생성된 설명
  You can click ‘Add’ button to add a new modified punch log. In order to add a new modified punch log, you must inset its TIME & Punch Type.
 
   You can find the PUT /tna/punch_logs/modified API in your TA Swagger.

 

 

Part 1. Search for the Punch Logs

 

[POST]: /tna/punch_logs/modified

[Headers] 

*offset & limit headers are required.

[Parameters] 

Name

Type

*M/O

Explanation

Value

Date

String

M

Date of the log that holds the punch logs

YYYY-MM-DD

Day_start_time

Long

M

Day start time used for searching punch logs in minutes using 24 hour clock

Ex. ‘60’, ‘480’

Retrieve_only_modified

Boolean

O

Indicates if only modified records should be retrieved

 

User_id

String

M

User ID of the logs

 

   * M – Mandatory, O – Optional

[Example Value/Parameters Model]

{

       "date": "2022-04-06",

       "day_start_time": 0,

       "retrieve_only_modified": true,

       "user_id": "1"

}

 

[Response: successful]

{

    "message": "Processed Successfully",

       "message_key": "SUCCESSFUL",

    "language": "en",

       "status_code": "SUCCESSFUL",

    "total": 3,

    "records": [

        {

               "modified_log": {

                   "id": 7,

                "device_datetime": "2022-04-06 08:00:00",

                "type": "PUNCH_TYPE_CHECK_IN",

                   "user": {

                       "user_id": "1",

                       "name": "Administrator"

                },

                   "device_datetime_format_string": "2022/04/06 08:00:00"

            },

            "device_datetime": "2022-04-05T23:00:00.000Z",

               "device_datetime_long": 1649199600000,

               "type": "PUNCH_TYPE_CHECK_IN",

               "modified_by_user": {

                   "user_id": "1",

                   "name": "Administrator"

            }

        },

        {

               "modified_log": {

                   "id": 9,

                "device_datetime": "2022-04-06 12:00:00",

                "type": "PUNCH_TYPE_BREAK_START",

                "user": {

                       "user_id": "1",

                       "name": "Administrator"

                },

                   "device_datetime_format_string": "2022/04/06 12:00:00"

            },

               "device_datetime": "2022-04-06T03:00:00.000Z",

            "device_datetime_long": 1649214000000,

               "type": "PUNCH_TYPE_BREAK_START",

               "modified_by_user": {

                   "user_id": "1",

                   "name": "Administrator"

            }

        },

        {

               "modified_log": {

                   "id": 8,

                "device_datetime": "2022-04-06 17:00:00",

                "type": "PUNCH_TYPE_CHECK_OUT",

                   "user": {

                       "user_id": "1",

                       "name": "Administrator"

                },

                   "device_datetime_format_string": "2022/04/06 17:00:00"

            },

               "device_datetime": "2022-04-06T08:00:00.000Z",

               "device_datetime_long": 1649232000000,

               "type": "PUNCH_TYPE_CHECK_OUT",

               "modified_by_user": {

                   "user_id": "1",

                   "name": "Administrator"

            }

        }

    ]

}

 

The above response represents the results same as the screenshot below.

 

 

Part 2. Add new Modified Punch Logs

 

[PUT]: /tna/punch_logs/modified

[Headers] 

*offset & limit headers are required.

[Parameters] 

Name

Type

*M/O

Explanation

Value

Logs

Array

O

Already-existing logs

 

Logs.modified_log

Data

O

Already-existing modified logs

 

Logs.modified_log.id

String

O

Modified log’s ID

 

Logs.modified_log.device_datetime

Datetime

O

Modified log’s device time

 

Logs.modified_log.type

String

O

Modified logs’ punch type code

 

Logs.modified_log.user.user_id

String

O

User’s ID

 

Logs.modified_log.user.name

String

O

User’s Name

 

Logs.modified_logdevice_datetime_format_string

String

O

Modified log’s device datetime in string format

 

 

 

 

 

Logs.original_log

Data

O

 

 

Logs.modified_log

Data

O

New modified log information

 

Logs.modified_log.device

Data

O

New modified log’s device

 

Logs.modified_log.user.user_id

String

O

New modified log’s user ID

 

Logs.modified_log.formatted_type.code

String

O

New modified log’s punch type code

 

Logs.modified_log.formatted_type.id

String

O

New modified log’s punch type code

 

Logs.modified_log.formatted_type.description

String

O

New modified log’s punch type code description

 

Logs.modified_log.formatted_datetime

Datetime

O

New modified log’s datetime

 

Logs.modified_log.device_datetime

Datetime

O

New modified log’s device datetime

 

Logs.modified_log.device_datetime_format_string

Datetime

O

New modified log’s device datetime format string

 

Logs.modified_log.type

String

O

New modified log’s punch type 

 

 

 

 

 

   * M – Mandatory, O – Optional
   * Not all the parameters are listed. Please check out the response body below.


[Example Value/Parameters Model]

{

       "logs": [

           {

               "modified_log": {

                "id": 7,

                "device_datetime": "2022-04-06 08:00:00",

                "type": "PUNCH_TYPE_CHECK_IN",

                "user": {

                    "user_id": "1",

                    "name": "Administrator"

                },

                "device_datetime_format_string": "2022/04/06 08:00:00"

            },

            "device_datetime": "2022-04-05T23:00:00.000Z",

            "device_datetime_long": 1649199600000,

            "type": "PUNCH_TYPE_CHECK_IN",

            "modified_by_user": {

                "user_id": "1",

                "name": "Administrator"

            },

            "rowEditable": false

        },

           {

               "modified_log": {

                "id": 9,

                "device_datetime": "2022-04-06 12:00:00",

                "type": "PUNCH_TYPE_BREAK_START",

                "user": {

                    "user_id": "1",

                    "name": "Administrator"

                },

                   "device_datetime_format_string": "2022/04/06 12:00:00"

               },

               "device_datetime": "2022-04-06T03:00:00.000Z",

               "device_datetime_long": 1649214000000,

               "type": "PUNCH_TYPE_BREAK_START",

               "modified_by_user": {

                "user_id": "1",

                "name": "Administrator"

               },

               "rowEditable": false

           },

           {

               "modified_log": {

                "id": 8,

                "device_datetime": "2022-04-06 17:00:00",

                "type": "PUNCH_TYPE_CHECK_OUT",

                "user": {

                    "user_id": "1",

                    "name": "Administrator"

                },

                "device_datetime_format_string": "2022/04/06 17:00:00"

               },

               "device_datetime": "2022-04-06T08:00:00.000Z",

               "device_datetime_long": 1649232000000,

               "type": "PUNCH_TYPE_CHECK_OUT",

               "modified_by_user": {

                   "user_id": "1",

                "name": "Administrator"

               },

               "rowEditable": false

           },

           {

               "original_log": {},

            "modified_log": {

                "device": {},

                "user": {

                    "user_id": "1"

                },

                "formatted_type": {

                    "code": "PUNCH_TYPE_BREAK_END",

                    "id": "PUNCH_TYPE_BREAK_END",

                    "description": "Break End"

                },

                   "formatted_datetime": "2022-04-06 13:00:00",

                "device_datetime": "2022-04-06 13:00:00",

                   "device_datetime_format_string": "2022/04/06 05:00:00",

                "type": "PUNCH_TYPE_BREAK_END"

            },

            "rowEditable": true

           }

    ],

       "user_id": "1"

}

 

[Response: successful]

{

    "message": "Processed Successfully",

       "message_key": "SUCCESSFUL",

    "language": "en",

       "status_code": "SUCCESSFUL"

}

 

Now you’ve added a new modified punch log. Let’s check out what it looks like in BioStar 2 TA.

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

자동 생성된 설명

 

 

 

 

Part 3. Add New Punch Logs via POSTMAN

텍스트이(가) 표시된 사진

자동 생성된 설명