Bookio Medical Public API (1.0.4)

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

Facilities

List of facilities

Returns a list of CGM facilities.

Authorizations:
Bearer

Responses

Response samples

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

Calendars

List of calendars

Looks for calendars in specified time

Authorizations:
Bearer
query Parameters
date
string <date> (Date)
Example: date=2018-06-29

Specific date.

facilityId
number <int64> (Id)
Example: facilityId=123

ID of the specified facility.

Responses

Response samples

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

Create calendar

Creates calendar from requested data.

Authorizations:
Bearer
Request Body schema: application/json
required

JSON body

facilityId
required
number <int64> (Id)

Unique identifier

name
required
string
note
required
string
validFrom
required
string <date> (DateTime)

Date (RFC 3339 full-date format)

validTo
required
string <date> (DateTime)

Date (RFC 3339 full-date format)

required
Array of objects
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "facilityId": 123,
  • "name": "Hello there",
  • "note": "Hello there",
  • "validFrom": "2018-06-29T12:00:00",
  • "validTo": "2018-06-29T12:00:00",
  • "services": [
    ],
  • "intervals": [
    ]
}

Response samples

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

Modify calendar

Creates calendar from requested data.

Authorizations:
Bearer
path Parameters
calendarId
required
number
Example: 3254

Bookio calendar ID.

Request Body schema: application/json
required

JSON body

facilityId
required
number <int64> (Id)

Unique identifier

name
required
string
note
required
string
validFrom
required
string <date> (DateTime)

Date (RFC 3339 full-date format)

validTo
required
string <date> (DateTime)

Date (RFC 3339 full-date format)

required
Array of objects
required
Array of objects

Responses

Request samples

Content type
application/json
{
  • "facilityId": 123,
  • "name": "Hello there",
  • "note": "Hello there",
  • "validFrom": "2018-06-29T12:00:00",
  • "validTo": "2018-06-29T12:00:00",
  • "services": [
    ],
  • "intervals": [
    ]
}

Response samples

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

End Calendar

Ends specified calendar at specified date.

Authorizations:
Bearer
path Parameters
calendarId
required
number
Example: 3254

Bookio calendar ID.

Request Body schema: application/json
required

JSON body

facilityId
number <int64> (Id)

Unique identifier

validTo
string <date> (DateTime)

Date (RFC 3339 full-date format)

Responses

Request samples

Content type
application/json
{
  • "facilityId": 123,
  • "validTo": "2018-06-29T12:00:00"
}

Response samples

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

Reservations

List of reservations

Returns a list of reservations by filter.

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

Email of the reservee.

number
string (ReservationNumber)
Example: number=a47b89

Bookio reservation number.

status
string (MedicReservationStatus)
Enum: "CONFIRMED" "CANCELLED" "DID_NOT_COME"
Example: status=CANCELLED

Reservation status.

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> (Id)
Example: facilityId=123

ID of the specified facility.

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

Look for reservation beginning this date.

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

Look for reservation ending this date.

onlyUnsynced
boolean
Example: onlyUnsynced=true

Show only unsynced reservations in the final result.

lastSync
number
Example: lastSync=1671109423478

The last timestamp with milliseconds when you synced your data.

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

surname
required
string (CustomerName)

Customer's name

email
required
string (CustomerEmail)

Customer's email

phone
required
string (CustomerPhone)

Customer's phone

dateFrom
required
string <date> (DateTime)

Date (RFC 3339 full-date format)

locale
required
string <locale> (Locale)

Locale (ISO 639-1 languages)

externalId
required
number <int64> (Id)

Unique identifier

serviceId
required
number <int64> (Id)

Unique identifier

note
string

Reservation note

facilityId
required
number <int64> (Id)

Unique identifier

Responses

Request samples

Content type
application/json
{
  • "name": "John",
  • "surname": "John",
  • "email": "john@yahoo.com",
  • "phone": "+421948762315",
  • "dateFrom": "2018-06-29T12:00:00",
  • "locale": "sk",
  • "externalId": 123,
  • "serviceId": 123,
  • "note": "Something to notify about.",
  • "facilityId": 123
}

Response samples

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

Change status of reservation

Change status of reservation

Authorizations:
Bearer
path Parameters
reservationId
required
number
Example: 3254

Bookio reservation ID.

Request Body schema: application/json

JSON body

status
string
Enum: "CONFIRMED" "CANCELLED" "DID_NOT_COME"

Status of the reservation

cancellationReason
string

Reason of cancellation which is propagated to cancellation email

Responses

Request samples

Content type
application/json
{
  • "status": "CANCELLED",
  • "cancellationReason": "Cant make it."
}

Response samples

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

Change term of reservation

Change term of reservation

Authorizations:
Bearer
path Parameters
reservationId
required
number
Example: 3254

Bookio reservation ID.

Request Body schema: application/json

JSON body

dateFrom
string <date> (DateTime)

Date (RFC 3339 full-date format)

dateTo
string or null <date> (DateTimeNotRequired)

Date (RFC 3339 full-date format)

Responses

Request samples

Content type
application/json
{
  • "dateFrom": "2018-06-29T12:00:00",
  • "dateTo": "2018-06-29T12:00:00"
}

Response samples

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

Confirms sync of reservation

Confirms sync of reservation

Authorizations:
Bearer
path Parameters
reservationId
required
number
Example: 3254

Bookio reservation ID.

Request Body schema: application/json

JSON body

externalId
number <int64> (Id)

Unique identifier

Responses

Request samples

Content type
application/json
{
  • "externalId": 123
}

Response samples

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

Blocked Times

List of blocked times

Returns a list of reservations by filter.

Authorizations:
Bearer
query Parameters
dateFrom
string <date> (Date)
Example: dateFrom=2018-06-29

Date from.

dateTo
string <date> (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> (Id)
Example: facilityId=123

ID of the specified facility.

lastSync
number
Example: lastSync=1671109423478

The last timestamp with milliseconds when you synced your data.

Responses

Response samples

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

Create blocked time

Creates blocked time from requested data.

Authorizations:
Bearer
Request Body schema: application/json
required

JSON body

dateFrom
required
string <date> (DateTime)

Date (RFC 3339 full-date format)

dateTo
required
string <date> (DateTime)

Date (RFC 3339 full-date format)

externalId
required
number <int64> (Id)

Unique identifier

note
required
string

Blocked time note

facilityId
required
number <int64> (Id)

Unique identifier

Responses

Request samples

Content type
application/json
{
  • "dateFrom": "2018-06-29T12:00:00",
  • "dateTo": "2018-06-29T12:00:00",
  • "externalId": 123,
  • "note": "A note.",
  • "facilityId": 123
}

Response samples

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

Change term of blocked time

Change term of blocked time

Authorizations:
Bearer
path Parameters
blockedTimeId
required
number
Example: 3254

Bookio blocked time ID.

Request Body schema: application/json

JSON body

dateFrom
string <date> (DateTime)

Date (RFC 3339 full-date format)

dateTo
string <date> (DateTime)

Date (RFC 3339 full-date format)

Responses

Request samples

Content type
application/json
{
  • "dateFrom": "2018-06-29T12:00:00",
  • "dateTo": "2018-06-29T12:00:00"
}

Response samples

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

Remove blocked time

Remove blocked time

Authorizations:
Bearer
path Parameters
blockedTimeId
required
number
Example: 3254

Bookio blocked time ID.

Responses

Response samples

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