Trybe (1.0.0)

Download OpenAPI specification:Download

License: MIT

This Document is the property of Five Nines Digital Ltd T/A Trybe. Classification – Public.

Introduction

This API is documented in OpenAPI format. The Trybe API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

You can download this OpenAPI specification and use the OpenAPI Generator to generate libraries in a supported language of your choice.

You will need to replace values in this documentation between hashes such as ##SiteId## with information provided to you. These values will be different per environment.

Cross-Origin Resource Sharing

This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with W3C spec. And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.

Authentication

Trybe offers different methods of authentication. Customers, guests and members can be authenticated using OpenID on top of OAuth2. Trybe users can be authenticated with a long lived personal access bearer token issued by the Trybe Account Management team.

You will have received your OAuth Client credentials for the authorization code flow used for SSO for both the playground and live environments. You should have also recieved a long lived personal access bearer token belonging to your user in the system. The personal access token will be used to manage Trybe resources.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.

BearerAuth

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

CookieAuth

Security Scheme Type API Key
Cookie parameter name: trybe_session

TrybeUser

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

Customer

Security Scheme Type OAuth2
authorizationCode OAuth Flow
Authorization URL: /oauth/authorize
Token URL: /oauth/token
Scopes:
  • openid -

    Provide access to your account details

  • profile -

    Allow access to basic information

  • email -

    Allow access to your email address

  • organisations -

    Allow access to your Trybe organisations

Pagination

All top-level API resources have support for bulk fetches via "list" API methods. For instance, you can list customers, and list membership types. These list API methods share a common structure, accepting the following 2 pagination parameters: page, per_page.

List endpoints will return meta and link information.

Meta

from
integer

The item number from which this results set starts from

to
integer

The item number from which this results set ends at

total
integer

The total number of results

current_page
integer

The current page number

last_page
integer

The page number of the last result set

per_page
integer

The number of results per page

path
string

The path of this api request

{}
first
string

The url of the first page for the paginated results set

next
string Nullable

The url of the next page for the paginated results set

prev
string Nullable

The url of the previous page for the paginated results set

last
string

The url of the last page for the paginated results set

Booking Frame

Booking frame

Use the booking frame to easily integrate Trybe into your existing booking flow.

With the booking frame, you can provide your guests with a smooth experience for booking treatments and packages without having to worry about the frontend.

Summary

The booking frame works in the following way:

  1. Creating a Booking Frame Session

    You make a request to our API to create a booking frame session, providing us with the date range and the number of guests.

    In the response, we'll generate you a URL.

  2. Present an iframe

    You present an iframe with the source as the generated URL.

  3. Guest uses booking frame

    The guest uses the Trybe booking frame to check availability, book treatments, and configure packages for their stay.

  4. Handle when the user is finished

    When the user has finished booking, they'll click a call to action within the booking frame which triggers a postMessage on the parent document.

  5. Submit the basket

    When you're ready, submit the basket to confirm the guest's choices.

  6. Record payment (optional)

    If you've captured a payment, make an additional request to our API to record this.

Authentication

To make requests to the API, you need to authenticate. There are two methods of authentication required for the different endpoints you'll be using:

  • booking-frame endpoints

    Pass a partner_id in the request to create your booking frame session. Get in touch with us to request a partner ID.

  • shop endpoints

    Generate an API key from the Developer settings page in Trybe and pass this as a Bearer token.

Base URL

When using the BookingFrameApi, the base URL of the API is specific to the site. You can see the URL for a site by heading to Shop Settings within Trybe.

Code samples

Use the following code samples for examples on how to integrate the booking frame into your application.

Creating a Booking Frame Session

Here's an example cURL request to create a booking frame session for 2 guests at Palm Tree Spa. The guests will be able to book treatments between 1st April 2023 to 3rd April 2023 inclusive. All treatments that are available for the given dates will be offered to the guest.

curl --request POST \
  --url https://palmtreespa.try.be/booking-frame/create \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
    "partner_id": "INSERT_YOUR_PARTNER_ID",
    "reservation_id": "12345",
    "date_from": "2023-04-01",
    "date_to": "2023-04-03",
    "num_guests": 2
}'

You can use the reservation_id to store your own reference against this booking frame session.

In the response, we'll send a JSON encoded url back. This is the URL to use to present an iframe to the user.

...
"url": "https:\/\/palmtreespa.try.be\/booking-frame\/6419a5ff5faebc72af0529a3",
...

Theming

The booking frame supports basic theming to create a consistent look and feel with your application.

We support customising the following values:

  • accent_color The accent colour is used as the background colour for some buttons and links.
  • accent_text_color The accent text colour is the text colour used for text placed over the accent colour background.

Send these values as a hex colour code under the theme property when creating a new booking frame session. Here's an example payload:

{
    "partner_id": "INSERT_YOUR_PARTNER_ID",
    "reservation_id": "12345",
    "date_from": "2023-04-01",
    "date_to": "2023-04-03",
    "num_guests": 2,
    "theme": {
      "accent_color": "#9999ff",
      "accent_text_color": "#ffffff"
    }
}

Only show specific treatments

If you want the user to only be able to pick from a specific range of treatments, you can pass the offering IDs when creating the booking frame session using the allowed_offering_ids field.

{
    "partner_id": "INSERT_YOUR_PARTNER_ID",
    "reservation_id": "12345",
    "date_from": "2023-04-01",
    "date_to": "2023-04-03",
    "num_guests": 2,
    "allowed_offering_ids": [
        "5e932c0901d210625e3a8766",
        "5e932c0901d210625e3a8767"
    ]
}

With the given payload, only two offerings will be available to choose from.

Similarly, you can use the disallowed_offering_ids field to exclude specific offerings.

{
    "partner_id": "INSERT_YOUR_PARTNER_ID",
    "reservation_id": "12345",
    "date_from": "2023-04-01",
    "date_to": "2023-04-03",
    "num_guests": 2,
    "disallowed_offering_ids": [
        "5e932c0901d210625e3a8766",
        "5e932c0901d210625e3a8767"
    ]
}

This payload will generate a booking frame session where the guest can choose from any offering except the ones specified.

Hiding prices

In some cases, you may not want the guest to see prices of the treatments; for example if the guest is buying an overnight package where the price includes one spa treatment.

To hide all the prices from the guest, use the hide_prices field.

{
    "partner_id": "INSERT_YOUR_PARTNER_ID",
    "reservation_id": "12345",
    "date_from": "2023-04-01",
    "date_to": "2023-04-03",
    "num_guests": 2,
    "hide_prices": true
}

Hiding prices for specific offerings

Sometimes you might want to offer the guest one or more specific treatments or packages within Trybe where the price is already included in your rate, but also give the guest flexibility to book more treatments at an additional cost.

For example, if the guest is booking a "Stay and Spa" rate in your application which includes a room and a specific treatment, but they are also free to book additional treatments on top of this.

With the included_offering_ids field, you can specify which offerings are "included", and should therefore display their price as zero on the booking frame. We'll display the value in the currency of the site, so if the site has GBP as the default currency, the price of the offering will display as "£0.00".

{
    "partner_id": "INSERT_YOUR_PARTNER_ID",
    "reservation_id": "12345",
    "date_from": "2023-04-01",
    "date_to": "2023-04-03",
    "num_guests": 2,
    "included_offering_ids": [
        "5e932c0901d210625e471af1"
    ]
}

Please note, the Basket response will still show the full price of the item in order for the revenue to be associated in Trybe.

Configure only mode

You can create a booking frame session which only allows the guest to configure an item already in the basket, and it removes the ability for them to pick an offering.

This can be useful if you want the guest to pick a package from your own application, but you don't want to deal with the complexities of configuring the package in your application. Or if you only want to offer a specific package to the guest, and you've already made it clear to the guest in your flow that they're booking a specific offering.

To use this, pass the configure_only field when creating the booking frame session:

{
    "partner_id": "INSERT_YOUR_PARTNER_ID",
    "reservation_id": "12345",
    "date_from": "2023-04-01",
    "date_to": "2023-04-03",
    "num_guests": 2,
    "configure_only": true
}

Then, use the API to programatically add an item to the basket. You can retrieve the basket ID and guest IDs from the response of the previous API request. Here's an example cURL request to add an item to the basket. Make sure you replace the IDs with ones relevant to your use case, and provide a valid Bearer token for authentication.

curl --request POST \
  --url https://api.try.be/shop/basket/5e932c0901d210625e3a8766/items \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer INSERT_YOUR_BEARER_TOKEN' \
  --data '{
    "offering_id": "5e932c0901d210625e471af1",
    "offering_type": "package",
    "date": "2023-04-01",
    "guest_id": "5e932c0901d210625e471af2",
}'

Now, when the booking frame is presented, the guest will only be able to configure the item in the basket. They won't be able to pick a different offering, nor remove the offering.

Present an iframe

Once you've created the booking frame session, you can present the booking frame to the guest by embedding an iframe on your page.

Here's an example of how you could acheive this in plain JavaScript:

const bookingFrameUrl = bookingFrameResponse.data.url
const iframe = document.createElement('iframe')

iframe.src = bookingFrameUrl

document.body.appendChild(iframe)

Sizing

The booking frame is responsive and has been engineered with small screens in mind. For the best mobile experience, we strongly recommend that the iframe is sized to fill the width and height of the viewport.

Handle when the user is finished

When the user has finished configuring their order, they'll click the "Continue" CTA button. This will trigger a postMessage event to be sent to the parent window with the following payload:

{
  "type": "trybeBookingFrameComplete",
  "reservationId": "12345"
}

The reservationId will match what you provided when creating the booking frame session.

You should add an event listener to this event, and use it to close the iframe and continue with your flow.

Here's an example of how you could do this in plain JavaScript:

window.addEventListener('message', function (event) {
  if (event.data.type === 'trybeBookingFrameComplete') {
    // Close the iframe
    // Continue with your flow
  }
})

Submit the basket

Once the guest has finished configuring their order, you'll need to "submit" the basket. This is what confirms the order in Trybe and schedules it with the relevant practitioner/room/area.

To do this, you'll need to make a POST request to the /shop/orders/{basketId}/submit endpoint. Make sure you replace the basket ID with one relevant to your use case, and provide a valid Bearer token for authentication.

curl --request POST \
  --url https://api.try.be/shop/orders/5e932c0901d210625e3a8766/submit \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer INSERT_YOUR_BEARER_TOKEN'

Record payment (optional)

If you've taken payment for the order within your application and want to record this in Trybe, make a POST request to the /shop/orders/{basketId}/payments endpoint.

Pass the amount as an integer of the smallest unit of currency. For example, if you've taken £100.00, pass 10000. No need to pass the currency code - it's derived from the Site's configuration.

curl --request POST \
  --url https://api.try.be/shop/orders/5e932c0901d210625e3a8766/submit \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer INSERT_YOUR_BEARER_TOKEN' \
  --data '{
    "amount": 10000,
    "processor": "partner"
  }'

Appointments

This endpoint is used for managing appointments

Schedule a list of appointments to be generated asynchronously.

query Parameters
date_from
string <date>

Filter to appointments with a date after this date.

date_to
string <date>

Filter to appointments with a date before this date.

start_date_from
string <date>

Filter to appointments with a start date after this date.

start_date_to
string <date>

Filter to appointments with a start date before this date.

site_id
string

The ID of the site to filter on.

status
string

Filter on appointments of this status.

email
boolean

Whether to request an email of this report.

practitioner_id
string
Example: practitioner_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of practitioner ids to fetch bookings for

room_id
string
Example: room_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of room ids to fetch bookings for

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to fetch bookings for

Responses

Response samples

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

Get appointment details

Returns the details of a single appointment

path Parameters
appointmentId
required
string

The ID of the appointment you want to retrieve

Responses

Response samples

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

Update an existing appointment

Update an existing appointment

path Parameters
appointmentId
required
string

The ID of the appointment you want to update

Request Body schema: application/json

Updates the specified Appointment object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

practitioner_ids
Array of strings

The IDs of the practitioners this slot is for

room_id
string

The ID of the room this slot is for

time
string <date-time>

The start time of the appointment.

duration
integer

The duration of appointment that the price rule applies to.

stage
string
Enum: "not_arrived" "arrived" "in_treatment" "checked_out"

The current stage of the order the session belongs to.

Responses

Request samples

Content type
application/json
{
  • "practitioner_ids": [
    ],
  • "room_id": "5dcb47800000000000000011",
  • "time": "2020-07-24T12:00:00+01:00",
  • "duration": 60,
  • "stage": "not_arrived"
}

Response samples

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

Check an existing appointment can be updated with the given details.

path Parameters
appointmentId
required
string

The ID of the appointment you want to check

Request Body schema: application/json
practitioner_ids
Array of strings

The IDs of the practitioners this slot is for

room_id
string

The ID of the room this slot is for

time
string <date-time>

The start time of the appointment.

duration
integer

The duration of appointment that the price rule applies to.

stage
string
Enum: "not_arrived" "arrived" "in_treatment" "checked_out"

The current stage of the order the session belongs to.

Responses

Request samples

Content type
application/json
{
  • "practitioner_ids": [
    ],
  • "room_id": "5dcb47800000000000000011",
  • "time": "2020-07-24T12:00:00+01:00",
  • "duration": 60,
  • "stage": "not_arrived"
}

Response samples

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

Get appointments

Returns an array of all appointments the given user has permission to view

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
string <date>
Example: date_from=2019-01-15T12:00:00+01:00

the date to fetch appointments from

date_to
string <date>
Example: date_to=2019-01-15T12:00:00+01:00

the date to fetch appointments to

order_submitted_at_from
string <date>
Example: order_submitted_at_from=2019-01-15T12:00:00+01:00

the order submitted date to fetch appointments from

order_submitted_at_to
string <date>
Example: order_submitted_at_to=2019-01-15T12:00:00+01:00

the order submitted date to fetch appointments to

practitioner_id
string
Example: practitioner_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of practitioner ids to fetch bookings for

room_id
string
Example: room_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of room ids to fetch bookings for

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of zone ids to fetch bookings for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    },
  • "meta": {},
}

Schedule a list of appointments to be generated asynchronously.

query Parameters
date_from
string <date>

Filter to appointments with a date after this date.

date_to
string <date>

Filter to appointments with a date before this date.

order_submitted_at_from
string <date>

Filter to appointments with a start date after this date.

order_submitted_at_to
string <date>

Filter to appointments with a start date before this date.

site_id
string

The ID of the site to filter on.

status
string

Filter on appointments of this status.

practitioner_id
string
Example: practitioner_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of practitioner ids to fetch bookings for

room_id
string
Example: room_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of room ids to fetch bookings for

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to fetch bookings for

Responses

Response samples

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

Get appointments

Returns an array of all appointments the given user has permission to view

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

date_from
string <date>
Example: date_from=2019-01-15T12:00:00+01:00

the date to fetch appointments from

date_to
string <date>
Example: date_to=2019-01-15T12:00:00+01:00

the date to fetch appointments to

start_date_from
string <date>
Example: start_date_from=2019-01-15T12:00:00+01:00

the start date to fetch appointments from

start_date_to
string <date>
Example: start_date_to=2019-01-15T12:00:00+01:00

the start date to fetch appointments to

submitted_at_from
string <date-time>
Example: submitted_at_from=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date on or after this time.

submitted_at_to
string <date-time>
Example: submitted_at_to=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date before this date.

practitioner_id
string
Example: practitioner_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of practitioner ids to fetch bookings for

room_id
string
Example: room_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of room ids to fetch bookings for

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of zone ids to fetch bookings for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    },
  • "meta": {},
}

AppointmentTypes

Get appointment types

Returns an array of all appointment types the given user has permission to view

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

archived
boolean

Only show archived resources

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Create a new appointment type

Create a new appointment type

Request Body schema: application/json

To create an appointment type, you pass an AppointmentType object.

id
string

The ID of the appointment type.

name
string

The name of this appointment type

description
string

A description of the appointment type

product_code
string

A custom product code for the appointment type.

currency
string

The ISO-4217 currency code in lower case

image_id
string

The id of the image

object (Media)
practitioner_ids
Array of strings

The IDs of practitioners who can provide this appointment

Array of objects (AvailabilityRule)

The rules defining periods during which appointments can be offered

enquiries_enabled
boolean

Whether enquiries can be accepted for this appointment type

Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (AppointmentPriceRule)

The rules defining prices for this appointment type

durations
Array of integers

The allowed durations of the appointment in minutes

end_buffer
integer

An optional number of minutes that should be blocked out at the end of the appointment, for example for cleaning or changeover time.

start_time_interval
integer

Appointments may start on intervals of this number of minutes

max_advance_bookings_interval
string

The maximum time before an appointment's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before an appointment's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

allocate_multi_capacity_rooms
boolean

If enabled, Trybe will attemtpt to assign guests to larger rooms before allocating single rooms.

members_only
boolean

Whether this appointment requires an active membership in order to book.

permitted_membership_type_ids
Array of strings

If this appointment is for members only, this property may be used to restrict the offering further so it may only be booked by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this appointment type.

Array of objects (MembershipBookingWindow)
object
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

tag_ids
Array of strings

The tags IDs associated with this appointment type

Array of objects (Tag)

The tags associated with this appointment type

category_ids
Array of strings

The category IDs associated with this appointment type

Array of objects (Category)

The category associated with this appointment type

site_ids
Array of strings

The IDs of the sites this appointment type belongs to

equipment_ids
Array of strings

The IDs of the equipment this appointment type requires

room_ids
Array of strings

The IDs of rooms that may be used to provide this appointment type

Array of objects (Contraindication)
offered_online
boolean

Whether this appointment type is bookable online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

min_guests
integer

The minimum guests this appointment type is for

max_guests
integer

The maximum guests this appointment type is for

revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "60 minute massage",
  • "description": "Choose from classic, deep tissue and Swedish massage",
  • "product_code": "MAS123",
  • "currency": "gbp",
  • "image_id": "5dcb47800000000000000000",
  • "image": {},
  • "practitioner_ids": [
    ],
  • "availability_rules": [
    ],
  • "enquiries_enabled": true,
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "price_rules": [
    ],
  • "durations": [
    ],
  • "end_buffer": 15,
  • "start_time_interval": 30,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "allocate_multi_capacity_rooms": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "meta": {
    },
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "tag_ids": [
    ],
  • "tags": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "site_ids": [
    ],
  • "equipment_ids": [
    ],
  • "room_ids": [
    ],
  • "contraindications": [
    ],
  • "offered_online": true,
  • "private": true,
  • "min_guests": 2,
  • "max_guests": 2,
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Get appointment type details

Returns the details of a single appointment type

path Parameters
appointmentTypeId
required
string

The ID of the appointment type you want to retrieve

Responses

Response samples

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

Update an existing appointment type

Update an existing appointment type

path Parameters
appointmentTypeId
required
string

The ID of the appointment type you want to retrieve

Request Body schema: application/json

Updates the specified AppointmentType object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the appointment type.

name
string

The name of this appointment type

description
string

A description of the appointment type

product_code
string

A custom product code for the appointment type.

currency
string

The ISO-4217 currency code in lower case

image_id
string

The id of the image

object (Media)
practitioner_ids
Array of strings

The IDs of practitioners who can provide this appointment

Array of objects (AvailabilityRule)

The rules defining periods during which appointments can be offered

enquiries_enabled
boolean

Whether enquiries can be accepted for this appointment type

Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (AppointmentPriceRule)

The rules defining prices for this appointment type

durations
Array of integers

The allowed durations of the appointment in minutes

end_buffer
integer

An optional number of minutes that should be blocked out at the end of the appointment, for example for cleaning or changeover time.

start_time_interval
integer

Appointments may start on intervals of this number of minutes

max_advance_bookings_interval
string

The maximum time before an appointment's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before an appointment's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

allocate_multi_capacity_rooms
boolean

If enabled, Trybe will attemtpt to assign guests to larger rooms before allocating single rooms.

members_only
boolean

Whether this appointment requires an active membership in order to book.

permitted_membership_type_ids
Array of strings

If this appointment is for members only, this property may be used to restrict the offering further so it may only be booked by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this appointment type.

Array of objects (MembershipBookingWindow)
object
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

tag_ids
Array of strings

The tags IDs associated with this appointment type

Array of objects (Tag)

The tags associated with this appointment type

category_ids
Array of strings

The category IDs associated with this appointment type

Array of objects (Category)

The category associated with this appointment type

site_ids
Array of strings

The IDs of the sites this appointment type belongs to

equipment_ids
Array of strings

The IDs of the equipment this appointment type requires

room_ids
Array of strings

The IDs of rooms that may be used to provide this appointment type

Array of objects (Contraindication)
offered_online
boolean

Whether this appointment type is bookable online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

min_guests
integer

The minimum guests this appointment type is for

max_guests
integer

The maximum guests this appointment type is for

revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "60 minute massage",
  • "description": "Choose from classic, deep tissue and Swedish massage",
  • "product_code": "MAS123",
  • "currency": "gbp",
  • "image_id": "5dcb47800000000000000000",
  • "image": {},
  • "practitioner_ids": [
    ],
  • "availability_rules": [
    ],
  • "enquiries_enabled": true,
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "price_rules": [
    ],
  • "durations": [
    ],
  • "end_buffer": 15,
  • "start_time_interval": 30,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "allocate_multi_capacity_rooms": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "meta": {
    },
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "tag_ids": [
    ],
  • "tags": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "site_ids": [
    ],
  • "equipment_ids": [
    ],
  • "room_ids": [
    ],
  • "contraindications": [
    ],
  • "offered_online": true,
  • "private": true,
  • "min_guests": 2,
  • "max_guests": 2,
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Delete an appointment type

Returns the status of deletion

path Parameters
appointmentTypeId
required
string

The ID of the appointment type you want to retrieve

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Check rules for appointment type

Ensures that each date which this appointment type is available for has a price rule

path Parameters
appointmentTypeId
required
string

The ID of the appointment type you want to retrieve

Responses

Response samples

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

Restores an appointment type

Restores a soft-deleted (archived) appointment type.

path Parameters
appointmentTypeId
required
string

The ID of the appointment type you want to retrieve

Responses

Response samples

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

Get appointment type price rules

Returns an array of all price rules for the given appointment type.

path Parameters
appointmentTypeId
required
string

The ID of the appointment type you want to retrieve

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Create a new price rule for an appointment type

path Parameters
appointmentTypeId
required
string

The ID of the appointment type you want to add a price rule for

Request Body schema: application/json

To create a price rule you pass an AppointmentPriceRule object.

id
string

The ID of the price rule.

appointment_type_id
string

The ID of the appointment type the price rule relates to.

date_from
string <date>

The rule should apply to appointments on or after this date.

date_to
string <date>

The rule should not apply to appointments after this date.

weekdays
Array of strings

The weekdays that this rule should apply to.

time_from
string

The rule should apply to appointments starting on or after this time.

time_to
string

The rule should not apply to appointments starting on or after this time.

duration
integer

The duration of appointment that the price rule applies to.

price
integer

The price of the appointment.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "appointment_type_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "weekdays": [
    ],
  • "time_from": "16:00",
  • "time_to": "20:00",
  • "duration": 60,
  • "price": 6000
}

Response samples

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

Get details of a single price rule

Returns the details of a single price rule.

path Parameters
appointmentTypeId
required
string

The ID of the appointment type the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to retrieve.

Responses

Response samples

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

Update an existing price rule

Update an existing price rule.

path Parameters
appointmentTypeId
required
string

The ID of the appointment type the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to update.

Request Body schema: application/json

Updates the specified AppointmentPriceRule object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the price rule.

appointment_type_id
string

The ID of the appointment type the price rule relates to.

date_from
string <date>

The rule should apply to appointments on or after this date.

date_to
string <date>

The rule should not apply to appointments after this date.

weekdays
Array of strings

The weekdays that this rule should apply to.

time_from
string

The rule should apply to appointments starting on or after this time.

time_to
string

The rule should not apply to appointments starting on or after this time.

duration
integer

The duration of appointment that the price rule applies to.

price
integer

The price of the appointment.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "appointment_type_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "weekdays": [
    ],
  • "time_from": "16:00",
  • "time_to": "20:00",
  • "duration": 60,
  • "price": 6000
}

Response samples

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

Delete a price rule

Returns the status of deletion

path Parameters
appointmentTypeId
required
string

The ID of the appointment type the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get appointment type availability rules

Returns an array of all availability rules for the given appointment type.

path Parameters
appointmentTypeId
required
string

The ID of the appointment type the availability rules relate to.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Create a new availability rule for an appointment type.

path Parameters
appointmentTypeId
required
string

The ID of the appointment type the availability rules relate to.

Request Body schema: application/json

To create an availability rule you pass an AvailabilityRule object.

id
string

The ID of the availability rule.

date_from
string <date>

The start of the rule period.

date_to
string <date>

The end of the rule period.

time_from
string

The daily start time of the time period, in 24 hour format.

time_to
string

The daily end time of the time period, in 24 hour format.

weekday
string

The weekday this rule applies to.

weekdays
Array of strings

The weekdays this rule applies to.

is_available
boolean

Whether the resource is available during this period. Any false rules will override true rules.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true
}

Response samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true
}

Get details of a single availability rule.

Returns the details of a single availability rule.

path Parameters
appointmentTypeId
required
string

The ID of the appointment type the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Responses

Response samples

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

Update an existing availability rule

Update an existing availability rule.

path Parameters
appointmentTypeId
required
string

The ID of the appointment type the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Request Body schema: application/json

Updates the specified AvailabilityRule object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the availability rule.

date_from
string <date>

The start of the rule period.

date_to
string <date>

The end of the rule period.

time_from
string

The daily start time of the time period, in 24 hour format.

time_to
string

The daily end time of the time period, in 24 hour format.

weekday
string

The weekday this rule applies to.

weekdays
Array of strings

The weekdays this rule applies to.

is_available
boolean

Whether the resource is available during this period. Any false rules will override true rules.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true
}

Response samples

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

Delete an availability rule

Returns the status of deletion

path Parameters
appointmentTypeId
required
string

The ID of the appointment type the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Copy an appointment type

path Parameters
appointmentTypeId
required
string

The ID of the appointment type to copy.

Request Body schema: application/json

Pass any appointment type properties that should be overridden on the copied resource.

id
string

The ID of the appointment type.

name
string

The name of this appointment type

description
string

A description of the appointment type

product_code
string

A custom product code for the appointment type.

currency
string

The ISO-4217 currency code in lower case

image_id
string

The id of the image

object (Media)
practitioner_ids
Array of strings

The IDs of practitioners who can provide this appointment

Array of objects (AvailabilityRule)

The rules defining periods during which appointments can be offered

enquiries_enabled
boolean

Whether enquiries can be accepted for this appointment type

Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (AppointmentPriceRule)

The rules defining prices for this appointment type

durations
Array of integers

The allowed durations of the appointment in minutes

end_buffer
integer

An optional number of minutes that should be blocked out at the end of the appointment, for example for cleaning or changeover time.

start_time_interval
integer

Appointments may start on intervals of this number of minutes

max_advance_bookings_interval
string

The maximum time before an appointment's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before an appointment's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

allocate_multi_capacity_rooms
boolean

If enabled, Trybe will attemtpt to assign guests to larger rooms before allocating single rooms.

members_only
boolean

Whether this appointment requires an active membership in order to book.

permitted_membership_type_ids
Array of strings

If this appointment is for members only, this property may be used to restrict the offering further so it may only be booked by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this appointment type.

Array of objects (MembershipBookingWindow)
object
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

tag_ids
Array of strings

The tags IDs associated with this appointment type

Array of objects (Tag)

The tags associated with this appointment type

category_ids
Array of strings

The category IDs associated with this appointment type

Array of objects (Category)

The category associated with this appointment type

site_ids
Array of strings

The IDs of the sites this appointment type belongs to

equipment_ids
Array of strings

The IDs of the equipment this appointment type requires

room_ids
Array of strings

The IDs of rooms that may be used to provide this appointment type

Array of objects (Contraindication)
offered_online
boolean

Whether this appointment type is bookable online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

min_guests
integer

The minimum guests this appointment type is for

max_guests
integer

The maximum guests this appointment type is for

revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "60 minute massage",
  • "description": "Choose from classic, deep tissue and Swedish massage",
  • "product_code": "MAS123",
  • "currency": "gbp",
  • "image_id": "5dcb47800000000000000000",
  • "image": {},
  • "practitioner_ids": [
    ],
  • "availability_rules": [
    ],
  • "enquiries_enabled": true,
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "price_rules": [
    ],
  • "durations": [
    ],
  • "end_buffer": 15,
  • "start_time_interval": 30,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "allocate_multi_capacity_rooms": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "meta": {
    },
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "tag_ids": [
    ],
  • "tags": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "site_ids": [
    ],
  • "equipment_ids": [
    ],
  • "room_ids": [
    ],
  • "contraindications": [
    ],
  • "offered_online": true,
  • "private": true,
  • "min_guests": 2,
  • "max_guests": 2,
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

AreaBookingTypes

This endpoint is used for managing area booking types

Get area booking types

Returns an array of all area booking types the given user has permission to view

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

archived
boolean

Only show archived resources

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Create a new area booking type

Create a new area booking type

Request Body schema: application/json

To create an area booking type, you pass an AreaBookingType object.

id
string

The ID of the area booking type.

name
string

The name of this area booking type.

description
string

A description of the area booking type.

product_code
string

A custom product code for the area booking type.

currency
string

The ISO-4217 currency code in lower case.

image_id
string

The id of the image

object (Media)
Array of objects (AvailabilityRule)

The rules defining periods during which appointments can be offered.

Array of objects (AreaBookingPriceRule)

The rules defining prices for this area booking type.

end_buffer
integer

An optional number of minutes that should be blocked out at the end of the appointment, for example for cleaning or changeover time.

object
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
start_time_interval
integer

Bookings may start on intervals of this number of minutes.

duration_interval
integer

Bookings may last for intervals of this number of minutes.

min_duration
integer

The shortest allowed duration for bookings of this type, in minutes.

max_duration
integer

The longest allowed duration for bookings of this type, in minutes.

max_advance_bookings_interval
string

The maximum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

members_only
boolean

Whether an active membership is required to book.

permitted_membership_type_ids
Array of strings

If this booking type is for members only, this property may be used to restrict the offering further so it may only be booked by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this booking type.

Array of objects (MembershipBookingWindow)
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

offered_online
boolean

Whether or not this area booking type is bookable online.

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

area_ids
Array of strings

An array of area IDs that can be booked with this booking type.

max_baskets
integer

The maximum number of baskets that may have bookings in a single area.

min_guests
integer

The minimum guests allowed in a booking of this type.

max_guests
integer

The maximum guests allowed in a booking of this type.

site_id
string

The ID of the site this area booking type belongs to

category_ids
Array of strings

The category IDs associated with this offering

Array of objects (Category)

The category associated with this offering

revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Hot Tub",
  • "description": "Soak away in one of our private hot tubs",
  • "product_code": "MAS123",
  • "currency": "gbp",
  • "image_id": "5dcb47800000000000000000",
  • "image": {},
  • "availability_rules": [
    ],
  • "price_rules": [
    ],
  • "end_buffer": 15,
  • "meta": {
    },
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "start_time_interval": 30,
  • "duration_interval": 15,
  • "min_duration": 60,
  • "max_duration": 180,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "offered_online": true,
  • "private": true,
  • "area_ids": [
    ],
  • "max_baskets": 1,
  • "min_guests": 1,
  • "max_guests": 1,
  • "site_id": "5dcb47800000000000000010",
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Get area booking type details

Returns the details of a single area booking type

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type you want to retrieve

Responses

Response samples

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

Update an existing area booking type

Update an existing area booking type

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type you want to update

Request Body schema: application/json

Updates the specified AreaBookingType object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the area booking type.

name
string

The name of this area booking type.

description
string

A description of the area booking type.

product_code
string

A custom product code for the area booking type.

