API
The Application Programming Interface (API) provides a data interface for accessing data within a particular reservation system (specific entity). Using the programmatic approach, it is possible to obtain reservation information and process it in other/external applications through the API.
The data interface description below is for experts and contains technical information and specifications!
This feature is only available in the PREMIUM package.
API for passing data to iframe integration
In certain cases, it may be appropriate to pass the initial customer data directly to the reservation form. Similarly, it may be appropriate to influence what happens after a successful reservation is made. If you have a reenio system embedded in your own website, it is possible realize this by extention of embedding script. Below is a sample that extends the standard form of the integration code with the data-api-ready and data-reservation-created attributes. The passing of the values for your own custom form fields is not supported.
<script>
function onApiReady(api){
api.setCustomer({
firstName: 'Pepa',
lastName: 'Novák',
email: 'pepa@reenio.cz',
phone: '+420123....'
});
}
function onReservationCreated(){
// TODO: redirect?
}
</script>
<div class="reenio-iframe" data-size="auto" data-url="/service/seo-konzultace-zdarma-1234;viewMode=7-days;hideResources=1" data-api-ready="onApiReady" data-reservation-created="onReservationCreated"></div>
<script src="https://reenio.cz/cs/GEAA321A/widget-iframe.js" async defer></script>
General information
The REST API is available at https://reenio.com/en/api/v1/admin/
.
UTF-8 encoding is used for all inbound and outbound communication with the API.
Unless otherwise noted, the date and time used to communicate with the API is in the time zone UTC. The date and time format follows the ISO 8601 standard.
When communicating with the API, you must use a minimum version of TLS 1.2.
The number of requests to the API is limited to 200/minute.
Detailed description of the API can be found at: https://reenio.cz/api-docs/
Authentication
Access to the REST API is secured by using the API key, which you get after logging into the reenio administration (https://reenio.com/en/admin/#/settings/api). This key is always tied to the subject and user who created it. This gives you the same permissions as communicating with the API. Always keep the API key secret. If it is suspected of being stolen, it is sufficient to remove it in the administration and create a new one.
The key must be passed across all API requests in an HTTP query via Authorization: Bearer
Authorization: Bearer Ky3Ancs1D2Nd33W6MQ2e9Db5
Customer list
Request
GET /customer/list
Request header
Header name | Value |
---|---|
Accept | application/json |
Authorization | Bearer <ApiKey> |
Request parameters
Parameter name | Parameter description | Compulsory | Data type |
---|---|---|---|
page | It is used for paging results. Specifies the page number. | no | int |
Customer detail
Request
GET /customer/detail/{id}
Request header
Header name | Value |
---|---|
Accept | application/json |
Authorization | Bearer <ApiKey> |
Request parameters
Parameter name | Parameter description | Compulsory | Data type |
---|---|---|---|
id | Customer ID | yes | int |
List of reservations
Request
GET /reservation/list
Request header
Header name | Value |
---|---|
Accept | application/json |
Authorization | Bearer <ApiKey> |
Request parameters
Parameter name | Parameter description | Compulsory | Data type |
---|---|---|---|
start | Start date of the requested period in ISO 8601 format. | yes | string |
end | End date of the requested period in ISO 8601 format. | yes | string |
includeCancelled | Does the result include canceled reservations? | no | bool |
includeAlternate | Should the result include alternates? | no | bool |
Reservation detail
Request
GET /reservation/detail/{id}
Request header
Header name | Value |
---|---|
Accept | application/json |
Authorization | Bearer <ApiKey> |
Request parameters
Parameter name | Parameter description | Compulsory | Data type |
---|---|---|---|
id | Reservation ID | yes | int |
List of "place" resources
Request
GET /resource/place
Request header
Header name | Value |
---|---|
Accept | application/json |
Authorization | Bearer <ApiKey> |
List of "service" resources
Request
GET /resource/service
Request header
Header name | Value |
---|---|
Accept | application/json |
Authorization | Bearer <ApiKey> |
List of "employee" resources
Request
GET /resource/employee
Request header
Header name | Value |
---|---|
Accept | application/json |
Authorization | Bearer <ApiKey> |
Detail of logged in user
The logged on user is the user for whom the API key was issued.
Request
GET /user/info
Request header
Header name | Value | |
---|---|---|
Accept | application/json | |
Authorization | Bearer <ApiKey> |