Bookio Travel Public API (1.2.0)

Download OpenAPI specification:Download

Introduction

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.

Authentication

Token based authentication. Access to bookio API with specific channel assigned to the token.

Bearer

Provided secret API token must be sent in Authorization request header:

    Authorization: Bearer <token>
Security Scheme Type API Key
Header parameter name: Authorization

Error codes

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

Language mutations

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".

Capacity

List of capacities

Returns capacities at specified interval

Authorizations:
query Parameters
dateFrom
required
string <date>
Example: dateFrom=2019-01-01

Date (RFC 3339 full-date format).

dateTo
required
string <date>
Example: dateTo=2019-08-01

Date (RFC 3339 full-date format).

rt
string
Example: rt=42

Room type ids (string or array)

facilityId
string
Example: facilityId=4adf5ds

facility's global ID / or internal id

Responses

200

Successful operation

get/capacity

Staging server.

https://test-accomodation.bookio.com/public/api/v1/capacity

Production server.

https://travel.bookio.com/public/api/v1/capacity

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Check free term

Checks if specified interval is free (also in PMS). Copies implementation of /create-reservation.

Authorizations:
Request Body schema: application/json

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)

  • if not specified, default currency is used

The following values are permitted: EUR, CZK, USD, GBP, HUF, PLN, CHF, DKK

reservationType
string
Default: "PAID"

Reservation will be created paid or unpaid

The following values are permitted: PAID, UNPAID

facilityId
required
string

Global ID of facility

roomData
required
Array of objects

Responses

200

Successful operation

400

Bad request

post/check-term

Staging server.

https://test-accomodation.bookio.com/public/api/v1/check-term

Production server.

https://travel.bookio.com/public/api/v1/check-term

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

List of facilities with capacities

Returns a list of facilities you have access to with their respective capacities

Authorizations:
query Parameters
dateCheckIn
required
string <date>
Example: dateCheckIn=2019-01-01

Check-in date (RFC 3339 full-date format).

dateCheckOut
required
string <date>
Example: dateCheckOut=2019-01-11

Check-out date (RFC 3339 full-date format).

Responses

200

Successful operation

get/check-facility-slot

Staging server.

https://test-accomodation.bookio.com/public/api/v1/check-facility-slot

Production server.

https://travel.bookio.com/public/api/v1/check-facility-slot

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Reservations

List of reservations

Returns a list reservations for your channel.

Authorizations:
query Parameters
email
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.

Responses

200

Successful operation

400

Bad request

get/reservations

Staging server.

https://test-accomodation.bookio.com/public/api/v1/reservations

Production server.

https://travel.bookio.com/public/api/v1/reservations

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Create reservation

Creates reservation from requested data.

Authorizations:
Request Body schema: application/json

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)

  • if not specified, default currency is used

The following values are permitted: EUR, CZK, USD, GBP, HUF, PLN, CHF, DKK

reservationType
string
Default: "PAID"

Reservation will be created paid or unpaid

The following values are permitted: PAID, UNPAID

facilityId
required
string

Global ID of facility

roomData
required
Array of objects

Responses

200

Successful operation

400

Bad request

post/reservations

Staging server.

https://test-accomodation.bookio.com/public/api/v1/reservations

Production server.

https://travel.bookio.com/public/api/v1/reservations

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "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":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Show reservation by ID

Returns a reservation by ID if the origin of the reservation is from token's channel.

Authorizations:
path Parameters
reservationId
number <int64>
Example: 123

Unique identifier

Responses

200

Successful operation

400

Bad request

get/reservations/${reservationId}

Staging server.

https://test-accomodation.bookio.com/public/api/v1/reservations/${reservationId}

Production server.

https://travel.bookio.com/public/api/v1/reservations/${reservationId}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Mark reservation as paid

Mark reservation as paid

Authorizations:
path Parameters
reservationId
required
number
Example: 3254

Bookio reservation ID.

Responses

200

Successful operation

400

Bad request

put/reservations/{reservationId}/pay

Staging server.

https://test-accomodation.bookio.com/public/api/v1/reservations/{reservationId}/pay

Production server.

https://travel.bookio.com/public/api/v1/reservations/{reservationId}/pay

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Cancel reservation

Cancel reservation

Authorizations:
path Parameters
reservationId
required
number
Example: 3254

Bookio reservation ID.

Request Body schema: application/json

JSON optional body

reason
string

Reason of cancellation which is propagated to cancellation email

Responses

200

Successful operation

400

Bad request

put/reservations/{reservationId}/cancel

Staging server.

https://test-accomodation.bookio.com/public/api/v1/reservations/{reservationId}/cancel

Production server.

https://travel.bookio.com/public/api/v1/reservations/{reservationId}/cancel

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "reason": "Sorry we must close our hotel at your reserved duration."
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Room Types

List room types for specified facility

List room types for specified facility

Authorizations:
query Parameters
facilityId
required
string
Example: facilityId=abc123

facility's global ID / or internal id

Responses

200

Successful operation

400

Bad request

get/room-types

Staging server.

https://test-accomodation.bookio.com/public/api/v1/room-types

Production server.

https://travel.bookio.com/public/api/v1/room-types

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Availability & Rates

Get availability

Gets availability of hotel items (room types, packages)

Authorizations:
query Parameters
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.

Responses

200

Successful operation

400

Bad request

get/availability

Staging server.

https://test-accomodation.bookio.com/public/api/v1/availability

Production server.

https://travel.bookio.com/public/api/v1/availability

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Get rates

Gets rates of hotel items (room types, packages)

Authorizations:
query Parameters
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.

Request Body schema: application/json

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.

Responses

200

Successful operation

400

Bad request

post/rates

Staging server.

https://test-accomodation.bookio.com/public/api/v1/rates

Production server.

https://travel.bookio.com/public/api/v1/rates

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "roomTypes":
    [
    ],
  • "packages":
    [
    ]
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Get children settings

Gets children settings of the facility

Authorizations:
query Parameters
gid
required
string
Example: gid=abc123

facility's global ID

Responses

200

Successful operation

400

Bad request

get/children-settings

Staging server.

https://test-accomodation.bookio.com/public/api/v1/children-settings

Production server.

https://travel.bookio.com/public/api/v1/children-settings

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Accessories

Gets available accessories

Authorizations:
query Parameters
gid
required
string
Example: gid=abc123

facility's global ID

Responses

200

Successful operation

400

Bad request

get/accessories

Staging server.

https://test-accomodation.bookio.com/public/api/v1/accessories

Production server.

https://travel.bookio.com/public/api/v1/accessories

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "result":
    {
    }
}

Utils

Check if API is up and running

Check if API is up and running

Responses

204

API is up and running.

500

API is undergoing some technical difficulties.

502

API is down.

get/check

Staging server.

https://test-accomodation.bookio.com/public/api/v1/check

Production server.

https://travel.bookio.com/public/api/v1/check

Widget

Reservation widget page

Widget spec for implementing to external pages via iframe or as a direct link. Reservation source is automatically determined from the HTTP referrer.

path Parameters
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.

query Parameters
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.

email
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.

Responses

200

HTML content

404

Wrong GID, facility does not exist or is not active

get/{channel}/widget/{facilityGid}

Staging server.

https://test-accomodation.bookio.com/public/api/v1/{channel}/widget/{facilityGid}

Production server.

https://travel.bookio.com/public/api/v1/{channel}/widget/{facilityGid}