currency
string

The ISO-4217 currency code in lower case.

image_id
string

The id of the image

object (Media)
Array of objects (AvailabilityRule)

The rules defining periods during which appointments can be offered.

Array of objects (AreaBookingPriceRule)

The rules defining prices for this area booking type.

end_buffer
integer

An optional number of minutes that should be blocked out at the end of the appointment, for example for cleaning or changeover time.

object
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
start_time_interval
integer

Bookings may start on intervals of this number of minutes.

duration_interval
integer

Bookings may last for intervals of this number of minutes.

min_duration
integer

The shortest allowed duration for bookings of this type, in minutes.

max_duration
integer

The longest allowed duration for bookings of this type, in minutes.

max_advance_bookings_interval
string

The maximum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

members_only
boolean

Whether an active membership is required to book.

permitted_membership_type_ids
Array of strings

If this booking type is for members only, this property may be used to restrict the offering further so it may only be booked by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this booking type.

Array of objects (MembershipBookingWindow)
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

offered_online
boolean

Whether or not this area booking type is bookable online.

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

area_ids
Array of strings

An array of area IDs that can be booked with this booking type.

max_baskets
integer

The maximum number of baskets that may have bookings in a single area.

min_guests
integer

The minimum guests allowed in a booking of this type.

max_guests
integer

The maximum guests allowed in a booking of this type.

site_id
string

The ID of the site this area booking type belongs to

category_ids
Array of strings

The category IDs associated with this offering

Array of objects (Category)

The category associated with this offering

revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Hot Tub",
  • "description": "Soak away in one of our private hot tubs",
  • "product_code": "MAS123",
  • "currency": "gbp",
  • "image_id": "5dcb47800000000000000000",
  • "image": {},
  • "availability_rules": [
    ],
  • "price_rules": [
    ],
  • "end_buffer": 15,
  • "meta": {
    },
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "start_time_interval": 30,
  • "duration_interval": 15,
  • "min_duration": 60,
  • "max_duration": 180,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "offered_online": true,
  • "private": true,
  • "area_ids": [
    ],
  • "max_baskets": 1,
  • "min_guests": 1,
  • "max_guests": 1,
  • "site_id": "5dcb47800000000000000010",
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Delete an area booking type

Returns the status of deletion

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Restores an area booking type

Restores a soft-deleted (archived) area booking type.

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type you want to restore

Responses

Response samples

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

Copy a booking type

path Parameters
areaBookingTypeId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the area booking type ID

Request Body schema: application/json

Pass any area booking type properties that should be overridden on the copied resource.

id
string

The ID of the area booking type.

name
string

The name of this area booking type.

description
string

A description of the area booking type.

product_code
string

A custom product code for the area booking type.

currency
string

The ISO-4217 currency code in lower case.

image_id
string

The id of the image

object (Media)
Array of objects (AvailabilityRule)

The rules defining periods during which appointments can be offered.

Array of objects (AreaBookingPriceRule)

The rules defining prices for this area booking type.

end_buffer
integer

An optional number of minutes that should be blocked out at the end of the appointment, for example for cleaning or changeover time.

object
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
start_time_interval
integer

Bookings may start on intervals of this number of minutes.

duration_interval
integer

Bookings may last for intervals of this number of minutes.

min_duration
integer

The shortest allowed duration for bookings of this type, in minutes.

max_duration
integer

The longest allowed duration for bookings of this type, in minutes.

max_advance_bookings_interval
string

The maximum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before a booking's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

members_only
boolean

Whether an active membership is required to book.

permitted_membership_type_ids
Array of strings

If this booking type is for members only, this property may be used to restrict the offering further so it may only be booked by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this booking type.

Array of objects (MembershipBookingWindow)
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

offered_online
boolean

Whether or not this area booking type is bookable online.

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

area_ids
Array of strings

An array of area IDs that can be booked with this booking type.

max_baskets
integer

The maximum number of baskets that may have bookings in a single area.

min_guests
integer

The minimum guests allowed in a booking of this type.

max_guests
integer

The maximum guests allowed in a booking of this type.

site_id
string

The ID of the site this area booking type belongs to

category_ids
Array of strings

The category IDs associated with this offering

Array of objects (Category)

The category associated with this offering

revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Hot Tub",
  • "description": "Soak away in one of our private hot tubs",
  • "product_code": "MAS123",
  • "currency": "gbp",
  • "image_id": "5dcb47800000000000000000",
  • "image": {},
  • "availability_rules": [
    ],
  • "price_rules": [
    ],
  • "end_buffer": 15,
  • "meta": {
    },
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "start_time_interval": 30,
  • "duration_interval": 15,
  • "min_duration": 60,
  • "max_duration": 180,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "offered_online": true,
  • "private": true,
  • "area_ids": [
    ],
  • "max_baskets": 1,
  • "min_guests": 1,
  • "max_guests": 1,
  • "site_id": "5dcb47800000000000000010",
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Get area booking type price rules

Returns an array of all price rules for the given area booking type.

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type you want to retrieve

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Create a new price rule for an area booking type

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type you want to add a price rule for

Request Body schema: application/json

To create a price rule you pass an AreaBookingPriceRule object.

id
string

The ID of the price rule.

area_booking_type_id
string

The ID of the area booking type the price rule relates to.

date_from
string <date>

The rule should apply to appointments on or after this date.

date_to
string <date>

The rule should not apply to appointments after this date.

weekdays
Array of strings

The weekdays that this rule should apply to.

time_from
string

The rule should apply to appointments starting on or after this time.

time_to
string

The rule should not apply to appointments starting on or after this time.

max_duration
integer

The longest duration that the price rule applies to.

price
integer

The price of the area booking type per minute.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "area_booking_type_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "weekdays": [
    ],
  • "time_from": "16:00",
  • "time_to": "20:00",
  • "max_duration": 90,
  • "price": 6000
}

Response samples

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

Get details of a single price rule

Returns the details of a single price rule.

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to retrieve.

Responses

Response samples

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

Update an existing price rule

Update an existing price rule.

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to update.

Request Body schema: application/json

Updates the specified AreaBookingPriceRule object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the price rule.

area_booking_type_id
string

The ID of the area booking type the price rule relates to.

date_from
string <date>

The rule should apply to appointments on or after this date.

date_to
string <date>

The rule should not apply to appointments after this date.

weekdays
Array of strings

The weekdays that this rule should apply to.

time_from
string

The rule should apply to appointments starting on or after this time.

time_to
string

The rule should not apply to appointments starting on or after this time.

max_duration
integer

The longest duration that the price rule applies to.

price
integer

The price of the area booking type per minute.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "area_booking_type_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "weekdays": [
    ],
  • "time_from": "16:00",
  • "time_to": "20:00",
  • "max_duration": 90,
  • "price": 6000
}

Response samples

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

Delete a price rule

Returns the status of deletion

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get area booking type availability rules

Returns an array of all availability rules for the given area booking type.

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type the availability rules relate to.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Create a new availability rule for an area booking type.

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type the availability rules relate to.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Request Body schema: application/json

To create an availability rule you pass an AreaBookingAvailabilityRule object.

id
string

The ID of the availability rule.

date_from
string <date>

The start of the rule period.

date_to
string <date>

The end of the rule period.

time_from
string

The daily start time of the time period, in 24 hour format.

time_to
string

The daily end time of the time period, in 24 hour format.

weekday
string

The weekday this rule applies to.

weekdays
Array of strings

The weekdays this rule applies to.

is_available
boolean

Whether the resource is available during this period. Any false rules will override true rules.

min_duration
integer

The minimum booking duration permitted by this availability rule.

max_duration
integer

The maximum booking duration permitted by this availability rule.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true,
  • "min_duration": 0,
  • "max_duration": 0
}

Response samples

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

Get details of a single availability rule.

Returns the details of a single availability rule.

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Responses

Response samples

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

Update an existing availability rule

Update an existing availability rule.

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Request Body schema: application/json

Updates the specified AreaBookingAvailabilityRule object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the availability rule.

date_from
string <date>

The start of the rule period.

date_to
string <date>

The end of the rule period.

time_from
string

The daily start time of the time period, in 24 hour format.

time_to
string

The daily end time of the time period, in 24 hour format.

weekday
string

The weekday this rule applies to.

weekdays
Array of strings

The weekdays this rule applies to.

is_available
boolean

Whether the resource is available during this period. Any false rules will override true rules.

min_duration
integer

The minimum booking duration permitted by this availability rule.

max_duration
integer

The maximum booking duration permitted by this availability rule.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true,
  • "min_duration": 0,
  • "max_duration": 0
}

Response samples

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

Delete an availability rule

Returns the status of deletion

path Parameters
areaBookingTypeId
required
string

The ID of the area booking type the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Basket

Create a new basket

Creates a new basket

Request Body schema: application/json

Pass an object containing the ID of the organisation that owns the items to be added.

site_id
string

The ID of the site owning the items to be added to the basket.

customer_id
string

The ID of the customer to associate this basket with

Responses

Request samples

Content type
application/json
{
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "customer_id": "00000000-0000-0000-0000-222222222222"
}

Response samples

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

Get details of a basket

Get basket details

path Parameters
basketId
required
string

The ID of the basket to be retrieved.

Responses

Response samples

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

Update basket details

Update basket details

path Parameters
basketId
required
string

The ID of the basket to be updated.

Request Body schema: application/json

Pass an object containing the details to be updated.

special_requests
string

Any customer requests relating to the basket

Responses

Request samples

Content type
application/json
{
  • "special_requests": "I would like the Blue Room please"
}

Response samples

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

Add an item to the basket

Adds an item to a basket

path Parameters
basketId
required
string

The ID of the basket items are to be added to.

Request Body schema: application/json

Pass an object containing the details of the item to be added.

offering_type
string

The type of item being added.

offering_id
string

The ID of the item to be added.

date
string

The date of the item, if applicable

time
string

The start date and time of the item, if applicable.

duration
integer

The duration of the item being added, in minutes, if applicable.

quantity
integer

The quantity of items being added, if applicable.

Array of objects (Guest)

Pass an array of guests to be associated with this basket item.

object

Responses

Request samples

Content type
application/json
{
  • "offering_type": "appointment",
  • "offering_id": "5dcb47800000000000000010",
  • "date": "2020-02-24T00:00:00+01:00",
  • "time": "2020-02-24T12:00:00+01:00",
  • "duration": 30,
  • "quantity": 2,
  • "guests": [
    ],
  • "item_configuration": { }
}

Response samples

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

Update an item in the basket

Update an item in the basket.

path Parameters
basketId
required
string

The ID of the basket.

itemId
required
string

The ID of the item being updated.

Request Body schema: application/json

Pass an object containing the details of the item to be updated.

offering_type
string

The type of item being added.

offering_id
string

The ID of the item to be added.

date
string

The date of the item, if applicable

time
string

The start date and time of the item, if applicable.

duration
integer

The duration of the item being added, in minutes, if applicable.

quantity
integer

The quantity of items being added, if applicable.

Array of objects (Guest)

Pass an array of guests to be associated with this basket item.

object

Responses

Request samples

Content type
application/json
{
  • "offering_type": "appointment",
  • "offering_id": "5dcb47800000000000000010",
  • "date": "2020-02-24T00:00:00+01:00",
  • "time": "2020-02-24T12:00:00+01:00",
  • "duration": 30,
  • "quantity": 2,
  • "guests": [
    ],
  • "item_configuration": { }
}

Response samples

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

Remove an item from the basket

Remove all quantity of an item from the basket.

path Parameters
basketId
required
string

The ID of the basket.

itemId
required
string

The ID of the item being removed.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Update an option for a package item in the basket.

path Parameters
basketId
required
string

The ID of the basket.

itemId
required
string

The ID of the item being updated.

Request Body schema: application/json

Pass an object containing the details of the item to be updated.

choice_id
string

The ID of the package choice.

option_id
string

The ID of the chosen option.

room_id
string

The ID of the room.

practitioner_id
string

The ID of the chosen practitioner.

practitioner_ids
Array of strings

The IDs of the chosen practitioners.

time
string <date-time>

The start date and time of the item, if applicable.

duration
integer

The duration of the item being added, in minutes, if applicable.

guest_ids
Array of strings

An optional array of guest IDs who are having this item. If this is not passed then the guests will be inferred from the package and item being added.

object

Responses

Request samples

Content type
application/json
{
  • "choice_id": "5f184bb0b6ecff2e8157bf26",
  • "option_id": "5f184bb0b6ecff2e8157bf27",
  • "room_id": "5f184bb0b6ecff2e8157bf26",
  • "practitioner_id": "5f184bb0b6ecff2e8157bf27",
  • "practitioner_ids": [
    ],
  • "time": "2020-02-24T12:00:00+01:00",
  • "duration": 60,
  • "guest_ids": [
    ],
  • "item_configuration": { }
}

Response samples

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

Remove an option for a package item in the basket.

path Parameters
basketId
required
string

The ID of the basket.

itemId
required
string

The ID of the item being updated.

packageItemId
required
string

The ID of the package item being removed.

Responses

Response samples

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

Bulk update guest details

Update multiple guests at once. Guests passed without an ID will be created, and any guests not passed will be removed from the basket.

path Parameters
basketId
required
string

The ID of the basket.

Request Body schema: application/json

Pass an object containing an array of guests.

Array of objects (Guest)

Responses

Request samples

Content type
application/json
{
  • "guests": [
    ]
}

Response samples

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

Add customer details to the basket

Adds customer details to the basket

path Parameters
basketId
required
string

The ID of the basket.

Request Body schema: application/json

Pass an object containing the customer details.

id
string

The ID of the customer.

first_name
string

The first name of the customer.

last_name
string

The last name of the customer.

full_name
string

The customer's full name

phone
string

The customer's phone number

has_password
boolean

Whether the user has a password

dob
string <date>

The customer's date of birth

brand_id
string

The ID of the brand this customer belongs to

site_id
string

The ID of the site this customer belongs to

stripe_id
string

The Stripe Customer ID for this customer

express_stripe_id
string

The Stripe Customer ID for this customer if they also exist in Trybe's legacy Stripe integration

email
string

The email address of the customer.

Array of objects (CustomerLabel)
preferred_locale
string

The preferred locale of the customer

locked_at
string <date-time> Nullable

The datetime which the customer was locked, or null if it has not been locked.

created_at
string <date-time>

The datetime which the customer was created

updated_at
string <date-time>

The datetime which the customer was last updated

deleted_at
string <date-time>

The datetime which the customer was anonymised, or null if it has not been.

last_active_at
string <date-time>

The datetime which the customer was last active

email_verified_at
string <date-time>

The datetime which the customer verified their email address

object
avatar_id
string <uuid>

The id of the log image

object (Media)
external_ref
string

An external reference for this customer.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "first_name": "Jane",
  • "last_name": "Doe",
  • "full_name": "Jane Doe",
  • "phone": "+447900000000",
  • "has_password": true,
  • "dob": "1995-01-13T00:00:00.000Z",
  • "brand_id": "000000-000000-000000-000000",
  • "site_id": "000000-000000-000000-000000",
  • "stripe_id": "cus_1234567890",
  • "express_stripe_id": "cus_1234567890",
  • "email": "janedoe@example.com",
  • "labels": [
    ],
  • "preferred_locale": "en",
  • "locked_at": "2021-01-01T00:00:00.000Z",
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z",
  • "deleted_at": "2021-01-01T00:00:00.000Z",
  • "last_active_at": "2021-01-01T00:00:00.000Z",
  • "email_verified_at": "2021-01-01T00:00:00.000Z",
  • "last_check_in": {
    },
  • "avatar_id": "000000-000000-000000-000000",
  • "avatar": {},
  • "external_ref": "string"
}

Response samples

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

Get retail products to offer to the customer during checkout.

Returns a collection of retail products which should be offered to the customer based on the items they have in their basket. For a retail product to appear here, it needs to be added as a cross-sell offering for at least one of the items in the basket.

path Parameters
basketId
required
string

The ID of the basket.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get configuration details required for the checkout for the current basket

Get configuration details required for the checkout for the current basket

path Parameters
basketId
required
string

The ID of the basket.

Responses

Response samples

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

Apply a new coupon to the basket.

path Parameters
basketId
required
string

The ID of the basket.

Request Body schema: application/json
id
string

The ID of the coupon code.

code
string

The code used to add the coupon.

object (BasketCouponSummary)

Responses

Request samples

Content type
application/json
{
  • "id": "60254378631dc82ed0792333",
  • "code": "ABC123",
  • "coupon": {
    }
}

Response samples

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

Remove a coupon from the basket.

path Parameters
basketId
required
string

The ID of the basket.

couponId
required
string

The ID of the coupon code to be removed.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Apply a customer credit to a basket.

path Parameters
basketId
required
string

The ID of the order you want to apply the credit to.

Request Body schema: application/json
id
string <uuid>

The ID of the customer credit to be applied.

Responses

Request samples

Content type
application/json
{
  • "id": "de96c16f-e4ce-414d-aa4e-ae7f0f6e2a5a"
}

Response samples

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

Remove a customer credit from a basket.

path Parameters
basketId
required
string

The ID of the basket you want to update.

customerCreditId
required
string

The ID of the customer credit you want to remove.

Responses

Response samples

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

Apply a new voucher to the basket.

path Parameters
basketId
required
string

The ID of the basket.

Request Body schema: application/json
code
string

The voucher code.

Responses

Request samples

Content type
application/json
{
  • "code": "ABCDEFGHIJ123"
}

Response samples

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

Remove a voucher from the basket.

path Parameters
basketId
required
string

The ID of the basket.

voucherId
required
string

The ID of the voucher code to be removed.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Set up a new pending payment for the basket

Set up a new pending payment for the basket

path Parameters
basketId
required
string

The ID of the basket.

Request Body schema: application/json

Pass an object containing optional payment details.

id
string

A unique ID for the basket payment

amount
integer

The amount of the payment in the smallest denomination, e.g. pence

processor
string

The processor for the payment to be added

details_source
string

How the payment method will be entered

capture_method
string

How the payment amount should be captured

object

A dictionary of processor-specific data

Responses

Request samples

Content type
application/json
{
  • "id": "5f204853badb610f2167d67c",
  • "amount": 1000,
  • "processor": "stripe",
  • "details_source": "pay_by_link",
  • "capture_method": "automatic",
  • "processor_data": { }
}

Response samples

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

Remove a pending payment from a basket.

path Parameters
basketId
required
string

The ID of the basket.

paymentId
required
string

The ID of the payment.

Responses

Response samples

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

Reserve the basket

Reserve the basket

path Parameters
basketId
required
string

The ID of the basket.

Responses

Response samples

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

Check that the basket is in a state that is ready to be submitted.

Check that the basket is in a state that is ready to be submitted.

path Parameters
basketId
required
string

The ID of the basket.

Responses

Response samples

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

Complete the checkout process

Complete the checkout process

path Parameters
basketId
required
string

The ID of the basket.

Request Body schema: application/json

Pass an object containing optional customer details.

id
string

The ID of the customer.

first_name
string

The first name of the customer.

last_name
string

The last name of the customer.

full_name
string

The customer's full name

phone
string

The customer's phone number

has_password
boolean

Whether the user has a password

dob
string <date>

The customer's date of birth

brand_id
string

The ID of the brand this customer belongs to

site_id
string

The ID of the site this customer belongs to

stripe_id
string

The Stripe Customer ID for this customer

express_stripe_id
string

The Stripe Customer ID for this customer if they also exist in Trybe's legacy Stripe integration

email
string

The email address of the customer.

Array of objects (CustomerLabel)
preferred_locale
string

The preferred locale of the customer

locked_at
string <date-time> Nullable

The datetime which the customer was locked, or null if it has not been locked.

created_at
string <date-time>

The datetime which the customer was created

updated_at
string <date-time>

The datetime which the customer was last updated

deleted_at
string <date-time>

The datetime which the customer was anonymised, or null if it has not been.

last_active_at
string <date-time>

The datetime which the customer was last active

email_verified_at
string <date-time>

The datetime which the customer verified their email address

object
avatar_id
string <uuid>

The id of the log image

object (Media)
external_ref
string

An external reference for this customer.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "first_name": "Jane",
  • "last_name": "Doe",
  • "full_name": "Jane Doe",
  • "phone": "+447900000000",
  • "has_password": true,
  • "dob": "1995-01-13T00:00:00.000Z",
  • "brand_id": "000000-000000-000000-000000",
  • "site_id": "000000-000000-000000-000000",
  • "stripe_id": "cus_1234567890",
  • "express_stripe_id": "cus_1234567890",
  • "email": "janedoe@example.com",
  • "labels": [
    ],
  • "preferred_locale": "en",
  • "locked_at": "2021-01-01T00:00:00.000Z",
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z",
  • "deleted_at": "2021-01-01T00:00:00.000Z",
  • "last_active_at": "2021-01-01T00:00:00.000Z",
  • "email_verified_at": "2021-01-01T00:00:00.000Z",
  • "last_check_in": {
    },
  • "avatar_id": "000000-000000-000000-000000",
  • "avatar": {},
  • "external_ref": "string"
}

Response samples

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

Create a new membership

Creates a new basket for a membership, and this in turn creates the membership.

Request Body schema: application/json
customer_id
required
string <uuid>

The ID of the customer who this membership should belong to

site_id
required
string <uuid>

The ID of the site which this membership is for

membership_type_id
required
string <uuid>

The membership type ID

membership_rate_id
required
string <uuid>

The membership rate ID

start_date
string <date-time>

The date and time which the membership should start

end_date
string <date-time>

The date and time which the membership should end

Responses

Request samples

Content type
application/json
{
  • "customer_id": "00000000-0000-0000-0000-444444444444",
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "membership_type_id": "00000000-0000-0000-0000-222222222222",
  • "membership_rate_id": "00000000-0000-0000-0000-333333333333",
  • "start_date": "2021-07-28T00:00:00.000Z",
  • "end_date": "2019-08-24T14:15:22Z"
}

Response samples

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

Calendar

Endpoints for retrieving data to be displayed on the calendar.

Get calendar events (v2)

Returns an array of all calendar events for a single date

query Parameters
date
string <date>
Example:

The date to fetch events for

view_type
string
Enum: "area" "practitioner" "room"

The view type (resource) to return events for. If specified, an event object will be returned for each resource of this type in the event.

zone_id
string

The zone ID to filter events for.

include_customers
string <boolean>
include_payments
string <boolean>
events
string

A comma-separated list of event keys and event types to return. The format is {event_type}..{event_key}, for example: appointment..1234_5678,session..5678_9012

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Get resources and meta data for rendering a calendar view.

Returns details of all calendar resources for a single date.

query Parameters
date
required
string <date>
Example:

The date to fetch resources for.

zone_id
string

The zone ID to filter resources for.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Get the occupancy details of a given day in the calendar.

Returns details of all information pertaining to occupancy.

query Parameters
date
required
string <date>
Example:

The date to fetch occupancy for.

view_type
string
Enum: "area" "practitioner" "room"

The view type (resource) to return occupancy for. If specified, an event object will be returned for each resource of this type in the event.

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

Responses

Response samples

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

Orders

Get a list of orders.

Returns an array of completed baskets along with customer and item details.

query Parameters
query
string

The query to filter orders on.

customer_id
string <uuid>
Example: customer_id=Jane

The customer ID to filter orders on.

status
string
Example: status=settled

The status to filter orders on.

labels
string
Example: labels=settled

The labels to filter orders on.

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

item_offering_id
string
Example: item_offering_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of offering ids to fetch orders for

submitted_by_id
string
Example: submitted_by_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of user ids to fetch orders for

revenue_date_from
string <date>
Example:

Filter on orders with a revenue date on or after this date.

revenue_date_to
string <date>
Example:

Filter on orders with a revenue date on or before this date.

item_date
string <date>
Example:

Filter on orders with an items on this date.

item_date_from
string <date-time>
Example: item_date_from=2019-01-15T12:00:00+01:00

Filter on orders with an item date on or after this date.

item_date_to
string <date-time>
Example: item_date_to=2019-01-15T12:00:00+01:00

Filter on orders with an item date on or before this date.

item_status
string
Example: item_status=confirmed

Filter on orders with an item status of one of these comma-separated values.

submitted_at_from
string <date-time>
Example: submitted_at_from=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date on or after this time.

submitted_at_to
string <date-time>
Example: submitted_at_to=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date before this date.

updated_at_from
string <date-time>
Example: updated_at_from=2019-01-15T12:00:00+01:00

Filter on orders with a updated date on or after this date.

updated_at_to
string <date-time>
Example: updated_at_to=2019-01-15T12:00:00+01:00

Filter on orders with a updated date before this date.

is_membership
boolean
Example: is_membership=true

Filter on orders that contain a membership purchase

has_outstanding_balance
boolean
Example: has_outstanding_balance=true

Filters on orders that have an outstanding balance

sales_channel
string
Example: sales_channel=5dcb47800000000000000000

Filter on orders that have the given sales channel ID

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Create a new order

Creates a new order

Request Body schema: application/json

Pass an object containing the ID of the organisation that owns the items to be added.

site_id
string

The ID of the site owning the items to be added to the order.

customer_id
string

The ID of the customer to associate this order with.

status
string

The status of the order.

external_ref
string

An external reference to be stored against the order.

Responses

Request samples

Content type
application/json
{
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "customer_id": "00000000-0000-0000-0000-222222222222",
  • "status": "new",
  • "external_ref": "ABC-123"
}

Response samples

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

Schedule a list of orders to be generated asynchronously.

query Parameters
query
string
Example: query=Jane

The query to filter orders on.

customer_id
string <uuid>
Example: customer_id=Jane

The customer ID to filter orders on.

status
string
Example: status=settled

The status to filter orders on.

labels
string
Example: labels=settled

The labels to filter orders on.

page
integer
Example: page=1

The page to retrieve results from.

per_page
integer
Example: per_page=15

The number of results to return per page.

item_offering_id
string
Example: item_offering_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of offering ids to fetch orders for.

revenue_date_from
string <date>
Example:

Filter on orders with a revenue date on or after this date.

revenue_date_to
string <date>
Example:

Filter on orders with a revenue date on or before this date.

item_date_from
string <date-time>
Example: item_date_from=2019-01-15T12:00:00+01:00

Filter on orders with an item date on or after this date.

item_date_to
string <date-time>
Example: item_date_to=2019-01-15T12:00:00+01:00

Filter on orders with an item date on or before this date.

item_status
string
Example: item_status=confirmed

Filter on orders with an item status of one of these comma-separated values.

submitted_at_from
string <date-time>
Example: submitted_at_from=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date on or after this time.

submitted_at_to
string <date-time>
Example: submitted_at_to=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date before this date.

updated_at_from
string <date-time>
Example: updated_at_from=2019-01-15T12:00:00+01:00

Filter on orders with a updated date on or after this date.

updated_at_to
string <date-time>
Example: updated_at_to=2019-01-15T12:00:00+01:00

Filter on orders with a updated date before this date.

submitted_by_id
string

A comma-separated list of user IDs to filter for items submitted by that user.

is_membership
boolean
Example: is_membership=true

Filter on orders that contain a membership purchase

has_outstanding_balance
boolean
Example: has_outstanding_balance=true

Filters on orders that have an outstanding balance

sales_channel
string
Example: sales_channel=5dcb47800000000000000000

Filter on orders that have the given sales channel ID

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Anonymises orders belonging to the given customer

Request Body schema: application/json
customer_id
required
string <uuid>

The ID of the customer to anonymise orders for

Responses

Request samples

Content type
application/json
{
  • "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e"
}

Get order details

Returns the details of a single order

path Parameters
orderId
required
string

The ID of the order you want to retrieve

Responses

Response samples

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

Update an existing order

path Parameters
orderId
required
string

The ID of the order you want to retrieve

Request Body schema: application/json

Updates the specified Order by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

sales_channel_id
string

The ID of the sales channel for this order.

stage
string
Enum: "not_arrived" "arrived" "in_treatment" "checked_out"

The current stage of the order.

customer_id
string

The ID of the customer this order belongs to.

integration_config_id
string

The ID of the integration config to associate with this order.

external_ref
string

An external reference to be stored against the order.

Responses

Request samples

Content type
application/json
{
  • "sales_channel_id": "5f344d756e7f2e7d3f2e4b82",
  • "stage": "not_arrived",
  • "customer_id": "5f344d756e7f2e7d3f2e4b83",
  • "integration_config_id": "5f344d756e7f2e7d3f2e4b83",
  • "external_ref": "ABC-123"
}

Response samples

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

Cancel an order and all its items.

Cancels an order and all associated order items

path Parameters
orderId
required
string

The ID of the order you want to cancel.

Responses

Response samples

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

Reserve the order

Reserve the order

path Parameters
orderId
required
string

The ID of the order.

Request Body schema: application/json
reserve_mins
integer

Optionally specify a number of minutes that the items should be reserved for.

Responses

Request samples

Content type
application/json
{
  • "reserve_mins": 15
}

Response samples

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

Submit order

Submits the given order

path Parameters
orderId
required
string

The ID of the basket.

query Parameters
skip_availability_checks
boolean

Whether to skip availability checks during this request.

Responses

Response samples

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

Get the revenue lines for an order

Returns the revenue lines for an order. This is an array of objects containing the gross, net tax and discount amounts as well as asscociated basket item id.

path Parameters
orderId
required
string

The ID of the order.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Get the ledger lines for an order

Returns the ledger lines for an order. This is an array of objects describing all payments and revenues associated with the order.

path Parameters
orderId
required
string

The ID of the order.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get the ledger line postings for an order

Returns the ledger line postings for an order. This is an array of objects describing attempts to post one or more ledger lines.

path Parameters
orderId
required
string

The ID of the order.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Settle (check out) an order

Moves the order to 'settled' status after which it cannot be modified. The order must be in submitted state first.

path Parameters
orderId
required
string

The ID of the basket.

Responses

Response samples

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

Apply a discount-type voucher to an order

Applies a voucher with a discount amount to an order. Vouchers with a monetary amount need to be added as a payment.

path Parameters
orderId
required
string

The ID of the order.

Request Body schema: application/json
code
string

The code of the voucher to be added

Responses

Request samples

Content type
application/json
{
  • "code": "CSZYGTXOTNXM"
}

Response samples

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

Remove a discount-type voucher from an order

Removes a voucher from an order.

path Parameters
orderId
required
string

The ID of the order.

voucherId
required
string

The ID of the applied voucher code.

Responses

Response samples

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

Mark order as no show

Moves the order to 'no show' status after which it cannot be modified.

path Parameters
orderId
required
string

The ID of the basket.

Responses

Response samples

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

Lock the given order

Locks the order indicating that the order should not be moved

path Parameters
orderId
required
string

The ID of the order.

Responses

Response samples

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

Unlock the given order

Unlocks the order indicating that the order can now be moved

path Parameters
orderId
required
string

The ID of the order.

Responses

Response samples

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

Restore (un-cancel) an order

Restores a cancelled order to 'new' status

path Parameters
orderId
required
string

The ID of the basket.

Responses

Response samples

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

Add an item to the order

Items can only be added to orders in submitted state.

path Parameters
orderId
required
string

The ID of the order items are to be added to.

query Parameters
skip_availability_checks
boolean

Whether to skip availability checks during this request.

Request Body schema: application/json

Pass an object containing the details of the item to be added.

offering_type
string

The type of item being added.

offering_id
string

The ID of the item to be added.

date
string

The date of the item, if applicable

time
string

The start date and time of the item, if applicable.

duration
integer

The duration of the item being added, in minutes, if applicable.

quantity
integer

The quantity of items being added, if applicable.

Array of objects (Guest)

Pass an array of guests to be associated with this basket item.

object
practitioner_ids
Array of strings

The IDs of practitioners who will carry out this booking.

room_id
string

The ID of the room the booking should be assigned to.

Responses

Request samples

