Notifications
Notifications on changes to product, availability or booking
Last updated
Was this helpful?
Notifications on changes to product, availability or booking
Last updated
Was this helpful?
To use this capability, add notifications
to your Octo-Capabilities
header. This capability allows you to subscribe to be notified when something changes against either of the:
Product
Availability
Booking
You can subscribe to notifications by creating subscriptions, which can be , or . You can also your subscriptions or a specific one.
POST
/notifications/subcriptions
Headers
Content-Type
application/json
Authorization
Bearer <token>
Octo-Capabilities
notifications
Body
url
string
The URL where you want the notifications to be sent to
notificationTypes
array
The type(s) of notifications you would like to be subscribed to as a part of this subscription. Possible events are:
PRODUCT_UPDATE
(changes to product object, including option, ticket, etc. within it)
AVAILABILITY_UPDATE
(changes to availabilities)
BOOKING_UPDATE
(changes to bookings)
headers
object
List of HTTP headers you want to be included in the request (eg. for authentication)
Example Response
Note the id
of your created subscription. You can use it to manage your created notification as described below. The REST endpoints will behave as you'd expect using the same schema as above.
Update an existing notification:
PATCH
/notifications/subscriptions/<id>
Delete an existing notification:
DELETE
/notifications/subscriptions/<id>
Retrieve an existing notification:
GET
/notifications/subscriptions/<id>
List all of the notifications associated with your account (Bearer Token):
GET
/notifications/subscriptions
The value included in data
is the content of the notification will vary based on type
:
When receiving notification you've created, the request body will not include the fully serialized object of either a product, availability or booking. Instead it'll simply provide you with the parameters needed to fetch that updated resource if you choose to. This can be done using OCTO Core , , and endpoints correspondingly. This is to reduce the volume of data sent in the request and allow the receiver of the notification to chose which capabilities they want to include when fetching the updated resource. All notifications will be HTTP POST requests and include a standard payload scheme:
productId
then be used to request the updated product details using .
You can then retrieve change details for these using endpoints.
Booking uuid
then be used to request the updated product details using .