Getting Started

There are 2 steps to setting up Zyllem webhooks:

  1. View list of Webhooks
  2. Subscribe to a Webhook

1. View list of Webhooks

To view all available webhooks, access the following endpoint:
GET api/v1/events/webhooks

To view the webhooks you are currently subscribed to, access the following endpoint:
GET api/v1/webhooks

This will return a collection of webhooks:

{
    "collection": [
        {
            "eventKey": "GLOBAL_ACTION_EXECUTED",
            "displayName": "Action executed",
            "description": "Global event that fired after action has been executed",
            "eventMeta": {
                "eventTypeKey": "ENTITY_ACTIVITY",
                "name": "Item Activity Event",
                "description": "Event capturing information related to an action execution"
            },
            "executionOrder": 1
        },
        {
            "eventKey": "GLOBAL_ITEM_ASSIGNED",
            "displayName": "Item assigned",
            "description": "Global event that fired after item has been assigned / unassigned to an asset",
            "eventMeta": {
                "eventTypeKey": "ENTITY_ASSIGNMENT",
                "name": "Item Assignment Event",
                "description": "Event capturing data related to an item (un-)assignment"
            },
            "executionOrder": 0
        },
        {
            "eventKey": "GLOBAL_ITEM_OPERATOR_REFERENCE_UPDATE",
            "displayName": "Item operator reference updated",
            "description": "Global event that fired after the operator reference has been updated",
            "eventMeta": {
                "eventTypeKey": "ENTITY_OPERATOR_REFERENCE_UPDATE",
                "name": "Operator reference update event",
                "description": "Event capturing information related to the operator reference update"
            },
            "executionOrder": 1
        },
        {
            "eventKey": "GLOBAL_ITEM_OPERATOR_WINDOWS_UPDATE",
            "displayName": "Item operator windows Updated",
            "description": "Global event that fired after operator windows of an item have been updated",
            "eventMeta": {
                "eventTypeKey": "ENTITY_OPERATOR_WINDOWS_UPDATE",
                "name": "Item Operator Windows Update Event",
                "description": "Event capturing data related to an update to the item operator windows"
            },
            "executionOrder": 0
        },
        {
            "eventKey": "GLOBAL_SHIFT_ACTIVITY_AVAILABILITY",
            "displayName": "Shift Activity Availability",
            "description": "Fired when the shift is availability is changed",
            "eventMeta": {
                "eventTypeKey": "GLOBAL_SHIFT_ACTIVITY_AVAILABILITY",
                "name": "Shift Activity Availability",
                "description": "Fired when the shift is availability is changed"
            },
            "executionOrder": 1
        }
    ]
}

2. Subscribe to a Webhook

To subscribe to a webhook, POST to the following endpoint:

POST api/v1/webhooks

{
    "key" : "User defined key to identify the webhook registration",
    "url" : "https://endpointurl",
    "eventKey" : "GLOBAL_ITEM_OPERATOR_REFERENCE_UPDATE",
    "headers" :{
        "Authorization" : "user_defined_auth_key",
        "SomeKey" : "user_defined_value"
    },
    "restrictedScope" : false
}

The structure has the following fields (*required):

Field

Description

Key*

Define the key to identify the webhook registration

Url*

Your webhook endpoint (where the webhook will be sent).

EventKey*

The event key of the event/activity you want to subscribe to. This value is obtained from the list of available webhooks in Step 1.

Headers

Optional Custom headers to be sent along with the webhook

RestrictedScope*

Always set this field to false.

When set to true, the webhook will only send events/activities for items that were booked using this API client.