Content type
application/json
{
  • "offering_type": "appointment",
  • "offering_id": "5dcb47800000000000000010",
  • "date": "2020-02-24T00:00:00+01:00",
  • "time": "2020-02-24T12:00:00+01:00",
  • "duration": 30,
  • "quantity": 2,
  • "guests": [
    ],
  • "item_configuration": { },
  • "practitioner_ids": [
    ],
  • "room_id": "5dcb47800000000000000011"
}

Response samples

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

Update an item in the order

path Parameters
orderId
required
string

The ID of the order.

itemId
required
string

The ID of the item being updated.

query Parameters
skip_availability_checks
boolean

Whether to skip availability checks during this request.

Request Body schema: application/json

Pass an object containing the details of the item to be updated.

offering_type
string

The type of item being added.

offering_id
string

The ID of the item to be added.

date
string

The date of the item, if applicable

time
string

The start date and time of the item, if applicable.

duration
integer

The duration of the item being added, in minutes, if applicable.

quantity
integer

The quantity of items being added, if applicable.

Array of objects (Guest)

Pass an array of guests to be associated with this basket item.

object
practitioner_ids
Array of strings

The IDs of practitioners who will carry out this booking.

room_id
string

The ID of the room the booking should be assigned to.

Responses

Request samples

Content type
application/json
{
  • "offering_type": "appointment",
  • "offering_id": "5dcb47800000000000000010",
  • "date": "2020-02-24T00:00:00+01:00",
  • "time": "2020-02-24T12:00:00+01:00",
  • "duration": 30,
  • "quantity": 2,
  • "guests": [
    ],
  • "item_configuration": { },
  • "practitioner_ids": [
    ],
  • "room_id": "5dcb47800000000000000011"
}

Response samples

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

Cancel an order item and remove it from the order.

path Parameters
orderId
required
string

The ID of the order you want to update.

itemId
required
string

The ID of the order item you want to remove.

Responses

Response samples

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

Update the delivery date of a voucher purchase item in the order

path Parameters
orderId
required
string

The ID of the order.

itemId
required
string

The ID of the item being updated.

Request Body schema: application/json

Pass an object containing the new delivery date.

price
string

The new delivery date of the voucherPurchase item, in a GMT string.

Responses

Request samples

Content type
application/json
{
  • "price": 2800
}

Response samples

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

Update (increase) the price of an item in the order

path Parameters
orderId
required
string

The ID of the order.

itemId
required
string

The ID of the item being updated.

Request Body schema: application/json

Pass an object containing the new item price.

price
integer

The new price of the item, in the smallest denomination. This must be higher than the item's original price; a discount may be used to decrease the price of an item.

Responses

Request samples

Content type
application/json
{
  • "price": 2800
}

Response samples

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

Reset the price of an item in the order

path Parameters
orderId
required
string

The ID of the order.

itemId
required
string

The ID of the item being updated.

Responses

Response samples

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

Add a discount to an order.

path Parameters
orderId
required
string

The ID of the order.

itemId
required
string

The ID of the order item.

Request Body schema: application/json
id
string

The ID of the order discount

amount_type
string
Enum: "fixed_amount" "percentage" "monetary"

The type of the amount this discount describes.

fixed_amount
integer

The amount of the discount if the type is monetary.

percentage
integer

The amount of the discount if the type is percentage.

calculated_amount
integer

The total calculated amount of this discount.

currency
string

The currency code for the discount.

discount_type_id
string

The ID of the discount type being used, if applicable.

is_custom_amount
boolean

True if the discount amount should be taken from this model rather than the related discount type.

coupon_code_id
string

The ID of the coupon code used to add this discount, if applicable.

object (BasketCouponSummary)
reason_code
string

A code to describe the reason for the discount.

added_by_id
string

The ID of the user who added the discount.

discount_type_code
string

The code for the discount type.

applicable_for
string
Enum: "app_only" "app_and_booking_engine"

Where this discount type is able to be applied.

discount_amount
integer

The value of the discount to be applied when a discount type is used. This can be used as a monetary or percentage value for an in-app discount type and is set to percentage for a promo code.

object (UserSummary)
applied_at
string <date-time>

The date and time that the discount was applied.

site_id
string

The ID of the site the discount is associated with.

Responses

Request samples

Content type
application/json
{
  • "id": "5f7dd49633a7b72a5633380f",
  • "amount_type": "fixed_amount",
  • "fixed_amount": 150,
  • "percentage": 15,
  • "calculated_amount": 150,
  • "currency": "gbp",
  • "discount_type_id": "6307518e13da732ca805dbfe",
  • "is_custom_amount": true,
  • "coupon_code_id": "60587adcb907570dfa4f0b42",
  • "coupon": {
    },
  • "reason_code": "general",
  • "added_by_id": "916f12b0-02b2-4e68-8bd0-3245f2d061c0",
  • "discount_type_code": "SUMMER23",
  • "applicable_for": "app_and_booking_engine",
  • "discount_amount": 15,
  • "applied_by": {
    },
  • "applied_at": "2020-09-24T12:00:00+01:00",
  • "site_id": "00000000-0000-0000-0000-111111111111"
}

Response samples

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

Delete a discount

path Parameters
orderId
required
string

The ID of the order you want to delete a discount for.

itemId
required
string

The ID of the order item.

discountId
required
string

The ID of the discount you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Add an option for a package item in the order.

path Parameters
orderId
required
string

The ID of the order.

itemId
required
string

The ID of the item being updated.

Request Body schema: application/json

Pass an object containing the details of the item to be updated.

choice_id
string

The ID of the package choice.

option_id
string

The ID of the chosen option.

room_id
string

The ID of the room.

practitioner_id
string

The ID of the chosen practitioner.

practitioner_ids
Array of strings

The IDs of the chosen practitioners.

time
string <date-time>

The start date and time of the item, if applicable.

duration
integer

The duration of the item being added, in minutes, if applicable.

guest_ids
Array of strings

An optional array of guest IDs who are having this item. If this is not passed then the guests will be inferred from the package and item being added.

object

Responses

Request samples

Content type
application/json
{
  • "choice_id": "5f184bb0b6ecff2e8157bf26",
  • "option_id": "5f184bb0b6ecff2e8157bf27",
  • "room_id": "5f184bb0b6ecff2e8157bf26",
  • "practitioner_id": "5f184bb0b6ecff2e8157bf27",
  • "practitioner_ids": [
    ],
  • "time": "2020-02-24T12:00:00+01:00",
  • "duration": 60,
  • "guest_ids": [
    ],
  • "item_configuration": { }
}

Response samples

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

Update an option for a package item in the order.

path Parameters
orderId
required
string

The ID of the order.

itemId
required
string

The ID of the item being updated.

packageItemId
required
string

The ID of the package item being removed.

Request Body schema: application/json

Pass an object containing the details of the item to be updated.

choice_id
string

The ID of the package choice.

option_id
string

The ID of the chosen option.

room_id
string

The ID of the room.

practitioner_id
string

The ID of the chosen practitioner.

practitioner_ids
Array of strings

The IDs of the chosen practitioners.

time
string <date-time>

The start date and time of the item, if applicable.

duration
integer

The duration of the item being added, in minutes, if applicable.

guest_ids
Array of strings

An optional array of guest IDs who are having this item. If this is not passed then the guests will be inferred from the package and item being added.

object

Responses

Request samples

Content type
application/json
{
  • "choice_id": "5f184bb0b6ecff2e8157bf26",
  • "option_id": "5f184bb0b6ecff2e8157bf27",
  • "room_id": "5f184bb0b6ecff2e8157bf26",
  • "practitioner_id": "5f184bb0b6ecff2e8157bf27",
  • "practitioner_ids": [
    ],
  • "time": "2020-02-24T12:00:00+01:00",
  • "duration": 60,
  • "guest_ids": [
    ],
  • "item_configuration": { }
}

Response samples

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

Remove an option for a package item in the order.

path Parameters
orderId
required
string

The ID of the order.

itemId
required
string

The ID of the item being updated.

packageItemId
required
string

The ID of the package item being removed.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

[Legacy] Add an item to the order Deprecated

Items can only be added to orders in submitted state.

path Parameters
orderId
required
string

The ID of the order items are to be added to.

query Parameters
skip_availability_checks
boolean

Whether to skip availability checks during this request.

Request Body schema: application/json

Pass an object containing the details of the item to be added.

offering_type
string

The type of item being added.

offering_id
string

The ID of the item to be added.

date
string

The date of the item, if applicable

time
string

The start date and time of the item, if applicable.

duration
integer

The duration of the item being added, in minutes, if applicable.

quantity
integer

The quantity of items being added, if applicable.

Array of objects (Guest)

Pass an array of guests to be associated with this basket item.

object
practitioner_ids
Array of strings

The IDs of practitioners who will carry out this booking.

room_id
string

The ID of the room the booking should be assigned to.

Responses

Request samples

Content type
application/json
{
  • "offering_type": "appointment",
  • "offering_id": "5dcb47800000000000000010",
  • "date": "2020-02-24T00:00:00+01:00",
  • "time": "2020-02-24T12:00:00+01:00",
  • "duration": 30,
  • "quantity": 2,
  • "guests": [
    ],
  • "item_configuration": { },
  • "practitioner_ids": [
    ],
  • "room_id": "5dcb47800000000000000011"
}

Response samples

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

[Legacy] Update an item in the order Deprecated

path Parameters
orderId
required
string

The ID of the order.

itemId
required
string

The ID of the item being updated.

query Parameters
skip_availability_checks
boolean

Whether to skip availability checks during this request.

Request Body schema: application/json

Pass an object containing the details of the item to be updated.

offering_type
string

The type of item being added.

offering_id
string

The ID of the item to be added.

date
string

The date of the item, if applicable

time
string

The start date and time of the item, if applicable.

duration
integer

The duration of the item being added, in minutes, if applicable.

quantity
integer

The quantity of items being added, if applicable.

Array of objects (Guest)

Pass an array of guests to be associated with this basket item.

object
practitioner_ids
Array of strings

The IDs of practitioners who will carry out this booking.

room_id
string

The ID of the room the booking should be assigned to.

Responses

Request samples

Content type
application/json
{
  • "offering_type": "appointment",
  • "offering_id": "5dcb47800000000000000010",
  • "date": "2020-02-24T00:00:00+01:00",
  • "time": "2020-02-24T12:00:00+01:00",
  • "duration": 30,
  • "quantity": 2,
  • "guests": [
    ],
  • "item_configuration": { },
  • "practitioner_ids": [
    ],
  • "room_id": "5dcb47800000000000000011"
}

Response samples

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

[Legacy] Cancel an order item and remove it from the order. Deprecated

path Parameters
orderId
required
string

The ID of the order you want to update.

itemId
required
string

The ID of the order item you want to remove.

Responses

Response samples

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

Update the lead booker details for an order.

Update the lead booker details for an order. If there is a 'lead booker' guest attached to the order, their details will also be updated.

path Parameters
orderId
required
string

The ID of the order you want to update

Request Body schema: application/json
first_name
string

The first name of the customer.

last_name
string

The last name of the customer.

email
string

The email address of the customer.

phone
string

The customer's phone number.

Responses

Request samples

Content type
application/json
{
  • "first_name": "Jane",
  • "last_name": "Doe",
  • "email": "janedoe@example.com",
  • "phone": "+447727123456"
}

Response samples

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

Get all payments for an order.

path Parameters
orderId
required
string

The ID of the order you want to retrieve payments for.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Add a payment to an order.

path Parameters
orderId
required
string

The ID of the order you want to add a payment to.

query Parameters
skip_availability_checks
boolean

Whether to skip availability checks during this request.

Request Body schema: application/json
processor
string

The payment processor to be used for the payment

capture_method
string

At what point the payment amount will be captured

amount
integer

The amount of the payment, in the lowest denomination

currency
string

The currency code for the amount

status
string
Enum: "pending" "paid" "ready_for_capture" "payment_method_stored" "payment_method_charged" "requires_action" "expired" "failed"

The current status of the payment

details_source
string

How the payment method will be entered

object

A dictionary of processor-specific data

Responses

Request samples

Content type
application/json
{
  • "processor": "stripe",
  • "capture_method": "automatic",
  • "amount": 10000,
  • "currency": "gbp",
  • "status": "pending",
  • "details_source": "pay_by_link",
  • "processor_data": { }
}

Response samples

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

Get payment details

path Parameters
orderId
required
string

The ID of the order you want to retrieve a payment for.

paymentId
required
string

The ID of the payment you want to retrieve.

Responses

Response samples

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

Delete a payment

path Parameters
orderId
required
string

The ID of the order you want to update.

paymentId
required
string

The ID of the payment you want to delete.

Responses

Response samples

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

Charge the given payment, which must be a manual or on-demand capture type.

path Parameters
orderId
required
string

The ID of the order you want to charge a payment for.

paymentId
required
string

The ID of the payment you want to charge.

Responses

Response samples

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

Get refunds for the specified order.

path Parameters
orderId
required
string

The ID of the order you want to refund a payment for.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get a single order refund

path Parameters
orderId
required
string

The ID of the order you want to retrieve a refund for.

refundId
required
string

The ID of the refund you want to refund.

Responses

Response samples

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

Add a refund against the specified payment.

path Parameters
orderId
required
string

The ID of the order you want to refund a payment for.

paymentId
required
string

The ID of the payment you want to refund.

Request Body schema: application/json

Pass a CreateRefund object.

amount
number

The amount to be refunded, in the smallest denomination. Defaults to the remaining payment amount if not specified.

notes
string

Notes to be stored against the refund.

processor
string

Specify if the refund should use a different processor to the original payment. This is only permitted in certain circumstances, for example specifying 'manual' to record a PMS payment as manually refunded.

object (CreateRefundAllocations)

A map of order items with the corresponding amounts to be refunded

Responses

Request samples

Content type
application/json
{
  • "amount": 4500,
  • "notes": "Customer cancelled.",
  • "processor": "manual",
  • "allocations": {
    }
}

Response samples

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

Transfer the overpayment of an order to a voucher

path Parameters
orderId
required
string

The ID of the order you want to retrieve discounts for.

Request Body schema: application/json
voucher_type_id
string

The ID of the voucher type to create.

Responses

Request samples

Content type
application/json
{
  • "voucher_type_id": "631748c2eb5a8f5eb5035f42"
}

Response samples

Content type
application/json
{
  • "code": "858297JWY5SY",
  • "payment_processor": "external_voucher",
  • "processor_voucher_id": "16319",
  • "processor": "Giftpro",
  • "valid_from_date": "2020-08-12T10:30:00+01:00",
  • "valid_to_date": "2020-08-12T12:30:00+01:00",
  • "amount_type": "discount_to_zero",
  • "total": 10000,
  • "balance": 9200,
  • "currency": "gbp",
  • "partially_redeemable": true,
  • "voucher_name": "30 min treatment",
  • "valid_offerings": [
    ],
  • "customer_id": "d2330199-49a1-462f-9bd8-4680fc929245"
}

Get all discounts for an order.

path Parameters
orderId
required
string

The ID of the order you want to retrieve discounts for.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Add a discount to an order.

path Parameters
orderId
required
string

The ID of the order you want to add a discount to.

Request Body schema: application/json
id
string

The ID of the order discount

amount_type
string
Enum: "fixed_amount" "percentage" "monetary"

The type of the amount this discount describes.

fixed_amount
integer

The amount of the discount if the type is monetary.

percentage
integer

The amount of the discount if the type is percentage.

calculated_amount
integer

The total calculated amount of this discount.

currency
string

The currency code for the discount.

discount_type_id
string

The ID of the discount type being used, if applicable.

is_custom_amount
boolean

True if the discount amount should be taken from this model rather than the related discount type.

coupon_code_id
string

The ID of the coupon code used to add this discount, if applicable.

object (BasketCouponSummary)
reason_code
string

A code to describe the reason for the discount.

added_by_id
string

The ID of the user who added the discount.

discount_type_code
string

The code for the discount type.

applicable_for
string
Enum: "app_only" "app_and_booking_engine"

Where this discount type is able to be applied.

discount_amount
integer

The value of the discount to be applied when a discount type is used. This can be used as a monetary or percentage value for an in-app discount type and is set to percentage for a promo code.

object (UserSummary)
applied_at
string <date-time>

The date and time that the discount was applied.

site_id
string

The ID of the site the discount is associated with.

Responses

Request samples

Content type
application/json
{
  • "id": "5f7dd49633a7b72a5633380f",
  • "amount_type": "fixed_amount",
  • "fixed_amount": 150,
  • "percentage": 15,
  • "calculated_amount": 150,
  • "currency": "gbp",
  • "discount_type_id": "6307518e13da732ca805dbfe",
  • "is_custom_amount": true,
  • "coupon_code_id": "60587adcb907570dfa4f0b42",
  • "coupon": {
    },
  • "reason_code": "general",
  • "added_by_id": "916f12b0-02b2-4e68-8bd0-3245f2d061c0",
  • "discount_type_code": "SUMMER23",
  • "applicable_for": "app_and_booking_engine",
  • "discount_amount": 15,
  • "applied_by": {
    },
  • "applied_at": "2020-09-24T12:00:00+01:00",
  • "site_id": "00000000-0000-0000-0000-111111111111"
}

Response samples

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

Delete a discount

path Parameters
orderId
required
string

The ID of the order you want to delete a discount for.

discountId
required
string

The ID of the discount you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Apply a credit to an order.

path Parameters
orderId
required
string

The ID of the order you want to apply the credit to.

Request Body schema: application/json
id
string <uuid>

The ID of the customer credit to be applied.

Responses

Request samples

Content type
application/json
{
  • "id": "de96c16f-e4ce-414d-aa4e-ae7f0f6e2a5a"
}

Response samples

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

Remove a customer credit from an order.

path Parameters
orderId
required
string

The ID of the order you want to update.

customerCreditId
required
string

The ID of the customer credit you want to remove.

Responses

Response samples

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

Get all emails relating to an order.

path Parameters
orderId
required
string

The ID of the order you want to get emails for.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Send a new email for an order.

path Parameters
orderId
required
string

The ID of the order you want to send an email for.

Request Body schema: application/json
type
string

The type of the email to be sent.

Responses

Request samples

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

Response samples

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

Preview a new email for an order.

path Parameters
orderId
required
string

The ID of the order you want to preview an email for.

Request Body schema: application/json
type
string

The type of the email to be sent.

Responses

Request samples

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

Response samples

Content type
{
  • "data": {
    }
}

Get a single order email.

path Parameters
orderId
required
string

The ID of the order the email relates to.

emailId
required
string

The ID of the email you want to retrieve.

Responses

Response samples

Content type
{
  • "data": {
    }
}

Delete an order email

path Parameters
orderId
required
string

The ID of the order the email relates to.

emailId
required
string

The ID of the email you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get all notes attached to an order.

path Parameters
orderId
required
string

The ID of the order you want to get notes for.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Add a new note to an order.

path Parameters
orderId
required
string

The ID of the order you want to add a note to.

Request Body schema: application/json

Pass an OrderNote object.

id
string
order_id
string

The order this note belongs too

content
string

The contents of the note.

object
created_by_id
string

The ID of the user who added the note.

created_at
string <date-time>

The date and time the note was created.

Responses

Request samples

Content type
application/json
{
  • "id": "5ed2b95f72823c4f98419f19",
  • "order_id": "5ed2b95f72823c4f98419f20",
  • "content": "Requested a double treatment room.",
  • "created_by": {
    },
  • "created_by_id": "5ed2b95f72823c4f98419f20",
  • "created_at": "2019-01-15T12:00:00+01:00"
}

Response samples

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

Get a single order note.

path Parameters
orderId
required
string

The ID of the order the note belongs to.

noteId
required
string

The ID of the note you want to retrieve.

Responses

Response samples

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

Update an order note.

path Parameters
orderId
required
string

The ID of the order the note belongs to.

noteId
required
string

The ID of the note you want to retrieve.

Request Body schema: application/json

Pass an OrderNote object. Only included fields will be updated.

id
string
order_id
string

The order this note belongs too

content
string

The contents of the note.

object
created_by_id
string

The ID of the user who added the note.

created_at
string <date-time>

The date and time the note was created.

Responses

Request samples

Content type
application/json
{
  • "id": "5ed2b95f72823c4f98419f19",
  • "order_id": "5ed2b95f72823c4f98419f20",
  • "content": "Requested a double treatment room.",
  • "created_by": {
    },
  • "created_by_id": "5ed2b95f72823c4f98419f20",
  • "created_at": "2019-01-15T12:00:00+01:00"
}

Response samples

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

Delete an order note

path Parameters
orderId
required
string

The ID of the order the note belongs to.

noteId
required
string

The ID of the note you want to retrieve.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get all guests associated with this order

Retrieves all guests associated with a order.

path Parameters
orderId
required
string

The ID of the order items are to be added to.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Add a guest to the order

Adds a guest to an order

path Parameters
orderId
required
string

The ID of the order the guest is to be added to.

Request Body schema: application/json

Pass an object containing the details of the guest to be added.

id
string

The ID of the guest.

name
string

The guest's full name.

first_name
string

The first name of the guest.

last_name
string

The last name of the guest.

is_lead_booker
boolean

Whether this guest is the lead booker

intake_form_submission_id
string

The ID of the submission for the guest.

intake_form_complete
boolean

True if the guest has completed their intake form.

intake_form_submitted_at
string <date-time>

The date and time the intake form was submitted.

Responses

Request samples

Content type
application/json
{
  • "id": "5e932c0901d210625e3a8766",
  • "name": "Jane Smith",
  • "first_name": "Jane",
  • "last_name": "Smith",
  • "is_lead_booker": true,
  • "intake_form_submission_id": "5f344d756e7f2e7d3f2e4b82",
  • "intake_form_complete": true,
  • "intake_form_submitted_at": "2020-02-24T12:00:00+00:00"
}

Response samples

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

Update a guest in the order

Update a guest in the order.

path Parameters
orderId
required
string

The ID of the order.

guestId
required
string

The ID of the guest being updated.

Request Body schema: application/json

Pass an object containing the details of the guest to be updated.

id
string

The ID of the guest.

name
string

The guest's full name.

first_name
string

The first name of the guest.

last_name
string

The last name of the guest.

is_lead_booker
boolean

Whether this guest is the lead booker

intake_form_submission_id
string

The ID of the submission for the guest.

intake_form_complete
boolean

True if the guest has completed their intake form.

intake_form_submitted_at
string <date-time>

The date and time the intake form was submitted.

Responses

Request samples

Content type
application/json
{
  • "id": "5e932c0901d210625e3a8766",
  • "name": "Jane Smith",
  • "first_name": "Jane",
  • "last_name": "Smith",
  • "is_lead_booker": true,
  • "intake_form_submission_id": "5f344d756e7f2e7d3f2e4b82",
  • "intake_form_complete": true,
  • "intake_form_submitted_at": "2020-02-24T12:00:00+00:00"
}

Response samples

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

Remove a guest from the order

Removes the guest from the order

path Parameters
orderId
required
string

The ID of the order.

guestId
required
string

The ID of the guest being removed.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Add label to order

path Parameters
orderId
required
string

The ID of the order you want to retrieve a label for.

labelId
required
string

The ID of the label you want to associate.

Responses

Response samples

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

Remove a order label

path Parameters
orderId
required
string

The ID of the order you want to delete a label for.

labelId
required
string

The ID of the label you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get the order itinerary, which includes all booking items grouped by date and guest.

path Parameters
orderId
required
string

The ID of the order you want to retrieve an itinerary for.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Generate the order itinerary as a Word document.

path Parameters
orderId
required
string

The ID of the order you want to retrieve an itinerary for.

Responses

Response samples

Content type
application/json
{}

Get a single order from its reference.

Looks up a single order by its reference.

path Parameters
orderRef
required
string
Example: TRY00

The reference of the order you want to retrieve

query Parameters
site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

List orders

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

site_id
string
Example: site_id=10000000-0000-0000-0000-000000000000

The ID of the site that inventory belongs to.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create a new order

Request Body schema: application/json
supplier_id
string

The ID of the supplier this order is for.

supplier_email
string

The email address of the supplier.

site_id
string

The ID of the site this order belongs to.

Responses

Request samples

Content type
application/json
{
  • "supplier_id": "10000000-0000-0000-0000-000000000000",
  • "supplier_email": "orders@example.com",
  • "site_id": "30000000-0000-0000-0000-000000000000"
}

Response samples

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

Retrieve a single order.

path Parameters
orderId
required
string

The ID of the order you want to update.

Responses

Response samples

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

Update an existing order.

path Parameters
orderId
required
string

The ID of the order you want to update.

Request Body schema: application/json
supplier_email
string

The email address of the supplier.

Responses

Request samples

Content type
application/json
{
  • "supplier_email": "orders@example.com"
}

Response samples

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

Delete an order

path Parameters
orderId
required
string

The ID of the order you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "Only draft orders may be updated."
}

Submit an order

path Parameters
orderId
required
string

The ID of the order to submit.

Responses

Response samples

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

Receive an order

path Parameters
orderId
required
string

The ID of the order to receive.

Responses

Response samples

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

List order items

path Parameters
orderId
required
string

The ID of the order you want to update.

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Add an item to an order.

path Parameters
orderId
required
string

The ID of the order you want to update.

Request Body schema: application/json
product_id
string

The Trybe ID of the product being ordered.

quantity
integer

The quantity of the item being ordered.

Responses

Request samples

Content type
application/json
{
  • "product_id": "10000000-0000-0000-0000-000000000000",
  • "quantity": 200
}

Response samples

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

Update an existing order item.

path Parameters
orderId
required
string

The ID of the order you want to update.

orderItemId
required
string

The ID of the order item you want to update.

Request Body schema: application/json
quantity
integer

The quantity of the item being ordered.

Responses

Request samples

Content type
application/json
{
  • "quantity": 200
}

Response samples

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

Delete an order item

path Parameters
orderId
required
string

The ID of the order you want to delete.

orderItemId
required
string

The ID of the order item you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "Only draft orders may be updated."
}

Packages

Get packages

Returns an array of all packages the given user has permission to view

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

archived
boolean

Only show archived resources

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Create a new package

Create a new package

Request Body schema: application/json

To create an package, you pass a Package object.

id
string

The ID of the package.

name
string

The name of this package

description
string

A description of the package

product_code
string

A custom product code for the package.

Array of objects (PackageItemChoice)

An array of choices for items which may be included in this package.

currency
string

The ISO-4217 currency code in lower case

object (Media)
site_id
string

The ID of the site the package belongs to.

Array of objects (AvailabilityRule)

The rules defining periods during which this package is available

max_daily_duration
integer

The maximum amount of time between the start of the first and end of the last item on each day of a package, in minutes.

prevent_choice_overlaps
boolean

Whether to prevent booking choices in this package from overlapping times.

max_advance_bookings_interval
string

The maximum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

Array of objects (PackagePriceRule)

The rules defining prices for this package

object
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
offered_online
boolean

Whether this session type is bookable online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

members_only
boolean

Whether this package requires an active membership in order to book.

permitted_membership_type_ids
Array of strings

If this package is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this package.

Array of objects (MembershipBookingWindow)
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

category_ids
Array of strings

The category IDs associated with this package type

Array of objects (Category)

The category associated with this package type

min_guests
integer

The minimum guests this package is for

max_guests
integer

The maximum guests this package is for

default_revenue_centre
string

The default revenue centre to fall back to to balance allocations

object (OfferingEmailOptions)
updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Treatment and Yoga",
  • "description": "Buy together and save",
  • "product_code": "MAS123",
  • "item_choices": [
    ],
  • "currency": "gbp",
  • "image": {},
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "availability_rules": [
    ],
  • "max_daily_duration": 240,
  • "prevent_choice_overlaps": true,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "price_rules": [
    ],
  • "meta": {
    },
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "offered_online": true,
  • "private": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "min_guests": 2,
  • "max_guests": 2,
  • "default_revenue_centre": "string",
  • "email_options": {
    },
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Get package details

Returns the details of a single package

path Parameters
packageId
required
string

The ID of the package you want to retrieve

Responses

Response samples

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

Update an existing package

Update an existing package

path Parameters
packageId
required
string

The ID of the package you want to update

Request Body schema: application/json

Updates the specified Package object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the package.

name
string

The name of this package

description
string

A description of the package

product_code
string

A custom product code for the package.

Array of objects (PackageItemChoice)

An array of choices for items which may be included in this package.

currency
string

The ISO-4217 currency code in lower case

object (Media)
site_id
string

The ID of the site the package belongs to.

Array of objects (AvailabilityRule)

The rules defining periods during which this package is available

max_daily_duration
integer

The maximum amount of time between the start of the first and end of the last item on each day of a package, in minutes.

prevent_choice_overlaps
boolean

Whether to prevent booking choices in this package from overlapping times.

max_advance_bookings_interval
string

The maximum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

Array of objects (PackagePriceRule)

The rules defining prices for this package

object
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
offered_online
boolean

Whether this session type is bookable online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

members_only
boolean

Whether this package requires an active membership in order to book.

permitted_membership_type_ids
Array of strings

If this package is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this package.

Array of objects (MembershipBookingWindow)
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

category_ids
Array of strings

The category IDs associated with this package type

Array of objects (Category)

The category associated with this package type

min_guests
integer

The minimum guests this package is for

max_guests
integer

The maximum guests this package is for

default_revenue_centre
string

The default revenue centre to fall back to to balance allocations

object (OfferingEmailOptions)
updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Treatment and Yoga",
  • "description": "Buy together and save",
  • "product_code": "MAS123",
  • "item_choices": [
    ],
  • "currency": "gbp",
  • "image": {},
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "availability_rules": [
    ],
  • "max_daily_duration": 240,
  • "prevent_choice_overlaps": true,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "price_rules": [
    ],
  • "meta": {
    },
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "offered_online": true,
  • "private": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "min_guests": 2,
  • "max_guests": 2,
  • "default_revenue_centre": "string",
  • "email_options": {
    },
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Delete a package

Returns the status of deletion

path Parameters
packageId
required
string

The ID of the package to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Restores a package

Restores a soft-deleted (archived) package.

path Parameters
packageId
required
string

The ID of the package you want to restore

Responses

Response samples

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

Get package availability rules

Returns an array of all availability rules for the given package.

path Parameters
packageId
required
string

The ID of the package the availability rules relate to.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Create a new availability rule for an package.

path Parameters
packageId
required
string

The ID of the package the availability rules relate to.

Request Body schema: application/json

To create an availability rule you pass an AvailabilityRule object.

id
string

The ID of the availability rule.

date_from
string <date>

The start of the rule period.

date_to
string <date>

The end of the rule period.

time_from
string

The daily start time of the time period, in 24 hour format.

time_to
string

The daily end time of the time period, in 24 hour format.

weekday
string

The weekday this rule applies to.

weekdays
Array of strings

The weekdays this rule applies to.

is_available
boolean

Whether the resource is available during this period. Any false rules will override true rules.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true
}

Response samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true
}

Get details of a single availability rule.

Returns the details of a single availability rule.

path Parameters
packageId
required
string

The ID of the package the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Responses

Response samples

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

Update an existing availability rule

Update an existing availability rule.

path Parameters
packageId
required
string

The ID of the package the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Request Body schema: application/json

Updates the specified AvailabilityRule object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the availability rule.

date_from
string <date>

The start of the rule period.

date_to
string <date>

The end of the rule period.

time_from
string

The daily start time of the time period, in 24 hour format.

time_to
string

The daily end time of the time period, in 24 hour format.

weekday
string

The weekday this rule applies to.

weekdays
Array of strings

The weekdays this rule applies to.

is_available
boolean

Whether the resource is available during this period. Any false rules will override true rules.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true
}

Response samples

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

Delete an availability rule

Returns the status of deletion

path Parameters
packageId
required
string

The ID of the package the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get package price rules

Returns an array of all price rules for the given package.

path Parameters
packageId
required
string

The ID of the package you want to retrieve

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Create a new price rule for an package

