Event Webhooks

These webhooks notify you of changes to a worker's timeline either through sharing updates, or events being pushed into their timeline via confirming offers or pending events.

Events Added Webhook

When a worker shares updates to their timeline or events are pushed into their timeline via confirming offers or pending events the system dispatches a notification payload to this endpoint.

Endpoint

POST https://<yourbaseUrl>/events/timelineChanged HTTP/1.1

Payload Schema

{"workerId":"9c8b042a-97c2-4569-ba93-1d3c1ff83655","periodStart":"2020-01-31T09:00:00+00:00","periodEnd":"2020-01-31T17:00:00+00:00","completedAt":"2020-01-30T12:32:11.5726446+00:00"}
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"workerId": {
"description" : "The id of the worker whose timeline has changed.",
"type": "string"
},
"periodStart": {
"type": "date-time",
"description" : "The start date/time of the earliest event in the list of event changes.",
},
"periodEnd": {
"type": "date-time",
"description" : "The end date/time of the furthest event in the future in the list of event changes (includes the maximum extent of any repeat event furthest into the future.).",
},
"completedAt": {
"type": "date-time",
"description" : "The date/time when the updates were committed to the timeline.",
},
"maxAvailableNow": {
"type": "date-time",
"description" : "The end of the furthest 'I'm Available Now' event in the future (includes the maximum extent of any repeat event furthest into the future).",
},
"maxAvailableNowCreated": {
"type": "date-time",
"description" : "The point in time at which the 'maxAvailableNow' event was created.",
},
},
}

Payload Example

{
"workerId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"periodStart":"2020-01-31T09:00:00+00:00",
"periodEnd":"2020-01-31T17:00:00+00:00",
"completedAt":"2020-01-30T12:32:11.5726446+00:00",
"maxAvailableNow": "2020-02-02T17:00:00+00:00",
"maxAvailableNowCreated": "2020-02-03T11:07:10.2045285+00:00"
}

Expected Response

HTTP 200 OK