WebHooks Support

We have now launched our support for custom WebHooks.

The initial set of webhook events are:

  • Employee created
  • Employee terminated
  • Pay run created
  • Pay run deleted
  • Leave request created

Listing web hook filters

This endpoint will return a list of available web hook filters. Please note that it is permitted to pass ‘*’ to subscribe to all events.

POST /api/v2/business/{businessid}/webhookfilters

Web Hook Registrations

To retrieve the list of current webhook registrations for the business:

# Request
GET api/v2/business/{businessid}/webhookregistrations

# Reply
[
  {
    "id": "ae5405296e6a4946bb9cc279de0f22f5",
    "webHookUri": "http://requestb.in/123aa21e3",
    "secret": "111111111122222222223333333333444444",
    "description": "My Web Hook",
    "isPaused": false,
    "filters": [
      "*"
    ],
    "headers": {},
    "properties": {}
  }
]

To register a webhook

POST api/v2/business/{businessid}/webhookregistrations

{
  "webHookUri": "http://requestb.in/123aa21e3",
  "secret": "111111111122222222223333333333444444",
  "description": "My Web Hook",
  "filters": [
    "*"
  ],
  "headers": {},
  "properties": {}
}

Web Hook Properties:

  • WebHookUri: the URI to post to for webhook events
  • Secret: this will be used to sign the message when the webhook data is POSTed. This can be verified against the Ms-Signature header
  • Description: a readable description of the webhook
  • Filters: an array of filter names (see above for retrieving a list of filters). This field is optional and, if not specified, will default to ‘all’
  • Headers: custom HTTP headers to pass along when the webhook data is POSted
  • Properties: custom properties to include in the data webhook data is POSted

To delete a webhook

DELETE api/v2/business/{businessid}/webhookregistrations/{webhookid}

To delete all webhooks for this business

DELETE api/v2/business/{businessid}/webhookregistrations

This is great. It would be good to have a webhook that triggers on personal details changing.

Story
As a Client Business
I want a web hook that lets me know employee personal details has been updated
So that I can synchronise personal details with other systems

Nice idea Zeelan! I’ve added this as a feature request.

1 Like

As an update to this, we would likely not use this service and have our HR system be the designated “source of truth”. So updates to personal details would likely only be written. In that case, we would just need to lock out personal details in this system as a “Nice to have”.