path Parameters
packageId
required
string

The ID of the package you want to add a price rule for

Request Body schema: application/json

To create a price rule you pass an PackagePriceRule object.

id
string

The ID of the price rule.

package_id
string

The ID of the package the price rule relates to.

date_from
string <date>

The rule should apply to packages starting on or after this date.

date_to
string <date>

The rule should not apply to packages starting after this date.

weekdays
Array of strings

The rule should apply to packages starting on any of these weekdays.

price
integer

The price of the package.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "package_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "weekdays": [
    ],
  • "price": 20000
}

Response samples

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

Get details of a single price rule

Returns the details of a single price rule.

path Parameters
packageId
required
string

The ID of the package the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to retrieve.

Responses

Response samples

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

Update an existing price rule

Update an existing price rule.

path Parameters
packageId
required
string

The ID of the package the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to update.

Request Body schema: application/json

Updates the specified AppointmentPriceRule object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the price rule.

appointment_type_id
string

The ID of the appointment type the price rule relates to.

date_from
string <date>

The rule should apply to appointments on or after this date.

date_to
string <date>

The rule should not apply to appointments after this date.

weekdays
Array of strings

The weekdays that this rule should apply to.

time_from
string

The rule should apply to appointments starting on or after this time.

time_to
string

The rule should not apply to appointments starting on or after this time.

duration
integer

The duration of appointment that the price rule applies to.

price
integer

The price of the appointment.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "appointment_type_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "weekdays": [
    ],
  • "time_from": "16:00",
  • "time_to": "20:00",
  • "duration": 60,
  • "price": 6000
}

Response samples

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

Delete a price rule

Returns the status of deletion

path Parameters
packageId
required
string

The ID of the package the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Copy a package

path Parameters
packageId
required
string

The ID of the package to copy.

Request Body schema: application/json

Pass any package properties that should be overridden on the copied resource.

id
string

The ID of the package.

name
string

The name of this package

description
string

A description of the package

product_code
string

A custom product code for the package.

Array of objects (PackageItemChoice)

An array of choices for items which may be included in this package.

currency
string

The ISO-4217 currency code in lower case

object (Media)
site_id
string

The ID of the site the package belongs to.

Array of objects (AvailabilityRule)

The rules defining periods during which this package is available

max_daily_duration
integer

The maximum amount of time between the start of the first and end of the last item on each day of a package, in minutes.

prevent_choice_overlaps
boolean

Whether to prevent booking choices in this package from overlapping times.

max_advance_bookings_interval
string

The maximum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before the package's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

Array of objects (PackagePriceRule)

The rules defining prices for this package

object
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
offered_online
boolean

Whether this session type is bookable online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

members_only
boolean

Whether this package requires an active membership in order to book.

permitted_membership_type_ids
Array of strings

If this package is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this package.

Array of objects (MembershipBookingWindow)
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

category_ids
Array of strings

The category IDs associated with this package type

Array of objects (Category)

The category associated with this package type

min_guests
integer

The minimum guests this package is for

max_guests
integer

The maximum guests this package is for

default_revenue_centre
string

The default revenue centre to fall back to to balance allocations

object (OfferingEmailOptions)
updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Treatment and Yoga",
  • "description": "Buy together and save",
  • "product_code": "MAS123",
  • "item_choices": [
    ],
  • "currency": "gbp",
  • "image": {},
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "availability_rules": [
    ],
  • "max_daily_duration": 240,
  • "prevent_choice_overlaps": true,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "price_rules": [
    ],
  • "meta": {
    },
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "offered_online": true,
  • "private": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "min_guests": 2,
  • "max_guests": 2,
  • "default_revenue_centre": "string",
  • "email_options": {
    },
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

List all item choices for the requested package.

Returns a list of item choices for the given package.

path Parameters
packageId
required
string

The ID of the package you want to retrieve choices for.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Add a new item choice to the package.

path Parameters
packageId
required
string

The ID of the package you want to update

Request Body schema: application/json
id
string

The ID of this choice.

name
string

A name for this choice.

description
string

A description of this choice.

min_options
integer

The minimum number of options that must be chosen.

max_options
integer

The maximum number of options that may be chosen.

option_budget
integer

The budget that this package allows for options in this choice. Each option will use its standalone price, and the overall package price will be increased if the total exceeds the budget.

auto_select_timeslot
boolean

Whether a timeslot should be automatically selected for this choice

hide_times
boolean

Whether to hide times for this choice from customers

optional
boolean

Whether this item choice should be optional.

visible
boolean

Whether this item choice should be visible to the customer.

allow_overlaps
boolean

Allow this choice to overlap with other items when prevent_choice_overlaps is enabled on the package.

offering_type
string
Enum: "appointment" "product" "session"

The type of offerings included in this choice.

object (OfferingRevenueAllocation)
Array of objects (PackageChoiceStartTimeRule)

An array of rules determining the start times that should be allowed for this choice.

Array of objects (PackageItemChoiceOption)

An array of options to make up this choice.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000025",
  • "name": "Massage",
  • "description": "Choose your type of massage.",
  • "min_options": 1,
  • "max_options": 2,
  • "option_budget": 2000,
  • "auto_select_timeslot": true,
  • "hide_times": true,
  • "optional": true,
  • "visible": true,
  • "allow_overlaps": true,
  • "offering_type": "appointment",
  • "allocation": {
    },
  • "start_time_rules": [
    ],
  • "options": [
    ]
}

Response samples

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

Get item choice details

Returns the details of a single package item choice

path Parameters
packageId
required
string

The ID of the package the choice belongs to

itemChoiceId
required
string

The ID of the choice you want to retrieve

Responses

Response samples

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

Update an existing item choice

Update an existing item choice

path Parameters
packageId
required
string

The ID of the package the choice belongs to.

itemChoiceId
required
string

The ID of the choice you want to update.

Request Body schema: application/json

Updates the specified PackageItemChoice object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of this choice.

name
string

A name for this choice.

description
string

A description of this choice.

min_options
integer

The minimum number of options that must be chosen.

max_options
integer

The maximum number of options that may be chosen.

option_budget
integer

The budget that this package allows for options in this choice. Each option will use its standalone price, and the overall package price will be increased if the total exceeds the budget.

auto_select_timeslot
boolean

Whether a timeslot should be automatically selected for this choice

hide_times
boolean

Whether to hide times for this choice from customers

optional
boolean

Whether this item choice should be optional.

visible
boolean

Whether this item choice should be visible to the customer.

allow_overlaps
boolean

Allow this choice to overlap with other items when prevent_choice_overlaps is enabled on the package.

offering_type
string
Enum: "appointment" "product" "session"

The type of offerings included in this choice.

object (OfferingRevenueAllocation)
Array of objects (PackageChoiceStartTimeRule)

An array of rules determining the start times that should be allowed for this choice.

Array of objects (PackageItemChoiceOption)

An array of options to make up this choice.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000025",
  • "name": "Massage",
  • "description": "Choose your type of massage.",
  • "min_options": 1,
  • "max_options": 2,
  • "option_budget": 2000,
  • "auto_select_timeslot": true,
  • "hide_times": true,
  • "optional": true,
  • "visible": true,
  • "allow_overlaps": true,
  • "offering_type": "appointment",
  • "allocation": {
    },
  • "start_time_rules": [
    ],
  • "options": [
    ]
}

Response samples

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

Delete an item choice

Returns the status of deletion

path Parameters
packageId
required
string

The ID of the package the choice belongs to.

itemChoiceId
required
string

The ID of the choice you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Update the order of choices within the package.

path Parameters
packageId
required
string

The ID of the package you want to update

Request Body schema: application/json
order
Array of strings

An array of IDs in the required order.

Responses

Request samples

Content type
application/json
{
  • "order": [
    ]
}

Response samples

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

List all choice options for the requested package item choice.

Returns a list of options for the given item choice.

path Parameters
packageId
required
string

The ID of the package you want to retrieve choices for.

itemChoiceId
required
string

The ID of the choice you want to retrieve options for.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Add a new item choice to the package.

path Parameters
packageId
required
string

The ID of the package you want to update

itemChoiceId
required
string

The ID of the choice you want to add an option to.

Request Body schema: application/json
id
string

The ID of the item type.

item_type
string

The type of item this option represents.

price_change
integer

A currency amount that this option would increase the package price by.

object (ShopOffering)

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000026",
  • "item_type": "appointment",
  • "price_change": 2000,
  • "offering": {
    }
}

Response samples

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

Get option details

Returns the details of a single package item choice

path Parameters
packageId
required
string

The ID of the package the option belongs to.

itemChoiceId
required
string

The ID of the choice the option belongs to.

optionId
required
string

The ID of the option to retrieve.

Responses

Response samples

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

Update an existing option

path Parameters
packageId
required
string

The ID of the package the option belongs to.

itemChoiceId
required
string

The ID of the choice the option belongs to.

optionId
required
string

The ID of the option to update.

Request Body schema: application/json

Updates the specified PackageItemChoiceOption object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the item type.

item_type
string

The type of item this option represents.

price_change
integer

A currency amount that this option would increase the package price by.

object (ShopOffering)

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000026",
  • "item_type": "appointment",
  • "price_change": 2000,
  • "offering": {
    }
}

Response samples

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

Delete an item choice option.

Returns the status of deletion

path Parameters
packageId
required
string

The ID of the package the option belongs to.

itemChoiceId
required
string

The ID of the choice the option belongs to.

optionId
required
string

The ID of the option to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Practitioners

This endpoint is used for managing practitioners

Get details of all practitioners available

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update the order of practitioners in the calendar

Request Body schema: application/json

Pass an object containing an array of ordered practitioner IDs

practitioner_ids
required
Array of strings
site_id
required
string

Responses

Request samples

Content type
application/json
{
  • "practitioner_ids": [
    ],
  • "site_id": "string"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get practitioner details

Returns the details of a single practitioner

path Parameters
practitionerId
required
string

The ID of the practitioner you want to retrieve

Responses

Response samples

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

Update an existing practitioner

Update an existing practitioner

path Parameters
practitionerId
required
string

The ID of the practitioner you want to update

Request Body schema: application/json

Updates the specified Practitioner object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the practitioner.

name
string

The full name of the practitioner.

avatar_id
string

The id of the avatar

object (Media)
site_ids
Array of strings

The IDs of the sites this practitioner is part of

tag_ids
Array of strings

The IDs of the tags this practitioner is tagged with

Array of objects (Tag)

The tags associated with this Practitioner

Array of objects (Zone)

An array of zones this practitioner is assigned to

can_offer_tags
Array of strings

The IDs of tags for services this practitioner is able to offer.

Array of objects (PractitionerAppointmentRestriction)

A set of rules defining when a practitioner cannot offer certain appointments.

scheduling_week_interval_start
integer

The date that week numbers should start from.

scheduling_week_interval
integer

The interval for recurring weekly availability, i.e. a value of 4 means a 4-week rolling rota.

created_at
string <date-time>

The date and time the practitioner was created.

updated_at
string <date-time>

The date and time the practitioner was last updated.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "name": "Jane Doe",
  • "avatar_id": "5dcb47800000000000000000",
  • "avatar": {},
  • "site_ids": [
    ],
  • "tag_ids": [
    ],
  • "tags": [
    ],
  • "zones": [
    ],
  • "can_offer_tags": [
    ],
  • "appointment_restrictions": [
    ],
  • "scheduling_week_interval_start": "2019-12-30T00:00:00.000Z",
  • "scheduling_week_interval": 4,
  • "created_at": "2019-01-15T12:00:00+01:00",
  • "updated_at": "2019-01-15T12:00:00+01:00"
}

Response samples

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

Delete a practitioner

Returns the status of deletion

path Parameters
practitionerId
required
string

The ID of the practitioner to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Copy a practitioner

path Parameters
practitionerId
required
string

The ID of the practitioner to copy.

Request Body schema: application/json

Pass any practitioner properties that should be overridden on the copied resource.

id
string

The ID of the practitioner.

name
string

The full name of the practitioner.

avatar_id
string

The id of the avatar

object (Media)
site_ids
Array of strings

The IDs of the sites this practitioner is part of

tag_ids
Array of strings

The IDs of the tags this practitioner is tagged with

Array of objects (Tag)

The tags associated with this Practitioner

Array of objects (Zone)

An array of zones this practitioner is assigned to

can_offer_tags
Array of strings

The IDs of tags for services this practitioner is able to offer.

Array of objects (PractitionerAppointmentRestriction)

A set of rules defining when a practitioner cannot offer certain appointments.

scheduling_week_interval_start
integer

The date that week numbers should start from.

scheduling_week_interval
integer

The interval for recurring weekly availability, i.e. a value of 4 means a 4-week rolling rota.

created_at
string <date-time>

The date and time the practitioner was created.

updated_at
string <date-time>

The date and time the practitioner was last updated.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "name": "Jane Doe",
  • "avatar_id": "5dcb47800000000000000000",
  • "avatar": {},
  • "site_ids": [
    ],
  • "tag_ids": [
    ],
  • "tags": [
    ],
  • "zones": [
    ],
  • "can_offer_tags": [
    ],
  • "appointment_restrictions": [
    ],
  • "scheduling_week_interval_start": "2019-12-30T00:00:00.000Z",
  • "scheduling_week_interval": 4,
  • "created_at": "2019-01-15T12:00:00+01:00",
  • "updated_at": "2019-01-15T12:00:00+01:00"
}

Response samples

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

Get appointment restrictions for this practitioner.

path Parameters
practitionerId
required
string

The ID of the practitioner to get restrictions for.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Add an appointment restriction for this practitioner.

path Parameters
practitionerId
required
string

The ID of the practitioner to add a restriction to.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Request Body schema: application/json

Pass a PractitionerAppointmentRestriction object.

id
string

The ID of the restriction

type
string
Enum: "cannot_offer" "max_duration"

The type of the restriction

applies_to_type
string
Enum: "specific" "categories"

The type of the restriction

appointment_type_ids
Array of strings

The IDs of appointment types that this restriction applies to

Array of objects (AppointmentTypeSummary)

The appointment types associated with this product

category_ids
Array of strings

The IDs of categories that this restriction applies to

Array of objects (Category)

The category associated with this product

date_from
string <date>

The first day that this restriction should apply

date_to
string <date>

The last date that this restriction should apply

max_duration
string

For a max_duration rule, this specifies the maximum number of minutes of th appointment type that the practitioner may offer each day.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000011",
  • "type": "cannot_offer",
  • "applies_to_type": "specific",
  • "appointment_type_ids": [
    ],
  • "appointment_types": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "date_from": "2020-06-20T00:00:00.000Z",
  • "date_to": "2020-06-20T00:00:00.000Z",
  • "max_duration": null
}

Response samples

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

Get the rota that applies to a practitioner for a given date.

path Parameters
practitionerId
required
string

The ID of the practitioner to get a rota for.

query Parameters
date
required
string <date>

The date the rota should apply to.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "for_date": {
    }
}

Update the rota that applies to a practitioner for a given date.

path Parameters
practitionerId
required
string

The ID of the practitioner to get a rota for.

Request Body schema: application/json

Pass a PractitionerRotaDateUpdate object.

date
string <date>

The date the availability rules apply to.

Array of objects (PractitionerRotaAvailabilityRule)

The rota rules that apply to the given date, including only times that are available. If an empty array is passed then an 'unavailable' custom availability rule will be created for the date. If the availability times match the regular rota times then all custom rules for the date will be removed.

Responses

Request samples

Content type
application/json
{
  • "date": "2021-07-05T00:00:00.000Z",
  • "availability_rules": [
    ]
}

Response samples

Content type
application/json
{
  • "data": {
    },
  • "for_date": {
    }
}

Get a single appointment restriction for this practitioner.

path Parameters
practitionerId
required
string

The ID of the practitioner to get restrictions for.

restrictionId
required
string

The ID of the appointment restriction to get.

Responses

Response samples

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

Update an existing appointment restriction

path Parameters
practitionerId
required
string

The ID of the practitioner who owns the restriction.

restrictionId
required
string

The ID of the appointment restriction to update.

Request Body schema: application/json

Updates the specified appointment restriction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the restriction

type
string
Enum: "cannot_offer" "max_duration"

The type of the restriction

applies_to_type
string
Enum: "specific" "categories"

The type of the restriction

appointment_type_ids
Array of strings

The IDs of appointment types that this restriction applies to

Array of objects (AppointmentTypeSummary)

The appointment types associated with this product

category_ids
Array of strings

The IDs of categories that this restriction applies to

Array of objects (Category)

The category associated with this product

date_from
string <date>

The first day that this restriction should apply

date_to
string <date>

The last date that this restriction should apply

max_duration
string

For a max_duration rule, this specifies the maximum number of minutes of th appointment type that the practitioner may offer each day.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000011",
  • "type": "cannot_offer",
  • "applies_to_type": "specific",
  • "appointment_type_ids": [
    ],
  • "appointment_types": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "date_from": "2020-06-20T00:00:00.000Z",
  • "date_to": "2020-06-20T00:00:00.000Z",
  • "max_duration": null
}

Response samples

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

Delete a single appointment restriction for this practitioner.

path Parameters
practitionerId
required
string

The ID of the practitioner the restriction belongs to.

restrictionId
required
string

The ID of the appointment restriction to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get custom availability entries for this practitioner.

path Parameters
practitionerId
required
string

The ID of the practitioner to get custom availability entries for.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

is_available
boolean

Filter on custom availability rules that match this value.

Responses

Response samples

Content type
application/json
{}

Add a custom availability entry for this practitioner.

path Parameters
practitionerId
required
string

The ID of the practitioner to add a custom availability entry to.

Request Body schema: application/json

Pass a PractitionerAppointmentRestriction object.

id
string

The ID of the custom availability rule.

has_availability_id
string

The ID of the resource this availability rule belongs to.

date_time_from
string <date-time>

The start date and time of the rule.

date_time_to
string <date-time>

The end date and time of the rule.

is_available
boolean

Whether the resource is available for the given time slot.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000031",
  • "has_availability_id": "5dcb47800000000000000032",
  • "date_time_from": "2020-02-24T12:00:00+01:00",
  • "date_time_to": "2020-02-24T12:00:00+01:00",
  • "is_available": true
}

Response samples

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

Get a single custom availability entry for this practitioner.

path Parameters
practitionerId
required
string

The ID of the practitioner to get custom availability entries for.

ruleId
required
string

The ID of the availability rule to get.

Responses

Response samples

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

Update an existing custom availability entry

path Parameters
practitionerId
required
string

The ID of the practitioner who owns the custom availability entry.

ruleId
required
string

The ID of the custom availability entry to update.

Request Body schema: application/json

Updates the specified custom availability entry object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the custom availability rule.

has_availability_id
string

The ID of the resource this availability rule belongs to.

date_time_from
string <date-time>

The start date and time of the rule.

date_time_to
string <date-time>

The end date and time of the rule.

is_available
boolean

Whether the resource is available for the given time slot.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000031",
  • "has_availability_id": "5dcb47800000000000000032",
  • "date_time_from": "2020-02-24T12:00:00+01:00",
  • "date_time_to": "2020-02-24T12:00:00+01:00",
  • "is_available": true
}

Response samples

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

Delete a single custom availability entry for this practitioner.

path Parameters
practitionerId
required
string

The ID of the practitioner the restriction belongs to.

ruleId
required
string

The ID of the custom availability entry to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get scheduled practitioner availability

Returns an array of all slots of scheduled availability for a practitioner - i.e. the rules that determine availability before any checks against scheduled appointments and sessions that the practitioner is assigned to.

query Parameters
practitioner_ids
string
Example: practitioner_ids=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of practitioner ids to fetch availability for

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get practitioners

Returns an array of all practitioners the given user has permission to view

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

query
string

A search query to filter practitioners by name.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Create a new practitioner

Create a new practitioner

Request Body schema: application/json

To create a practitioner, you create a Practitioner object.

id
string

The ID of the practitioner.

name
string

The full name of the practitioner.

avatar_id
string

The id of the avatar

object (Media)
site_ids
Array of strings

The IDs of the sites this practitioner is part of

tag_ids
Array of strings

The IDs of the tags this practitioner is tagged with

Array of objects (Tag)

The tags associated with this Practitioner

Array of objects (Zone)

An array of zones this practitioner is assigned to

can_offer_tags
Array of strings

The IDs of tags for services this practitioner is able to offer.

Array of objects (PractitionerAppointmentRestriction)

A set of rules defining when a practitioner cannot offer certain appointments.

scheduling_week_interval_start
integer

The date that week numbers should start from.

scheduling_week_interval
integer

The interval for recurring weekly availability, i.e. a value of 4 means a 4-week rolling rota.

created_at
string <date-time>

The date and time the practitioner was created.

updated_at
string <date-time>

The date and time the practitioner was last updated.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "name": "Jane Doe",
  • "avatar_id": "5dcb47800000000000000000",
  • "avatar": {},
  • "site_ids": [
    ],
  • "tag_ids": [
    ],
  • "tags": [
    ],
  • "zones": [
    ],
  • "can_offer_tags": [
    ],
  • "appointment_restrictions": [
    ],
  • "scheduling_week_interval_start": "2019-12-30T00:00:00.000Z",
  • "scheduling_week_interval": 4,
  • "created_at": "2019-01-15T12:00:00+01:00",
  • "updated_at": "2019-01-15T12:00:00+01:00"
}

Response samples

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

Products

Get products

Returns an array of all products the given user has permission to view

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

query
string
Example: query=Jane

The query to filter the products on. This will search the product name

archived
boolean

Only show archived resources

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Create a new product

Create a new product

Request Body schema: application/json

To create a product, you pass a Product object.

id
string

The ID of the product.

name
string

The name of this product

description
string

A description of the product

product_code
string

A custom product code for the product.

barcode
string

The barcode of the product

currency
string

The ISO-4217 currency code in lower case

object (Media)
offered_online
boolean

Whether this product is available online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

members_only
boolean

Whether this product requires an active membership in order to purchase.

permitted_membership_type_ids
Array of strings

If this product is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types.

tag_ids
Array of strings

The tags IDs associated with this product

Array of objects (Tag)

The tags associated with this product

category_ids
Array of strings

The category IDs associated with this product

Array of objects (Category)

The category associated with this product

site_id
string

The ID of the site this product belongs to

inventory_product_id
string

The ID of the inventory product. Only products with trackable inventory will have this property.

Array of objects (ProductPriceRule)

The rules defining prices for this product

revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Ricky's Hand Moisturiser",
  • "description": "For silky soft hands",
  • "product_code": "MAS123",
  • "barcode": 5013635312160,
  • "currency": "gbp",
  • "image": {},
  • "offered_online": true,
  • "private": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "tag_ids": [
    ],
  • "tags": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "inventory_product_id": "5dcb47800000000000000020",
  • "price_rules": [
    ],
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Search for a product by barcode

path Parameters
code
required
string

The barcode to search for.

Responses

Response samples

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

Get product details

Returns the details of a single product

path Parameters
productId
required
string

The ID of the product you want to retrieve

Responses

Response samples

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

Update an existing product

Update an existing product

path Parameters
productId
required
string

The ID of the product you want to update

Request Body schema: application/json

Updates the specified Product object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the product.

name
string

The name of this product

description
string

A description of the product

product_code
string

A custom product code for the product.

barcode
string

The barcode of the product

currency
string

The ISO-4217 currency code in lower case

object (Media)
offered_online
boolean

Whether this product is available online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

members_only
boolean

Whether this product requires an active membership in order to purchase.

permitted_membership_type_ids
Array of strings

If this product is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types.

tag_ids
Array of strings

The tags IDs associated with this product

Array of objects (Tag)

The tags associated with this product

category_ids
Array of strings

The category IDs associated with this product

Array of objects (Category)

The category associated with this product

site_id
string

The ID of the site this product belongs to

inventory_product_id
string

The ID of the inventory product. Only products with trackable inventory will have this property.

Array of objects (ProductPriceRule)

The rules defining prices for this product

revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Ricky's Hand Moisturiser",
  • "description": "For silky soft hands",
  • "product_code": "MAS123",
  • "barcode": 5013635312160,
  • "currency": "gbp",
  • "image": {},
  • "offered_online": true,
  • "private": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "tag_ids": [
    ],
  • "tags": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "inventory_product_id": "5dcb47800000000000000020",
  • "price_rules": [
    ],
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Delete a product

Returns the status of deletion

path Parameters
productId
required
string

The ID of the product to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Restores a product

Restores a soft-deleted (archived) product.

path Parameters
productId
required
string

The ID of the product you want to restore

Responses

Response samples

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

Get product price rules

Returns an array of all price rules for the given product.

path Parameters
productId
required
string

The ID of the product you want to retrieve price rules for.

query Parameters
page
integer
Example: page=1

The page to retrieve results from.

per_page
integer
Example: per_page=15

The number of results to return per page.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new price rule for a product.

path Parameters
productId
required
string

The ID of the product you want to add a price rule for.

Request Body schema: application/json

To create a price rule you pass an ProductPriceRule object.

id
string

The ID of the price rule.

product_id
string

The ID of the product the price rule relates to.

date_from
string <date>

The rule should apply to products sold on or after this date.

date_to
string <date>

The rule should not apply to products sold after this date.

price
integer

The price of the product.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "product_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "price": 20000
}

Response samples

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

Get details of a single price rule.

Returns the details of a single price rule.

path Parameters
productId
required
string

The ID of the product the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to retrieve.

Responses

Response samples

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

Update an existing price rule.

Update an existing price rule.

path Parameters
productId
required
string

The ID of the product the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to update.

Request Body schema: application/json

Updates the specified ProductPriceRule object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the price rule.

product_id
string

The ID of the product the price rule relates to.

date_from
string <date>

The rule should apply to products sold on or after this date.

date_to
string <date>

The rule should not apply to products sold after this date.

price
integer

The price of the product.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "product_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "price": 20000
}

Response samples

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

Delete a price rule.

Returns the status of deletion.

path Parameters
productId
required
string

The ID of the product the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Copy a product

path Parameters
productId
required
string

The ID of the product to copy.

Request Body schema: application/json

Pass any product properties that should be overridden on the copied resource.

id
string

The ID of the product.

name
string

The name of this product

description
string

A description of the product

product_code
string

A custom product code for the product.

barcode
string

The barcode of the product

currency
string

The ISO-4217 currency code in lower case

object (Media)
offered_online
boolean

Whether this product is available online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

members_only
boolean

Whether this product requires an active membership in order to purchase.

permitted_membership_type_ids
Array of strings

If this product is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types.

tag_ids
Array of strings

The tags IDs associated with this product

Array of objects (Tag)

The tags associated with this product

category_ids
Array of strings

The category IDs associated with this product

Array of objects (Category)

The category associated with this product

site_id
string

The ID of the site this product belongs to

inventory_product_id
string

The ID of the inventory product. Only products with trackable inventory will have this property.

Array of objects (ProductPriceRule)

The rules defining prices for this product

revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Ricky's Hand Moisturiser",
  • "description": "For silky soft hands",
  • "product_code": "MAS123",
  • "barcode": 5013635312160,
  • "currency": "gbp",
  • "image": {},
  • "offered_online": true,
  • "private": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "tag_ids": [
    ],
  • "tags": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "inventory_product_id": "5dcb47800000000000000020",
  • "price_rules": [
    ],
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

List products

query Parameters
site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

supplier_ids
string
Example: supplier_ids=10000000-0000-0000-0000-000000000000,20000000-0000-0000-0000-000000000000

A comma-separated list of supplier IDs to retrieve products for

category_ids
string
Example: category_ids=10000000-0000-0000-0000-000000000000,20000000-0000-0000-0000-000000000000

A comma-separated list of category IDs to retrieve products for

brand_ids
string
Example: brand_ids=10000000-0000-0000-0000-000000000000,20000000-0000-0000-0000-000000000000

A comma-separated list of brand IDs to retrieve products for

query
string
Example: query=Jane

The query to filter the products on. This will search the product name.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create a new product

Request Body schema: application/json
id
string

The ID of the product.

name
string

The name of the product.

description
string

An internal description of the product.

barcode
string

The barcode on the product.

sku
string

An internal reference code for the product.

reorder_level
integer

The quantity of this product at which it should be reordered.

currency
string

The currency of the product.

brand_id
string

The ID of the brand of this product.

category_id
string

The ID of the category this product is in.

organisation_id
string

The ID of the organisation this product belongs to.

site_id
string

The ID of the site this product belongs to.

average_cost
integer

The average cost of this item in the lowest denomination for the products currency.

stock_value
integer

The total value of this stock at the site in the lowest denomination for the products currency.

stock_level
integer

The amount of stock for this product at the site.

Responses

Request samples

Content type
application/json
{
  • "id": "10000000-0000-0000-0000-000000000000",
  • "name": "Moisture bliss body butter",
  • "description": "Nutrient rich organic argan oil and a comforting blend of geranium, cedarwood and ylang pure essential oils",
  • "barcode": 123456789,
  • "sku": "AB123",
  • "reorder_level": 20,
  • "currency": "gbp",
  • "brand_id": "10000000-0000-0000-0000-000000000000",
  • "category_id": "10000000-0000-0000-0000-000000000000",
  • "organisation_id": "10000000-0000-0000-0000-000000000000",
  • "site_id": "30000000-0000-0000-0000-000000000000",
  • "average_cost": 100,
  • "stock_value": 1000,
  • "stock_level": 10
}

Response samples

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

Retrieve a single product.

path Parameters
productId
required
string

The ID of the product you want to update.

Responses

Response samples

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

Update an existing product.

path Parameters
productId
required
string

The ID of the product you want to update.

Request Body schema: application/json
id
string

The ID of the product.

name
string

The name of the product.

description
string

An internal description of the product.

barcode
string

The barcode on the product.

sku
string

An internal reference code for the product.

reorder_level
integer

The quantity of this product at which it should be reordered.

currency
string

The currency of the product.

brand_id
string

The ID of the brand of this product.

category_id
string

The ID of the category this product is in.

organisation_id
string

The ID of the organisation this product belongs to.

site_id
string

The ID of the site this product belongs to.

average_cost
integer

The average cost of this item in the lowest denomination for the products currency.

stock_value
integer

The total value of this stock at the site in the lowest denomination for the products currency.

stock_level
integer

The amount of stock for this product at the site.

Responses

Request samples

Content type
application/json
{
  • "id": "10000000-0000-0000-0000-000000000000",
  • "name": "Moisture bliss body butter",
  • "description": "Nutrient rich organic argan oil and a comforting blend of geranium, cedarwood and ylang pure essential oils",
  • "barcode": 123456789,
  • "sku": "AB123",
  • "reorder_level": 20,
  • "currency": "gbp",
  • "brand_id": "10000000-0000-0000-0000-000000000000",
  • "category_id": "10000000-0000-0000-0000-000000000000",
  • "organisation_id": "10000000-0000-0000-0000-000000000000",
  • "site_id": "30000000-0000-0000-0000-000000000000",
  • "average_cost": 100,
  • "stock_value": 1000,
  • "stock_level": 10
}

Response samples

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

Delete a product

path Parameters
productId
required
string

The ID of the product you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Copy a product

path Parameters
productId
required
string

The ID of the product to copy.

Request Body schema: application/json

Pass any product properties that should be overridden on the copied resource.

id
string

The ID of the product.

name
string

The name of the product.

description
string

An internal description of the product.

barcode
string

The barcode on the product.

sku
string

An internal reference code for the product.

reorder_level
integer

The quantity of this product at which it should be reordered.

currency
string

The currency of the product.

brand_id
string

The ID of the brand of this product.

category_id
string

The ID of the category this product is in.

organisation_id
string

The ID of the organisation this product belongs to.

site_id
string

The ID of the site this product belongs to.

average_cost
integer

The average cost of this item in the lowest denomination for the products currency.

stock_value
integer

The total value of this stock at the site in the lowest denomination for the products currency.

stock_level
integer

