Terminal - Process offline registrations
API Url
Used for creating clock-in, clock-out registrations based on input offline registrations.
POST
http://localhost:16010/ProMarkREST/rest/Terminal/offline-registrations
Permissions: user
Request headers
| Field | Type | Description |
|---|---|---|
Accept-Languageoptional | String | =en-GB Language use for localization. |
X-Clientoptional | String | =Client type. "Portal""Mobile""Admin" |
X-Roleoptional | Number | ProMark role (1: Employee, 2: User). {12} |
X-WebPart-Idoptional | Number | Unique web-part identifier. |
Parameter
| Field | Type | Description |
|---|---|---|
| request | Object | Main object containing the request data. |
| data | Object | Object containg data to be uploaded. |
| offlineRegistrations | Object | Object containing the offline registrations. |
| empId | String | Unique Employee Id. |
latitudeoptional | Number | Latitude with double precission. |
longitudeoptional | Number | Longitude with double precission. |
| registeredTime | Date | Entered date/time of the registration. |
| terminal | Number | Terminal ID. |
| type | String | Registration Type identifier. Supported type ids are CI = Clock-in, CO = Clock-out "CI""CO" |
Request example for offline transactions post:
{"request":{"data": {"offlineRegistrations": [{"empId": "806","terminal": 1111,"type": "CO","registeredTime": "2017-12-11T16:00:00.000"},{"empId": "831","type": "CO","terminal": 1111,"registeredTime": "2017-12-11T16:00:00.000"}]}}}
Response example when all transactions processed successfully:
{"response": {"data": {},"errorCode": 0,"errorMessage": ""}}
Response example when any transaction is processed to fail:
{"response": {"data": {"offlineRegistrations": [{"empId": "124","id": "CI","registeredTime": "2017-12-11T08:02:40.000","error": "Cannot find employee 124"}]},"errorCode": 100,"errorMessage": "Some registrations could not be proccessed"}}