Webhooks
Get notifications sent to you when something changes
This capability allows you to create webhooks which will notify a given URL whenever an action happens in Peek Pro, e.g. Booking Update or Booking Cancellation.
post
https://octo.peek.com/integrations/octo
/webhooks
Create Webhook
Field
Description
url
A fully formed URL. If you want to include basic authentication credentials that is supported also. For example:
event
The event that will trigger the webhook. Possible values are:
booking_update triggered when an existing booking is confirmed, updated or cancelled.
An example response will look like this:
1
{
2
"id": "octohook_123",
3
"event": "booking_update",
4
"url": "https://example.com/webhooks/booking_update"
5
}
Copied!
We recommend for testing you can use ngrok to create an endpoint which connects to your localhost. You can then make test bookings with the same credentials and see the webhook requests arrive.
When an event is triggered the webhook will perform a POST HTTP request to the specified URL, the request body will look like this depending on the event type:
booking_update
1
{
2
"webhook": {
3
"id": "octohook_123",
4
"event": "booking_update",
5
"url": "https://example.com/webhooks/booking_update"
6
},
7
"booking": {
8
"uuid": "89fe0192-ddcd-430a-b285-e1396a4725d2",
9
"testMode": true,
10
"resellerReference": null,
11
"supplierReference": "X749G9",
12
"status": "ON_HOLD",
13
"utcExpiresAt": "2020-06-07T17:06:37Z",
14
"utcConfirmedAt": null,
15
"productId": "av_123",
16
"optionId": "av_123",
17
"cancellable": true,
18
"cancellation": null,
19
"freesale": false,
20
"notes": "optional notes on the booking",
21
"availability": {
22
"id": "20200701143000_720_5214a9d6-5271-4958-a306-14a07e4084c6",
23
"localDateTimeStart": "2020-07-01T14:30:00-08:00",
24
"localDateTimeEnd": "2020-07-02T02:30:00-08:00",
25
"allDay": true,
26
"openingHours": []
27
},
28
"contact": {
29
"fullName": null,
30
"emailAddress": null,
31
"phoneNumber": null,
32
"locales": [],
33
"country": null
34
},
35
"deliveryMethods": [
36
"VOUCHER"
37
],
38
"voucher": {
39
"redemptionMethod": "DIGITAL",
40
"utcRedeemedAt": null,
41
"deliveryOptions": []
42
},
43
"unitItems": [
44
{
45
"uuid": "eeddd74e-88e6-4dab-84e9-14f7af18935f",
46
"resellerReference": null,
47
"supplierReference": "408H44",
48
"unitId": "ecbdb23e-9840-4d15-b6f4-254a9ea401b2"
49
},
50
{
51
"uuid": "ec1e2622-1359-437b-83f8-15182759d605",
52
"resellerReference": null,
53
"supplierReference": "BSDYM4",
54
"unitId": "ecbdb23e-9840-4d15-b6f4-254a9ea401b2"
55
},
56
{
57
"uuid": "de9855fd-8176-4551-9ba9-ae8c997cb2bb",
58
"resellerReference": null,
59
"supplierReference": "E5K92G",
60
"unitId": "480d0c3e-80a1-4bf2-a39b-aa06332739df"
61
}
62
]
63
}
64
}
Copied!
This endpoint will return a list of all existing webhooks.
get
https://octo.peek.com/integrations/octo
/webhooks
List Webhooks
delete
https://octo.peek.com/integrations/octo
/webhooks/:id
Delete Webhooks
Last modified 5mo ago