The amount of stock for this product at the site.

Responses

Request samples

Content type
application/json
{
  • "id": "10000000-0000-0000-0000-000000000000",
  • "name": "Moisture bliss body butter",
  • "description": "Nutrient rich organic argan oil and a comforting blend of geranium, cedarwood and ylang pure essential oils",
  • "barcode": 123456789,
  • "sku": "AB123",
  • "reorder_level": 20,
  • "currency": "gbp",
  • "brand_id": "10000000-0000-0000-0000-000000000000",
  • "category_id": "10000000-0000-0000-0000-000000000000",
  • "organisation_id": "10000000-0000-0000-0000-000000000000",
  • "site_id": "30000000-0000-0000-0000-000000000000",
  • "average_cost": 100,
  • "stock_value": 1000,
  • "stock_level": 10
}

Response samples

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

Retrieve the adjustments for a product.

path Parameters
productId
required
string

The ID of the product you want to get adjustments for.

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Add an adjustment for this product

path Parameters
productId
required
string

The ID of the product to add an adjustment for.

Request Body schema: application/json
id
string

The ID of the adjustment.

organisation_id
string

The ID of the organisation this adjustment belongs to.

site_id
string

The ID of the site this adjustment belongs to.

product_id
string

The ID of the product this adjustment is for.

quantity
integer

The amount of the adjustment, which may be positive or negative.

reason_code
string

A reason code for the adjustment.

reason_description
string

A free-text reason for the adjustment.

location_id
integer Nullable

The ID of the location the stock is moving from.

created_at
string <date-time>

The date and time the adjustment was created.

Responses

Request samples

Content type
application/json
{
  • "id": "10000000-0000-0000-0000-000000000000",
  • "organisation_id": "20000000-0000-0000-0000-000000000000",
  • "site_id": "30000000-0000-0000-0000-000000000000",
  • "product_id": "30000000-0000-0000-0000-000000000000",
  • "quantity": 0,
  • "reason_code": "string",
  • "reason_description": "string",
  • "location_id": 0,
  • "created_at": "2019-01-15T12:00:00.000Z"
}

Response samples

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

List suppliers of this product

path Parameters
productId
required
string

The ID of the product to retrieve suppliers for.

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Add a new supplier for the product.

path Parameters
productId
required
string

The ID of the product to add a supplier to.

Request Body schema: application/json
id
string

The ID of the product-supplier relationship.

product_id
string

The ID of the product.

product_name
string

The name of the product.

supplier_id
string

The ID of the supplier.

supplier_name
string

The name of the supplier

supplier_product_id
string

The supplier's ID of the product being ordered.

order_quantity
integer

The default quantity of the product to order from this supplier.

organisation_id
string

The ID of the organisation this product supplier record belongs to.

unit_price
integer

The unit price of this item in the lowest denomination for the products currency.

currency
string

The currency of the supplier product

Responses

Request samples

Content type
application/json
{
  • "id": "10000000-0000-0000-0000-000000000000",
  • "product_id": "10000000-0000-0000-0000-000000000000",
  • "product_name": "Moisture bliss body butter",
  • "supplier_id": "10000000-0000-0000-0000-000000000000",
  • "supplier_name": "Wallmart",
  • "supplier_product_id": "MRJ-45-100",
  • "order_quantity": 10,
  • "organisation_id": "10000000-0000-0000-0000-000000000000",
  • "unit_price": 200,
  • "currency": "gbp"
}

Response samples

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

Retrieve a single product supplier.

path Parameters
productId
required
string

The ID of the product.

supplierProductId
required
string

The ID of the supplier-product you want to retrieve.

Responses

Response samples

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

Update an existing supplier of a product.

path Parameters
productId
required
string

The ID of the product.

supplierProductId
required
string

The ID of the supplier-product you want to update.

Request Body schema: application/json
order_quantity
integer

The default quantity of the product to order from this supplier.

supplier_product_id
string

The supplier's ID of the product.

Responses

Request samples

Content type
application/json
{
  • "order_quantity": 10,
  • "supplier_product_id": "MRJ-45-100"
}

Response samples

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

Remove a supplier of a product

path Parameters
productId
required
string

The ID of the product.

supplierProductId
required
string

The ID of the supplier-product you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Sessions

Get details of a list of session occurrences.

Returns the details of all sessions

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

start_time_from
string <date-time>
Example: start_time_from=2019-01-15T12:00:00+01:00

The time of the earliest session to include

start_time_to
string <date-time>
Example: start_time_to=2019-01-15T12:00:00+01:00

The time of the latest session to include

session_type_id
string
Example: session_type_id=2019-01-15T12:00:00+01:00

The session type to filter results for

recurrence_group_id
string
Example: recurrence_group_id=609bb63f702b5315cd55b4a4

The recurrence group to filter results for

include_bookings
boolean

Whether to include session bookings

include_cancelled
boolean

Whether to include cancelled sessions

cancelled
boolean

Only show cancelled sessions

practitioner_id
string
Example: practitioner_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of practitioner ids to fetch bookings for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Get details of a single session occurrence.

Returns the details of a single session

path Parameters
sessionId
required
string

The ID of the session you want to retrieve

query Parameters
include_bookings
boolean

Whether to include session bookings

Responses

Response samples

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

Update an existing session

Update an existing session

path Parameters
sessionId
required
string

The ID of the session you want to update

Request Body schema: application/json

Updates the specified Session object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the session.

session_type_id
string

The ID of the session type this session is for.

session_type_name
string

The name of the session type this session is for.

practitioner_id
string Nullable

The ID of the practitioner leading the session.

object (PractitionerSummary)

The summary of a Practitioner object

room_id
string

The ID of the room where the session is taking place.

object (RoomSummary)

The summary of a Room object

start_time
string <date-time>

The date and time the session starts.

end_time
string <date-time>

The date and time the session ends.

duration
integer

The duration of the session.

capacity
integer

The total capacity of the session.

max_baskets
integer

The maximum number of baskets that may have bookings for this session.

remaining_capacity
integer

The remaining capacity of the session.

waitlist_enabled
boolean

Whether the waitlist is enabled for this session.

num_waitlisted
integer

The number of customers currently on the waiting list for this session.

price
integer

The cost of the session, in the smallest denomination (eg pence or cents).

currency
string

The ISO-4217 currency code in lower case.

Array of objects (SessionBooking)

If requested, an array of bookings for this session.

num_checked_in
integer

If bookings are included, this is the number of bookings that have been checked in.

num_no_show
integer

If bookings are included, this is the number of bookings that have marked as no-show.

no_availability_reason
string Nullable

A code representing the reason this slot is unavailable.

no_availability_message
string Nullable

A customer-friendly message representing the reason this slot is unavailable.

site_id
string

The ID of the site where the session is taking place.

organisation_id
string

The ID of the organisation the session belongs to.

created_at
string <date-time>

The date and time the session was created.

updated_at
string <date-time>

The date and time the session was last updated.

deleted_at
string <date-time>

The date and time the session was deleted (cancelled).

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "session_type_id": "5dcb47800000000000000010",
  • "session_type_name": "Spa access",
  • "practitioner_id": "5dcb47800000000000000010",
  • "practitioner": {
    },
  • "room_id": "5dcb47800000000000000010",
  • "room": {
    },
  • "start_time": "2019-01-15T11:00:00+01:00",
  • "end_time": "2019-01-15T12:00:00+01:00",
  • "duration": 60,
  • "capacity": 10,
  • "max_baskets": 1,
  • "remaining_capacity": 4,
  • "waitlist_enabled": true,
  • "num_waitlisted": 2,
  • "price": 595,
  • "currency": "gbp",
  • "bookings": [
    ],
  • "num_checked_in": 12,
  • "num_no_show": 2,
  • "no_availability_reason": "no_practitioners_available",
  • "no_availability_message": "No practitioners are available.",
  • "site_id": "5dcb47800000000000000010",
  • "organisation_id": "00000000-0000-0000-0000-000000000000",
  • "created_at": "2019-01-15T12:00:00+01:00",
  • "updated_at": "2019-01-15T12:00:00+01:00",
  • "deleted_at": "2019-01-15T12:00:00+01:00"
}

Response samples

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

Delete a session

Returns the status of deletion

path Parameters
sessionId
required
string

The ID of the session to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Restores a session

Restores a soft-deleted (cancelled) session. If the session is not soft-deleted, this endpoint will still return a 200.

path Parameters
sessionId
required
string

The ID of the session

Responses

Response samples

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

Get session types

Returns an array of all session types the given user has permission to view

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

session_type_id
string
Example: session_type_id=5dcb47800000000000000010

A comma separated string of session type IDs to filter results for

archived
boolean

Only show archived resources

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Create a new session type

Create a new session type

Request Body schema: application/json

To create a session type, you pass a SessionType object.

id
string

The ID of the session type.

name
string

The name of this session type

description
string

A description of the session type

product_code
string

A custom product code for the session type.

currency
string

The ISO-4217 currency code in lower case

image_id
string

The id of the image

object (Media)
offered_online
boolean

Whether this session type is bookable online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

site_id
string

The ID of the site this session is part of

duration
integer

The duration of the session type.

max_baskets_per_session
integer

Limit the number of baskets that may create bookings for a single session.

max_advance_bookings_interval
string

The maximum time before a session's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before a session's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

members_only
boolean

Whether this session requires an active membership in order to book.

max_bookings_per_member
integer

The maximum number of bookings a member may make on a single session.

permitted_membership_type_ids
Array of strings

If this session is for members only, this property may be used to restrict the offering further so it may only be booked by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this session type.

Array of objects (MembershipBookingWindow)
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

waitlist_enabled
boolean

Whether the waitlist is enabled for sessions of this type.

min_guests
integer

The minimum guests allowed in a booking for this session

max_guests
integer

The maximum guests allowed in a booking for this session

Array of objects (SessionPriceRule)

The rules defining prices for this session type.

category_ids
Array of strings

The category IDs associated with this session type

Array of objects (Category)

The category associated with this session type

Array of objects (SessionRecurrenceGroup)

An array of recurrence groups for this session type

object
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Vinyasa yoga",
  • "description": "A dynamic form of yoga",
  • "product_code": "MAS123",
  • "currency": "gbp",
  • "image_id": "5dcb47800000000000000000",
  • "image": {},
  • "offered_online": true,
  • "private": true,
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "duration": 60,
  • "max_baskets_per_session": 1,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "members_only": true,
  • "max_bookings_per_member": 1,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "waitlist_enabled": true,
  • "min_guests": 1,
  • "max_guests": 2,
  • "price_rules": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "recurrence_groups": [
    ],
  • "meta": {
    },
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Get session type details

Returns the details of a single session type

path Parameters
sessionTypeId
required
string

The ID of the session type you want to retrieve

Responses

Response samples

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

Update an existing session type

Update an existing session type

path Parameters
sessionTypeId
required
string

The ID of the session type you want to update

Request Body schema: application/json

Updates the specified SessionType object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the session type.

name
string

The name of this session type

description
string

A description of the session type

product_code
string

A custom product code for the session type.

currency
string

The ISO-4217 currency code in lower case

image_id
string

The id of the image

object (Media)
offered_online
boolean

Whether this session type is bookable online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

site_id
string

The ID of the site this session is part of

duration
integer

The duration of the session type.

max_baskets_per_session
integer

Limit the number of baskets that may create bookings for a single session.

max_advance_bookings_interval
string

The maximum time before a session's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before a session's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

members_only
boolean

Whether this session requires an active membership in order to book.

max_bookings_per_member
integer

The maximum number of bookings a member may make on a single session.

permitted_membership_type_ids
Array of strings

If this session is for members only, this property may be used to restrict the offering further so it may only be booked by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this session type.

Array of objects (MembershipBookingWindow)
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

waitlist_enabled
boolean

Whether the waitlist is enabled for sessions of this type.

min_guests
integer

The minimum guests allowed in a booking for this session

max_guests
integer

The maximum guests allowed in a booking for this session

Array of objects (SessionPriceRule)

The rules defining prices for this session type.

category_ids
Array of strings

The category IDs associated with this session type

Array of objects (Category)

The category associated with this session type

Array of objects (SessionRecurrenceGroup)

An array of recurrence groups for this session type

object
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Vinyasa yoga",
  • "description": "A dynamic form of yoga",
  • "product_code": "MAS123",
  • "currency": "gbp",
  • "image_id": "5dcb47800000000000000000",
  • "image": {},
  • "offered_online": true,
  • "private": true,
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "duration": 60,
  • "max_baskets_per_session": 1,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "members_only": true,
  • "max_bookings_per_member": 1,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "waitlist_enabled": true,
  • "min_guests": 1,
  • "max_guests": 2,
  • "price_rules": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "recurrence_groups": [
    ],
  • "meta": {
    },
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Delete a session type

Returns the status of deletion

path Parameters
sessionTypeId
required
string

The ID of the session type to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Restores a session type

Restores a soft-deleted (archived) session type.

path Parameters
sessionTypeId
required
string

The ID of the session type you want to restore

Responses

Response samples

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

Get session type price rules

Returns an array of all price rules for the given session type.

path Parameters
sessionTypeId
required
string

The ID of the session type you want to retrieve

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Create a new price rule for a session type

path Parameters
sessionTypeId
required
string

The ID of the session type you want to add a price rule for

Request Body schema: application/json

To create a price rule you pass a SessionPriceRule object.

id
string

The ID of the price rule.

session_type_id
string

The ID of the session type the price rule relates to.

date_from
string <date>

The rule should apply to sessions on or after this date.

date_to
string <date>

The rule should not apply to sessions after this date.

weekdays
Array of strings

The weekdays that this rule should apply to.

time_from
string

The rule should apply to sessions starting on or after this time.

time_to
string

The rule should apply to sessions starting before this time.

price
integer

The price of the session.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "session_type_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "weekdays": [
    ],
  • "time_from": "16:00",
  • "time_to": "17:00",
  • "price": 1500
}

Response samples

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

Get details of a single price rule

Returns the details of a single price rule.

path Parameters
sessionTypeId
required
string

The ID of the session type the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to retrieve.

Responses

Response samples

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

Update an existing price rule

Update an existing price rule.

path Parameters
sessionTypeId
required
string

The ID of the session type the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to update.

Request Body schema: application/json

Updates the specified SessionPriceRule object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the price rule.

session_type_id
string

The ID of the session type the price rule relates to.

date_from
string <date>

The rule should apply to sessions on or after this date.

date_to
string <date>

The rule should not apply to sessions after this date.

weekdays
Array of strings

The weekdays that this rule should apply to.

time_from
string

The rule should apply to sessions starting on or after this time.

time_to
string

The rule should apply to sessions starting before this time.

price
integer

The price of the session.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "session_type_id": "5dcb47800000000000000010",
  • "date_from": "2020-02-01T00:00:00.000Z",
  • "date_to": "2020-04-01T00:00:00.000Z",
  • "weekdays": [
    ],
  • "time_from": "16:00",
  • "time_to": "17:00",
  • "price": 1500
}

Response samples

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

Delete a price rule

Returns the status of deletion

path Parameters
sessionTypeId
required
string

The ID of the session type the price rule belongs to.

priceRuleId
required
string

The ID of the price rule you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Create a new recurrence group for a session type

path Parameters
sessionTypeId
required
string

The ID of the session type you want to add a recurrence group for

Request Body schema: application/json

To create a recurrence group you pass a SessionRecurrenceGroupUpdate object.

name
string

An option name for the recurrence group.

practitioner_id
string

The practitioner who leads the sessions in this group.

room_id
string

The room where the sessions in this group take place.

weekdays
Array of strings

The weekdays sessions in this group take place.

start_time
string

The start time of each occurrence in this group, in 24 hour format.

capacity
integer

The capacity of each session in this group.

recurrence_start
string <date>

The start date of the recurrence group.

recurrence_end
string <date>

The end date of the recurrence group.

Responses

Request samples

Content type
application/json
{
  • "name": "Mondays with Adrienne",
  • "practitioner_id": "5f184bb0b6ecff2e8157bf27",
  • "room_id": "5dcb47800000000000000010",
  • "weekdays": [
    ],
  • "start_time": "16:00",
  • "capacity": 12,
  • "recurrence_start": "2021-04-10T00:00:00.000Z",
  • "recurrence_end": "2021-05-10T00:00:00.000Z"
}

Response samples

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

Update an existing recurrence group

Update an existing recurrence group.

path Parameters
sessionTypeId
required
string

The ID of the session type the recurrence group belongs to.

recurrenceGroupId
required
string

The ID of the recurrence group you want to update.

Request Body schema: application/json

Updates the specified SessionRecurrenceGroup object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

name
string

An option name for the recurrence group.

practitioner_id
string

The practitioner who leads the sessions in this group.

room_id
string

The room where the sessions in this group take place.

weekdays
Array of strings

The weekdays sessions in this group take place.

start_time
string

The start time of each occurrence in this group, in 24 hour format.

capacity
integer

The capacity of each session in this group.

recurrence_start
string <date>

The start date of the recurrence group.

recurrence_end
string <date>

The end date of the recurrence group.

Responses

Request samples

Content type
application/json
{
  • "name": "Mondays with Adrienne",
  • "practitioner_id": "5f184bb0b6ecff2e8157bf27",
  • "room_id": "5dcb47800000000000000010",
  • "weekdays": [
    ],
  • "start_time": "16:00",
  • "capacity": 12,
  • "recurrence_start": "2021-04-10T00:00:00.000Z",
  • "recurrence_end": "2021-05-10T00:00:00.000Z"
}

Response samples

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

Delete a recurrence group

Returns the status of deletion

path Parameters
sessionTypeId
required
string

The ID of the session type the recurrence group belongs to.

recurrenceGroupId
required
string

The ID of the recurrence group you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Check an update to a recurrence group

Check an update to a recurrence group

path Parameters
sessionTypeId
required
string

The ID of the session type the recurrence group belongs to.

recurrenceGroupId
required
string

The ID of the recurrence group you want to check.

Request Body schema: application/json

Checks the impact of applying the updates given in the SessionRecurrenceGroup object.

name
string

An option name for the recurrence group.

practitioner_id
string

The practitioner who leads the sessions in this group.

room_id
string

The room where the sessions in this group take place.

weekdays
Array of strings

The weekdays sessions in this group take place.

start_time
string

The start time of each occurrence in this group, in 24 hour format.

capacity
integer

The capacity of each session in this group.

recurrence_start
string <date>

The start date of the recurrence group.

recurrence_end
string <date>

The end date of the recurrence group.

Responses

Request samples

Content type
application/json
{
  • "name": "Mondays with Adrienne",
  • "practitioner_id": "5f184bb0b6ecff2e8157bf27",
  • "room_id": "5dcb47800000000000000010",
  • "weekdays": [
    ],
  • "start_time": "16:00",
  • "capacity": 12,
  • "recurrence_start": "2021-04-10T00:00:00.000Z",
  • "recurrence_end": "2021-05-10T00:00:00.000Z"
}

Response samples

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

Copy a session type

path Parameters
sessionTypeId
required
string

The ID of the session type to copy.

Request Body schema: application/json

Pass any session type properties that should be overridden on the copied resource.

id
string

The ID of the session type.

name
string

The name of this session type

description
string

A description of the session type

product_code
string

A custom product code for the session type.

currency
string

The ISO-4217 currency code in lower case

image_id
string

The id of the image

object (Media)
offered_online
boolean

Whether this session type is bookable online

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

site_id
string

The ID of the site this session is part of

duration
integer

The duration of the session type.

max_baskets_per_session
integer

Limit the number of baskets that may create bookings for a single session.

max_advance_bookings_interval
string

The maximum time before a session's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_advance_bookings_interval
string

The minimum time before a session's start time that it may be booked, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

members_only
boolean

Whether this session requires an active membership in order to book.

max_bookings_per_member
integer

The maximum number of bookings a member may make on a single session.

permitted_membership_type_ids
Array of strings

If this session is for members only, this property may be used to restrict the offering further so it may only be booked by active members with of one of the given membership types.

membership_booking_windows_enabled
boolean

Whether membership-specific booking windows should be enabled for this session type.

Array of objects (MembershipBookingWindow)
customer_cancellation_permitted
string
Enum: "allowed" "disallowed" "unpaid"

Whether bookings of this type may be cancelled online by customers. A value of unpaid means this booking my be cancelled only if no payments have been recorded against the order it is part of.

customer_cancellation_min_duration
string

The minimum duration that must be left before the booking in order for the customer to cancel, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

waitlist_enabled
boolean

Whether the waitlist is enabled for sessions of this type.

min_guests
integer

The minimum guests allowed in a booking for this session

max_guests
integer

The maximum guests allowed in a booking for this session

Array of objects (SessionPriceRule)

The rules defining prices for this session type.

category_ids
Array of strings

The category IDs associated with this session type

Array of objects (Category)

The category associated with this session type

Array of objects (SessionRecurrenceGroup)

An array of recurrence groups for this session type

object
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
Array of objects (OfferingIdentifier)
revenue_centre
string

The revenue centre to assign revenue to for this offering

updated_at
string <date-time>

The time and date that the appointment type was last updated.

deleted_at
string <date-time>

The time and date that the appointment type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "Vinyasa yoga",
  • "description": "A dynamic form of yoga",
  • "product_code": "MAS123",
  • "currency": "gbp",
  • "image_id": "5dcb47800000000000000000",
  • "image": {},
  • "offered_online": true,
  • "private": true,
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "duration": 60,
  • "max_baskets_per_session": 1,
  • "max_advance_bookings_interval": "P2W",
  • "min_advance_bookings_interval": "P2D",
  • "members_only": true,
  • "max_bookings_per_member": 1,
  • "permitted_membership_type_ids": [
    ],
  • "membership_booking_windows_enabled": true,
  • "membership_booking_windows": [
    ],
  • "customer_cancellation_permitted": "allowed",
  • "customer_cancellation_min_duration": "P7D",
  • "waitlist_enabled": true,
  • "min_guests": 1,
  • "max_guests": 2,
  • "price_rules": [
    ],
  • "category_ids": [
    ],
  • "categories": [
    ],
  • "recurrence_groups": [
    ],
  • "meta": {
    },
  • "upsell_offerings": [
    ],
  • "cross_sell_offerings": [
    ],
  • "related_retail_offerings": [
    ],
  • "revenue_centre": "spa",
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Shop

Get a list of all appointment type tags belonging to the organisation.

query Parameters
organisation_id
required
string
Example: organisation_id=00000000-0000-0000-0000-000000000000

The ID of the organisation the tags belong to

Responses

Response samples

Content type
application/json
{}

Get a list of all categories belonging to the organisation.

query Parameters
organisation_id
required
string
Example: organisation_id=00000000-0000-0000-0000-000000000000

The ID of the organisation the categories belong to

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Retrieve a list of all offerings.

Get all offerings (appointments, sessions etc) available from the shop, optionally filtered by availability on a particular date or by category.

query Parameters
site_id
required
string

The ID of the site.

date
string <date>

An optional date to filter offering availability.

category_id
string

An optional category to filter offerings.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve an offerings.

Gets a specific offering available from the shop.

path Parameters
offeringType
required
string
Enum: "appointment" "package" "session"

The offering type

offeringId
required
string

The ID of the offering

query Parameters
site_id
required
string <uuid>

The site ID which the offering belongs to

Responses

Response samples

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

Retrieve an offering's cross sell offerings

path Parameters
offeringType
required
string
Enum: "appointment" "package" "session"

The offering type

offeringId
required
string

The ID of the offering

query Parameters
site_id
required
string <uuid>

The site ID which the offering belongs to

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Retrieve an offering's up sell offerings

path Parameters
offeringType
required
string
Enum: "appointment" "package" "session"

The offering type

offeringId
required
string

The ID of the offering

query Parameters
site_id
required
string <uuid>

The site ID which the offering belongs to

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Coupons

This endpoint is used for managing coupons

Get coupons

Returns an array of all coupons that the given user has permission to view

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new coupon

Create a new coupon

Request Body schema: application/json

To create a coupon, specify the offerings which it applies to and when the coupon is valid.

name
required
string

The name of the coupon

description
string

A string to describe the coupon

valid_weekdays
Array of strings

An array of weekdays which this coupon is available for use

invalid_date_set_ids
Array of strings

An array of IDs of DateSets describing when this coupon is not valid. The DateSet must belong to the same organisation as the coupon.

default_validity_interval
string

The default duration this coupon is valid for, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

redemption_type
string
Enum: "manual" "programmatic"

The method that this coupon may be redeemed.

Responses

Request samples

Content type
application/json
{
  • "name": "Test coupon",
  • "description": "This coupon is a test",
  • "valid_weekdays": [
    ],
  • "invalid_date_set_ids": [
    ],
  • "default_validity_interval": "P1Y",
  • "redemption_type": "manual"
}

Response samples

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

Gets details about a coupon

Gets details about a coupon

path Parameters
couponId
required
string

The ID of the coupon

Responses

Response samples

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

Update a coupon

Updates base information for an existing coupon. If you're looking to update the nested offerings_discounts, see the updateCouponOffering endpoint.

path Parameters
couponId
required
string

The ID of the coupon

Request Body schema: application/json

The base information to update the existing coupon with. Any parameters not provided will be left unchanged.

name
string

The name of the coupon

description
string

A string to describe the coupon

valid_weekdays
Array of strings

An array of weekdays which this coupon is available for use

invalid_date_set_ids
Array of strings

An array of IDs of DateSets describing when this coupon is not valid. The DateSet must belong to the same organisation as the coupon.

default_validity_interval
string

The default duration this coupon is valid for, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

Responses

Request samples

Content type
application/json
{
  • "name": "Test coupon",
  • "description": "This coupon is a test",
  • "valid_weekdays": [
    ],
  • "invalid_date_set_ids": [
    ],
  • "default_validity_interval": "P1Y"
}

Response samples

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

Soft-delete a coupon.

Soft-deletes a coupon. To restore a soft-deleted coupon, see the restoreCoupon endpoint.

path Parameters
couponId
required
string

The ID of the coupon

Responses

Response samples

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

Restores a coupon

Restores a soft-deleted coupon. If the coupon is not soft-deleted, this endpoint will still return a 200.

path Parameters
couponId
required
string

The ID of the coupon

Responses

Response samples

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

Add an offering discount to a coupon

Adds a new offering discount to an existing coupon

path Parameters
couponId
required
string

The ID of the coupon

Request Body schema: application/json

An object describing which offering the discount applies to, and what the discount is.

required
Array of objects

An array of offerings which this discount applies to

discount_type
required
string
Enum: "fixed_amount" "percentage"

The type of discount to be applied

fixed_amount
integer

The amount of discount to apply as an integer of the smallest unit of currency.

percentage
integer

The percentage of discount to apply

Responses

Request samples

Content type
application/json
{
  • "offerings": [
    ],
  • "discount_type": "fixed_amount",
  • "fixed_amount": 50,
  • "percentage": 10
}

Response samples

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

Remove an offering discount from a coupon

Removes an existing offering discount from the given coupon

path Parameters
couponId
required
string

The ID of the coupon

offeringDiscountId
required
string

The ID of the offering discount

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Update an offering discount

Updates an existing offering discount on the given coupon

path Parameters
couponId
required
string

The ID of the coupon

offeringDiscountId
required
string

The ID of the offering discount

Request Body schema: application/json
object
discount_type
string
Enum: "fixed_amount" "percentage"

The type of discount to be applied.

fixed_amount
integer

The amount of discount to apply as an integer of the smallest unit of currency.

percentage
integer

The percentage of discount to apply.

Responses

Request samples

Content type
application/json
{
  • "offerings": {
    },
  • "discount_type": "fixed_amount",
  • "fixed_amount": 50,
  • "percentage": 10
}

Response samples

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

Get codes for a coupon.

Returns an array of all coupon codes for the given coupon.

path Parameters
couponId
required
string

The ID of the coupon

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new coupon code

path Parameters
couponId
required
string

The ID of the coupon

Request Body schema: application/json

Pass a CreateCouponCodeRequest object to create a new code.

code
string

The redemption code to be used, which must be unique to the organisation. A code will be generated if none is specified.

valid_from_date
string <date-time>

The date and time after which the coupon code may be used.

valid_to_date
string <date-time>

The date and time after which the coupon code may not be used.

multi_use
boolean

Whether the coupon code may be used multiple times.

customer_credit_id
string <uuid> Nullable

The ID of the associated Customer Credit, if applicable.

customer_id
string <uuid> Nullable

The ID of the associated customer, if a customer credit ID is passed.

revenue
integer

The amount of revenue that should be allocated when this coupon code is redeemed, in the smallest unit of currency.

Responses

Request samples

Content type
application/json
{
  • "code": "WYQZF",
  • "valid_from_date": "2021-02-15T12:00:00+00:00",
  • "valid_to_date": "2022-02-15T12:00:00+00:00",
  • "multi_use": true,
  • "customer_credit_id": "0f5432ff-5183-409d-985f-9ec93f791046",
  • "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
  • "revenue": 2495
}

Response samples

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

Delete a coupon code.

path Parameters
couponId
required
string

The ID of the coupon

codeId
required
string

The ID of the coupon code

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

VoucherTypes

Get details of all voucher types available

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update the order of voucher types

Request Body schema: application/json

Pass an object containing an array of ordered voucher type IDs

voucher_type_ids
required
Array of strings
site_id
required
string

Responses

Request samples

