Attendance APIs
Using the attendance APIs, you can check in an user, or check out an user from the mobile app.
Check In User
Purpose
To check in the user to the mobile app. The check in entries for a user will be listed under the Attendance section of the Related List tab in the User Details page.
Request URL
https://fsm.zoho.com/fsm/v1/Attendance/actions/checkin
Request Method
POST
Scope
scope=ZohoFSM.modules.Attendance.CREATE
Permission Required
CheckIn/CheckOut of Attendance
Request Body Parameters
Name | Type | Description |
Check_In_Time | String | The time at which you want to check in the user. If Check_In_Time is not included, then the current time will be considered as the check in time. |
user | String | The id of the user. This is a mandatory key. |
Sample Request
Copiedcurl --request POST 'https://fsm.zoho.com/fsm/v1/Attendance/actions/checkin' \
--header 'Authorization: Zoho-oauthtoken 1000.26xxxxxxxxxx.xxxxxxxxxx0' \
--header 'content-type: application/json' \
--data "@checkIn.json"
Sample Input
Copied{
"data":[
{
"Check_In_Time":"2023-07-04T10:50:03+05:30",
"user":"1003000000208001"
}
]
}
Sample Success Response
Copied{
"data": [
{
"code": "USER_CHECKEDIN",
"details": {},
"message": "You have been checked in successfully."
}
]
}
Sample Error Response
Copied{
"code": "USER_ALREADY_CHECKEDIN",
"details": {
"Device_Information": "",
"Check_In_Time": "2023-07-04T10:50:03+05:30"
},
"message": "You are already checked in.",
"status": "error"
}
Sample Error Response
Copied{
"code": "NO_PERMISSION",
"details": {
"permissions": [
"Given user don't have permission for CheckIn/CheckOut."
]
},
"message": "permission denied",
"status": "error"
}
Sample Error Response
Copied{
"code": "ATTENDANCE_CONFLICT",
"details": {
"Attendance": [
{
"Check_Out_Time": "2023-08-21T17:09:44+05:30",
"id": "1003000000879002",
"Name": "Log-9",
"Service_Resource": {
"id": "1003000000208159"
},
"Check_In_Time": "2023-08-21T17:06:09+05:30"
}
]
},
"message": "Conflicting Attendance records found for provided checkin and checkout time.",
"status": "error"
}
Sample Error Response
Copied{
"code": "INVALID_DATA",
"details": {
"api_name": "Check_In_Time"
},
"message": "You can't checkin in future date.",
"status": "error"
}