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:

eventTypeactivityTypeDescription
clock_inshift, manual_breakUser clocked in
clock_outshift, manual_breakUser clocked out
auto_clock_outshift, manual_breakUser clocked out automatically based on the predefined settings in the time clock configuration
admin_addshift, manual_break, time_offAdmin added a new time activity
admin_editshift, manual_breakAdmin edited a time activity
admin_deleteshift, manual_breakAdmin deleted a time activity
admin_approved_clock_out_outside_geo_fence_requestshift, manual_breakAdmin 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_requestshift, manual_break, time_offAdmin approved a time activity that was added by a user
admin_approved_edit_requestshift, manual_breakAdmin approved changes made by a user to a time activity
admin_approved_delete_requestshift, manual_breakAdmin approved the deletion of a time activity by a user
admin_declined_requesttime_offAdmin declined a time off request that had been previously approved
auto_approved_clock_out_outside_geo_fence_requestshift, manual_breakAutomatically approved a clock-out that occurred outside the geofence
auto_approved_add_requestshift, manual_break, time_offAutomatically approved a time activity added by a user
auto_approved_edit_requestshift, manual_breakAutomatically approved changes made by a user to a time activity
auto_approved_delete_requestshift, manual_breakAutomatically 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”
}

What’s Next