ZingHR - SyncSwipeData API

 

Documentation





API for pushing swipe details from client to ZingHR system.

 

 

Overview:


Production URLhttps://portal.zinghr.com/2015/route/Integration/SyncSwipeData
UAT URLhttps://clientuat.zinghr.com/2015/route/Integration/SyncSwipeData
Methods SupportedPOST
DescriptionUpdate Attendance Flag in ZingHR




Input :

 


The following input fields are required to push swipe data. Each API request require the token as an input which identifies the request and check if the required API is valid or not.

SubscriptionName (Mandatory)

Name of account (String , max length = 10) 

Token(Mandatory)

For verification of the account and request. (String )

SwipeData(Mandatory)

JSON Array of SwipeData with below mentioned Parameters



Elements of SwipeData Collection :


Parameter Name

Mandatory

Data Type

Length

Description


EmpIdentification 

Yes

 

VarChar

50

Employee Code / Card No of the Employee. Eg. 100879 ,SM100879

SwipeDateTime 


 


 

Yes

DateTime

NA

Employee Punch Swipe Date And Time of the Employee. Eg.

2020-08-17 09:00:00 (yyyy-mm-dd hh:mm:ss), This data should

be available in one column Date + Time

TerminalId 

Yes

VarChar

50

From which Terminal / Machine Employee has punched in/out

SwipeReceivedOnClientSideD

ateTime 


 


 

Yes

DateTime

NA

This field will help us to get Delay Swipes details for on which date and time the Swipe data gets download on client's database server. So we recommend to provide this data. This will be helpful In case delay of data in future We will be able to find the reason for the same.

RowDataId 


 

No

Numeric

18,0

Unique ID (Incremental id for each swipe which is not duplicate)

SwipeLocation

No

VarChar

100

Require Location Name. eg. Location1, Location2 etc.

InOutFlag 

No

VarChar

100

Employee Punch In and OUT Flag to identify, Employee has

Punched In OR Out on the Biometric. Eg. IN / OUT.



Response :

Message

Messages
CodeCodes


Note : Below Input Parameters Key Names are case sensitive.




API Codes & Message :

Code : 1Message : Success
Code : 2Message : Invalid Input Parameters
Code : 3Message : Invalid Token
Code : 4Message : Internal Server Error
Code : 6Message : Token Expired


Note : In case of multiple records in SwipeData collection only valid records will be Synced with ZingHR. Invalid records will be excluded and returned in response under InvalidRecords field with Code 1 and Success Message.


API Input Example :


{

   
    "SubscriptionName" : "<<Your Account Name>>",

    "Token" : "<<Your API Token>>",

    "SwipeData" : [


        {


            "EmpIdentification" : "admin",

            "SwipeDateTime" : "2020-10-20 14:33:41",

            "TerminalId" : "1111",

            "SwipeReceivedOnClientSideDateTime" : "2020-10-20 14:33:41",

            "RowDataId" : "123", "SwipeLocation" : "Mumbai",

            "InOutFlag" : "In"


        },


        {


            "EmpIdentification" : "test001",

            "SwipeDateTime" : "2020-10-20 14:33:41",

            "TerminalId" : "1111",

            "SwipeReceivedOnClientSideDateTime" : "2020-10-20 14:33:41",

            "RowDataId" : "123", "SwipeLocation" : "Chennai",

            "InOutFlag" : "In"

         }

    ]


}