WSTimeUpdate |
public UpdateUserTimePunchOut UpdateUserTimePunch( UpdateUserTimePunchIn input )
Note |
---|
Please note the following 1. This endpoint searches by looking for a transaction within the same minute specified in the TransactionDateTime. This time should be passed in as though the employee is located in the UTC timezone. The conversion to The EE Timezone when saving the record is done by the system. For example: Entering an Epoch Milliseconds value of 1688202000000 will look for a punch on the user time card of Saturday, "July 1, 2023 9:00:00 AM" in the employee time zone (no matter what time zone the employee is in) 2. Either the Badge # or the EmpIdentifier should be specified in the OriginalPunchInfo - sending both will result in an error message being returned. 3. When specifying values to be changed - a value of an empty string for a Labor Level will be interpreted as an intent to unassign the labor level. If you wish to not change a value you may set its value to null and it will be ignored. 4. This endpoint only allows existing punches to be updated. It does not delete or add punches to the system. |
Note |
---|
Business Rules: Punching in and out is the core of the time-web system. The WSTime class encapsulate the needed methods/operations to interact with a users time entry. Users can be assigned to different preferences and policies. These policies are what will affect the results of a users time entry into the system. Setup: Employee > Dashboard Manager > Time Cards |
{ "AuthToken": "VXBkYXRlVXNlclRpbWVQdW5jaC1TYW1wbGUtSlNPTi1JTg==", "RecordsToUpdate": [ { "ID": 1, "OriginalPunch": { "TransactionDateTime": "\/Date(1689152400000)\/", "EmpIdentifier": "adm", "BadgeNumber": "", "TransactionType": 2 }, "PunchUpdates": { "LaborLevel1": "1", "LaborLevel2": "5", "LaborLevel3": null, "LaborLevel4": null, "LaborLevel5": null, "LaborLevel6": null, "LaborLevel7": null, "LaborLevel8": null, "LaborLevel9": null, "LaborLevel10": null, "LaborLevel11": null, "LaborLevel12": null, "LaborLevel13": null, "LaborLevel14": null, "LaborLevel15": null, "TransactionType": 2, "TransactionDateTime": "\/Date(1689156000000)\/" } } ] }
{ "ResultStatus": 0, "ResultStatusDescription": "Completed", "Results": [ { "ID": 1, "Status": 0, "StatusDescription": "Updated" } ], "ResultsIdentifier": "e21a798b-7ec1-43f6-9ebe-f59ebaea016d", "Report": { "APIVersion": "2.0", "ProcessTime": "0.0541909", "RequestTime": "/Date(1689284559724-0700)/", "ResponseTime": "/Date(1689284559779-0700)/", "Results": 1 } }
public class UpdateUserTimePunchSample { public void V2_UpdateUserTimePunch_Example{ UpdateUserTimePunchIn input = new UpdateUserTimePunchIn() { AuthToken = "VXBkYXRlVXNlclRpbWVQdW5jaC1TYW1wbGUtSlNPTi1JTg==" RecordsToUpdate = new List < UpdateUserTimePunchObject > () { new UpdateUserTimePunchObject() { ID = 1, OriginalPunch = new PunchInformation() { BadgeNumber = "1234", EmpIdentifier = "", TransactionType = 2, TransactionDateTime = new DateTime(2020, 1, 1) }, PunchUpdates = new TimeSlicePreModel() { Accuracy = 0, TransactionType = 2, TransactionDateTime = new DateTime(2021, 2, 1), LaborLevel1 = string.Empty, LaborLevel2 = string.Empty, LaborLevel3 = string.Empty, LaborLevel4 = string.Empty, LaborLevel5 = string.Empty, LaborLevel6 = string.Empty, LaborLevel7 = string.Empty, LaborLevel8 = string.Empty, LaborLevel9 = string.Empty, LaborLevel10 = string.Empty, LaborLevel11 = string.Empty, LaborLevel12 = string.Empty, LaborLevel13 = string.Empty, LaborLevel14 = string.Empty, LaborLevel15 = string.Empty } } } } var Test = new ServiceRouter.UpdateUserTimePunch(input); } }