Bookio Services Public API (1.0.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
12 Resource not found.
20 Invalid token or missing access rights
30 There is no capacity left
40 Duplicate reservation
403 You don't have enough permissions to access this endpoint
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".

Reservations

List of reservations

Returns a list of reservations by filter.

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

Email of the reservee.

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.

facilityId
number <int64>
Example: facilityId=123

ID of the specified facility.

from
string <date>
Example: from=2018-06-29

Look for reservation beginning this date.

to
string <date>
Example: to=2018-06-29

Look for reservation ending this date.

Responses

200

Successful operation

400

Bad request

get/reservations

Production server.

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

Staging server.

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

Response samples

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

Course Reservations

List of reservations

Returns a list of reservations by filter.

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

Email of the reservee.

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.

facilityId
number <int64>
Example: facilityId=123

ID of the specified facility.

Responses

200

Successful operation

400

Bad request

get/course-reservations

Production server.

https://services.bookio.com/public/api/v1/course-reservations

Staging server.

https://staging.bookio.com/public/api/v1/course-reservations

Response samples

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

Blocked Times

List of blocked times

Returns a list of reservations by filter.

Authorizations:
query Parameters
dateFrom
string <date>
Example: dateFrom=2018-06-29

Date from.

dateTo
string <date>
Example: dateTo=2018-06-29

Date to.

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.

facilityId
number <int64>
Example: facilityId=123

ID of the specified facility.

Responses

200

Successful operation

400

Bad request

get/blocked-time

Production server.

https://services.bookio.com/public/api/v1/blocked-time

Staging server.

https://staging.bookio.com/public/api/v1/blocked-time

Response samples

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

Facility

Get active facility ids

Returns active facility ids.

Authorizations:

Responses

200

Successful operation

400

Bad request

get/facility/list-ids

Production server.

https://services.bookio.com/public/api/v1/facility/list-ids

Staging server.

https://staging.bookio.com/public/api/v1/facility/list-ids

Response samples

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

Get facility info

Returns information about facility.

Authorizations:

Responses

200

Successful operation

400

Bad request

get/facility/{facilityId}/info

Production server.

https://services.bookio.com/public/api/v1/facility/{facilityId}/info

Staging server.

https://staging.bookio.com/public/api/v1/facility/{facilityId}/info

Response samples

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

Get workers

Returns workers of specified facility.

Authorizations:

Responses

200

Successful operation

400

Bad request

get/facility/{facilityId}/workers

Production server.

https://services.bookio.com/public/api/v1/facility/{facilityId}/workers

Staging server.

https://staging.bookio.com/public/api/v1/facility/{facilityId}/workers

Response samples

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

Get services

Returns services of specified facility.

Authorizations:

Responses

200

Successful operation

400

Bad request

get/facility/{facilityId}/services

Production server.

https://services.bookio.com/public/api/v1/facility/{facilityId}/services

Staging server.

https://staging.bookio.com/public/api/v1/facility/{facilityId}/services

Response samples

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

WebHooks

Webhook is setup to point to one API url. Operations are distinguished by type field. We are using only POST http request.

Based on the `type` field the structure of the Json will change.

Webhook is always sending an array of json objects. You can get more than 1 change at the same time. All these changes contains type field. They are sent chronologically in the array as they go.

All webhooks have maximum of 5 attempts (timeout, your api is down, etc ...).

Further you can find basic structure of the webhook and afterwards only the objects which will be sent within the basic webhook array.