Webhook Payload Formats
Example request payloads for each webhook event can be seen below. All fields in each webhook event will be described as below.
To learn how to set up webhooks in ONARKEN®, read this article: Configuring Webhooks for Custom Integrations
For more information on verifying received webhooks, go to https://api.onarken.com/#webhooks
Note: drop_off.failed, collection.failed and swap.failed webhooks are only sent on Sovran smart lockers with AI asset detection features installed.
Drop off completed (drop_off.completed):
{
"event_id": "<uuid>",
"event_type": "drop_off.completed",
"event_data": {
"id": "<uuid>",
"dropped_off_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the drop off transaction |
| event_data.dropped_off_at |
dateTime |
Timestamp asset was dropped off at |
Drop off expired (drop_off.expired):
{
"event_id": "<uuid>",
"event_type": "drop_off.expired",
"event_data": {
"id": "<uuid>",
"cancelled_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the drop off transaction |
| event_data.cancelled_at |
dateTime |
Timestamp drop off transaction expired |
Drop off cancelled (drop_off.cancelled):
{
"event_id": "<uuid>",
"event_type": "drop_off.cancelled",
"event_data": {
"id": "<uuid>",
"cancelled_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the drop off transaction |
| event_data.cancelled_at |
dateTime |
Timestamp drop off transaction was cancelled |
Drop off failed (drop_off.failed):
{
"event_id": "<uuid>",
"event_type": "drop_off.failed",
"event_data": {
"id": "<uuid>",
"ai_detection": {
"likeliness_percentage": <int>,
"justification": "AI desciption why drop off failed",
"detected_object": "description of unauthorised asset, or locker state"
}
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the drop off transaction |
| event_data.ai_detection |
object |
Object containing information from the AI detection used to determine the status of the transaction. |
| event_data.ai_detection.likeliness_percentage |
string |
Percentage of certainty that the asset in the locker bay is correct. |
| event_data.ai_detection.justification |
string |
AI reasoning on why drop off was rejected |
| event_data.ai_detection.detected_object |
string |
Description of unexpected asset placed in the locker bay. Will report "none" or something similar if the locker bay is empty. |
Collection completed (collection.completed):
{
"event_id": "<uuid>",
"event_type": "collection.completed",
"event_data": {
"id": "<uuid>",
"dropped_off_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the collection transaction |
| event_data.dropped_off_at |
dateTime |
Timestamp asset was collected at |
Collection cancelled (collection.cancelled):
{
"event_id": "<uuid>",
"event_type": "collection.cancelled",
"event_data": {
"id": "<uuid>",
"cancelled_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the collection transaction |
| event_data.cancelled_at |
dateTime |
Timestamp collection transaction was cancelled |
Collection expired (collection.expired):
{
"event_id": "<uuid>",
"event_type": "collection.expired",
"event_data": {
"id": "<uuid>",
"cancelled_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the collection transaction |
| event_data.cancelled_at |
dateTime |
Timestamp collection transaction expired |
Collection failed (collection.failed):
{
"event_id": "<uuid>",
"event_type": "collection.failed",
"event_data": {
"id": "<uuid>",
"ai_detection": {
"likeliness_percentage": <int>,
"justification": "Detailed AI desciption why collection failed.",
"detected_object": "Brief description of unauthorised asset, or locker state"
}
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the drop off transaction |
| event_data.ai_detection |
object |
Object containing information from the AI detection used to determine the status of the transaction. |
| event_data.ai_detection.likeliness_percentage |
string |
Percentage of certainty that the asset in the locker bay is correct. |
| event_data.ai_detection.justification |
string |
AI reasoning on why collection was rejected |
| event_data.ai_detection.detected_object |
string |
Description of unexpected asset placed in the locker bay. |
Collection failed events will only trigger if the AI detects the expected asset assigned for collection still in the locker.
Loan returned (loan.returned):
{
"event_id": "<uuid>",
"event_type": "loan.returned",
"event_data": {
"id": "<uuid>",
"bay_id": "<guid>",
"asset_id": "Asset-name",
"user_id": "<guid>",
"requested_at": "<dateTime>",
"loaned_at": "<dateTime>",
"due_at": "<dateTime>",
"returned_at": "<dateTime>,
"cancelled_at": null
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the loan transaction |
| event_data.bay_id |
string |
The unique UUID of the locker bay |
| event_data.asset_id |
string |
The unique UUID of the asset |
| event_data.requested_at |
string |
Timestamp return transaction request was approved at the smart locker |
| event_data.loaned_at |
string |
Timestamp asset being returned was originally loaned at |
| event_data.due_at |
dateTime |
Timestamp loaned asset was due to be returned |
| event_data.returned_at |
dateTime |
Timestamp asset was returned at. |
| event_data.cancelled_at |
dateTime |
Timestamp collection transaction expired |
Loan failed to return (loan.failed_return):
{
"event_id": "<uuid>",
"event_type": "loan.failed_return",
"event_data": {
"failure_reason": "Failure reason",
"failed_at": "<dateTime>",
"loan": {
"id": "<uuid>",
"bay_id": "<guid>",
"asset_id": "Asset-name",
"user_id": "<guid>",
"reason": "ai_empty",
"loaned_at": "<dateTime>",
"due_at": "<dateTime>",
"cancelled_at": null
}
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.failure_reason |
string |
Text description on why loan failed |
| event_data.failed_at |
string |
Timestamp return was detected as failed |
| event_data.loan |
object |
Collection of properties specific to the loan transaction |
| event_data.loan.id |
string |
The unique UUID of the loan transaction |
| event_data.loan.bay_id |
string |
The unique UUID of the locker bay |
| event_data.loan.asset_id |
string |
The unique UUID of the asset |
| event_data.loan.requested_at |
string |
Timestamp return transaction request was approved at the smart locker |
| event_data.loan.loaned_at |
string |
Timestamp asset being returned was originally loaned at |
| event_data.loan.due_at |
dateTime |
Timestamp loaned asset was due to be returned |
| event_data.loan.returned_at |
|
Timestamp asset was returned at. |
| event_data.loan.cancelled_at |
dateTime |
Timestamp collection transaction expired |
Swap completed (swap.completed):
{
"event_id": "<uuid>",
"event_type": "swap.completed",
"event_data": {
"id": "<uuid>",
"swapped_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the swap transaction |
| event_data.swapped_at |
dateTime |
Timestamp swap transaction occurred |
Swap cancelled (swap.cancelled):
{
"event_id": "<uuid>",
"event_type": "swap.cancelled",
"event_data": {
"id": "<uuid>",
"cancelled_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the collection transaction |
| event_data.cancelled_at |
dateTime |
Timestamp swap transaction was cancelled |
Swap expired (swap.expired):
{
"event_id": "<uuid>",
"event_type": "drop_off.expired",
"event_data": {
"id": "<uuid>",
"cancelled_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the collection transaction |
| event_data.cancelled_at |
dateTime |
Timestamp swap transaction expired |
Swap failed (swap.failed)
{
"event_id": "<uuid>",
"event_type": "swap.failed",
"event_data": {
"id": "<uuid>",
"ai_detection": {
"likeliness_percentage": <int>,
"justification": "Detailed AI desciption why swap failed.",
"detected_object": "Brief description of unauthorised asset, or locker stat"
}
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the drop off transaction |
| event_data.ai_detection |
object |
Object containing information from the AI detection used to determine the status of the transaction. |
| event_data.ai_detection.likeliness_percentage |
string |
Percentage of certainty that the asset in the locker bay is correct. |
| event_data.ai_detection.justification |
string |
AI reasoning on why swap was rejected |
| event_data.ai_detection.detected_object |
string |
Description of unexpected asset placed in the locker bay. Will report "none" or something similar if the locker bay is empty. |
Door left open (bay.door_left_open):
{
"event_id": "<uuid>",
"event_type": "bay.door_left_open",
"event_data": {
"id": "<uuid>",
"opened_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the door left open incident |
| event_data.opened_at |
dateTime |
Timestamp locker bay door was left open at |
Bay quarantined (bay.quarantined):
{
"event_id": "<uuid>",
"event_type": "bay.quarantined",
"event_data": {
"id": "<uuid>",
"quarantined_at": "<dateTime>",
"quarantined_until": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the quarantined bay incident |
| event_data.quarantined_at |
dateTime |
Timestamp bay quarantining started |
| event_data.quarantined_until |
dateTime |
Timestamp bay quarantining will expire |
Installation connected (installation.connected):
{
"event_id": "<uuid>",
"event_type": "installation.connected",
"event_data": {
"id": "<uuid>",
"connected_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the installation connected incident |
| event_data.connected_at |
dateTime |
Timestamp smart locker client connected to ONARKEN |
Installation disconnected (installation.disconnected):
{
"event_id": "<uuid>",
"event_type": "installation.disconnected",
"event_data": {
"id": "<uuid>",
"disconnected_at": "<dateTime>"
}
}
| Field |
Type |
Description |
| event_id |
string |
The unique UUID of the event |
| event_type |
string |
The type (name) of the event |
| event_data |
object |
Contains a collection of properties specific to the event type. |
| event_data.id |
string |
The unique UUID of the installation disconnected incident |
| event_data.disconnected_at |
dateTime |
Timestamp smart locker client disconnected from ONARKEN |
If you require any more information about processing webhooks, visit https://api.onarken.com and go to the "Webhooks" section.