Content type
application/json
{
  • "voucher_type_ids": [
    ],
  • "site_id": "string"
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get voucher types

Returns an array of all voucher types the given user has permission to view.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

archived
boolean

Only show archived resources

amount_type
string
Example: amount_type=cash

Only include vouchers that have this amount type.

customisable_amount
boolean
Example: customisable_amount=true

Only include vouchers that have a customisable amount.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Create a new voucher type

Create a new voucher type

Request Body schema: application/json

To create a voucher type, you pass a VoucherType object.

id
string

The ID of the voucher type.

name
string

The name of this voucher type.

description
string

A description of the voucher type.

product_code
string

A custom product code for the voucher type.

object (Media)
recipient_message
string

A message that will be included in the email containing the gift voucher.

amount_type
string
Enum: "cash" "discount_to_zero"

The type of discount offered by this voucher.

amount
integer

The value of this voucher if it is a 'cash' type

customisable_amount
boolean

Whether the amount of this voucher can be overridden by a user when it is being sold

valid_weekdays
Array of strings

An array of weekdays (in lowercase) that this voucher may be used on.

invalid_date_set_ids
Array of strings

An array of date set IDs that this voucher may not be used on.

Array of objects (OfferingIdentifier)

An array of offerings this voucher may be used on.

Array of objects (OfferingIdentifier)

If no valid_offerings are defined, this is an array of offerings this voucher may be not used on.

partially_redeemable
boolean

Whether vouchers of this type should be partially redeemable.

default_validity_interval
string

The default duration this voucher is valid for, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

offered_online
boolean

Whether this voucher type is allowed to be purchased online.

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

members_only
boolean

Whether this voucher type requires an active membership in order to purchase.

permitted_membership_type_ids
Array of strings

If this voucher type is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types.

Array of objects (AvailabilityRule)

The rules defining periods during which the voucher can be purchased.

Array of objects (VoucherPriceRule)

The rules defining prices for this voucher type.

currency
string

The ISO-4217 currency code in lower case.

site_id
string

The ID of the site this voucher type belongs to.

organisation_id
string

The ID of the organisation this voucher type belongs to.

category_ids
Array of strings

The category IDs associated with this session type

updated_at
string <date-time>

The time and date that the voucher type was last updated.

deleted_at
string <date-time>

The time and date that the voucher type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "£50 voucher",
  • "description": "£50 off a treatment of your choice.",
  • "product_code": "VOU123",
  • "image": {},
  • "recipient_message": "You can spend this on anything you like. Enjoy!",
  • "amount_type": "cash",
  • "amount": 2500,
  • "customisable_amount": true,
  • "valid_weekdays": [
    ],
  • "invalid_date_set_ids": [
    ],
  • "valid_offerings": [
    ],
  • "invalid_offerings": [
    ],
  • "partially_redeemable": true,
  • "default_validity_interval": "P1Y",
  • "offered_online": true,
  • "private": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "availability_rules": [
    ],
  • "price_rules": [
    ],
  • "currency": "gbp",
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "organisation_id": "00000000-0000-0000-0000-000000000000",
  • "category_ids": [
    ],
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Get voucher type details

Returns the details of a single voucher type

path Parameters
voucherTypeId
required
string

The ID of the voucher type you want to retrieve

Responses

Response samples

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

Update an existing voucher type

Update an existing voucher type

path Parameters
voucherTypeId
required
string

The ID of the voucher type you want to retrieve

Request Body schema: application/json

Updates the specified VoucherType object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the voucher type.

name
string

The name of this voucher type.

description
string

A description of the voucher type.

product_code
string

A custom product code for the voucher type.

object (Media)
recipient_message
string

A message that will be included in the email containing the gift voucher.

amount_type
string
Enum: "cash" "discount_to_zero"

The type of discount offered by this voucher.

amount
integer

The value of this voucher if it is a 'cash' type

customisable_amount
boolean

Whether the amount of this voucher can be overridden by a user when it is being sold

valid_weekdays
Array of strings

An array of weekdays (in lowercase) that this voucher may be used on.

invalid_date_set_ids
Array of strings

An array of date set IDs that this voucher may not be used on.

Array of objects (OfferingIdentifier)

An array of offerings this voucher may be used on.

Array of objects (OfferingIdentifier)

If no valid_offerings are defined, this is an array of offerings this voucher may be not used on.

partially_redeemable
boolean

Whether vouchers of this type should be partially redeemable.

default_validity_interval
string

The default duration this voucher is valid for, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

offered_online
boolean

Whether this voucher type is allowed to be purchased online.

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

members_only
boolean

Whether this voucher type requires an active membership in order to purchase.

permitted_membership_type_ids
Array of strings

If this voucher type is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types.

Array of objects (AvailabilityRule)

The rules defining periods during which the voucher can be purchased.

Array of objects (VoucherPriceRule)

The rules defining prices for this voucher type.

currency
string

The ISO-4217 currency code in lower case.

site_id
string

The ID of the site this voucher type belongs to.

organisation_id
string

The ID of the organisation this voucher type belongs to.

category_ids
Array of strings

The category IDs associated with this session type

updated_at
string <date-time>

The time and date that the voucher type was last updated.

deleted_at
string <date-time>

The time and date that the voucher type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "£50 voucher",
  • "description": "£50 off a treatment of your choice.",
  • "product_code": "VOU123",
  • "image": {},
  • "recipient_message": "You can spend this on anything you like. Enjoy!",
  • "amount_type": "cash",
  • "amount": 2500,
  • "customisable_amount": true,
  • "valid_weekdays": [
    ],
  • "invalid_date_set_ids": [
    ],
  • "valid_offerings": [
    ],
  • "invalid_offerings": [
    ],
  • "partially_redeemable": true,
  • "default_validity_interval": "P1Y",
  • "offered_online": true,
  • "private": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "availability_rules": [
    ],
  • "price_rules": [
    ],
  • "currency": "gbp",
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "organisation_id": "00000000-0000-0000-0000-000000000000",
  • "category_ids": [
    ],
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Delete a voucher type

Returns the status of deletion

path Parameters
voucherTypeId
required
string

The ID of the voucher type you want to retrieve

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Copy a voucher type

path Parameters
voucherTypeId
required
string

The ID of the voucher type to copy.

Request Body schema: application/json

Pass any voucher type properties that should be overridden on the copied resource.

id
string

The ID of the voucher type.

name
string

The name of this voucher type.

description
string

A description of the voucher type.

product_code
string

A custom product code for the voucher type.

object (Media)
recipient_message
string

A message that will be included in the email containing the gift voucher.

amount_type
string
Enum: "cash" "discount_to_zero"

The type of discount offered by this voucher.

amount
integer

The value of this voucher if it is a 'cash' type

customisable_amount
boolean

Whether the amount of this voucher can be overridden by a user when it is being sold

valid_weekdays
Array of strings

An array of weekdays (in lowercase) that this voucher may be used on.

invalid_date_set_ids
Array of strings

An array of date set IDs that this voucher may not be used on.

Array of objects (OfferingIdentifier)

An array of offerings this voucher may be used on.

Array of objects (OfferingIdentifier)

If no valid_offerings are defined, this is an array of offerings this voucher may be not used on.

partially_redeemable
boolean

Whether vouchers of this type should be partially redeemable.

default_validity_interval
string

The default duration this voucher is valid for, as an ISO8601 string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

offered_online
boolean

Whether this voucher type is allowed to be purchased online.

private
boolean

Whether this is private. When private, it is accessible from the URL but doesn't appear on category pages and isn't indexed on search engines.

members_only
boolean

Whether this voucher type requires an active membership in order to purchase.

permitted_membership_type_ids
Array of strings

If this voucher type is for members only, this property may be used to restrict the offering further so it may only be purchased by active members with of one of the given membership types.

Array of objects (AvailabilityRule)

The rules defining periods during which the voucher can be purchased.

Array of objects (VoucherPriceRule)

The rules defining prices for this voucher type.

currency
string

The ISO-4217 currency code in lower case.

site_id
string

The ID of the site this voucher type belongs to.

organisation_id
string

The ID of the organisation this voucher type belongs to.

category_ids
Array of strings

The category IDs associated with this session type

updated_at
string <date-time>

The time and date that the voucher type was last updated.

deleted_at
string <date-time>

The time and date that the voucher type was archived.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000010",
  • "name": "£50 voucher",
  • "description": "£50 off a treatment of your choice.",
  • "product_code": "VOU123",
  • "image": {},
  • "recipient_message": "You can spend this on anything you like. Enjoy!",
  • "amount_type": "cash",
  • "amount": 2500,
  • "customisable_amount": true,
  • "valid_weekdays": [
    ],
  • "invalid_date_set_ids": [
    ],
  • "valid_offerings": [
    ],
  • "invalid_offerings": [
    ],
  • "partially_redeemable": true,
  • "default_validity_interval": "P1Y",
  • "offered_online": true,
  • "private": true,
  • "members_only": true,
  • "permitted_membership_type_ids": [
    ],
  • "availability_rules": [
    ],
  • "price_rules": [
    ],
  • "currency": "gbp",
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "organisation_id": "00000000-0000-0000-0000-000000000000",
  • "category_ids": [
    ],
  • "updated_at": "2020-02-24T12:00:00+01:00",
  • "deleted_at": "2020-02-24T12:00:00+01:00"
}

Response samples

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

Restores a voucher type

Restores a soft-deleted (archived) voucher type.

path Parameters
voucherTypeId
required
string

The ID of the voucher type you want to restore

Responses

Response samples

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

Get voucher type availability rules

Returns an array of all availability rules for the given voucher type.

path Parameters
voucherTypeId
required
string

The ID of the voucher type the availability rules relate to.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new availability rule for a voucher type.

path Parameters
voucherTypeId
required
string

The ID of the voucher type the availability rules relate to.

Request Body schema: application/json

To create an availability rule you pass an AvailabilityRule object.

id
string

The ID of the availability rule.

date_from
string <date>

The start of the rule period.

date_to
string <date>

The end of the rule period.

time_from
string

The daily start time of the time period, in 24 hour format.

time_to
string

The daily end time of the time period, in 24 hour format.

weekday
string

The weekday this rule applies to.

weekdays
Array of strings

The weekdays this rule applies to.

is_available
boolean

Whether the resource is available during this period. Any false rules will override true rules.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true
}

Response samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true
}

Get details of a single availability rule.

Returns the details of a single availability rule.

path Parameters
voucherTypeId
required
string

The ID of the voucher type the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Responses

Response samples

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

Update an existing availability rule

Update an existing availability rule.

path Parameters
voucherTypeId
required
string

The ID of the voucher type the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Request Body schema: application/json

Updates the specified AvailabilityRule object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the availability rule.

date_from
string <date>

The start of the rule period.

date_to
string <date>

The end of the rule period.

time_from
string

The daily start time of the time period, in 24 hour format.

time_to
string

The daily end time of the time period, in 24 hour format.

weekday
string

The weekday this rule applies to.

weekdays
Array of strings

The weekdays this rule applies to.

is_available
boolean

Whether the resource is available during this period. Any false rules will override true rules.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb56700000000000000000",
  • "date_from": "2021-02-15T12:00:00+00:00",
  • "date_to": "2021-02-15T12:00:00+00:00",
  • "time_from": "11:00",
  • "time_to": "17:00",
  • "weekday": "string",
  • "weekdays": [
    ],
  • "is_available": true
}

Response samples

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

Delete an availability rule

Returns the status of deletion

path Parameters
voucherTypeId
required
string

The ID of the voucher type the availability rule belongs to.

availabilityRuleId
required
string

The ID of the availability rule you want to access.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Organisations

This endpoint is used to retrieve organisations

Get all available categories

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the category belongs to

query Parameters
voucher_applicable
boolean

Only show categories that are applicable to vouchers

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update the order of categories

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the category belongs to

Request Body schema: application/json

Pass an object containing an array of ordered category IDs

category_ids
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "category_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get labels

Returns an array of all labels the given user has permission to view

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the labels belong to

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

archived
boolean

Only show archived resources

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create a new label

Create a new label

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the label belong to

Request Body schema: application/json

To create a label, you pass an Label object.

id
string <uuid>

The ID of the label

value
string

The name of the label

colour
string

A hex colour code excluding the preceding # which this label will be rendered as.

organisation_id
string <uuid>

The organisation which this label belongs to

created_at
string <date-time>

The datetime which the label was created

updated_at
string <date-time>

The datetime which the label was last updated

Responses

Request samples

Content type
application/json
{
  • "id": "000000-000000-000000-000000",
  • "value": "VIP",
  • "colour": "ff6634",
  • "organisation_id": "000000-000000-000000-000000",
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z"
}

Response samples

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

Get label details

Returns the details of a single label

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the label belong to

labelId
required
string

The ID of the label you want to retrieve

Responses

Response samples

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

Update an existing label

Update an existing label

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the label belong to

labelId
required
string

The ID of the label you want to update

Request Body schema: application/json

Updates the specified Label object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string <uuid>

The ID of the label

value
string

The name of the label

colour
string

A hex colour code excluding the preceding # which this label will be rendered as.

organisation_id
string <uuid>

The organisation which this label belongs to

created_at
string <date-time>

The datetime which the label was created

updated_at
string <date-time>

The datetime which the label was last updated

Responses

Request samples

Content type
application/json
{
  • "id": "000000-000000-000000-000000",
  • "value": "VIP",
  • "colour": "ff6634",
  • "organisation_id": "000000-000000-000000-000000",
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z"
}

Response samples

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

Delete a label

Returns the status of deletion

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the label belong to

labelId
required
string

The ID of the label to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Restores an archived label

Restores a soft-deleted (archived) label.

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the label belongs to

labelId
required
string

The ID of the label to restore

Responses

Response samples

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

Copy a label

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the label belong to

labelId
required
string

The ID of the label to copy.

Request Body schema: application/json

Pass any label properties that should be overridden on the copied resource.

id
string <uuid>

The ID of the label

value
string

The name of the label

colour
string

A hex colour code excluding the preceding # which this label will be rendered as.

organisation_id
string <uuid>

The organisation which this label belongs to

created_at
string <date-time>

The datetime which the label was created

updated_at
string <date-time>

The datetime which the label was last updated

Responses

Request samples

Content type
application/json
{
  • "id": "000000-000000-000000-000000",
  • "value": "VIP",
  • "colour": "ff6634",
  • "organisation_id": "000000-000000-000000-000000",
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z"
}

Response samples

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

Get categories

Returns an array of all categories the given user has permission to view

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the category belongs to

query Parameters
voucher_applicable
boolean

Only return voucher categories

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create a new category

Create a new category

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the category belongs to

Request Body schema: application/json

To create a category, you pass an Category object.

id
string

The ID of the category.

name
string

The name of the category.

organisation_id
string

The ID of the organisation the category belongs to.

Responses

Request samples

Content type
application/json
{
  • "id": "10000000-0000-0000-0000-000000000000",
  • "name": "Massage oils",
  • "organisation_id": "20000000-0000-0000-0000-000000000000"
}

Response samples

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

Get category details

Returns the details of a single category

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the category belongs to

categoryId
required
string

The ID of the category you want to retrieve

Responses

Response samples

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

Update an existing category

Update an existing category

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the category belongs to

categoryId
required
string

The ID of the category you want to update

Request Body schema: application/json

Updates the specified Category object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the category.

name
string

The name of the category.

organisation_id
string

The ID of the organisation the category belongs to.

Responses

Request samples

Content type
application/json
{
  • "id": "10000000-0000-0000-0000-000000000000",
  • "name": "Massage oils",
  • "organisation_id": "20000000-0000-0000-0000-000000000000"
}

Response samples

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

Delete a category

Returns the status of deletion

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the category belongs to

categoryId
required
string

The ID of the category to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Copy a category

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the category belongs to

categoryId
required
string

The ID of the category to copy.

Request Body schema: application/json

Pass any category properties that should be overridden on the copied resource.

id
string

The ID of the category.

name
string

The name of the category.

organisation_id
string

The ID of the organisation the category belongs to.

Responses

Request samples

Content type
application/json
{
  • "id": "10000000-0000-0000-0000-000000000000",
  • "name": "Massage oils",
  • "organisation_id": "20000000-0000-0000-0000-000000000000"
}

Response samples

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

Get custom payment types

Returns an array of all custom payment types the given user has permission to view

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the custom payment type belongs to

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new custom payment type

Create a new custom payment type

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the custom payment type belongs to

Request Body schema: application/json

Pass a new CustomPaymentType object.

id
string

The ID of the custom payment type.

name
string

The name of the custom payment type.

kind
string
Enum: "pms_prepaid" "prepayment" "voucher"

The kind of the custom payment type.

Responses

Request samples

Content type
application/json
{
  • "id": "5f8d944e79c9f341846e807a",
  • "name": "Cash",
  • "kind": "pms_prepaid"
}

Response samples

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

Get custom payment type details

Returns the details of a single custom payment type

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the custom payment type belongs to

customPaymentTypeId
required
string

The ID of the custom payment type you want to retrieve

Responses

Response samples

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

Update an existing custom payment type

Update an existing custom payment type

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the custom payment type belongs to

customPaymentTypeId
required
string

The ID of the custom payment type you want to update

Request Body schema: application/json

Updates the specified CustomPaymentType object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the custom payment type.

name
string

The name of the custom payment type.

kind
string
Enum: "pms_prepaid" "prepayment" "voucher"

The kind of the custom payment type.

Responses

Request samples

Content type
application/json
{
  • "id": "5f8d944e79c9f341846e807a",
  • "name": "Cash",
  • "kind": "pms_prepaid"
}

Response samples

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

Delete a custom payment type

Returns the status of deletion

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the custom payment type belongs to

customPaymentTypeId
required
string

The ID of the custom payment type to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get a list of all appointment type tags belonging to the organisation.

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the tags belong to

Responses

Response samples

Content type
application/json
{}

Add a new appointment tag to the organisation

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the tags belong to

Request Body schema: application/json

To create an appointment tag, you create a Tag object.

id
string

The ID of the tag.

name
string

The name of the tag.

organisation_id
string

The ID of the organisation the tag belongs to.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "name": "Beginner friendly",
  • "organisation_id": "00000000-0000-0000-0000-000000000000"
}

Response samples

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

Get a list of all appointment type tags belonging to the organisation.

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation whose tag you want to retrieve.

tagId
required
string
Example: 5e932c0901d210625e3a8766

The ID of the tag you want to retrieve.

Responses

Response samples

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

Update an existing appointment type tag

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation whose tag you want to update.

tagId
required
string
Example: 5e932c0901d210625e3a8766

The ID of the tag you want to update.

Request Body schema: application/json
id
string

The ID of the tag.

name
string

The name of the tag.

organisation_id
string

The ID of the organisation the tag belongs to.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "name": "Beginner friendly",
  • "organisation_id": "00000000-0000-0000-0000-000000000000"
}

Response samples

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

Delete an appointment type tag

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation whose tag you want to delete.

tagId
required
string
Example: 5e932c0901d210625e3a8766

The ID of the tag you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get a list of all sales channels belonging to the organisation.

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the sales channels belong to

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Add a new sales channel to the organisation

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the tags belong to

Request Body schema: application/json

To create a sales channel, you create a SalesChannel object.

id
string

The ID of the sales channel.

organisation_id
string

The ID of the organisation the sales channel belongs to.

name
string

The name of the sales channel.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "organisation_id": "00000000-0000-0000-0000-000000000000",
  • "name": "Direct"
}

Response samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "organisation_id": "00000000-0000-0000-0000-000000000000",
  • "name": "Direct"
}

Get a list of all sales channels belonging to the organisation.

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation whose sales channel you want to retrieve.

salesChannelId
required
string
Example: 5e932c0901d210625e3a8766

The ID of the sales channel you want to retrieve.

Responses

Response samples

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

Delete a sales channel

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation whose sales channel you want to delete.

salesChannelId
required
string
Example: 5e932c0901d210625e3a8766

The ID of the sales channel you want to delete.

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get a list of all date sets belonging to the organisation.

Returns an array of all date sets the current user has permission to view.

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the date set belongs to.

query Parameters
limit
integer
Example: limit=1

A limit to the number of results that should be returned.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a new date set

Create a new date set

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the date set belongs to.

Request Body schema: application/json

To create a date set, you pass an DateSet object.

id
string

The ID of the date set.

name
string

The name of the date set.

Array of objects (DateSetDate)

The dates in the date set.

organisation_id
string

The ID of the organisation the date set belongs to.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "name": "Bank holidays",
  • "dates": [
    ],
  • "organisation_id": "00000000-0000-0000-0000-000000000000"
}

Response samples

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

Get a date set

Returns the details of a single date set

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the date set belongs to.

dateSetId
required
string

The ID of the date set you want to retrieve.

Responses

Response samples

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

Update a date set

Update an existing date set

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the date set belongs to

dateSetId
required
string

The ID of the date set you want to update

Request Body schema: application/json

Updates the specified DateSet object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

The ID of the date set.

name
string

The name of the date set.

Array of objects (DateSetDate)

The dates in the date set.

organisation_id
string

The ID of the organisation the date set belongs to.

Responses

Request samples

Content type
application/json
{
  • "id": "5dcb47800000000000000000",
  • "name": "Bank holidays",
  • "dates": [
    ],
  • "organisation_id": "00000000-0000-0000-0000-000000000000"
}

Response samples

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

Delete a date sate

Delete a date set

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the date set belongs to

dateSetId
required
string

The ID of the date set to delete

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 5dcb47800000000000000000"
}

Get a list of all revenue centres belonging to the organisation.

Returns an array of all revenue centres for the given organisation.

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the revenue belongs to.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Create a new revenue centre

Create a new revenue centre

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the revenue centre belongs to.

Request Body schema: application/json

To create a revenue centre, you pass an RevenueCentre object.

id
string

A string identifier of the revenue centre.

key
string

A string identifier of the revenue centre.

name
string

The name of the revenue centre

tax_percent
number

The tax percent for this revenue centre

Responses

Request samples

Content type
application/json
{
  • "id": "fb",
  • "key": "fb",
  • "name": "Food & Beverage",
  • "tax_percent": 20
}

Response samples

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

Get a revenue centre

Returns the details of a single revenue centre

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the revenue centre belongs to.

revenueCentreId
required
string

The ID of the revenue centre you want to retrieve.

Responses

Response samples

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

Update a revenue centre

Updates the details of a single revenue centre

path Parameters
organisationId
required
string
Example: 00000000-0000-0000-0000-000000000000

The ID of the organisation the revenue centre belongs to.

revenueCentreId
required
string

The ID of the revenue centre you want to retrieve.

Request Body schema: application/json

Updates the specified RevenueCentre object by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

id
string

A string identifier of the revenue centre.

key
string

A string identifier of the revenue centre.

name
string

The name of the revenue centre

tax_percent
number

The tax percent for this revenue centre

Responses

Request samples

Content type
application/json
{
  • "id": "fb",
  • "key": "fb",
  • "name": "Food & Beverage",
  • "tax_percent": 20
}

Response samples

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

Vouchers

List all external (third party integration) vouchers for a site.

query Parameters
site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Retrieve a single voucher.

path Parameters
voucherId
required
string

The ID of the voucher to retrieve.

Responses

Response samples

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

Update a voucher.

path Parameters
voucherId
required
string

The ID of the voucher to update.

Request Body schema: application/json
Array of objects

An array of offerings that this voucher is valid for.

valid_weekdays
Array of strings

An array of weekdays (in lowercase) that this voucher may be used on.

invalid_date_set_ids
Array of strings

An array of date set IDs that this voucher may not be used on.

Responses

Request samples

Content type
application/json
{
  • "valid_offerings": [
    ],
  • "valid_weekdays": [
    ],
  • "invalid_date_set_ids": [
    ]
}

Response samples

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

Import vouchers to a site.

query Parameters
site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Add a valid offering to a voucher.

path Parameters
voucherId
required
string
Example: 60119cd6cd0e5323af364b96

The ID of the voucher to update

Responses

Response samples

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

Remove a valid offering from a voucher

path Parameters
voucherId
required
string
Example: 60119cd6cd0e5323af364b96

The ID of the voucher to update

offeringId
required
string
Example: 60119cd6cd0e5323af364b97

The ID of the offering to remove

Responses

Response samples

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

Look up the details of a voucher by its code.

path Parameters
voucherCode
required
string

The code for the voucher you want to retrieve

query Parameters
site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Look up the details of a voucher by its code.

path Parameters
voucherCode
required
string

The code for the voucher you want to retrieve

query Parameters
site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

CheckAvailability

This endpoint is used to check availability of various offerings

DEPRECATED. Check availability for a single guest booking multiple appointments at the same time. The response includes a set of slots each for the combination of all appointments back-to-back. This endpoint is unreliable and will be removed at the end of August 2024. Deprecated

Request Body schema: application/json

Pass an object containing a site ID and an array of appointment details.

site_id
string

The ID of the site where availability is to be checked.

date
string <date>

The date availability is to be checked for

basket_id
string

The ID of the current basket. This will show the current basket's items as still available in the response.

Array of objects (AddBasketItem)

The appointments to be checked for availability, in the same format they would be added to the basket.

Responses

Request samples

Content type
application/json
{
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "date": "2020-04-15T00:00:00+01:00",
  • "basket_id": "5dcb47800000000000111111",
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Check availability for an offering across a range of dates

Request availability for up to one month at a time.

query Parameters
offering_id
required
string
Example: offering_id=5dcb47800000000000000000

The ID of the offering.

offering_type
required
string
Example: offering_type=appointment

The type of the offering.

date_from
required
string <date>
Example:

Availability from this date.

date_to
required
string <date>
Example:

Availability up to and including this date.

quantity
integer
Example: quantity=2

Check availability for this quantity.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

DEPRECATED. Get available slots for several items at once. This endpoint does not work reliably in the way that API consumers would expect and will be removed at the end of August 2024.

Request Body schema: application/json

Pass an object containing a site ID and an array of item details.

site_id
string

The ID of the site where availability is to be checked.

date
string <date>

The date availability is to be checked for

basket_id
string

The ID of the current basket. This will show the current basket's items as still available in the response.

Array of objects (AddBasketItem)

The appointments to be checked for availability, in the same format they would be added to the basket.

Responses

Request samples

Content type
application/json
{
  • "site_id": "00000000-0000-0000-0000-111111111111",
  • "date": "2020-04-15T00:00:00+01:00",
  • "basket_id": "5dcb47800000000000111111",
  • "items": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "currency": "gbp"
}

Get appointment availability

Returns availability slots matching the given details. A date range that include a portion of any days will include results for those whole days.

path Parameters
siteId
required
string
Example: 5dcb47800000000000000000

The site to retrieve availability for

appointmentTypeId
required
string
Example: 5dcb47800000000000000000

The appointment type to retrieve availability for

query Parameters
duration
integer
Example: duration=60

Restrict availability checks to just those of the given length in minutes

practitioner_id
string
Example: practitioner_id=5dcb47800000000000000000

Restrict availability checks to just those offered by the given practitioner ID

exclude_appointments
string
Example: exclude_appointments=5dcb47800000000000000020,5dcb47800000000000000021

A comma separated string of appointment ids to exclude from availabliity checks

exclude_basket_items
string
Example: exclude_basket_items=5dcb47800000000000000020,5dcb47800000000000000021

A comma separated string of basket item ids to exclude from availabliity checks

basket_id
string
Example: basket_id=5dcb47800000000000000020

The ID of the basket availability should be checked for.

guest_id
string
Example: guest_id=5dcb47800000000000000020

The ID of the guest availability should be checked for.

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get available dates for appointments

DEPRECATED (2024-09-19): This endpoint is deprecated and will be removed in a future release. Use getOfferingDatesAvailability instead.

path Parameters
appointmentTypeId
required
string
Example: 5dcb47800000000000000000

The appointment type to retrieve availability for

query Parameters
duration
integer
Example: duration=60

Restrict availability checks to just those of the given length in minutes

practitioner_id
string
Example: practitioner_id=5dcb47800000000000000000

Restrict availability checks to just those offered by the given practitioner ID

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get area booking availability

Returns all area booking slots matching the given details with their current availability.

path Parameters
bookingTypeId
required
string
Example: 5dcb47800000000000000000

The area booking type to retrieve availability for

query Parameters
duration
integer
Example: duration=60

If passed, will only return availability for slots of this number of minutes.

exclude_bookings
string
Example: exclude_bookings=5dcb47800000000000000020,5dcb47800000000000000021

A comma separated string of booking IDs to exclude from availabliity checks

exclude_basket_items
string
Example: exclude_basket_items=5dcb47800000000000000020,5dcb47800000000000000021

A comma separated string of basket item IDs to exclude from availabliity checks

basket_id
string
Example: basket_id=5dcb47800000000000000020

The ID of the basket availability should be checked for.

guest_id
string
Example: guest_id=5dcb47800000000000000021

The ID of the guest availability should be checked for.

quantity
string
Example: quantity=8

The required capacity of the slot.

date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Get session availability

Returns all sessions matching the given details and their current availability

path Parameters
siteId
required
string

The ID of the site you want to retrieve sessions for

sessionTypeId
required
string
Example: 5dcb47800000000000000000

The session type to retrieve availability for

query Parameters
basket_id
string
Example: basket_id=5dcb47800000000000000020

The ID of the basket availability should be checked for.

guest_id
string
Example: guest_id=5dcb47800000000000000021

The ID of the guest availability should be checked for.

quantity
string
Example: quantity=8

The required capacity of the session.

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get package availability

MARKED FOR DEPRECATION: use getPackageChoiceSlotAvailability instead. Returns all packages matching the given details and their current availability.

path Parameters
siteId
required
string

The ID of the site you want to retrieve packages for

packageId
required
string
Example: 5dcb47800000000000000000

The package type to retrieve availability for

query Parameters
date
required
string <date>

A date to filter package availability.

basket_item_id
string

The ID of the current basket. This will show the current basket's items as still available in the response and will take into account any package rules.

Responses

Response samples

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

Get package availability for a single choice.

Returns all packages matching the given details and their current availability

path Parameters
packageId
required
string
Example: 5dcb47800000000000000000

The package type to retrieve availability for

choiceId
required
string

The ID of the choice you want to retrieve slots for

query Parameters
date
required
string <date>

An date to filter package availability.

basket_id
string

The ID of the current basket. This will be used for suggested slots.

basket_item_id
string

The ID of the current basket item. This will exclude the given item's bookings so they still appear available in the response and will take into account any package rules. The basket will also be set if this is passed.

package_item_id
string

The ID of the current package item. This will exclude the given item's booking so those times still appear available in the response and will take into account any package rules. The basket and basket item will also be set if this is passed.

option_id
string

Only show slots for the given option.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Get product availability

Returns the number of available stock for the product.

path Parameters
productId
required
string
Example: 5dcb47800000000000000000

The ID of the product to retrieve availability for

Responses

Response samples

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

Reports

A collection of endpoints for generating reports

Queue a report of all voucher codes

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

status
string
Enum: "unredeemed" "partially_redeemed" "redeemed"

Filter on vouchers by status

amount
string
Example: amount=>1000

Filter on values of a certain amount, optionally including an operator.

balance
string
Example: balance=>1000

Filter on vouchers with a certain balance, optionally including an operator.

created_since
string <date-time>

Filter on vouchers created since a given date and time.

Responses

Response samples

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

Get a report of practitioner occupancy for a date range

Retrieves a report of practitioner occupancy for a date range. This report is superseded by the Practitioner Utilisation report.

query Parameters
date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    },
  • "metadata": {
    }
}

Queue a report of practitioner occupancy for a date range

Retrieves a report of practitioner occupancy for a date range

query Parameters
date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Get a report of practitioner occupancy for a date range, shown by date

query Parameters
date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of zone ids to filter by.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    },
  • "metadata": {
    }
}

Queue a report of practitioner occupancy for a date range, shown by date

query Parameters
date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of zone ids to filter by.

Responses

Response samples

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

Get a summary report of utilisation and revenue by practitioner.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
required
string <date>

Include dates on or after this date. For revenue stats this will be treated as the revenue date.

date_to
required
string <date>

Include dates on or before this date. For revenue stats this will be treated as the revenue date.

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "totals": {
    },
  • "meta": {
    }
}

Queue a download of utilisation and revenue by practitioner.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
required
string <date>

Include dates on or after this date. For revenue stats this will be treated as the revenue date.

date_to
required
string <date>

Include dates on or before this date. For revenue stats this will be treated as the revenue date.

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

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

Get a report of room occupancy for a date range

Retrieves a report of room occupancy for a date range

query Parameters
date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

room_ids
string
Example: room_ids=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of room ids to fetch occupany for

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    }
}

Queue a report of room occupancy for a date range

Retrieves a report of room occupancy for a date range

query Parameters
date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

room_ids
string
Example: room_ids=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of room ids to fetch occupany for

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

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

Get a report of bookable area occupancy for a date range

Retrieves a report of bookable area occupancy for a date range

query Parameters
date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

bookable_area_ids
string
Example: bookable_area_ids=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of bookable area ids to fetch occupancy for

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    }
}

Queue a report of bookable area occupancy for a date range

Retrieves a report of bookable area occupancy for a date range

query Parameters
date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

bookable_area_ids
string
Example: bookable_area_ids=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of bookable area ids to fetch occupancy for

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

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

Get a list of payments and refunds.

query Parameters
completed_from
string <date-time>

Filter to charges completed after this time.

completed_to
string <date-time>

Filter to charges completed before this time.

revenue_date_from
string <date>

Filter to charges with a revenue date after this date.

revenue_date_to
string <date>

Filter to charges with a revenue date before this date.

payout_date_from
string <date>

Filter to charges with a payout date after this date.

payout_date_to
string <date>

Filter to charges with a payout date after this date.

site_id
string

The ID of the site to filter on.

status
string

Filter on charges of this status.

chargeable_type
string
Enum: "order" "membership"

Filter on charges of this type.

charge_type
string
Enum: "refund" "payment"

Filter on refunds or payments.

processor
string
Enum: "manual" "stripe" "adyen" "saved_card" "pms_folio" "voucher" "external_voucher"

Filter payments by processor.

processor_type_id
string

Filter payments by processor.

order_status
any
Enum: "in_progress" "new" "submitted" "settled" "cancelled" "no_show"

Filter status of orders.

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "processor_totals": [
    ],
  • "meta": {},
}

Schedule a list of payments and refunds to be generated asynchronously.

