Last modifcation: 2023-02-15

Third-party applications can integrate with ibelsa.rooms through our REST API.

Changes

To keep you informed about how to integrate with ibelsa.rooms and access our APIs, you should subscribe to our email newsletter

ibelsa.rooms Developer News

We strongly recommend to subscribe to this newsletter as important information will be published here, for example breaking changes to our API. You can unsubscribe at any time, of course!

We also maintain an archive of all previous newsletters.


Further documentation and update information: https://www.ibelsa.com/api-documentation/

Endpoint unrelated info

Deep Links

You can create deep links to reservations in the ibelsa.rooms application using the main reservation and room reservation ids you receive through the endpoints below.

Structure:

Deeplink to a main reservation

https://rooms.ibelsa.com/de/application?goto=mr_{main_reservation_id}

Deeplink to a room reservation

https://rooms.ibelsa.com/de/application?goto=rr_{room_reservation_id}

REST API basics

The ibelsa REST API uses HTTP verbs and resource-oriented URLs for actions, HTTP status codes for errors, and the HTTP header for authentication.

ibelsa.rooms uses the JSON data format exclusively, and all connections use HTTPS for security.

Restrictions

Rate limits

In order to ensure effective operation of the interface, we expect that 1000 requests per minute per source IP will not be exceeded.

We reserve the right to block access if these limits are repeatedly exceeded significantly.

Contact us as info@ibelsa.com if you cannot comply with these restrictions.

Authentication

Creating API Keys

If you have not already created an ibelsa API key, you can do so in the “my Hotel” area of ibelsa.rooms (select the cogwheel button at the top of the sidebar). First, under “Users”, create a group that has permission to use the API. Then, visit “Integrations” and select “ibelsa API” at the bottom of the list to the left. Here you can create one or more API keys.

Using API Keys

Each API call must set the special HTTP header ‘x-ibelsa-key’. Clients of the ibelsa.rooms API must also accept cookies and HTTP redirects, as some API calls may set a session cookie and then redirect to another URL. This is an implementation detail and may change in the future.

Example

You can experiment with ibelsa API calls in a terminal by using the free curl tool. For example, you can retrieve the settings of your hotel like so (please use your own API key instead):

$ IBELSA_KEY=12345678-1234-1234-1234-12345678
$ curl -siLX GET -b ibelsa_cookies -c ibelsa_cookies -H "x-ibelsa-key: $IBELSA_KEY" https://rooms.ibelsa.com/api/get/hotelsettings

The -s option suppresses the progress bar (--silent); the -i option includes the HTTP headers in the output (--include); the -L option instructs curl to follow HTTP redirects (3XX status code); and the -X GET option explicitly sets the HTTP method to GET.
The options -b and -c options let curl know in which file to store (-c) and read (-b) cookies. The -H option sets the special x-ibelsa-key HTTP header to our API key.

The combination of the -L, -b and -c options is necessary because the first API response might be a redirect to another URL (status 3XX), with a session cookies that is set via the Set-Cookie header. curl will then save this cookie and use it when following the redirect.
Important: When you access the ibelsa.rooms API from your programming language of choice, please ensure that the library you use handles HTTP cookies and redirects correctly.

If you run the command above, the response(s) should look like this:

HTTP/1.1 301 Moved Permanently

...

Set-Cookie: PHPSESSID=b6tu7v431fsgd7elc65olsa7l6; path=/

...

HTTP/1.1 200 OK

...

Content-Type: application/json; charset=utf-8

{"success":true,"data":{..."hotel_name":"Your hotel name"...}}

If your output looks similar–congratulations! You have successfully sent your first request to our API, and retrieved some general information about your hotel.

As you can see, all responses from the ibelsa.rooms API are wrapped in a top-level object with a boolean “success” flag. The actual data is nested under “data”.

Errors

HTTP status codes are used for error handling. Common errors are:

Details may be returned in the response body.

Documentation auto-generated on Fri, 29 Mar 24 06:12:47 +0000