Create an Attendance Entry
Purpose
To create an attendance (check in to check out) entry for the user. The attendance 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
Request Method
POST
Scope
scope=ZohoFSM.modules.Attendance.CREATE
Permission Required
Create of Attendance
Request Body Parameters
Name | Type | Description |
Check_In_Time | String | The time at which you want to check in the user. This is a mandatory key. |
Check_Out_Time | String | The time at which you want to check out the user. This is a mandatory key. |
Service_Resource | String | The id of the Service_Resources. This is a mandatory key. |
Sample Request
Copiedcurl --request POST 'https://fsm.zoho.com/fsm/v1/Attendance' \
--header 'Authorization: Zoho-oauthtoken 1000.26xxxxxxxxxx.xxxxxxxxxx0' \
--header 'content-type: application/json' \
--data "@attendance.json"
Sample Input
Copied{
"data":[
{
"Check_In_Time":"2023-07-04T10:50:03+05:30",
"Check_Out_Time":"2023-07-04T10:50:03+05:30",
"Service_Resource":"1003000000208159"
}
]
}
Sample Success Response
Copied{
"result": "success",
"code": "SUCCESS",
"data": {
"Attendance": [
{
"UID": "Attendance_0",
"Modified_Time": "2023-08-21T17:36:45+05:30",
"Modified_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
},
"Created_Time": "2023-08-21T17:36:45+05:30",
"id": "1003000000880015",
"Created_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
},
"TabName": "Attendance"
}
]
},
"status": "success"
}
Sample Error Response
Copied{
"code": "INVALID_DATA",
"details": {
"Attendance": [
{
"UID": "Attendance_0",
"code": "ATTENDANCE_ALREADY_APPLIED",
"details": {
"Check_Out_Time": "2023-08-21T10:50:03+05:30",
"id": "1003000000880015",
"Name": "Log-12",
"Service_Resource": {
"id": "1003000000208159"
},
"Check_In_Time": "2023-08-21T10:50:03+05:30"
},
"message": "Attendance already applied for the same date time.",
"status": "error"
}
]
},
"message": "invalid data",
"status": "error"
}
Sample Error Response
Copied{
"code": "NO_PERMISSION",
"details": {
"permissions": [
"create"
]
},
"message": "permission denied",
"status": "error"
}
Sample Error Response
Copied{
"code": "INVALID_DATA",
"details": {
"Attendance": [
{
"UID": "Attendance_0",
"code": "ATTENDANCE_CONFLICT",
"details": {
"Attendance": [
{
"Check_Out_Time": null,
"id": "1003000000879019",
"Name": "Log-11",
"Service_Resource": {
"id": "1003000000208159"
},
"Check_In_Time": "2023-08-21T17:21:54+05:30"
}
]
},
"message": "Conflicting Attendance records found for provided checkin and checkout time.",
"status": "error"
}
]
},
"message": "invalid data",
"status": "error"
}
Sample Error Response
Copied{
"code": "INVALID_DATA",
"details": {
"Attendance": [
{
"UID": "Attendance_0",
"code": "INVALID_DATA",
"details": {
"api_name": "Check_Out_Time"
},
"message": "Checkout time should be greater than checkin time",
"status": "error"
}
]
},
"message": "invalid data",
"status": "error"
}