Guideline to Assign First Key during a session
The first key should only be assigned when a webhook is received with all the following parameters:
-
Type of webhook is WORK SESSION update. The payload has:
-
"action": "work_session.update"
-
-
Status of session is STARTED. The payload has:
-
"status": 0
which means STARTED
-
-
Webhook DOES NOT have keys within
options
field of payload.
Once a key is assigned, careful consideration must be taken before assigning more keys to avoid duplicate keys. The flowchart below provides a guideline to avoid key duplication, where the third-party system is expected to validate if the user requires a different key before assigning more.
Example of "work_session.update" Webhook without Keys in options field
{
"tenant": {
"id": "8231b3fa-78f3-4ea6-b423-8f3877fe4a6c",
"name": "sesame"
},
"url": "/v3/public/work_sessions/ce88a8e2-c69b-4a6e-b047-a47ca9001842",
"event": "evt_b0d837bb-739f-43ab-98c4-3973b91efb27",
"type": "event",
"api_version": "2021-10-26",
"live_mode": true,
"data": [
{
"action": "work_session.update",
"object": {
"id": "ce88a8e2-c69b-4a6e-b047-a47ca9001842",
"lock": {
"id": 23585,
"name": "Lock-5C21",
"site": {
"id": 83,
"name": "Joel"
},
"deleted": false,
"deactivated": false,
"description": "Lock-5C21",
"lock_type_id": 1,
"hardware_type": "AP3"
},
"site": {
"id": 83,
"name": "Joel"
},
"user": {
"name": "Joel Matsu",
"email": "joel.matsu@sera4.com",
"username": "joel572",
"membership_id": "f20d0df4-3b74-4cf8-9a92-0a44631e3280"
},
"wstl": 480,
"status": 0,
"options": {
"flow": "confirmation_required",
"tasks": [
"Installation",
"Maintenance"
],
"chosen_tasks": [
"Maintenance"
],
"ticket_number": "T-123"
},
"comments": "",
"duration": "",
"wstl_as_time": "08:00:00",
"membership_id": "f20d0df4-3b74-4cf8-9a92-0a44631e3280",
"time_exceeded": false,
"locksmith_uuid": "a6e0427b2e5d480391ce1d6b1e6cc883",
"close_confirmed": false,
"started_at_time": "2025-09-10T17:52:24.470Z",
"started_at_location": {
"lat": "-23.86608126363599",
"lng": "-49.80470585224187"
},
"photo_notes_confirmed": false
},
"object_meta": {
"changes": [
"status",
"options"
]
},
"id": 67225,
"attempt": 1,
"created_at": "2025-09-10T17:55:19.916Z"
}
]
}
Example of "work_session.update" Webhook with Keys in options field .
This webhook is received after one ore more keys have been assigned.
{
"tenant": {
"id": "8231b3fa-78f3-4ea6-b423-8f3877fe4a6c",
"name": "sesame"
},
"url": "/",
"event": "evt_ag-2891d6d5-94ef-4be9-a7ec-f788c2d39bb5",
"type": "event",
"api_version": "2021-10-26",
"live_mode": true,
"data": [
{
"action": "work_session.update",
"object": {
"id": "ce88a8e2-c69b-4a6e-b047-a47ca9001842",
"lock": {
"id": 23585,
"name": "Lock-5C21",
"site": {
"id": 83,
"name": "Joel"
},
"deleted": false,
"deactivated": false,
"description": "Lock-5C21",
"lock_type_id": 1,
"hardware_type": "AP3"
},
"site": {
"id": 83,
"name": "Joel"
},
"user": {
"name": "Joel Matsu",
"email": "joel.matsu@sera4.com",
"username": "joel572",
"membership_id": "f20d0df4-3b74-4cf8-9a92-0a44631e3280"
},
"wstl": 480,
"status": 0,
"options": {
"flow": "confirmation_required",
"keys": [
{
"id": 12526,
"set_by": 10
}
],
"tasks": [
"Installation",
"Maintenance"
],
"chosen_tasks": [
"Maintenance"
],
"ticket_number": "T-123"
},
"comments": "",
"duration": "",
"wstl_as_time": "08:00:00",
"membership_id": "f20d0df4-3b74-4cf8-9a92-0a44631e3280",
"time_exceeded": false,
"locksmith_uuid": "a6e0427b2e5d480391ce1d6b1e6cc883",
"close_confirmed": false,
"started_at_time": "2025-09-10T17:52:24.470Z",
"started_at_location": {
"lat": "-23.86608126363599",
"lng": "-49.80470585224187"
},
"photo_notes_confirmed": false
},
"object_meta": {
"changes": [
"options"
]
},
"id": 67226,
"attempt": 1,
"created_at": "2025-09-10T17:57:57.991Z"
}
]
}