Bookio Travel Public API (1.2.0)

Download OpenAPI specification:

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:
Bearer
query Parameters
dateFrom
required
string <date> (Date)
Example: dateFrom=2019-01-01

Date (RFC 3339 full-date format).

dateTo
required
string <date> (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 (Gid)
Example: facilityId=4adf5ds

facility's global ID / or internal id

Responses

Response samples

Content type
application/json
{
  • "result": {
    }
}

Check free term

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

Authorizations:
Bearer
Request Body schema: application/json
required

JSON body

name
required
string (CustomerName)

Customer's name

email
required
string (CustomerEmail)

Customer's email

phone
required
string (CustomerPhone)

Customer's phone

dateFrom
required
string <date> (Date)

Date (RFC 3339 full-date format)

dateTo
required
string <date> (Date)

Date (RFC 3339 full-date format)

guestCount
number (Count)
locale
required
string <locale> (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)

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 (Gid)

Global ID of facility

required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "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
{
  • "result": {
    }
}

List of facilities with capacities

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

Authorizations:
Bearer
query Parameters
dateCheckIn
required
string <date> (Date)
Example: dateCheckIn=2019-01-01

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

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

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

Responses

Response samples

Content type
application/json
{
  • "result": {
    }
}

Reservations

List of reservations

Returns a list reservations for your channel.

Authorizations:
Bearer
query Parameters
email
string
Example: email=test@bookio.com

Email of the reservee.

number
string (ReservationNumber)
Example: number=a47b89

Bookio reservation number.

hash
string (ReservationHash)
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

Response samples

Content type
application/json
{
  • "result": {
    }
}

Create reservation

Creates reservation from requested data.

Authorizations:
Bearer
Request Body schema: application/json
required

JSON body

name
required
string (CustomerName)

Customer's name

email
required
string (CustomerEmail)

Customer's email

phone
required
string (CustomerPhone)

Customer's phone

dateFrom
required
string <date> (Date)

Date (RFC 3339 full-date format)

dateTo
required
string <date> (Date)

Date (RFC 3339 full-date format)

guestCount
number (Count)
locale
required
string <locale> (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)

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 (Gid)

Global ID of facility

required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "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
{
  • "result": {
    }
}

Show reservation by ID

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

Authorizations:
Bearer
path Parameters
reservationId
number <int64> (Id)
Example: 123

Unique identifier

Responses

Response samples

Content type
application/json
{
  • "result": {
    }
}

Mark reservation as paid

Mark reservation as paid

Authorizations:
Bearer
path Parameters
reservationId
required
number
Example: 3254

Bookio reservation ID.

Responses

Response samples

Content type
application/json
{
  • "result": {
    }
}

Cancel reservation

Cancel reservation

Authorizations:
Bearer
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

Request samples

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

Response samples

Content type
application/json
{
  • "result": {
    }
}

Room Types

List room types for specified facility

List room types for specified facility

Authorizations:
Bearer
query Parameters
facilityId
required
string (Gid)
Example: facilityId=abc123

facility's global ID / or internal id

Responses

Response samples

Content type
application/json
{
  • "result": {
    }
}

Availability & Rates

Get availability

Gets availability of hotel items (room types, packages)

Authorizations:
Bearer
query Parameters
gid
required
string (Gid)
Example: gid=abc123

facility's global ID

dateCheckIn
string <date> (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> (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

Response samples

Content type
application/json
{
  • "result": {
    }
}

Get rates

Gets rates of hotel items (room types, packages)

Authorizations:
Bearer
query Parameters
gid
required
string (Gid)
Example: gid=abc123

facility's global ID

dateCheckIn
string <date> (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> (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
required

JSON body

Array of objects

Room types you want the rates to be checked.

Array of objects

Packages you want the rates to be checked.

Responses

Request samples

Content type
application/json
{
  • "roomTypes": [
    ],
  • "packages": [
    ]
}

Response samples

Content type
application/json
{
  • "result": {
    }
}

Get children settings

Gets children settings of the facility

Authorizations:
Bearer
query Parameters
gid
required
string (Gid)
Example: gid=abc123

facility's global ID

Responses

Response samples

Content type
application/json
{
  • "result": {
    }
}

Accessories

Gets available accessories

Authorizations:
Bearer
query Parameters
gid
required
string (Gid)
Example: gid=abc123

facility's global ID

Responses

Response samples

Content type
application/json
{
  • "result": {
    }
}

Utils

Check if API is up and running

Check if API is up and running

Responses

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 (Gid)
Example: abc123

Unique id of specified facility you want to make reservation in.

query Parameters
dateFrom
string <date> (Date)
Example: dateFrom=2019-09-01

ISO8601 date (RFC 3339 full-date format). Autofills the check-in date.

dateTo
string <date> (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