query Parameters
completed_from
string <date-time>

Filter to charges completed after this time.

completed_to
string <date-time>

Filter to charges completed before this time.

revenue_date_from
string <date>

Filter to charges with a revenue date after this date.

revenue_date_to
string <date>

Filter to charges with a revenue date before this date.

payout_date_from
string <date>

Filter date that the transaction's payout is recognised.

payout_date_to
string <date>

Filter date that the transaction's payout is recognised.

site_id
string

The ID of the site to filter on.

status
string

Filter on charges of this status.

chargeable_type
string
Enum: "order" "membership"

Filter on charges of this type.

charge_type
string
Enum: "refund" "payment"

Filter on refunds or payments.

processor
string
Enum: "manual" "stripe" "adyen" "saved_card" "pms_folio" "voucher" "external_voucher"

Filter payments by processor.

processor_type_id
string

Filter payments by processor.

order_status
any
Enum: "in_progress" "new" "submitted" "settled" "cancelled" "no_show"

Filter status of orders.

email
boolean

Whether to request an email of this report.

Responses

Response samples

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

Get a list of payments and refunds for a single date.

query Parameters
date
string <date-time>

Filter to charges completed on this date. Defaults to today's date.

site_id
string

The ID of the site to filter on.

status
string

Filter on charges of this status.

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "processor_totals": [
    ],
  • "meta": {},
}

Get a summary report of no shows and cancellations.

query Parameters
revenue_date_from
required
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
required
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
required
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Get a summary report of no shows and cancellations.

query Parameters
revenue_date_from
required
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
required
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
required
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": {
    }
}

Queue a download for cancellations and no shows.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to get data for.

Responses

Response samples

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

Get a summary report of revenue by reporting centre.

query Parameters
item_date_from
string <date-time>

Filter to baskets with items on or after this date.

item_date_to
string <date-time>

Filter to baskets with items on or before this date.

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

labels
string

Filter to baskets with the given labels. This can be a comma separated list of label IDs, or 'none' to filter on baskets that don't have any labels.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Schedule a summary report of revenue by reporting centre to be generated asynchronously.

query Parameters
item_date_from
string <date-time>

Filter to baskets with items on or after this date.

item_date_to
string <date-time>

Filter to baskets with items on or before this date.

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

labels
string

Filter to baskets with the given labels. This can be a comma separated list of label IDs, or 'none' to filter on baskets that don't have any labels.

Responses

Response samples

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

Get a summary report of revenue by sales channel.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

sales_channel
Array of strings <uuid>

Filter to items of the selected sales channel(s).

submitted_at_from
string <date-time>

Filter on orders with a submitted date on or after this time.

submitted_at_to
string <date-time>

Filter on orders with a submitted date before this date.

revenue_centre
Array of strings <uuid>

Filter to items of the selected revenue centre(s).

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "meta": {
    }
}

Get a summary report of revenue by sales channel.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

sales_channel
Array of strings <uuid>

Filter to items of the selected sales channel(s).

submitted_at_from
string <date-time>

Filter on orders with a submitted date on or after this time.

submitted_at_to
string <date-time>

Filter on orders with a submitted date before this date.

revenue_centre
Array of strings <uuid>

Filter to items of the selected revenue centre(s).

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

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

Get a summary report of revenue by order label.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to get data for.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Get a summary report of revenue by order label.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to get data for.

labels
Array of strings <uuid>

Filter to items of the selected order label(s).

revenue_centre
Array of strings <uuid>

Filter to items of the selected revenue centre(s).

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "meta": {
    }
}

Queue a download of revenue by order label.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to get data for.

labels
Array of strings <uuid>

Filter to items of the selected order label(s).

revenue_centre
Array of strings <uuid>

Filter to items of the selected revenue centre(s).

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

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

Get a run sheet of the day's bookings.

query Parameters
date
required
string <date>

Filter to baskets with a revenue date on or after this date.

practitioner_id
string

A comma-separated list of practitioner IDs to filter on.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": [
    ]
}

Get a list report of order items including their revenue details.

query Parameters
revenue_date_from
string <date>

Filter to basket items with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to basket items with a revenue date on or before this date.

offering_type
string

A comma-separated list of item types to filter on.

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

page
integer
Example: page=1

The page to retrieve results from

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "meta": {
    },
}

Schedule a list of item revenue details to be generated asynchronously.

query Parameters
revenue_date_from
string <date>

Filter to baskets items with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets items with a revenue date on or before this date.

offering_type
string

A comma-separated list of item types to filter on.

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

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

Get a list report of the number of times different items have been purchased.

query Parameters
date_from
string <date-time>

Filter to items on or after this date.

date_to
string <date-time>

Filter to items on or before this date.

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

offering_type
string

The type of item to filter on.

offering_category
string

Filter on items for offerings in these categories.

order_label
string

Filter on items in orders with these labels.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "totals": {
    }
}

Schedule a list of item sales to be generated asynchronously.

query Parameters
date_from
string <date-time>

Filter to items on or after this date.

date_to
string <date-time>

Filter to items on or before this date.

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

offering_type
string

The type of item to filter on.

offering_category
string

Filter on items for offerings in these categories.

order_label
string

Filter on items in orders with these labels.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Get a list report of individual order items.

query Parameters
order_status
Array of strings
Example: order_status=settled

The status to filter orders on.

order_label
Array of strings
Example: order_label=settled

The labels to filter orders on.

offering_id
Array of strings
Example: offering_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of offering ids to fetch orders for

offering_type
Array of strings

A comma-separated list of item types to filter on.

revenue_date_from
string <date>
Example:

Filter on orders with a revenue date on or after this date.

revenue_date_to
string <date>
Example:

Filter on orders with a revenue date on or before this date.

date_from
string <date-time>
Example: date_from=2019-01-15T12:00:00+01:00

Filter on items with a start time on or after this date.

date_to
string <date-time>
Example: date_to=2019-01-15T12:00:00+01:00

Filter on items with a start time on or before this date.

order_submitted_at_from
string <date-time>
Example: order_submitted_at_from=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date on or after this time.

order_submitted_at_to
string <date-time>
Example: order_submitted_at_to=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date before this date.

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

sold_by_id
Array of strings

A comma-separated list of user IDs to filter for items sold by that user.

category_id
Array of strings

A comma-separated list of category IDs to filter on.

sort
string

The field to order results by.

sort_order
string
Enum: "asc" "desc"

The direction to order results by.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "totals": {
    },
  • "meta": {},
}

Schedule a list of item sales to be generated asynchronously.

query Parameters
order_status
Array of strings
Example: order_status=settled

The status to filter orders on.

order_label
Array of strings
Example: order_label=settled

The labels to filter orders on.

offering_id
Array of strings
Example: offering_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of offering ids to fetch orders for

offering_type
Array of strings

A comma-separated list of item types to filter on.

revenue_date_from
string <date>
Example:

Filter on orders with a revenue date on or after this date.

revenue_date_to
string <date>
Example:

Filter on orders with a revenue date on or before this date.

date_from
string <date-time>
Example: date_from=2019-01-15T12:00:00+01:00

Filter on items with a start time on or after this date.

date_to
string <date-time>
Example: date_to=2019-01-15T12:00:00+01:00

Filter on items with a start time on or before this date.

order_submitted_at_from
string <date-time>
Example: order_submitted_at_from=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date on or after this time.

order_submitted_at_to
string <date-time>
Example: order_submitted_at_to=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date before this date.

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

sold_by_id
Array of strings

A comma-separated list of user IDs to filter for items sold by that user.

category_id
Array of strings

A comma-separated list of category IDs to filter on.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Get a summary report of discount usage for baskets matching the given parameters.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Get a summary report of discount usage for baskets matching the given parameters.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": [
    ]
}

Queue a summary report of discount usage to be generated asynchronously.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

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

Get a report of top customers based on orders with the given criteria.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": [
    ]
}

Schedule a report of top customers based on orders with the given criteria.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

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

Get a variety of stats relating to bookings and occupancy for a date range.

query Parameters
site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to fetch stats for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get a list report of the number of times different items have been purchased.

query Parameters
date_from
string <date>
Example:

Filter for stats on or after this date.

date_to
string <date>
Example:

Filter for stats on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Schedule a list of item sales to be generated asynchronously.

query Parameters
date_from
string <date>
Example:

Filter for stats on or after this date.

date_to
string <date>
Example:

Filter for stats on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

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

Get a report of changes to the balance of all Trybe-processed payments.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
string <date>
Example:

Filter for balance changes on or after this date.

date_to
string <date>
Example:

Filter for balance changes on or before this date.

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Get a report of changes to the balance of all Trybe-processed payments.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
string <date>
Example:

Filter for balance changes on or after this date.

date_to
string <date>
Example:

Filter for balance changes on or before this date.

Responses

Response samples

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

Get a list of payouts for the specified site.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
string <date>
Example:

Filter for payouts with a payout date on or after this date.

date_to
string <date>
Example:

Filter for payouts with a payout date on or before this date.

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Get a single payout.

path Parameters
payoutId
required
string

The ID of the payout you want to retrieve.

Responses

Response samples

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

Queue a report of a single payout as a CSV.

path Parameters
payoutId
required
string

The ID of the payout you want to retrieve.

Responses

Response samples

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

Load the data for the revenue projection report

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

revenue_date_from
string <date>
Example:

Filter for items with revenue on or after this date.

revenue_date_to
string <date>
Example:

Filter for items with revenue on or before this date.

item_date_from
string <date>
Example:

Filter for items on or after this date.

item_date_to
string <date>
Example:

Filter for items on or before this date.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "totals": {
    }
}

Queue an export of the revenue projection report

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

revenue_date_from
string <date>
Example:

Filter for items with revenue on or after this date.

revenue_date_to
string <date>
Example:

Filter for items with revenue on or before this date.

item_date_from
string <date>
Example:

Filter for items on or after this date.

item_date_to
string <date>
Example:

Filter for items on or before this date.

Responses

Response samples

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

Load a list of pay by link payments

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

page
integer
Example: page=1

The page to retrieve results from

revenue_date_from
string <date>
Example:

Filter for payments for orders with revenue on or after this date.

revenue_date_to
string <date>
Example:

Filter for payments for orders with revenue on or before this date.

completed_from
string <date>
Example:

Filter for payments paid on or after this date.

completed_to
string <date>
Example:

Filter for payments paid on or before this date.

created_from
string <date>
Example:

Filter for payments created on or after this date.

created_to
string <date>
Example:

Filter for payments created on or before this date.

status
string

Filter for payments with this status.

created_by
Array of strings <uuid>
Example: created_by=pending

A comma-separated list of user IDs to filter for links where the payment was created by the user.

sort
string

The field to order results by.

sort_order
string
Enum: "asc" "desc"

The direction to order results by.

Responses

Response samples

Content type
application/json
{}

Load a list of smart filters and counts for pay by link payments

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get breakdown of memberships

query Parameters
brand_id
required
string

The brand ID to filter memberships by

created_at_from
string <datetime>

Filters the report to only show memberships created after the given date

created_at_to
string <datetime>

Filters the report to only show memberships created before the given date

site_id
string

The site ID to filter memberships by

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get a report of the stock on hand.

query Parameters
date
required
string <date>

The date in Y-m-d format.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

category_ids
Array of strings <uuid>
Example: category_ids=10000000-0000-0000-0000-000000000000

The category id

supplier_ids
Array of strings <uuid>
Example: supplier_ids=10000000-0000-0000-0000-000000000000

The supplier id

brand_ids
Array of strings <uuid>
Example: brand_ids=10000000-0000-0000-0000-000000000000

The brand id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Generate a report of the stock on hand to generated asyncronously

query Parameters
date
required
string <date>

The date in Y-m-d format.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

category_ids
Array of strings <uuid>
Example: category_ids=10000000-0000-0000-0000-000000000000

The category id

supplier_ids
Array of strings <uuid>
Example: supplier_ids=10000000-0000-0000-0000-000000000000

The supplier id

brand_ids
Array of strings <uuid>
Example: brand_ids=10000000-0000-0000-0000-000000000000

The brand id

Responses

Response samples

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

Media

These endpoints are used to manage uploaded media.

Stores a media object

Uploads an image and returns a Media object

Request Body schema: multipart/form-data
image
string <binary>
file
string <binary>
organisation_id
string

The ID of the organisation which this media belongs to

collection
string
Enum: "library" "imports"

The collection which this media should be categorised under

Responses

Response samples

Content type
application/json
{}

Retrieve a media object

Retrieves details about the given Media object

path Parameters
mediaId
required
string

The media ID

Responses

Response samples

Content type
application/json
{}

Customers

A Customer represents a customer within a brand. When a customer signs up, their account is attached to the brand which the site they signed up to belongs to.

List all Customers

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

query
string
Example: query=@try.be

Filters customers with a similar name, email or phone number to the given value

email
string <email>
Example: email=hello@example.com

The email address to filter against

organisation_id
string <uuid>
Example: organisation_id=000000-000000-000000-000000

The ID of the organisation to filter against

brand_id
string <uuid>
Example: brand_id=000000-000000-000000-000000

The ID of the brand to filter against

site_id
string <uuid>
Example: site_id=000000-000000-000000-000000

The ID of the site to filter against

membership_number
string
Example: membership_number=1234567890

The membership number to filter against

name
string
Example: name=Jane

The customer's name to filter against

phone
string
Example: phone=1234567890

The phone number to filter against

membership
string

The state of membership to filter against. Set to "none" to filter customers that are not a member of any type, "any" to filter customers that are a member of any type, and "needs_dd_mandate" for memberships awaiting a direct debit mandate.

membership_created_at_from
string

Filters customers which have a membership that was created on or after the given date

membership_created_at_to
string

Filters customers which have a membership that was created on or before the given date

membership_type_id
string

Filters customers which have a membership of the given membership type ID

membership_rate_id
string

Filters customers which have a membership of the given membership rate ID

marketing_opt_in
string

Filters customers who are opted into the given marketing preference ID. Alternatively, pass "any" to filter customers opted into any marketing preference, or "none" to filter customers not opted into any preferences.

label_ids
Array of strings <uuid>

Filters customers which have the given label ids. Separate multiple label ids with a comma.

id
string

Filters to just the customers with the given IDs. Separate multiple IDs with a comma.

created_at_from
string

Filters customers that were created on or after the given date.

created_at_to
string

Filters customers that were created on or before the given date.

updated_at_from
string

Filters customers that were updated on or after the given date.

updated_at_to
string

Filters customers that were updated on or before the given date.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "meta": {},
}

Create a Customer

Request Body schema: application/json

The new customers details

site_id
string

The site ID which this customer belongs to

first_name
string

The customer's first name

last_name
string

The customer's last name

phone
string

The customer's phone number

dob
string <date>

The customer's date of birth

email
string <email>

The customer's email

password
string <password>

The customer's password

marketing_preference_ids
Array of strings

An array of marketing preferences to opt the customer in to

external_ref
string

An external reference for this customer.

guestline_ref
string

The guestline reference for this customer.

preferred_locale
string

The preferred locale of the customer

Responses

Request samples

Content type
application/json
{
  • "site_id": "000000-000000-000000-000000",
  • "first_name": "Dan",
  • "last_name": "Johnson",
  • "phone": "+447900000000",
  • "dob": "1995-01-13T00:00:00.000Z",
  • "email": "dan@try.be",
  • "password": "password",
  • "marketing_preference_ids": [
    ],
  • "external_ref": "string",
  • "guestline_ref": "string",
  • "preferred_locale": "en"
}

Response samples

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

Queue a report of customers

Retrieves a report of customers in CSV format. The report will be generated asyncronously.

query Parameters
query
string
Example: query=@try.be

Filters customers with a similar name, email or phone number to the given value

email
string <email>
Example: email=hello@example.com

The email address to filter against

organisation_id
string <uuid>
Example: organisation_id=000000-000000-000000-000000

The ID of the organisation to filter against

brand_id
string <uuid>
Example: brand_id=000000-000000-000000-000000

The ID of the brand to filter against

membership_number
string
Example: membership_number=1234567890

The membership number to filter against

name
string
Example: name=Jane

The customer's name to filter against

phone
string
Example: phone=1234567890

The phone number to filter against

membership
string

The state of membership to filter against. Set to "none" to filter customers that are not a member of any type, "any" to filter customers that are a member of any type, and "needs_dd_mandate" for memberships awaiting a direct debit mandate.

membership_created_at_from
string

Filters customers which have a membership that was created on or after the given date

membership_created_at_to
string

Filters customers which have a membership that was created on or before the given date

membership_type_id
string

Filters customers which have a membership of the given membership type ID

membership_rate_id
string

Filters customers which have a membership of the given membership rate ID

marketing_opt_in
string

Filters customers who are opted into the given marketing preference ID. Alternatively, pass "any" to filter customers opted into any marketing preference, or "none" to filter customers not opted into any preferences.

label_ids
string

Filters customers who have the given label attached. To filter on multiple labels, seperate IDs with a comma.

created_at_from
string

Filters customers that were created on or after the given date.

created_at_to
string

Filters customers that were created on or before the given date.

updated_at_from
string

Filters customers that were updated on or after the given date.

updated_at_to
string

Filters customers that were updated on or before the given date.

Responses

Response samples

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

Search for a customer by barcode

path Parameters
code
required
string

The barcode to search for. This could either be the ID of the customer or an associated barcode.

query Parameters
site_id
required
string

The site ID to filter memberships on

Responses

Response samples

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

Retrieve a Customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

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

Update a Customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Request Body schema: application/json

Updates the specified customer with the values provided. Existing values that are not provided will remain unchanged.

first_name
string

The customer's first name

last_name
string

The customer's last name

email
string <email>

The customer's email address

phone
string

The customer's phone number in E.164 format

dob
string <date>

The customer's date of birth

password
string <password>

The customer's password

external_ref
string

An external reference for this customer.

preferred_locale
string

The preferred locale of the customer

Responses

Request samples

Content type
application/json
{
  • "first_name": "Dan",
  • "last_name": "Johnson",
  • "email": "user@example.com",
  • "phone": "+447900000000",
  • "dob": "1995-01-13T00:00:00.000Z",
  • "password": "password",
  • "external_ref": "string",
  • "preferred_locale": "en"
}

Response samples

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

Delete a customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 602e2436fca8b45baa499643"
}

Lock a customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

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

Unlock a customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

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

Get associated barcodes for this client

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Associate a barcode with this client

Associate the given barcode with the given client.

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Request Body schema: application/json
object

Responses

Request samples

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

Response samples

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

Get associated barcodes for this client

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

barcodeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the associated barcode

Responses

Trigger a billing cycle

This endpoint triggers the billing cycle for the given customer. If the customer has any memberships, they will be charged, and any due credits will be issued.

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

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

Trigger a password reset

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

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

Resends the email verification notification

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

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

Generates a URL to set a customer's password

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

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

Get a customer's addresses

path Parameters
customerId
required
string

The ID of the customer

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create an address for a customer

path Parameters
customerId
required
string

The ID of the customer

Request Body schema: application/json
name
required
string

The name of the address

address_line_1
required
string

The first address line

address_line_2
string Nullable

The second address line

city
string Nullable
county
string Nullable
country
string Nullable
postcode
string Nullable

Responses

Request samples

Content type
application/json
{
  • "name": "Home",
  • "address_line_1": "123 Fake Street",
  • "address_line_2": "Some building",
  • "city": "London",
  • "county": "London",
  • "country": "United Kingdom",
  • "postcode": "E14 1AA"
}

Response samples

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

Get an address

path Parameters
customerId
required
string

The ID of the customer

addressId
required
string

The ID of the address

Responses

Response samples

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

Update an address

path Parameters
customerId
required
string

The ID of the customer

addressId
required
string

The ID of the address to update

Request Body schema: application/json
name
string

The name of the address

address_line_1
string

The first address line

address_line_2
string Nullable

The second address line

city
string Nullable
county
string Nullable
country
string Nullable
postcode
string Nullable

Responses

Request samples

Content type
application/json
{
  • "name": "Home",
  • "address_line_1": "123 Fake Street",
  • "address_line_2": "Some building",
  • "city": "London",
  • "county": "London",
  • "country": "United Kingdom",
  • "postcode": "E14 1AA"
}

Response samples

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

Deletes an address

path Parameters
customerId
required
string

The ID of the customer

addressId
required
string

The ID of the address

Responses

Get customer contraindications

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Attach a contraindication

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Request Body schema: application/json
contraindication_id
required
string <uuid>

The ID of the contraindication to attach/detach

Responses

Request samples

Content type
application/json
{
  • "contraindication_id": "ab707ffd-a3fa-4b94-a229-2ce327a7ce9d"
}

Response samples

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

Detach a contraindication

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Request Body schema: application/json
contraindication_id
required
string <uuid>

The ID of the contraindication to attach/detach

Responses

Request samples

Content type
application/json
{
  • "contraindication_id": "ab707ffd-a3fa-4b94-a229-2ce327a7ce9d"
}

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 602e2436fca8b45baa499643"
}

Customer labels

A collection of endpoints for managing labels attached to a customer.

Get customer labels

Returns a list of the labels attached to this customer

path Parameters
customerId
required
string
Example: 000000-000000-000000-000000

The ID of the customer you want to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Attach labels to customer

Attach existing labels to the given customer

path Parameters
customerId
required
string
Example: 000000-000000-000000-000000

The ID of the customer you want to update

Request Body schema: application/json
labels
Array of strings <uuid>

Responses

Request samples

Content type
application/json
{
  • "labels": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Detatch labels to customer

Detatch existing labels to the given customer

path Parameters
customerId
required
string
Example: 000000-000000-000000-000000

The ID of the customer you want to update

Request Body schema: application/json
labels
Array of strings <uuid>

Responses

Request samples

Content type
application/json
{
  • "labels": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Customer notes

A collection of endpoints for managing notes attached to a customer.

Get notes for customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a note for the customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Request Body schema: application/json
note
required
string

The contents of the note

Responses

Request samples

Content type
application/json
{
  • "note": "string"
}

Response samples

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

Update a note for the customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

noteId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the note

Request Body schema: application/json
note
string

The contents of the note

Responses

Request samples

Content type
application/json
{
  • "note": "string"
}

Response samples

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

Delete a note for the customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

noteId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the note

Responses

Customer marketing preferences

Endpoints to manage marketing preferences for a customer.

List all of a customer's marketing preferences

Returns an array of all the marketing preferences belonging to a customer

path Parameters
customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Opt in to a marketing preference

Opt a customer in to a marketing preference

path Parameters
customerId
required
string
Example: 000000-000000-000000-000000

The ID of the customer you want to update

marketingPreferenceId
required
string
Example: 000000-000000-000000-000000

The ID of the marketing preference you want to update

Responses

Response samples

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

Opt a customer out of a marketing preference

Opt a customer out of a marketing preference

path Parameters
customerId
required
string
Example: 000000-000000-000000-000000

The ID of the customer you want to update

marketingPreferenceId
required
string
Example: 000000-000000-000000-000000

The ID of the marketing preference you want to update

Responses

Marketing preferences

Endpoints to manage marketing preferences that can be attached to users.

List all marketing preferences

A public endpoint for listing marketing preferences for the given organisation.

query Parameters
organisation_id
string <uuid>

The organisation ID to get marketing preferences for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

List all marketing preferences

List all the marketing preferences you're authorised to see.

query Parameters
organisation_id
string

Filters marketing preferences that are associated with the given organisation ID

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Create a marketing preference

Request Body schema: application/json
text
string

The text of the marketing preference

organisation_id
string

The ID of the organisation this marketing preference should be linked to

Responses

Request samples

Content type
application/json
{
  • "text": "I agree to the terms and conditions",
  • "organisation_id": "000000-000000-000000-000000"
}

Response samples

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

Retrieve a MarketingPreference

path Parameters
marketingPreferenceId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the marketing preference

Responses

Response samples

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

Update a MarketingPreference

path Parameters
marketingPreferenceId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the marketing preference

Request Body schema: application/json

Details to update the marketing preference with

text
string

The text of the marketing preference

Responses

Request samples

Content type
application/json
{
  • "text": "I agree to the terms and conditions"
}

Response samples

Content type
application/json
{
  • "id": "000000-000000-000000-000000",
  • "text": "I agree to the terms and conditions",
  • "organisation_id": "000000-000000-000000-000000",
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z"
}

Delete a marketing preference

path Parameters
marketingPreferenceId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the marketing preference

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 602e2436fca8b45baa499643"
}

Labels

A collection of endpoints for managing labels.

Labels can be attached to a customer for metadata.

Get all labels

Retrieves a list of all the labels set up against the authenticated user's organisation

query Parameters
archived
boolean

When true, only archived labels are returned

per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create label

Creates a new label

Request Body schema: application/json
value
required
string <= 20 characters

The name of the label

colour
required
string <= 6 characters

A hex colour code excluding the preceding # which this label will be rendered as.

organisation_id
string <uuid>

The organisation which this label belongs to

Responses

Request samples

Content type
application/json
{
  • "value": "VIP",
  • "colour": "ff6634",
  • "organisation_id": "000000-000000-000000-000000"
}

Response samples

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

Get label

Retrieves details about the given label

path Parameters
labelId
required
string <uuid>

The ID of the label

Responses

Response samples

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

Update label

Updates the given label

path Parameters
labelId
required
string <uuid>

The ID of the label

Request Body schema: application/json
value
string <= 20 characters

The name of the label

colour
string <= 6 characters

A hex colour code excluding the preceding # which this label will be rendered as.

Responses

Request samples

Content type
application/json
{
  • "value": "VIP",
  • "colour": "ff6634"
}

Response samples

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

Delete label

Soft-deletes the given label

path Parameters
labelId
required
string <uuid>

The ID of the label

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 602e2436fca8b45baa499643"
}

Restore a label

Restores a soft-deleted label

path Parameters
labelId
required
string <uuid>

The ID of the label

Responses

Response samples

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

Membership types

A MembershipType is used to distinguish different types of memberships. MembershipType belongs to a brand, and can only be linked to Memberships that belong to the same brand.

A MembershipType can be public or private. When public, the type will appear on the customer-facing signup flow. When private, it can only be seen on the Trybe application.

List all MembershipTypes

List all the membership types you're authorised to see.

query Parameters
brand_id
string

Filters membership types that are associated with the given brand ID

archived
boolean

When true, only archived membership types are returned

public
boolean

When true, only public membership types are returned

auto_payments
boolean

When true, only membership types that support automatic payments are returned

terms
boolean

When true, only membership types that have terms and conditions are returned

per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create a MembershipType

Request Body schema: application/json
name
string

Name of the membership type

description
string

The description of the membership type

terms
string

Terms and conditions of the membership type

brand_id
string

The ID of the brand which this type belongs to

offline_payments
boolean

Whether this MembershipType takes "offline" payments. If true, the monthly fee won't automatically be collected using Stripe, which can be useful if a different provider is used for collecting direct debits. You'll need to manually manage the membership status.

disable_confirmation_email
boolean

Whether to disable sending the confirmation email when a membership is confirmed.

default_duration
string

The default duration a membership of this type should be valid for. If not specified, the default duration is one calendar year. The duration should be specified as an ISO8601 duration string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

minimum_start_date
string <date>

The minimum start date for a membership of this type.

private
boolean

Whether the type is a private type

min_members
integer

The minimum number of members required to create a membership of this type

max_members
integer

The maximum number of members allowed to create a membership of this type

object

When creating a membership type, the first rate will be created too. Here, you can specify the currency, amount and billing frequency to use for the first rate.

Responses

Request samples

Content type
application/json
{
  • "name": "Gold tier",
  • "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
  • "terms": "string",
  • "brand_id": "000000-000000-000000-000000",
  • "offline_payments": true,
  • "disable_confirmation_email": true,
  • "default_duration": "P3M",
  • "minimum_start_date": "2021-01-01T00:00:00.000Z",
  • "private": true,
  • "min_members": 2,
  • "max_members": 4,
  • "initial_rate": {
    }
}

Response samples

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

Retrieve a MembershipType

path Parameters
membershipTypeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership type

Responses

Response samples

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

Update a MembershipType

path Parameters
membershipTypeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership type

Request Body schema: application/json

Details to update the membership type with

name
string

Name of the membership type

description
string

The description of the membership type

terms
string

Terms and conditions of the membership type

private
boolean

Whether the type is a private type

offline_payments
boolean

Whether this MembershipType takes "offline" payments. If true, the monthly fee won't automatically be collected using Stripe, which can be useful if a different provider is used for collecting direct debits. You'll need to manually manage the membership status.

disable_confirmation_email
boolean

Whether to disable sending the confirmation email when a membership is confirmed.

minimum_start_date
string <date>

The minimum start date for a membership of this type.

default_duration
string

The default duration a membership of this type should be valid for. If not specified, the default duration is one calendar year. The duration should be specified as an ISO8601 duration string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

min_members
integer

The minimum number of members required to create a membership of this type

max_members
integer

The maximum number of members allowed to create a membership of this type

Responses

Request samples

Content type
application/json
{
  • "name": "Gold tier",
  • "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
  • "terms": "string",
  • "private": true,
  • "offline_payments": true,
  • "disable_confirmation_email": true,
  • "minimum_start_date": "2021-01-01T00:00:00.000Z",
  • "default_duration": "P3M",
  • "min_members": 2,
  • "max_members": 4
}

Response samples

Content type
application/json
{
  • "id": "000000-000000-000000-000000",
  • "name": "Gold tier",
  • "description": "Enjoy exclusive benefits as part of being a member in our Gold tier",
  • "terms": "string",
  • "brand_id": "000000-000000-000000-000000",
  • "offline_payments": true,
  • "disable_confirmation_email": true,
  • "private": true,
  • "minimum_start_date": "2021-01-01T00:00:00.000Z",
  • "min_members": 2,
  • "max_members": 4,
  • "rates": [
    ],
  • "revenue_schedule": "FREQ=WEEKLY",
  • "created_at": "2021-01-01T00:00:00.000Z",
  • "updated_at": "2021-01-01T00:00:00.000Z",
  • "deleted_at": "2021-01-01T00:00:00.000Z"
}

Archive a MembershipType

path Parameters
membershipTypeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership type

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 602e2436fca8b45baa499643"
}

Restore a MembershipType

path Parameters
membershipTypeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership type

Responses

Response samples

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

List all membership types

List the membership types you're authorised to see in order

query Parameters
brand_id
string

Filters membership types that are associated with the given brand ID

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Update the order of membership types

Update the order of the membership types you're authorised to see

Request Body schema: application/json

Pass an object containing an array of membership type IDs

membership_type_ids
required
Array of strings

Responses

Request samples

Content type
application/json
{
  • "membership_type_ids": [
    ]
}

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Membership rates

MembershipRates define how a customer is billed for their membership. It contains the price the customer is charged for initially joining, the reoccurring fee, and the frequency in which the billing happens.

A MembershipRate must belong to a MembershipType.

List all MembershipRates

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

membership_type_id
string

The membership type ID to filter against

archived
boolean

When true, only archived membership types are returned

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Create a MembershipRate

Request Body schema: application/json
name
required
string

The name of the membership rate

membership_type_id
required
string

The ID of the membership type which this rate belongs to

required
object (Money)
object (Money)
private
boolean

Whether this rate is private

billing_frequency
required
string

The frequency that this membership is billed. The duration is specified as an ISO8601 duration string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

processors
Array of strings
default_duration
string Nullable

The default duration of the membership. This is used when a customer signs themselves up for a membership. The duration is specified as an ISO8601 duration string. See https://en.wikipedia.org/wiki/ISO_8601#Durations When null, by default the membership won't end.

Responses

Request samples

Content type
application/json
{
  • "name": "Standard rate",
  • "membership_type_id": "000000-000000-000000-000000",
  • "price": {
    },
  • "joining_fee": {
    },
  • "private": true,
  • "billing_frequency": "P1M",
  • "processors": [
    ],
  • "default_duration": "P1Y"
}

