Create ARI subscriptions

Distribution API endpoints allow you to create and manage subscriptions for receiving ARI data.

Create an ARI subscription

To create new subscriptions, you must make a POST request to the Distribution API.

POST /v1/subscriptions

With a request body like:

{
   "propertyId":"MUC",
   "channelCode":"ChannelManager",
   "endpointUrl":"https://my-domain.com/notifications?token=hsu38hdsh82hskal342s",
   "ratePlanIds":[
      "MUC-NONREF_DBL",
      "MUC-NONREF_SGL"
   ],
   "numberOfDays":365,
   "enabled":true
}

In the payload above, you can see how your subscription can be for multiple rate plans.

A subscription object has the following fields:

Field Description
propertyId The property id for which the ARI data is subscribed.
channelCode Channel code that is used for synchronization. It can be BookingCom, ChannelManager, Expedia, Homelike, Hrs, Ibe, AltoVita or DesVu.
endpointUrl URL where the ARI data is sent to. Please ensure that the URL uses some means of authorization by having a token as a query parameter in the URL.
ratePlanIds Rate plans that should be included in the ARI push.
numberOfDays Number of days from today into the future that should be included in the ARI data push.
enabled No automatic updates are sent if the subscription is not enabled.

The key field is the endpointUrl. This is the URL we call to deliver the ARI data. Ensure you protect this endpoint well, as an unprotected endpoint would allow everyone to set prices or availabilities for the hotels. Sounds like trouble. We require HTTPS with a valid certificate and some sort of token. The URL also needs to be reachable from apaleo.com. If you’re not sure, check with your security or ops team if any firewalls prevent incoming traffic on (usually) port 443. If so, ask to whitelist us.

Our outbound IP addresses are:

  • 34.240.36.71
  • 52.212.76.75
  • 63.33.249.221

As a result, you’ll get an ID back. Be sure to store this, as you’ll need it later to update or delete the subscription.

Update an ARI subscription

The main reason to update a subscription is after a new rate plan is added and needs to be synchronized. To modify a subscription, you can use the following endpoint:

PUT /v1/subscriptions/{id}

Subscriptions are tied to an API client so that other applications used by the same apaleo account cannot accidentally interfere with your subscriptions.

Here is a sample payload:

{
  "endpointUrl": "https://my-domain.com/notifications?token=hsu38hdsh82hskal342s",
  "ratePlanIds": [
    "MUC-NONREF_DBL",
    "MUC-NONREF_SGL",
    "MUC-NONREF_TPT"
  ],
  "numberOfDays": 365,
  "enabled": true
}

Delete an ARI subscription

You might want to delete a subscription if a property is going to disconnect your app from apaleo. To delete a subscription, you can use the following endpoint:

DELETE /v1/subscriptions/{id}

Please ensure that the property admin contacts your support team before disconnecting the app from apaleo; otherwise, you’ll keep getting the ARI updates at your endpoint.