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.
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”
}