Bookio Medical Public API (1.0.4)

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

Facilities

List of facilities

Returns a list of CGM facilities.

Authorizations:

Responses

200

Successful operation

400

Bad request

get/facilities/cgm

Production server.

https://medic.bookio.com/public/api/v1/facilities/cgm

Response samples

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

Calendars

List of calendars

Looks for calendars in specified time

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

Specific date.

facilityId
number <int64>
Example: facilityId=123

ID of the specified facility.

Responses

200

Successful operation

400

Bad request

get/calendars

Production server.

https://medic.bookio.com/public/api/v1/calendars

Response samples

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

Create calendar

Creates calendar from requested data.

Authorizations:
Request Body schema: application/json

JSON body

facilityId
required
number <int64>

Unique identifier

name
required
string
note
required
string
validFrom
required
string <date>

Date (RFC 3339 full-date format)

validTo
required
string <date>

Date (RFC 3339 full-date format)

services
required
Array of objects
intervals
required
Array of objects

Responses

200

Successful operation

400

Bad request

post/calendars

Production server.

https://medic.bookio.com/public/api/v1/calendars

Request samples

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

Modify calendar

Creates calendar from requested data.

Authorizations:
path Parameters
calendarId
required
number
Example: 3254

Bookio calendar ID.

Request Body schema: application/json

JSON body

facilityId
required
number <int64>

Unique identifier

name
required
string
note
required
string
validFrom
required
string <date>

Date (RFC 3339 full-date format)

validTo
required
string <date>

Date (RFC 3339 full-date format)

services
required
Array of objects
intervals
required
Array of objects

Responses

200

Successful operation

400

Bad request

put/calendars/{calendarId}

Production server.

https://medic.bookio.com/public/api/v1/calendars/{calendarId}

Request samples

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

End Calendar

Ends specified calendar at specified date.

Authorizations:
path Parameters
calendarId
required
number
Example: 3254

Bookio calendar ID.

Request Body schema: application/json

JSON body

facilityId
number <int64>

Unique identifier

validTo
string <date>

Date (RFC 3339 full-date format)

Responses

200

Successful operation

400

Bad request

put/calendars/{calendarId}/end

Production server.

https://medic.bookio.com/public/api/v1/calendars/{calendarId}/end

Request samples

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

Response samples

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

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.

number
string
Example: number=a47b89

Bookio reservation number.

status
string
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>
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.

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

200

Successful operation

400

Bad request

get/reservations

Production server.

https://medic.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

surname
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)

locale
required
string <locale>

Locale (ISO 639-1 languages)

externalId
required
number <int64>

Unique identifier

serviceId
required
number <int64>

Unique identifier

note
string

Reservation note

facilityId
required
number <int64>

Unique identifier

Responses

200

Successful operation

400

Bad request

post/reservations

Production server.

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

Request samples

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

Change status of reservation

Change status of reservation

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

200

Successful operation

400

Bad request

put/reservations/{reservationId}/change-status

Production server.

https://medic.bookio.com/public/api/v1/reservations/{reservationId}/change-status

Request samples

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

Response samples

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

Change term of reservation

Change term of reservation

Authorizations:
path Parameters
reservationId
required
number
Example: 3254

Bookio reservation ID.

Request Body schema: application/json

JSON body

dateFrom
string <date>

Date (RFC 3339 full-date format)

dateTo
string <date> Nullable

Date (RFC 3339 full-date format)

Responses

200

Successful operation

400

Bad request

put/reservations/{reservationId}/change-term

Production server.

https://medic.bookio.com/public/api/v1/reservations/{reservationId}/change-term

Request samples

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

Response samples

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

Confirms sync of reservation

Confirms sync of reservation

Authorizations:
path Parameters
reservationId
required
number
Example: 3254

Bookio reservation ID.

Request Body schema: application/json

JSON body

externalId
number <int64>

Unique identifier

Responses

200

Successful operation

400

Bad request

put/reservations/{reservationId}/confirm-sync

Production server.

https://medic.bookio.com/public/api/v1/reservations/{reservationId}/confirm-sync

Request samples

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

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.

lastSync
number
Example: lastSync=1671109423478

The last timestamp with milliseconds when you synced your data.

Responses

200

Successful operation

400

Bad request

get/blocked-times

Production server.

https://medic.bookio.com/public/api/v1/blocked-times

Response samples

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

Create blocked time

Creates blocked time from requested data.

Authorizations:
Request Body schema: application/json

JSON body

dateFrom
required
string <date>

Date (RFC 3339 full-date format)

dateTo
required
string <date>

Date (RFC 3339 full-date format)

externalId
required
number <int64>

Unique identifier

note
required
string

Blocked time note

facilityId
required
number <int64>

Unique identifier

Responses

200

Successful operation

400

Bad request

post/blocked-times

Production server.

https://medic.bookio.com/public/api/v1/blocked-times

Request samples

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

Change term of blocked time

Change term of blocked time

Authorizations:
path Parameters
blockedTimeId
required
number
Example: 3254

Bookio blocked time ID.

Request Body schema: application/json

JSON body

dateFrom
string <date>

Date (RFC 3339 full-date format)

dateTo
string <date>

Date (RFC 3339 full-date format)

Responses

200

Successful operation

400

Bad request

put/blocked-times/{blockedTimeId}/change-term

Production server.

https://medic.bookio.com/public/api/v1/blocked-times/{blockedTimeId}/change-term

Request samples

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

Response samples

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

Remove blocked time

Remove blocked time

Authorizations:
path Parameters
blockedTimeId
required
number
Example: 3254

Bookio blocked time ID.

Responses

200

Successful operation

400

Bad request

delete/blocked-times/{blockedTimeId}

Production server.

https://medic.bookio.com/public/api/v1/blocked-times/{blockedTimeId}

Response samples

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