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

FieldTypeDescription
Accept-LanguageoptionalString

=en-GB Language use for localization.

X-ClientoptionalString

=Client type.

Allowed values:"Portal""Mobile""Admin"
X-RoleoptionalNumber

ProMark role (1: Employee, 2: User).

Allowed values:{12}
X-WebPart-IdoptionalNumber

Unique web-part identifier.

Parameter

FieldTypeDescription
requestObject

Main object containing the request data.

  dataObject

Object containg data to be uploaded.

    offlineRegistrationsObject

Object containing the offline registrations.

      empIdString

Unique Employee Id.

      latitudeoptionalNumber

Latitude with double precission.

      longitudeoptionalNumber

Longitude with double precission.

      registeredTimeDate

Entered date/time of the registration.

      terminalNumber

Terminal ID.

      typeString

Registration Type identifier. Supported type ids are CI = Clock-in, CO = Clock-out

Allowed values:"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"
}
}