Skip to main content

Create subscriptions

Let's get started with creating a new subscription.

You must ensure that you have a hotel level access token to authenticate requests related to subscriptions. More information about hotel access tokens.

Creating a subscription

You must provide a valid endpoint when creating a subscription. The endpoint will be sent a POST healthcheck that will pass if a valid 2xx response status code is sent.

A topic is an enum that defines the types of queries that the endpoint is subscribed to. The values for topic can be found in the API reference. The following table indicates the queries that are related to a specific topic.

QueryTopicAction
createSpaceSpacenew-space
updateSpaceSpaceupdate-space
deleteSpaceSpacedelete-space
createPricelistSpacenew-pricelist
updatePricelistSpaceupdate-pricelist
deletePricelistSpacedelete-pricelist
createOrderSpacenew-order
updateOrderSpaceupdate-order
createBookingSpacenew-booking
UpdateBookingSpaceupdate-booking
mutation createMarketplaceAppSubscription {
createMarketplaceAppSubscription(
endpoint: "https://api.your-app.com/xxxxx"
topics: [Booking, Order, Space]
) {
id
endpoint
topics
}
}

Reponse

{
"data": {
"createMarketplaceAppSubscription": {
"id": "69ba68fa-a480-4fd4-bf25-049e5182155f",
"endpoint": "https://api.your-app.com/xxxxx",
"topics": ["Booking", "Order", "Space"]
}
}
}