Attendance


ClockIn

The ClockIn API call is used to Clock In a user. This call will inform Eyelit MES-M that a user is now clocked in and available for work. The Clock In time will be the system time when the request was received. 

Figure 1 - Logic within Attendance-ClockIn API Call

ActiveX control 

Data Prerequisites 

To clock a user in to Eyelit MES-M the user must already exist. 

Request 

Table 1 shows the method and endpoint required to make the API call to Clock In a user. 

Table 1 - Outbound Message Detail for Attendance-ClockIn 

Method 

URL Structure 

Endpoint 

PUT 

https://[environment].mestec.net 

/api/Attendance/ClockIn 

The body of the payload should follow the format below.  

JSON structure for Attendance-ClockIn 

ActiveX control 

See Table 2 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M. 

Table 2 - Parameter Information for Attendance-ClockIn 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

UserName 

useraccount.username 

VARCHAR2(50) 

Yes 

No 

Exact 

Sample Request 

See below for sample use cases with examples of the JSON payload format required. 

To Clock a user into Eyelit MES-M.

JSON Sample for Attendance-ClockIn request 

ActiveX controlResponse 

When using the Attendance-ClockIn API call, if user is clocked in Eyelit MES-M , a JSON payload will be returned containing data in the following structure: 

JSON structure for Attendance-ClockIn Response 

ActiveX control

Sample Response 

See below for sample use cases with examples of the JSON payload format returned. 

Sample JSON response for Attendance-ClockIn 

ActiveX controlClockOut 

The Attendance-ClockOut API call is used to Clock a user out of Eyelit MES-M. This call will inform Eyelit MES-M that a user is now clocked Out and no longer available for work. The Clock Out time will be the system time when the request was received. 

Figure 2 - Logic within Attendance-ClockOut API Call 

ActiveX control 

Data Prerequisites 

To clock a user Out of Eyelit MES-M the user must already exist.  

Request 

Table 3 shows the method and endpoint required to make the API call to Clock Out a user. 

Table 3 - Outbound Message Detail for Attendance-ClockOut 

Method 

URL Structure 

Endpoint 

PUT 

https://[environment].mestec.net 

/api/Attendance/ClockOut 

The body of the payload should follow the format below.  

ActiveX control

Table 4- Parameter Information for Attendance-ClockOut 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

UserName 

useraccount.username 

VARCHAR2(50) 

Yes 

No 

Exact 

Sample Request 

See below for sample use cases with examples of the JSON payload format required. 

To Clock a user Out of Eyelit MES-M:

JSON Sample for Attendance-ClockOut request 

ActiveX control

Response 

When using the Attendance-ClockOut API call, if user is clocked out in Eyelit MES-M, a JSON payload will be returned containing data in the following structure: 

JSON structure for ClockOut Response 

ActiveX control

Sample Response 

See below for sample use cases with examples of the JSON payload format returned. 

Sample JSON response for successful ClockOut 

ActiveX control 

GetShift

The Attendance-GetShift API call is used find the shift information for a user during a specified timeframe. This call will return the shift(s) ID and name a user was clocked in during the specified timeframe. 

Figure 3 - Logic within Attendance-GetShift API Call 

ActiveX control 

Data Prerequisites 

The user must exist in Eyelit MES-M. 

Request 

Table 5 shows the method and endpoint required to make the API call to Attendance-GetShift 

Table 5 - Outbound Message Detail for Attendance-GetShift 

Method 

URL Structure 

Endpoint 

POST 

https://[environment].mestec.net 

/api/Attendance/GetShift 


The body of the payload should follow the format below.

ActiveX control 

“in” and “out” should be in the format: “YYYY-MM-DDTHH:mm:ss.0000Z”, where: 

  • YYYY is the year 

  • MM is the month 

  • DD is the day 

  • HH is the hour 

  • mm is minutes 

  • ss is seconds 

Example: “2024-07-16T11:27:57.946Z

See Table 6 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M. 

Table 6 - Parameter Information for Attendance-GetShift 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

UserName 

Useraccount.name 

VARCHAR2(50) 

Yes 

No 

Exact 

in 

N/A 

 

Yes 

N/A 

N/A 

out 

N/A 

 

Yes 

N/A 

N/A 

Sample Request 

See below for sample use cases with examples of the JSON payload format required. 

To request shift information. 

JSON Sample for Attendance-GetShift request 

ActiveX control

Response 

When using the Attendance-GetShift API call , if any data has been found in Eyelit MES-M that meets the parameter values passed in the original payload, a JSON payload will be returned containing data in the following structure: 

Format for Attendance-GetShift response 

ActiveX control 

Where “ID” will be the shift id and “Name” will be the name of the shift. 

Sample Response 

Sample JSON response for successful Attendance-GetShift request 

ActiveX control

Delete

The Attendance-Delete API call is used to delete an existing attendance log. This API has been superseded by the Attendance-ClockIn and Attendance-ClockOut APIs.