Methods

Reservations

Get Reservations

GET https://yourdomain.com/apibaseurl/reservations/get/

Get reservation entries.

Query Parameters

Name
Type
Description

past

Boolean

If TRUE, returned entries will include past reservations. Default is FALSE.

providers

String

Comma-separated Provider IDs.

services

String

Comma-separated Service IDs.

customers

String

Comma-separated Customer IDs.

status

String

Status of the requsted reservations. Possible values are "pending", "confirmed", "cancelled".

full

Boolean

If TRUE, returned entries will include all the metadata. Default is FALSE.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer)

{
    "response": [
      {
        "id" : "r_MP4WdkOw32TSain2tjORQFD3KPikzWTp",
        "db_id" :  "13",
        "serviceId" : "s_AO4WdkOw32XSyrn2tjORQFD4KPikzWTK",
        "providerId" : 3
        "customerId" : "c_AO4WdkOw32XSyrn2tjORQFD4KPikzWTK",
        "start" : 1567949246
        "end" : 1567949564,
        "status" : "confirmed",
        "created" : 1567949246
      },
      {
        "id" : "r_MP4WdkOw32TSain2tjORQFD3KPikzWTp",
        "db_id" :  "15",
        "serviceId" : "s_AO4WdkOw32XSyrn2tjORQFD4KPikzWTK",
        "providerId" : 2
        "customerId" : "c_AO4WdkOw32XSyrn2tjORQFD4KPikzWTK",
        "start" : 1567949246
        "end" : 1567949564,
        "status" : "cancelled",
        "created" : 1567949246
      },
      ...
    ]
}

Add Reservation

POST https://yourdomain.com/apibaseurl/reservations/add/

This endpoint allows you to create a reservation.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations.

Request Body

Name
Type
Description

reservation*

Object

The reservation object that needs to be created.

Edit reservation

POST https://yourdomain.com/apibaseurl/reservations/edit/

This endpoint allows you to edit a reservation entry.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations.

Request Body

Name
Type
Description

reservation*

Object

The edited reservation object (can be partial, but it must contain the ID at least, otherwise an error is returned).

Remove reservation

POST https://yourdomain.com/apibaseurl/reservations/remove/

This endpoint allows you to remove a reservation from the database. The operation won't trigger any event down the line. An error is returned if the reservation is confirmed or pending. If you need to remove a database record of a reservation which is confirmed or pending, edit it first.

Query Parameters

Name
Type
Description

id*

String

ID of the reservation that needs to be deleted.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations, otherwise an error is returned.

Services

Get Services

GET https://yourdomain.com/apibaseurl/services/get/

This endpoint allows you to get service entries.

Query Parameters

Name
Type
Description

full

Boolean

If TRUE, the entries will include all the metadata. Default is FALSE.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer)

{
    "entries" : [
        {
            "type" : "service",
            "id" : "music-class",
            "name" : "Music Class",
            "color" : "#81D742",
            "class" : "appointment",
            "description" : "Violin music class",
            "isActive" : true,
            "bookable" : "everyone",
            "location" : {
                "setting" : "fixed",
                "address" : "Empire State Building, 5th Avenue, New York"
            },
            "redirectURL" : "http://www.hello.com",
            "notificationEmailAdmin": {
                "send" : true,
                "address" : "admin@example.com",
                "subject" : "Just got a new reservation",
                "body" : "<p>e-mail message body</p>"
            },
            "notificationEmailCustomer": {
                "send" : true,
                "subject" : "Just got a new reservation",
                "body" : "<p>e-mail message body</p>"
            },
            "reminderEmail": {
                "send" : false,
                "subject" : "Don't forget your reservation",
                "body" : "We are getting close!"
            },
            "cancellationByCustomer" : {
                "allow" : false
            }
            "payments" : {
                "fares" : {
                    "normal" : {
                        "name" : "Regular fare",
                        "desc" : "Regular fare",
                        "price" : 10
                    },
                    "fare_1" : {
                        "name" : "Super fare",
                        "desc" : "Super fare",
                        "price" : 14
                    }
                },
                "required" : "immediately"
            },
            "approval": {
                "requireFrom" : "admin",
                "keepFreeUntilApproval": false
            }
        }
    ]
}

Add Service

POST https://yourdomain.com/apibaseurl/services/add/

This endpoint allows you to create a service.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations.

Request Body

Name
Type
Description

service*

Object

The service object that needs to be created.

Edit service

POST https://yourdomain.com/apibaseurl/services/edit/

This endpoint allows you to edit a service entry.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations.

Request Body

Name
Type
Description

service*

Object

The edited service object (can be partial, but it must contain the ID at least, otherwise an error is returned).

Remove service

POST https://yourdomain.com/apibaseurl/services/remove/

This endpoint allows you to remove a service from the database. An error is returned if there are reservations in place for the service.

Query Parameters

Name
Type
Description

id*

String

ID of the service that needs to be deleted.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations, otherwise an error is returned.

Providers

Get Providers

GET https://yourdomain.com/apibaseurl/providers/get/

This endpoint allows you to get providers entries.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer)