Response samples

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

Retrieve a MembershipRate

path Parameters
rateId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership rate

Responses

Response samples

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

Update a MembershipRate

path Parameters
rateId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership rate

Request Body schema: application/json

Details to update the rate with

name
string

The name of the membership rate

object (Money)
object (Money)
private
boolean

Whether this rate is private

billing_frequency
string

The frequency that this membership is billed. The duration is specified as an ISO8601 duration string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

default_duration
string

The default duration of the membership. This is used when a customer signs themselves up for a membership. The duration is specified as an ISO8601 duration string. See https://en.wikipedia.org/wiki/ISO_8601#Durations

Responses

Request samples

Content type
application/json
{
  • "name": "Standard rate",
  • "price": {
    },
  • "joining_fee": {
    },
  • "private": true,
  • "billing_frequency": "P1M",
  • "default_duration": "P1Y"
}

Response samples

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

Archive a MembershipRate

path Parameters
rateId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership rate

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 602e2436fca8b45baa499643"
}

Restore a MembershipRate

path Parameters
membershipRateId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership rate

Responses

Response samples

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

Get details about the total amount to pay

path Parameters
rateId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership rate

query Parameters
start_date
string <date>
Example:

The date the membership will start

end_date
string <date>
Example:

The date the membership will end

source
string
Example: source=app

The source of the membership

header Parameters
Accept-Language
string
Example: en

The language to use for the response.

Responses

Response samples

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

Membership credit rules

A MembershipCreditRule defines how a Credit should be issued for a Membership.

Memberships

A Membership defines a membership against a Customer. A Membership will always have a MembershipRate and a MembershipType, and a start and end date.

When a Customer has a Membership, they will be charged monthly until the end date using the provided payment method.

Collect a joining fee

This endpoint is used to create the Stripe Checkout session for collecting a joining fee as well as any pro-rata fees. A stripe_session_id is returned which can be passed into the Stripe.js SDK to redirect the user to the checkout.

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

Content type
application/json
{
  • "status": "needs_dd_mandate",
  • "account_id": "acct_1Jmwv72UMaxwwwup",
  • "url": "string",
  • "stripe_session_id": "si_1234567890",
  • "rate_price": {
    },
  • "rate_frequency": "P1M"
}

Collect Direct Debit details

This endpoint is used to create the Stripe Checkout session for collecting bank details for a Direct Debit mandate. A stripe_session_id is returned which can be passed into the Stripe.js SDK to redirect the user to the checkout.

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

Content type
application/json
{
  • "status": "needs_dd_mandate",
  • "account_id": "acct_1Jmwv72UMaxwwwup",
  • "url": "string",
  • "stripe_session_id": "si_1234567890",
  • "rate_price": {
    },
  • "rate_frequency": "P1M"
}

List all Memberships

query Parameters
customer_id
string

The customer ID to filter against

site_id
string

The site ID to filter against

status
Array of strings

The status of the membership

membership_type_id
string <uuid>
Deprecated
membership_type_ids
Array of strings <uuid>

The membership type IDs to filter against. Separate multiple IDs with a comma.

membership_rate_id
string <uuid>

The membership rate ID

created_at_from
string <date>

Filter memberships created no earlier than the given date

created_at_to
string <date>

Filter memberships created no later than the given date

next_billing_date_from
string <date>

Filter memberships due for billing no earlier than the given date

next_billing_date_to
string <date>

Filter memberships due for billing no later than the given date

end_date_from
string <date>

Filter memberships that end no earlier than the given date

end_date_to
string <date>

Filter memberships that end no later than the given date

attention_reason
string

The reason why this membership needs attention

manual_payments
boolean

Whether to only show membership types that have auto-payments disabled

billing_frequency
Array of strings

The membership billing frequency to filter against

rate_id
Array of strings

The membership rate to filter against

membership_number
string

The membership number to filter against

external_ref
string
Example: external_ref=1234567890

The external reference to filter against

organisation_id
string <uuid>
Example: organisation_id=00000000-0000-0000-0000-000000000000

The ID of the organisation

per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Create a Membership

header Parameters
X-Trybe-On-Behalf-Of
string <uuid>

The user ID of the user who is creating the membership

Request Body schema: application/json

The details of the membership to create. A Membership always requires a Customer, but for convenience, you can pass customer_data to create the customer inline and attach the membership to the newly created customer.

Unless you're authorised to do so, you'll only be permitted to create a membership for a private MembershipType and/or a non-default MembershipRate when you provide a valid MembershipSignupToken ID for the type and rate in question.

The status of newly created memberships is always 'reserved'. You'll need to make a request to the memberships/:membershipId/confirm endpoint to update the status - this should be done once the pro-rata or joining fee payment has been paid.

customer_id
string

The ID of the customer which this membership relates to

site_id
string

The site ID which this membership belongs to

object (CreateCustomerRequest)

You must provide either an email address or both a first and last name.

membership_type_id
required
string

The membership type ID. This must belong to the same brand as the given customer.

membership_rate_id
required
string

The membership rate ID. This must belong to the same type as provided.

intake_form_required
boolean

Whether an intake form is required for this membership

basket_id
string

The basket ID which was used to purchase this membership, if applicable.

source
string
Enum: "app" "self_signup"

The source of where this membership was created.

external_ref
string

An external reference for this membership.

start_date
required
string <date>

The date which the membership should start from.

end_date
required
string <date> Nullable

The date which the membership should end.

Responses

Request samples

Content type
application/json
{
  • "customer_id": "000000-000000-000000-000000",
  • "site_id": "000000-000000-000000-000000",
  • "customer_data": {
    },
  • "membership_type_id": "000000-000000-000000-000000",
  • "membership_rate_id": "000000-000000-000000-000000",
  • "intake_form_required": true,
  • "basket_id": "60c0c01d92ec44e252235966",
  • "source": "app",
  • "external_ref": "string",
  • "start_date": "2021-01-01T00:00:00.000Z",
  • "end_date": "2021-01-01T00:00:00.000Z"
}

Response samples

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

Queue a report of memberships

Retrieves a report of memberships in CSV format. The report will be generated asyncronously.

query Parameters
customer_id
string

The customer ID to filter against

site_id
string

The site ID to filter against

status
Array of strings

The status of the membership

membership_type_id
string <uuid>
Deprecated
membership_type_ids
Array of strings <uuid>

The membership type IDs to filter against. Separate multiple IDs with a comma.

membership_rate_id
string <uuid>

The membership rate ID

created_at_from
string <date>

Filter memberships created no earlier than the given date

created_at_to
string <date>

Filter memberships created no later than the given date

next_billing_date_from
string <date>

Filter memberships due for billing no earlier than the given date

next_billing_date_to
string <date>

Filter memberships due for billing no later than the given date

end_date_from
string <date>

Filter memberships that end no earlier than the given date

end_date_to
string <date>

Filter memberships that end no later than the given date

attention_reason
string

The reason why this membership needs attention

manual_payments
boolean

Whether to only show membership types that have auto-payments disabled

membership_number
string

The membership number to filter against

external_ref
string
Example: external_ref=1234567890

The external reference to filter against

billing_frequency
Array of strings

The membership billing frequency to filter against

Responses

Response samples

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

Retrieve a Membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

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

Update a Membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Request Body schema: application/json
membership_type_id
string

The membership type ID. This must belong to the same brand as the given customer.

membership_rate_id
string

The membership rate ID. This must belong to the same type as provided.

start_date
string <date>

The date which the membership should start from.

end_date
string <date> Nullable

The date which the membership should end.

external_ref
string

An external reference for this membership.

Responses

Request samples

Content type
application/json
{
  • "membership_type_id": "000000-000000-000000-000000",
  • "membership_rate_id": "000000-000000-000000-000000",
  • "start_date": "2021-01-01T00:00:00.000Z",
  • "end_date": "2021-01-01T00:00:00.000Z",
  • "external_ref": "string"
}

Response samples

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

Archive a Membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 602e2436fca8b45baa499643"
}

Retrieve a list of members for a membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Add a member to a membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Request Body schema: application/json
customer_id
required
string <uuid>

The ID of the customer to add to the membership

Responses

Request samples

Content type
application/json
{
  • "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e"
}

Response samples

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

Remove a member from a membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

customerId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the customer

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 602e2436fca8b45baa499643"
}

Cancel a membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

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

Confirm a membership

When a membership is created through the self-signup flow, it first goes into the "reserved" stage. This means the client hasn't completed their signup yet, and the basket needs to be completed. Calling this endpoint sets the status to needs_attention if a mandate is required, or active if not.

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

header Parameters
X-Trybe-On-Behalf-Of
string <uuid>

The user ID of the user who is confirming the membership

Responses

Response samples

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

Sends the mandate request email

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

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

Retries the payment for a membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

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

Add a manual payment

Records a manual payment against the membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Request Body schema: application/json
processor_type_id
required
string

The ID of the custom payment type

Responses

Request samples

Content type
application/json
{
  • "processor_type_id": "string"
}

Response samples

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

Get the next billing details for a membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

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

Get the subsequent billing details for a membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

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

Get the subsequent billing date for a membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

Content type
application/json
{
  • "data": "2019-08-24"
}

Issue credits for a membership

path Parameters
membershipId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership

Responses

Response samples

Content type
application/json
{
  • "message": "The requested resource could not be found 602e2436fca8b45baa499643"
}

Look up a customer by their membership number.

path Parameters
membershipNumber
required
string

The membership number of the member to look up.

Responses

Response samples

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

Membership charges

When a customer is charged for their membership, a MembershipCharge object is created which relates to a Stripe PaymentIntent.

List all MembershipCharges

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

site_id
string <uuid>

Filters MembershipCharges by the site ID

membership_id
string

Filters MembershipCharges by the membership ID

customer_id
string

Filters MembershipCharges by the customer ID

payment_intent_id
string

Filters MembershipCharges by the payment intent ID

status
string
Example: status=processing

Filters MembershipCharges by the status

date_from
string <date>
Example:

Filters MembershipCharges by the date from

date_to
string <date>
Example:

Filters MembershipCharges by the date to

processor
string
Example: processor=stripe

Filters MembershipCharges by the processor

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Queue a report of MembershipCharges

query Parameters
per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

site_id
string <uuid>

Filters MembershipCharges by the site ID

membership_id
string

Filters MembershipCharges by the membership ID

customer_id
string

Filters MembershipCharges by the customer ID

payment_intent_id
string

Filters MembershipCharges by the payment intent ID

status
string
Example: status=processing

Filters MembershipCharges by the status

date_from
string <date>
Example:

Filters MembershipCharges by the date from

date_to
string <date>
Example:

Filters MembershipCharges by the date to

processor
string
Example: processor=stripe

Filters MembershipCharges by the processor

Responses

Response samples

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

Retrieve a MembershipCharge

path Parameters
membershipChargeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership charge

Responses

Response samples

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

Mark a MembershipCharge as successful

path Parameters
membershipChargeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership charge

Responses

Response samples

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

Mark a MembershipCharge as failed

path Parameters
membershipChargeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership charge

query Parameters
customer_action_required
boolean
Example: customer_action_required=true

Whether the customer needs to take action

Request Body schema: application/json
reason
string

The reason for the failure

Responses

Request samples

Content type
application/json
{
  • "reason": "The payment was declined"
}

Response samples

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

Refund a MembershipCharge

path Parameters
membershipChargeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership charge

Request Body schema: application/json
amount
required
integer

The amount to refund from this charge as an integer of the smallest unit

note
string

A custom description of why this refund was made

Responses

Request samples

Content type
application/json
{
  • "amount": 1000,
  • "note": "Customer forgot to cancel last week"
}

Response samples

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

Refund a MembershipCharge

path Parameters
membershipChargeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership charge

membershipChargeRefundId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership charge

Responses

Response samples

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

Set the receipt path for a charge

path Parameters
membershipChargeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership charge

Request Body schema: application/json
receipt_path
required
string

A path pointing to a PDF tax receipt of this charge

Responses

Request samples

Content type
application/json
{
  • "receipt_path": "string"
}

Response samples

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

Download the receipt for this charge

path Parameters
membershipChargeId
required
string <uuid>
Example: 000000-000000-000000-000000

The ID of the membership charge

Responses

Response samples

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

Payment methods

A customer can have one or more payment methods attached to their account.

These can be used for reoccurring membership billing or shop checkouts

Get payment methods

query Parameters
customer_id
string

Filters payment methods that are associated with the given customer

type
string

Filters payment methods that are of this type

processor
string

Filters payment methods that are for use with this processor

status
string

Filters payment methods that have this status

membership_payment_method
string

Filters payment methods that can be used for a membership

per_page
integer
Example: per_page=15

The number of results to return per page

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Delete a payment method

path Parameters
paymentMethodId
required
string

The ID of the payment method

Responses

Signup

A collection of public endpoints used for the self-signup flow

My account

A collection of endpoints providing details about the currently authenticated customer.

Get a list of orders for the authenticated customer.

Returns an array of completed baskets for the authenticated customer along with item details.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {},
}

Get base details about the authenticated customer

Authorizations:

Responses

Response samples

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

Get the authenticated customer's memberships

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get the authenticated customer's charges

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get the authenticated customer's credits

By default, only credits which haven't been redeemed and haven't expired are shown, but this behaviour can be changed by passing the documented query parameters.

Revoked tokens are never returned on this endpoint.

Authorizations:
query Parameters
redeemed
boolean

Whether to include redeemed credits

expired
boolean

Whether to include expired credits

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get the authenticated customer's marketing preferences

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Opt into a marketing preference

Authorizations:
path Parameters
marketingPreferenceId
required
string <uuid>

The ID of the marketing preference to opt in/out of

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Opt out of a marketing preference

Authorizations:
path Parameters
marketingPreferenceId
required
string <uuid>

The ID of the marketing preference to opt in/out of

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get the authenticated customer's payment methods

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {}
}

Get customer contraindications

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Attach a contraindication

Authorizations:
Request Body schema: application/json
contraindication_id
required
string <uuid>

The ID of the contraindication to attach/detach

Responses

Request samples

Content type
application/json
{
  • "contraindication_id": "ab707ffd-a3fa-4b94-a229-2ce327a7ce9d"
}

Response samples

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

Detach a contraindication

Authorizations:
Request Body schema: application/json
contraindication_id
required
string <uuid>

The ID of the contraindication to attach/detach

Responses

Request samples

Content type
application/json
{
  • "contraindication_id": "ab707ffd-a3fa-4b94-a229-2ce327a7ce9d"
}

Response samples

Content type
application/json
{
  • "message": "The given data was invalid",
  • "errors": {
    }
}

Reports

A collection of endpoints for generating reports

Queue a report of all voucher codes

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

status
string
Enum: "unredeemed" "partially_redeemed" "redeemed"

Filter on vouchers by status

amount
string
Example: amount=>1000

Filter on values of a certain amount, optionally including an operator.

balance
string
Example: balance=>1000

Filter on vouchers with a certain balance, optionally including an operator.

created_since
string <date-time>

Filter on vouchers created since a given date and time.

Responses

Response samples

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

Get a report of practitioner occupancy for a date range

Retrieves a report of practitioner occupancy for a date range. This report is superseded by the Practitioner Utilisation report.

query Parameters
date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    },
  • "metadata": {
    }
}

Queue a report of practitioner occupancy for a date range

Retrieves a report of practitioner occupancy for a date range

query Parameters
date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Get a report of practitioner occupancy for a date range, shown by date

query Parameters
date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of zone ids to filter by.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    },
  • "metadata": {
    }
}

Queue a report of practitioner occupancy for a date range, shown by date

query Parameters
date_time_from
string <date-time>
Example: date_time_from=2019-01-15T12:00:00+01:00

The start of the range to retrieve data for

date_time_to
string <date-time>
Example: date_time_to=2019-01-15T12:00:00+01:00

The end of the range to retrieve data for

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8768

A comma separated string of zone ids to filter by.

Responses

Response samples

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

Get a summary report of utilisation and revenue by practitioner.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
required
string <date>

Include dates on or after this date. For revenue stats this will be treated as the revenue date.

date_to
required
string <date>

Include dates on or before this date. For revenue stats this will be treated as the revenue date.

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "totals": {
    },
  • "meta": {
    }
}

Queue a download of utilisation and revenue by practitioner.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
required
string <date>

Include dates on or after this date. For revenue stats this will be treated as the revenue date.

date_to
required
string <date>

Include dates on or before this date. For revenue stats this will be treated as the revenue date.

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

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

Get a report of room occupancy for a date range

Retrieves a report of room occupancy for a date range

query Parameters
date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

room_ids
string
Example: room_ids=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of room ids to fetch occupany for

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    }
}

Queue a report of room occupancy for a date range

Retrieves a report of room occupancy for a date range

query Parameters
date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

room_ids
string
Example: room_ids=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of room ids to fetch occupany for

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

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

Get a report of bookable area occupancy for a date range

Retrieves a report of bookable area occupancy for a date range

query Parameters
date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

bookable_area_ids
string
Example: bookable_area_ids=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of bookable area ids to fetch occupancy for

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "totals": {
    }
}

Queue a report of bookable area occupancy for a date range

Retrieves a report of bookable area occupancy for a date range

query Parameters
date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

bookable_area_ids
string
Example: bookable_area_ids=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of bookable area ids to fetch occupancy for

zone_id
Array of strings <uuid>
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to filter by.

Responses

Response samples

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

Get a list of payments and refunds.

query Parameters
completed_from
string <date-time>

Filter to charges completed after this time.

completed_to
string <date-time>

Filter to charges completed before this time.

revenue_date_from
string <date>

Filter to charges with a revenue date after this date.

revenue_date_to
string <date>

Filter to charges with a revenue date before this date.

payout_date_from
string <date>

Filter to charges with a payout date after this date.

payout_date_to
string <date>

Filter to charges with a payout date after this date.

site_id
string

The ID of the site to filter on.

status
string

Filter on charges of this status.

chargeable_type
string
Enum: "order" "membership"

Filter on charges of this type.

charge_type
string
Enum: "refund" "payment"

Filter on refunds or payments.

processor
string
Enum: "manual" "stripe" "adyen" "saved_card" "pms_folio" "voucher" "external_voucher"

Filter payments by processor.

processor_type_id
string

Filter payments by processor.

order_status
any
Enum: "in_progress" "new" "submitted" "settled" "cancelled" "no_show"

Filter status of orders.

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "processor_totals": [
    ],
  • "meta": {},
}

Schedule a list of payments and refunds to be generated asynchronously.

query Parameters
completed_from
string <date-time>

Filter to charges completed after this time.

completed_to
string <date-time>

Filter to charges completed before this time.

revenue_date_from
string <date>

Filter to charges with a revenue date after this date.

revenue_date_to
string <date>

Filter to charges with a revenue date before this date.

payout_date_from
string <date>

Filter date that the transaction's payout is recognised.

payout_date_to
string <date>

Filter date that the transaction's payout is recognised.

site_id
string

The ID of the site to filter on.

status
string

Filter on charges of this status.

chargeable_type
string
Enum: "order" "membership"

Filter on charges of this type.

charge_type
string
Enum: "refund" "payment"

Filter on refunds or payments.

processor
string
Enum: "manual" "stripe" "adyen" "saved_card" "pms_folio" "voucher" "external_voucher"

Filter payments by processor.

processor_type_id
string

Filter payments by processor.

order_status
any
Enum: "in_progress" "new" "submitted" "settled" "cancelled" "no_show"

Filter status of orders.

email
boolean

Whether to request an email of this report.

Responses

Response samples

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

Get a list of payments and refunds for a single date.

query Parameters
date
string <date-time>

Filter to charges completed on this date. Defaults to today's date.

site_id
string

The ID of the site to filter on.

status
string

Filter on charges of this status.

page
integer
Example: page=1

The page to retrieve results from

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "processor_totals": [
    ],
  • "meta": {},
}

Get a summary report of no shows and cancellations.

query Parameters
revenue_date_from
required
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
required
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
required
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Get a summary report of no shows and cancellations.

query Parameters
revenue_date_from
required
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
required
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
required
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": {
    }
}

Queue a download for cancellations and no shows.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to get data for.

Responses

Response samples

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

Get a summary report of revenue by reporting centre.

query Parameters
item_date_from
string <date-time>

Filter to baskets with items on or after this date.

item_date_to
string <date-time>

Filter to baskets with items on or before this date.

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

labels
string

Filter to baskets with the given labels. This can be a comma separated list of label IDs, or 'none' to filter on baskets that don't have any labels.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Schedule a summary report of revenue by reporting centre to be generated asynchronously.

query Parameters
item_date_from
string <date-time>

Filter to baskets with items on or after this date.

item_date_to
string <date-time>

Filter to baskets with items on or before this date.

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

labels
string

Filter to baskets with the given labels. This can be a comma separated list of label IDs, or 'none' to filter on baskets that don't have any labels.

Responses

Response samples

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

Get a summary report of revenue by sales channel.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

sales_channel
Array of strings <uuid>

Filter to items of the selected sales channel(s).

submitted_at_from
string <date-time>

Filter on orders with a submitted date on or after this time.

submitted_at_to
string <date-time>

Filter on orders with a submitted date before this date.

revenue_centre
Array of strings <uuid>

Filter to items of the selected revenue centre(s).

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "meta": {
    }
}

Get a summary report of revenue by sales channel.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

sales_channel
Array of strings <uuid>

Filter to items of the selected sales channel(s).

submitted_at_from
string <date-time>

Filter on orders with a submitted date on or after this time.

submitted_at_to
string <date-time>

Filter on orders with a submitted date before this date.

revenue_centre
Array of strings <uuid>

Filter to items of the selected revenue centre(s).

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

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

Get a summary report of revenue by order label.

query Parameters
page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to get data for.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Get a summary report of revenue by order label.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to get data for.

labels
Array of strings <uuid>

Filter to items of the selected order label(s).

revenue_centre
Array of strings <uuid>

Filter to items of the selected revenue centre(s).

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "meta": {
    }
}

Queue a download of revenue by order label.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to get data for.

labels
Array of strings <uuid>

Filter to items of the selected order label(s).

revenue_centre
Array of strings <uuid>

Filter to items of the selected revenue centre(s).

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

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

Get a run sheet of the day's bookings.

query Parameters
date
required
string <date>

Filter to baskets with a revenue date on or after this date.

practitioner_id
string

A comma-separated list of practitioner IDs to filter on.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": [
    ]
}

Get a list report of order items including their revenue details.

query Parameters
revenue_date_from
string <date>

Filter to basket items with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to basket items with a revenue date on or before this date.

offering_type
string

A comma-separated list of item types to filter on.

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

page
integer
Example: page=1

The page to retrieve results from

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "meta": {
    },
}

Schedule a list of item revenue details to be generated asynchronously.

query Parameters
revenue_date_from
string <date>

Filter to baskets items with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets items with a revenue date on or before this date.

offering_type
string

A comma-separated list of item types to filter on.

site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

Responses

Response samples

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

Get a list report of the number of times different items have been purchased.

query Parameters
date_from
string <date-time>

Filter to items on or after this date.

date_to
string <date-time>

Filter to items on or before this date.

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

offering_type
string

The type of item to filter on.

offering_category
string

Filter on items for offerings in these categories.

order_label
string

Filter on items in orders with these labels.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "totals": {
    }
}

Schedule a list of item sales to be generated asynchronously.

query Parameters
date_from
string <date-time>

Filter to items on or after this date.

date_to
string <date-time>

Filter to items on or before this date.

revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

offering_type
string

The type of item to filter on.

offering_category
string

Filter on items for offerings in these categories.

order_label
string

Filter on items in orders with these labels.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Get a list report of individual order items.

query Parameters
order_status
Array of strings
Example: order_status=settled

The status to filter orders on.

order_label
Array of strings
Example: order_label=settled

The labels to filter orders on.

offering_id
Array of strings
Example: offering_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of offering ids to fetch orders for

offering_type
Array of strings

A comma-separated list of item types to filter on.

revenue_date_from
string <date>
Example:

Filter on orders with a revenue date on or after this date.

revenue_date_to
string <date>
Example:

Filter on orders with a revenue date on or before this date.

date_from
string <date-time>
Example: date_from=2019-01-15T12:00:00+01:00

Filter on items with a start time on or after this date.

date_to
string <date-time>
Example: date_to=2019-01-15T12:00:00+01:00

Filter on items with a start time on or before this date.

order_submitted_at_from
string <date-time>
Example: order_submitted_at_from=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date on or after this time.

order_submitted_at_to
string <date-time>
Example: order_submitted_at_to=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date before this date.

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

sold_by_id
Array of strings

A comma-separated list of user IDs to filter for items sold by that user.

category_id
Array of strings

A comma-separated list of category IDs to filter on.

sort
string

The field to order results by.

sort_order
string
Enum: "asc" "desc"

The direction to order results by.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
{
  • "data": [
    ],
  • "totals": {
    },
  • "meta": {},
}

Schedule a list of item sales to be generated asynchronously.

query Parameters
order_status
Array of strings
Example: order_status=settled

The status to filter orders on.

order_label
Array of strings
Example: order_label=settled

The labels to filter orders on.

offering_id
Array of strings
Example: offering_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8767

A comma separated string of offering ids to fetch orders for

offering_type
Array of strings

A comma-separated list of item types to filter on.

revenue_date_from
string <date>
Example:

Filter on orders with a revenue date on or after this date.

revenue_date_to
string <date>
Example:

Filter on orders with a revenue date on or before this date.

date_from
string <date-time>
Example: date_from=2019-01-15T12:00:00+01:00

Filter on items with a start time on or after this date.

date_to
string <date-time>
Example: date_to=2019-01-15T12:00:00+01:00

Filter on items with a start time on or before this date.

order_submitted_at_from
string <date-time>
Example: order_submitted_at_from=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date on or after this time.

order_submitted_at_to
string <date-time>
Example: order_submitted_at_to=2019-01-15T12:00:00+01:00

Filter on orders with a submitted date before this date.

item_date_from
string <date-time>

Filter on items which are booked in for or after this date.

item_date_to
string <date-time>

Filter on items which are booked in for before this date.

sold_by_id
Array of strings

A comma-separated list of user IDs to filter for items sold by that user.

category_id
Array of strings

A comma-separated list of category IDs to filter on.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

Responses

Response samples

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

Get a summary report of discount usage for baskets matching the given parameters.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Get a summary report of discount usage for baskets matching the given parameters.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": [
    ]
}

Queue a summary report of discount usage to be generated asynchronously.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

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

Get a report of top customers based on orders with the given criteria.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": [
    ]
}

Schedule a report of top customers based on orders with the given criteria.

query Parameters
revenue_date_from
string <date>

Filter to baskets with a revenue date on or after this date.

revenue_date_to
string <date>

Filter to baskets with a revenue date on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

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

Get a variety of stats relating to bookings and occupancy for a date range.

query Parameters
site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

date_from
string
Example: date_from=2019-12-18

The start of the date range to retrieve data for

date_to
string
Example: date_to=2019-12-24

The end of the date range to retrieve data for

zone_id
string
Example: zone_id=5e932c0901d210625e3a8766,5e932c0901d210625e3a8769

A comma separated string of zone ids to fetch stats for

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get a list report of the number of times different items have been purchased.

query Parameters
date_from
string <date>
Example:

Filter for stats on or after this date.

date_to
string <date>
Example:

Filter for stats on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

Content type
{
  • "data": {
    },
  • "totals": {
    }
}

Schedule a list of item sales to be generated asynchronously.

query Parameters
date_from
string <date>
Example:

Filter for stats on or after this date.

date_to
string <date>
Example:

Filter for stats on or before this date.

site_id
string

The ID of the site to filter on.

Responses

Response samples

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

Get a report of changes to the balance of all Trybe-processed payments.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
string <date>
Example:

Filter for balance changes on or after this date.

date_to
string <date>
Example:

Filter for balance changes on or before this date.

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Get a report of changes to the balance of all Trybe-processed payments.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
string <date>
Example:

Filter for balance changes on or after this date.

date_to
string <date>
Example:

Filter for balance changes on or before this date.

Responses

Response samples

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

Get a list of payouts for the specified site.

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

date_from
string <date>
Example:

Filter for payouts with a payout date on or after this date.

date_to
string <date>
Example:

Filter for payouts with a payout date on or before this date.

page
integer
Example: page=1

The page to retrieve results from

per_page
integer
Example: per_page=15

The number of results to return per page

Responses

Response samples

Content type
application/json
{}

Get a single payout.

path Parameters
payoutId
required
string

The ID of the payout you want to retrieve.

Responses

Response samples

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

Queue a report of a single payout as a CSV.

path Parameters
payoutId
required
string

The ID of the payout you want to retrieve.

Responses

Response samples

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

Load the data for the revenue projection report

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

revenue_date_from
string <date>
Example:

Filter for items with revenue on or after this date.

revenue_date_to
string <date>
Example:

Filter for items with revenue on or before this date.

item_date_from
string <date>
Example:

Filter for items on or after this date.

item_date_to
string <date>
Example:

Filter for items on or before this date.

Responses

Response samples

Content type
application/json
{
  • "data": {
    },
  • "totals": {
    }
}

Queue an export of the revenue projection report

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

revenue_date_from
string <date>
Example:

Filter for items with revenue on or after this date.

revenue_date_to
string <date>
Example:

Filter for items with revenue on or before this date.

item_date_from
string <date>
Example:

Filter for items on or after this date.

item_date_to
string <date>
Example:

Filter for items on or before this date.

Responses

Response samples

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

Load a list of pay by link payments

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

page
integer
Example: page=1

The page to retrieve results from

revenue_date_from
string <date>
Example:

Filter for payments for orders with revenue on or after this date.

revenue_date_to
string <date>
Example:

Filter for payments for orders with revenue on or before this date.

completed_from
string <date>
Example:

Filter for payments paid on or after this date.

completed_to
string <date>
Example:

Filter for payments paid on or before this date.

created_from
string <date>
Example:

Filter for payments created on or after this date.

created_to
string <date>
Example:

Filter for payments created on or before this date.

status
string

Filter for payments with this status.

created_by
Array of strings <uuid>
Example: created_by=pending

A comma-separated list of user IDs to filter for links where the payment was created by the user.

sort
string

The field to order results by.

sort_order
string
Enum: "asc" "desc"

The direction to order results by.

Responses

Response samples

Content type
application/json
{}

Load a list of smart filters and counts for pay by link payments

query Parameters
site_id
required
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The ID of the site

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get breakdown of memberships

query Parameters
brand_id
required
string

The brand ID to filter memberships by

created_at_from
string <datetime>

Filters the report to only show memberships created after the given date

created_at_to
string <datetime>

Filters the report to only show memberships created before the given date

site_id
string

The site ID to filter memberships by

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}

Get a report of the stock on hand.

query Parameters
date
required
string <date>

The date in Y-m-d format.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

category_ids
Array of strings <uuid>
Example: category_ids=10000000-0000-0000-0000-000000000000

The category id

supplier_ids
Array of strings <uuid>
Example: supplier_ids=10000000-0000-0000-0000-000000000000

The supplier id

brand_ids
Array of strings <uuid>
Example: brand_ids=10000000-0000-0000-0000-000000000000

The brand id

Responses

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "meta": {
    }
}

Generate a report of the stock on hand to generated asyncronously

query Parameters
date
required
string <date>

The date in Y-m-d format.

site_id
string <uuid>
Example: site_id=00000000-0000-0000-0000-111111111111

The site id to update

category_ids
Array of strings <uuid>
Example: category_ids=10000000-0000-0000-0000-000000000000

The category id

supplier_ids
Array of strings <uuid>
Example: supplier_ids=10000000-0000-0000-0000-000000000000

The supplier id

brand_ids
Array of strings <uuid>
Example: brand_ids=10000000-0000-0000-0000-000000000000

The brand id

Responses

Response samples

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