Download OpenAPI specification:Download
This API is documented in OpenAPI format. It's still a work in progress so please let us know about any issues at dev@bookio.com.
Token based authentication. Access to bookio API with specific channel assigned to the token.
ErrorCode | Description |
---|---|
10 | Generic validation error, errors field will give more information |
11 | Payment error, reservation cannot be marked as paid |
20 | Invalid token or missing access rights |
30 | Rooms are occupied |
40 | Duplicate reservation |
50 | Generic PMS error, problem with external systems during specific operations. Errors field will give more information |
404 | Not found |
666 | Unspecified internal error, this will be reported to us and we will look into it shortly |
Every request accepts parameter lang
. Example: /api/v1/some-endpoint?lang=sk
or /api/v1/some-endpoint?someParam=1&lang=en
. Controls the language of texts. Unsupported locale will fallback to "en".
Returns capacities at specified interval
dateFrom required | |
dateTo required | |
rt | string Example: rt=42 Room type ids (string or array) |
facilityId | string Example: facilityId=4adf5ds facility's global ID / or internal id |
Successful operation
Staging server.
Production server.
{- "result": {
- "success": true,
- "errors": [ ],
- "data": {
- "$isoDate": {
- "$roomTypeId": 4
}
}
}
}
Checks if specified interval is free (also in PMS). Copies implementation of /create-reservation.
JSON body
name required | string Customer's name |
email required | string Customer's email |
phone required | string Customer's phone |
dateFrom required | string <date> Date (RFC 3339 full-date format) |
dateTo required | string <date> Date (RFC 3339 full-date format) |
guestCount | number Deprecated Number of guests. From now on it will be sum of roomData's guests. You can still send this (not a breaking change) but it will be ignored. |
locale required | string <locale> Locale (ISO 639-1 languages) |
additionalNote | string Additional note shown in Bookio reservation detail |
totalPrice | number Deprecated Total price for rooms. From now on it will be sum of roomData's prices. You can still send this (not a breaking change) but it will be ignored. |
currency | string Currency (ISO 4217 alphabetic code)
The following values are permitted: |
reservationType | string Default: "PAID" Reservation will be created paid or unpaid The following values are permitted: |
facilityId required | string Global ID of facility |
roomData required | Array of objects |
Successful operation
Bad request
Staging server.
Production server.
{- "name": "John",
- "email": "john@yahoo.com",
- "phone": "+421948762315",
- "dateFrom": "2018-06-29",
- "dateTo": "2018-06-29",
- "guestCount": 2,
- "locale": "sk",
- "additionalNote": "Some deal data",
- "totalPrice": 0,
- "currency": "EUR",
- "reservationType": "UNPAID",
- "facilityId": "abc123",
- "roomData": [
- {
- "roomTypeId": 13,
- "packageId": 2,
- "price": 200,
- "guests": 2,
- "adults": { },
- "children": [
- {
- "age": 10,
- "childBed": true,
- "noBed": false
}
], - "accessories": [
- {
- "packageAccessoryId": 10,
- "id": 233,
- "price": 100,
- "count": 2
}
]
}
]
}
{- "result": {
- "success": true,
- "data": {
- "isFree": true
}
}
}
Returns a list of facilities you have access to with their respective capacities
dateCheckIn required | |
dateCheckOut required |
Successful operation
Staging server.
Production server.
{- "result": {
- "success": true,
- "errors": [ ],
- "errorCode": 0,
- "data": [
- {
- "gid": "abc123",
- "name": "Hotel Imperial",
- "capacity": {
- "freeRooms": [
- {
- "id": 4444,
- "freeCapacity": 4,
- "freeRooms": [
- 4,
- 3
], - "beds": 2,
- "extraBeds": 1,
- "roomTypeId": 4444
}
], - "maxCapacity": 20
}
}
]
}
}
Returns a list reservations for your channel.
string Example: email=test@bookio.com Email of the reservee. | |
number | string Example: number=a47b89 Bookio reservation number. |
hash | string Example: hash=08ab382e-1162-4d35-8c5b-ab1064b1afc7 Bookio reservation hash. |
offset | integer >= 0 Default: 0 Example: offset=50 Determines the offset within pagination. |
limit | integer [ 0 .. 100 ] Default: 100 Example: limit=50 Limits the result set. |
Successful operation
Bad request
Staging server.
Production server.
{- "result": {
- "success": true,
- "errors": [
- "string"
], - "data": {
- "pagination": {
- "total": 1234,
- "offset": 100,
- "limit": 100
}, - "reservations": [
- {
- "dateFrom": "2018-06-29",
- "dateTo": "2018-06-29",
- "name": "John Audrey",
- "email": "alias@example.com",
- "phone": "+421944888777",
- "number": "a2se8w",
- "hash": "08ab382e-1162-4d35-8c5b-ab1064b1afc7",
- "facility": {
- "name": "string",
- "gid": "abc123"
}, - "created": "2018-06-29T12:00:00",
- "note": "string",
- "status": "RESERVED",
- "items": [
- {
- "name": "Double room",
- "description": "Full-featured amazing room.",
- "package": {
- "name": "Wellness package.",
- "description": "Great wellness accomodation in our hotel with welcome drink...",
- "includedAccessories": [
- {
- "name": "Breakfast",
- "count": 1
}
]
}, - "accessories": [
- {
- "name": "Breakfast",
- "count": 1
}
]
}
]
}
]
}
}
}
Creates reservation from requested data.
JSON body
name required | string Customer's name |
email required | string Customer's email |
phone required | string Customer's phone |
dateFrom required | string <date> Date (RFC 3339 full-date format) |
dateTo required | string <date> Date (RFC 3339 full-date format) |
guestCount | number Deprecated Number of guests. From now on it will be sum of roomData's guests. You can still send this (not a breaking change) but it will be ignored. |
locale required | string <locale> Locale (ISO 639-1 languages) |
additionalNote | string Additional note shown in Bookio reservation detail |
totalPrice | number Deprecated Total price for rooms. From now on it will be sum of roomData's prices. You can still send this (not a breaking change) but it will be ignored. |
currency | string Currency (ISO 4217 alphabetic code)
The following values are permitted: |
reservationType | string Default: "PAID" Reservation will be created paid or unpaid The following values are permitted: |
facilityId required | string Global ID of facility |
roomData required | Array of objects |
Successful operation
Bad request
Staging server.
Production server.
{- "name": "John",
- "email": "john@yahoo.com",
- "phone": "+421948762315",
- "dateFrom": "2018-06-29",
- "dateTo": "2018-06-29",
- "guestCount": 2,
- "locale": "sk",
- "additionalNote": "Some deal data",
- "totalPrice": 0,
- "currency": "EUR",
- "reservationType": "UNPAID",
- "facilityId": "abc123",
- "roomData": [
- {
- "roomTypeId": 13,
- "packageId": 2,
- "price": 200,
- "guests": 2,
- "adults": { },
- "children": [
- {
- "age": 10,
- "childBed": true,
- "noBed": false
}
], - "accessories": [
- {
- "packageAccessoryId": 10,
- "id": 233,
- "price": 100,
- "count": 2
}
]
}
]
}
{- "result": {
- "success": true,
- "data": {
- "reservationId": 3423
}
}
}
Returns a reservation by ID if the origin of the reservation is from token's channel.
reservationId | number <int64> Example: 123 Unique identifier |
Successful operation
Bad request
Staging server.
Production server.
{- "result": {
- "success": true,
- "data": {
- "dateFrom": "2018-06-29",
- "dateTo": "2018-06-29",
- "name": "John Audrey",
- "email": "alias@example.com",
- "phone": "+421944888777",
- "number": "a2se8w",
- "hash": "08ab382e-1162-4d35-8c5b-ab1064b1afc7",
- "facility": {
- "name": "string",
- "gid": "abc123"
}, - "created": "2018-06-29T12:00:00",
- "note": "string",
- "status": "RESERVED",
- "items": [
- {
- "name": "Double room",
- "description": "Full-featured amazing room.",
- "package": {
- "name": "Wellness package.",
- "description": "Great wellness accomodation in our hotel with welcome drink...",
- "includedAccessories": [
- {
- "name": "Breakfast",
- "count": 1
}
]
}, - "accessories": [
- {
- "name": "Breakfast",
- "count": 1
}
]
}
]
}
}
}
Mark reservation as paid
reservationId required | number Example: 3254 Bookio reservation ID. |
Successful operation
Bad request
Staging server.
Production server.
{- "result": {
- "success": true
}
}
Cancel reservation
reservationId required | number Example: 3254 Bookio reservation ID. |
JSON optional body
reason | string Reason of cancellation which is propagated to cancellation email |
Successful operation
Bad request
Staging server.
Production server.
{- "reason": "Sorry we must close our hotel at your reserved duration."
}
{- "result": {
- "success": true,
- "data": {
- "reservationId": 3423,
- "status": "cancelled"
}
}
}
List room types for specified facility
facilityId required | string Example: facilityId=abc123 facility's global ID / or internal id |
Successful operation
Bad request
Staging server.
Production server.
{- "result": {
- "success": true,
- "data": [
- {
- "id": 123,
- "name": "Apartman",
- "note": "Room type is situated in the back of the building",
- "amenities": [
- "WC"
], - "beds": 2,
- "extraBeds": 1,
- "allBeds": 3,
- "childBeds": 0,
- "count": 10,
- "includedMeal": "No board",
}
]
}
}
Gets availability of hotel items (room types, packages)
gid required | string Example: gid=abc123 facility's global ID |
dateCheckIn | string <date> Example: dateCheckIn=2019-09-01 ISO8601 date (RFC 3339 full-date format). Check in date. Needed to give the availability of rooms and packages. |
dateCheckOut | string <date> Example: dateCheckOut=2019-09-06 ISO8601 date (RFC 3339 full-date format). Check out date. Needed to give the availability of rooms and packages. |
Successful operation
Bad request
Staging server.
Production server.
{- "result": {
- "success": true,
- "data": {
- "currency": "EUR",
- "roomTypes": [
- {
- "id": 123,
- "name": "Apartman",
- "note": "Room type is situated in the back of the building",
- "amenities": [
- "WC"
], - "beds": 2,
- "extraBeds": 1,
- "allBeds": 3,
- "count": 10,
- "includedMeal": "No board",
- "available": 4,
- "priceFrom": 40
}
], - "packages": [
- {
- "id": 123,
- "name": "Wellness package",
- "note": "Lorem ipsum dolores",
- "shortDescription": "Lorem ipsum dolores",
- "validFrom": "2018-06-29",
- "validTo": "2018-06-29",
- "reservationFrom": "2018-06-29",
- "reservationTo": "2018-06-29",
- "prices": {
- "1": {
- "2": {
- "price": 800
}, - "4": {
- "price": 2400
}
}
}, - "guestCount": 2,
- "allowedNights": [
- 2
], - "includedAccessoriesByNights": {
- "2": {
- "name": "Half-board",
- "count": 2
}, - "4": {
- "name": "Wellness",
- "count": 2
}
}, - "roomTypes": [
- 4
], - "upsaleAccessories": [
- {
- "packageAccessoryId": 123,
- "itemId": 456,
- "name": "Full-board",
- "price": 20
}
], - "reservationWeekDays": [
- 1
]
}
]
}
}
}
Gets rates of hotel items (room types, packages)
gid required | string Example: gid=abc123 facility's global ID |
dateCheckIn | string <date> Example: dateCheckIn=2019-09-01 ISO8601 date (RFC 3339 full-date format). Check in date. Needed to give the availability of rooms and packages. |
dateCheckOut | string <date> Example: dateCheckOut=2019-09-06 ISO8601 date (RFC 3339 full-date format). Check out date. Needed to give the availability of rooms and packages. |
JSON body
roomTypes | Array of objects Room types you want the rates to be checked. |
packages | Array of objects Packages you want the rates to be checked. |
Successful operation
Bad request
Staging server.
Production server.
{- "roomTypes": [
- {
- "id": null,
- "adults": 2,
- "children": [
- {
- "age": 10,
- "childBed": true,
- "noBed": false
}
]
}
], - "packages": [
- {
- "id": null,
- "roomTypeId": 2,
- "guestCount": 2
}
]
}
{- "result": {
- "success": true,
- "data": {
- "currency": "EUR",
- "roomTypes": [
- {
- "id": 123,
- "price": 400
}
], - "packages": [
- {
- "id": 123,
- "price": 600
}
]
}
}
}
Gets children settings of the facility
gid required | string Example: gid=abc123 facility's global ID |
Successful operation
Bad request
Staging server.
Production server.
{- "result": {
- "success": true,
- "data": {
- "childBed": {
- "maxCount": 10,
- "maxAge": 4,
- "pricePerUnit": 15
}, - "categories": [
- {
- "ageFrom": 0,
- "ageTo": 2,
- "noExtraBed": true
}
]
}
}
}
Gets available accessories
gid required | string Example: gid=abc123 facility's global ID |
Successful operation
Bad request
Staging server.
Production server.
{- "result": {
- "success": true,
- "data": [
- {
- "id": 2222,
- "name": "Wellness",
- "validFrom": "2018-06-29",
- "validTo": "2018-06-29",
- "items": [
- {
- "id": 2222,
- "name": "Masaz 30 minut",
- "price": 30,
- "pricing": "PER_HOUR",
- "enabled": true,
- "active": true,
- "tax": 20
}
]
}
]
}
}
Check if API is up and running
API is up and running.
API is undergoing some technical difficulties.
API is down.
Staging server.
Production server.
Widget spec for implementing to external pages via iframe or as a direct link. Reservation source is automatically determined from the HTTP referrer.
channel required | string Unique string id of specified channel. |
facilityGid required | string Example: abc123 Unique id of specified facility you want to make reservation in. |
dateFrom | string <date> Example: dateFrom=2019-09-01 ISO8601 date (RFC 3339 full-date format). Autofills the check-in date. |
dateTo | string <date> Example: dateTo=2019-09-06 ISO8601 date (RFC 3339 full-date format). Autofills the check-out date. |
adults | integer Autofills the number of adults. |
children | integer Autofills the number of children. |
rurl | string A return url after successful payment. |
firstName | string Autofills first name of the reservee. |
lastName | string Autofills last name of the reservee. |
string Autofills email of the reservee. | |
phone | string Autofills phone of the reservee. |
calendarClosed | boolean Sets the default behaviour of calendar to be closed on load. |
css | string Example: css=https://mydomain.com/assets/mycustom.css Possibility to add custom css and customize the design of our widget to one's needs. The CSS is changed by overriding our classes with one's own. Our classes are not documented, so there is a need to look at the source. |
HTML content
Wrong GID, facility does not exist or is not active
Staging server.
Production server.