{
    "entries" : [
        {
            "type" : "service",
            "id" : "music-class",
            "name" : "Music Class",
            "color" : "#81D742",
            "class" : "appointment",
            "description" : "Violin music class",
            "isActive" : true,
            "bookable" : "everyone",
            "location" : {
                "setting" : "fixed",
                "address" : "Empire State Building, 5th Avenue, New York"
            },
            "redirectURL" : "http://www.hello.com",
            "notificationEmailAdmin": {
                "send" : true,
                "address" : "admin@example.com",
                "subject" : "Just got a new reservation",
                "body" : "<p>e-mail message body</p>"
            },
            "notificationEmailCustomer": {
                "send" : true,
                "subject" : "Just got a new reservation",
                "body" : "<p>e-mail message body</p>"
            },
            "reminderEmail": {
                "send" : false,
                "subject" : "Don't forget your reservation",
                "body" : "We are getting close!"
            },
            "cancellationByCustomer" : {
                "allow" : false
            }
            "payments" : {
                "fares" : {
                    "normal" : {
                        "name" : "Regular fare",
                        "desc" : "Regular fare",
                        "price" : 10
                    },
                    "fare_1" : {
                        "name" : "Super fare",
                        "desc" : "Super fare",
                        "price" : 14
                    }
                },
                "required" : "immediately"
            },
            "approval": {
                "requireFrom" : "admin",
                "keepFreeUntilApproval": false
            }
        }
    ]
}

Edit Provider

POST https://yourdomain.com/apibaseurl/providers/edit/

This endpoint allows you to edit a provider entry.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations.

Request Body

Name
Type
Description

provider*

Object

The edited provider object (can be partial, but it must contain the ID at least, otherwise an error is returned).

Edit Provider Service settings

POST https://yourdomain.com/apibaseurl/providers/edit/service/

This endpoint allows you to edit provider service settings.

Query Parameters

Name
Type
Description

serviceId*

String

The ID of the service

providerId

String

The ID of the provider

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations.

Request Body

Name
Type
Description

settings*

Object

The edited provider service settings object (can be partial).

Customers

Get Customers

GET https://yourdomain.com/apibaseurl/customers/get/

This endpoint allows you to get customers entries.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer)

{
    "entries" : [
        {
            "type" : "service",
            "id" : "music-class",
            "name" : "Music Class",
            "color" : "#81D742",
            "class" : "appointment",
            "description" : "Violin music class",
            "isActive" : true,
            "bookable" : "everyone",
            "location" : {
                "setting" : "fixed",
                "address" : "Empire State Building, 5th Avenue, New York"
            },
            "redirectURL" : "http://www.hello.com",
            "notificationEmailAdmin": {
                "send" : true,
                "address" : "admin@example.com",
                "subject" : "Just got a new reservation",
                "body" : "<p>e-mail message body</p>"
            },
            "notificationEmailCustomer": {
                "send" : true,
                "subject" : "Just got a new reservation",
                "body" : "<p>e-mail message body</p>"
            },
            "reminderEmail": {
                "send" : false,
                "subject" : "Don't forget your reservation",
                "body" : "We are getting close!"
            },
            "cancellationByCustomer" : {
                "allow" : false
            }
            "payments" : {
                "fares" : {
                    "normal" : {
                        "name" : "Regular fare",
                        "desc" : "Regular fare",
                        "price" : 10
                    },
                    "fare_1" : {
                        "name" : "Super fare",
                        "desc" : "Super fare",
                        "price" : 14
                    }
                },
                "required" : "immediately"
            },
            "approval": {
                "requireFrom" : "admin",
                "keepFreeUntilApproval": false
            }
        }
    ]
}

Add Customer

POST https://yourdomain.com/apibaseurl/customers/add/

This endpoint allows you to create a customer.

Query Parameters

Name
Type
Description

createUser

Boolean

If TRUE, a WordPress user will be created as well. Default is FALSE.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations.

Request Body

Name
Type
Description

customer*

Object

The customer object that needs to be created.

{
    "id": "c_XXXXXXXXXXX"
}

Edit Customer

POST https://yourdomain.com/apibaseurl/customer/edit/

This endpoint allows you to edit a customer entry.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations.

Request Body

Name
Type
Description

customer*

Object

The edited customer object (can be partial, but it must contain the ID at least, otherwise an error is returned).

Remove Customer

POST https://yourdomain.com/apibaseurl/customers/remove/

This endpoint allows you to remove a customer from the database. An error is returned if there are reservations in place for the customer.

Query Parameters

Name
Type
Description

id*

String

ID of the customer that needs to be deleted.

Headers

Name
Type
Description

Authentication*

String

Authentication token (Bearer). It must allow write operations.

Availability

Get Availability

GET https://yourdomain.com/apibaseurl/availability/get/

This endpoint allows you to get timeslot entries (services of Unscheduled type are excluded).

Query Parameters

Name
Type
Description

max_timestamp*

Int

Unix time. The returned set will contain only timeslots that end before this time.

min_timestamp*

Int

Unix time. The returned set will contain only timeslots that start after this time.

services

String

Comma-separated Service IDs.

providers

String

Comma-separated Provider IDs.

Headers

Name
Type
Description

Authentication*

string

Authentication token (Bearer)

"entries" : [
    {
            "serviceId": "music-class",
            "start": 1568253600,
            "end": 1568257200,
            "providerId": 1,
            "isFull": false,
            "isAllday": false,
            "location": "Empire State Building, 5th Avenue, New York",
            "timezone": "America/New_York",
            "fares": {
                "normal": 10,
                "fare_1": 14
            },
            "max_tickets": 6,
            "bookableUntil": 1568250000,
            "readOnly": false,
            "paddingAfter": 0
        }
]

Last updated