Time activity webhook
Upon integrating with the time activity webhook, you will be notified of a variety of events that reflect the actions taken by users and admins within the system. These events are crucial for real-time monitoring and management of time-related activities.
Important to know
This article provides helpful insights and examples about different types of time activities. For the most up-to-date information, please follow this link.
Below is a detailed overview of the events you can expect to receive:
eventType | activityType | Description |
---|---|---|
clock_in | shift, manual_break | User clocked in |
clock_out | shift, manual_break | User clocked out |
auto_clock_out | shift, manual_break | User clocked out automatically based on the predefined settings in the time clock configuration |
admin_add | shift, manual_break, time_off | Admin added a new time activity |
admin_edit | shift, manual_break | Admin edited a time activity |
admin_delete | shift, manual_break | Admin deleted a time activity |
admin_approved_clock_out_outside_geo_fence_request | shift, manual_break | Admin approved a clock out that occurred outside the geofence. In response, the initial shift created at clock-in is deleted, and a new shift aligned with the clock-out outside geofence parameters is created |
admin_approved_add_request | shift, manual_break, time_off | Admin approved a time activity that was added by a user |
admin_approved_edit_request | shift, manual_break | Admin approved changes made by a user to a time activity |
admin_approved_delete_request | shift, manual_break | Admin approved the deletion of a time activity by a user |
admin_declined_request | time_off | Admin declined a time off request that had been previously approved |
auto_approved_clock_out_outside_geo_fence_request | shift, manual_break | Automatically approved a clock-out that occurred outside the geofence |
auto_approved_add_request | shift, manual_break, time_off | Automatically approved a time activity added by a user |
auto_approved_edit_request | shift, manual_break | Automatically approved changes made by a user to a time activity |
auto_approved_delete_request | shift, manual_break | Automatically approved the deletion of a time activity by a user |
Additional information provided
With each event, you will receive essential details to help you identify and manage the time activity effectively:
- userId: The unique identifier of the user associated with the time activity.
- timeClockId: The unique identifier of the time clock where the time activity is logged.
- timeActivity: This object contains all relevant details of the time activity, provided for all events except deletions.
- timeActivityId: The unique identifier of the time activity, specifically sent for deletion events such as:
- admin_delete
- admin_approved_delete_request
- admin_declined_request
- auto_approved_delete_request
Event examples
This section includes examples of the JSON payloads for event types mentioned, illustrating how the data is structured and what information is included. This practical insight helps in understanding how to process and react to each event within your system effectively:
clock_in - shift
{
âuserIdâ: 145,
âtimeClockIdâ: 67,
âactivityTypeâ: âshiftâ,
âeventTypeâ: âclock_inâ,
âtimeActivityâ:
{
âidâ: â65d46394a0973d7bbd55cd26â,
âstartâ:
{
âtimestampâ: 1708417940,
âtimezoneâ: âAsia/Jerusalemâ
},
âjobIdâ: âcc6e0b98-1f9a-4e3f-8535-c02d55a362d8â,
âshiftAttachmentsâ: []
}
}
clock_out - shift
{
âuserIdâ: 145,
âtimeClockIdâ: 67,
âactivityTypeâ: âshiftâ,
âeventTypeâ: âclock_outâ,
âtimeActivityâ:
{
âidâ: â65d5da9df9a1952f149bc47câ,
âstartâ:
{
âtimestampâ: 1708513949,
âtimezoneâ: âAsia/Jerusalemâ
},
âendâ:
{
âtimestampâ: 1708513979,
âtimezoneâ: âAsia/Jerusalemâ
},
âjobIdâ: âcc6e0b98-1f9a-4e3f-8535-c02d55a362d8â,
âshiftAttachmentsâ: [
{
âshiftAttachmentIdâ: âa69ef24c-41d5-2e91-d84b-e73ddb5773d1",
âattachmentâ:
{
âfilesâ: [
{
âfileNameâ: âfileâ,
âfileUrlâ: âhttps://link_to_fileâ
}
]
}
}
]
}
}
admin_add - time_off
{
âuserIdâ: 146,
âtimeClockIdâ: 67,
âactivityTypeâ: âtime_offâ,
âeventTypeâ: âadmin_addâ,
âtimeActivityâ:
{
âidâ: â65d32918a28dbd2c492d76bbâ,
âstartâ:
{
âtimestampâ: 1710885600,
âtimezoneâ: âAsia/Jerusalemâ
},
âendâ:
{
âtimestampâ: 1710971999,
âtimezoneâ: âAsia/Jerusalemâ
},
âpolicyTypeIdâ: â65af9319dea5e39064086d93â,
âdurationâ:
{
âvalueâ: 1.0,
âunitsâ: âdaysâ
},
âisAllDayâ: true
}
}
admin_edit - manual_break
{
âuserIdâ: 145,
âtimeClockIdâ: 67,
âactivityTypeâ: âmanual_breakâ,
âeventTypeâ: âadmin_editâ,
âtimeActivityâ:
{
âidâ: â65d370a6a28dbd2c492d76bfâ,
âstartâ:
{
âtimestampâ: 1708671600,
âtimezoneâ: âAsia/Jerusalemâ
},
âendâ:
{
âtimestampâ: 1708675200,
âtimezoneâ: âAsia/Jerusalemâ
},
âmanualBreakIdâ: âaad8cb0d-0d27-4adc-84f9-eb2ac4fa26b6â
}
}
admin_delete - shift
{
âuserIdâ: 145,
âtimeClockIdâ: 67,
âactivityTypeâ: âshiftâ,
âeventTypeâ: âadmin_deleteâ,
âtimeActivityIdâ: â65d4636ba0973d7bbd55cd25â
}
admin_approved_edit_request - shift
{
âuserIdâ: 145,
âtimeClockIdâ: 67,
âactivityTypeâ: âshiftâ,
âeventTypeâ: âadmin_approved_edit_requestâ,
âtimeActivityâ:
{
âidâ: â65d1f5cc8cf696ef8fafd9d4â,
âstartâ:
{
âtimestampâ: 1708844400,
âtimezoneâ: âAsia/Jerusalemâ
},
âendâ:
{
âtimestampâ: 1708876800,
âtimezoneâ: âAsia/Jerusalemâ
},
âjobIdâ: âcc6e0b98-1f9a-4e3f-8535-c02d55a362d8â,
âshiftAttachmentsâ: []
}
}
admin_declined_request - time_off
{
âuserIdâ: 145,
âtimeClockIdâ: 67,
âactivityTypeâ: âtime_offâ,
âeventTypeâ: âadmin_declined_requestâ,
âtimeActivityIdâ: â65d4a72e0fa9ac7f730c91beâ
}
Updated about 2 months ago