Skip to content

PerfectGym Next API (1.12.1)

  • Appointment, bookable appointment and slots operations
  • Redeem checkin vouchers
  • Class and slots operations
  • Cross studio operations
  • Get customers and contracts
  • Retrieve customer accounting details
  • Retrieve customer communication details
  • Get device information
  • Employee operations
  • Debt collection operations
  • Leads operations
  • Manage membership contracts
  • Membership operations
  • Payment operations
  • Get studio information
  • Get trial offers information
Download OpenAPI description
Languages
Servers
Demo tenant

https://open-api-demo.open-api.perfectgym.com/

Mock server

https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/

Appointments

Appointment, bookable appointment and slots operations

Operations

Request

Required Scopes: BOOKABLE_APPOINTMENTS_READ

Returns bookable appointments

Security
ApiKeyAuth
Query
offsetstring

Offset from last request (last ID of the bookable appointment)

Default "0"
sliceSizeinteger(int32)[ 10 .. 100 ]

Desired size of data chunk

Default 50
curl -i -X GET \
  'https://open-api-demo.open-api.perfectgym.com/v1/appointments/bookable?offset=0&sliceSize=50' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
resultArray of objects(BookableAppointment)required

List of bookable appointments

result[].​idinteger(int64)required

Unique ID of the bookable appointment

Example: 1001
result[].​titlestring

Title of the bookable appointment

Example: "Mission Beach body"
result[].​durationinteger(int32)

Duration of the bookable appointment in minutes

Example: 45
result[].​categorystring

Category of the bookable appointment

Example: "Fitness"
result[].​descriptionstring

Description of the bookable appointment

Example: "Get your body ready for beaches"
result[].​imgUrlstring

Image URL assigned to display this bookable appointment

hasNextbooleanrequired

True if there exists next data slice

Example: true
offsetstringrequired

Offset for next query (last ID of the bookable appointment)

Example: "1234567890"
Response
application/json
{ "result": [ {} ], "hasNext": true, "offset": "1234567890" }

Request

Required Scopes: BOOKABLE_APPOINTMENTS_READ

Returns bookable appointment

Security
ApiKeyAuth
Path
bookableAppointmentIdinteger(int64)required

Id of the bookable appointment

curl -i -X GET \
  'https://open-api-demo.open-api.perfectgym.com/v1/appointments/bookable/{bookableAppointmentId}' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
idinteger(int64)required

Unique ID of the bookable appointment

Example: 1001
titlestring

Title of the bookable appointment

Example: "Mission Beach body"
durationinteger(int32)

Duration of the bookable appointment in minutes

Example: 45
categorystring

Category of the bookable appointment

Example: "Fitness"
descriptionstring

Description of the bookable appointment

Example: "Get your body ready for beaches"
imgUrlstring

Image URL assigned to display this bookable appointment

Response
application/json
{ "id": 1001, "title": "Mission Beach body", "duration": 45, "category": "Fitness", "description": "Get your body ready for beaches", "imgUrl": "string" }

Request

Required Scopes: BOOKABLE_APPOINTMENTS_READ

Returns bookable appointment slots

Security
ApiKeyAuth
Path
bookableAppointmentIdinteger(int64)required

Id of the bookable appointment

Query
customerIdinteger(int64)

Id of the customer

daysAheadinteger(int32)[ 1 .. 6 ]

Days from now on to look ahead

Default 1
slotWindowStartDatestring(date)

Bookable appointment slots are calculated in the window from slotWindowStartDate to (slotWindowStartDate + daysAhead)

curl -i -X GET \
  'https://open-api-demo.open-api.perfectgym.com/v1/appointments/bookable/{bookableAppointmentId}/slots?customerId=0&daysAhead=1&slotWindowStartDate=2019-08-24' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/jsonArray [
startDateTimestring(date-time)

Start date time of the bookable appointment slot

Example: "2022-06-22T08:00:00.000+02:00[Europe/Berlin]"
endDateTimestring(date-time)

End date time of the bookable appointment slot

Example: "2022-06-22T10:00:00.000+02:00[Europe/Berlin]"
instructorsArray of objects(Instructor)

List of instructors

]
Response
application/json
[ { "startDateTime": "2022-06-22T08:00:00.000+02:00[Europe/Berlin]", "endDateTime": "2022-06-22T10:00:00.000+02:00[Europe/Berlin]", "instructors": [] } ]

Request

Required Scopes: APPOINTMENTS_WRITE

Returns validation result

Security
ApiKeyAuth
Bodyapplication/jsonrequired
customerIdinteger(int64)required

Unique ID of the customer

Example: 203
bookableAppointmentIdinteger(int64)required

Unique ID of the bookable appointment

Example: 20334
startDateTimestring(date-time)required

Start date time of the bookable appointment slot

Example: "2022-06-22T08:00:00.000+02:00[Europe/Berlin]"
endDateTimestring(date-time)required

End date time of the bookable appointment slot

Example: "2022-06-22T10:00:00.000+02:00[Europe/Berlin]"
instructorIdsArray of integers(int64)

Instructor ID list of the bookable appointment slot

curl -i -X POST \
  https://open-api-demo.open-api.perfectgym.com/v1/appointments/bookable/validate \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "customerId": 203,
    "bookableAppointmentId": 20334,
    "startDateTime": "2022-06-22T08:00:00.000+02:00[Europe/Berlin]",
    "endDateTime": "2022-06-22T10:00:00.000+02:00[Europe/Berlin]",
    "instructorIds": [
      0
    ]
  }'

Responses

OK

Bodyapplication/json
validationStatusstringrequired

Status of the booking validation

Enum ValueDescription
NO_CONTINGENT

Customer doesn't have required contingent

CUSTOMER_IDLE

Customer has an idle period during the time of the bookable appointment slot

BOOKABLE_APPOINTMENT_RESTRICTIONS_NOT_FULFILLED

The restriction(s) of the bookable appointment is/are not fulfilled

STUDIO_CLOSED

Studio is closed during period

AVAILABLE

Booking is possible

PAST_START_DATE_TIME

The start date and time is in the past

BOOKING_LIMIT_REACHED

Booking limit reached

CUSTOMER_IN_OTHER_BOOKING

Customer has other bookings in this period

DATE_TIME_BEFORE_EARLIEST_BOOKING_DATE_TIME

Date and time are before earliest possible booking date

PERIOD_DOES_NOT_MATCH

The period from start date and time to end date and time does not match the main time of the bookable appointment

Example: "RESOURCE_NOT_AVAILABLE"
Response
application/json
{ "validationStatus": "RESOURCE_NOT_AVAILABLE" }

Request

Required Scopes: APPOINTMENTS_WRITE

Book an appointment booking for given customer

Security
ApiKeyAuth
Bodyapplication/jsonrequired
customerIdinteger(int64)required

Unique ID of the customer

Example: 203
bookableAppointmentIdinteger(int64)required

Unique ID of the bookable appointment

Example: 20334
startDateTimestring(date-time)required

Start date time of the bookable appointment slot

Example: "2022-06-22T08:00:00.000+02:00[Europe/Berlin]"
endDateTimestring(date-time)required

End date time of the bookable appointment slot

Example: "2022-06-22T10:00:00.000+02:00[Europe/Berlin]"
instructorIdsArray of integers(int64)

Instructor ID list of the bookable appointment slot

curl -i -X POST \
  https://open-api-demo.open-api.perfectgym.com/v1/appointments/booking/book \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "customerId": 203,
    "bookableAppointmentId": 20334,
    "startDateTime": "2022-06-22T08:00:00.000+02:00[Europe/Berlin]",
    "endDateTime": "2022-06-22T10:00:00.000+02:00[Europe/Berlin]",
    "instructorIds": [
      0
    ]
  }'

Responses

OK

Bodyapplication/json
bookingIdinteger(int64)required

Unique ID of the appointment booking

Example: 2033
bookingStatusstringrequired

Status of the appointment booking

Enum ValueDescription
BOOKED

Customer is successfully booked

CANCELED

Customer booking is canceled

BOOKED_WITH_CONFIRMATION_REQUIRED

Customer booking is successful, but confirmation is required

Example: "BOOKED"
startDateTimestring(date-time)required

Start date and time of the appointment booking

endDateTimestring(date-time)required

End date and time of the appointment booking

titlestring

Title of the appointment booking

Example: "Mission Beach body"
durationinteger(int32)

Duration of the appointment booking in minutes

Example: 45
categorystring

Category of the appointment booking

Example: "Fitness"
descriptionstring

Description of the appointment booking

Example: "Get your body ready for beaches"
imgUrlstring

Image URL assigned to display this appointment booking

instructorsArray of objects(Instructor)

Instructors list of the appointment booking

appointmentStatusstringrequired

The status of an appointment

Enum ValueDescription
COMPLETED

The appointment is completed.

CANCELED

The appointment is canceled.

PLANNED

The appointment is planned.

Example: "COMPLETED"
participantStatusstringrequired

The status of a participant

Enum ValueDescription
PARTICIPATING

The customer is participating.

UNSET

The participation status is not set.

NOT_PARTICIPATING

The customer is not participating.

Example: "PARTICIPATING"
Response
application/json
{ "bookingId": 2033, "bookingStatus": "BOOKED", "startDateTime": "2019-08-24T14:15:22Z", "endDateTime": "2019-08-24T14:15:22Z", "title": "Mission Beach body", "duration": 45, "category": "Fitness", "description": "Get your body ready for beaches", "imgUrl": "string", "instructors": [ {} ], "appointmentStatus": "COMPLETED", "participantStatus": "PARTICIPATING" }

Request

Required Scopes: APPOINTMENTS_READ

Get an appointment booking by id

Security
ApiKeyAuth
Path
bookingIdinteger(int64)required

Id of the appointment booking

curl -i -X GET \
  'https://open-api-demo.open-api.perfectgym.com/v1/appointments/booking/{bookingId}' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
bookingIdinteger(int64)required

Unique ID of the appointment booking

Example: 2033
bookingStatusstringrequired

Status of the appointment booking

Enum ValueDescription
BOOKED

Customer is successfully booked

CANCELED

Customer booking is canceled

BOOKED_WITH_CONFIRMATION_REQUIRED

Customer booking is successful, but confirmation is required

Example: "BOOKED"
startDateTimestring(date-time)required

Start date and time of the appointment booking

endDateTimestring(date-time)required

End date and time of the appointment booking

titlestring

Title of the appointment booking

Example: "Mission Beach body"
durationinteger(int32)

Duration of the appointment booking in minutes

Example: 45
categorystring

Category of the appointment booking

Example: "Fitness"
descriptionstring

Description of the appointment booking

Example: "Get your body ready for beaches"
imgUrlstring

Image URL assigned to display this appointment booking

instructorsArray of objects(Instructor)

Instructors list of the appointment booking

appointmentStatusstringrequired

The status of an appointment

Enum ValueDescription
COMPLETED

The appointment is completed.

CANCELED

The appointment is canceled.

PLANNED

The appointment is planned.

Example: "COMPLETED"
participantStatusstringrequired

The status of a participant

Enum ValueDescription
PARTICIPATING

The customer is participating.

UNSET

The participation status is not set.

NOT_PARTICIPATING

The customer is not participating.

Example: "PARTICIPATING"
customerIdinteger(int64)required

Unique ID of the customer

Example: 1234
Response
application/json
{ "bookingId": 2033, "bookingStatus": "BOOKED", "startDateTime": "2019-08-24T14:15:22Z", "endDateTime": "2019-08-24T14:15:22Z", "title": "Mission Beach body", "duration": 45, "category": "Fitness", "description": "Get your body ready for beaches", "imgUrl": "string", "instructors": [ {} ], "appointmentStatus": "COMPLETED", "participantStatus": "PARTICIPATING", "customerId": 1234 }

Request

Required Scopes: APPOINTMENTS_WRITE

Delete an appointment booking by id

Security
ApiKeyAuth
Path
bookingIdinteger(int64)required

Id of the appointment booking

curl -i -X DELETE \
  'https://open-api-demo.open-api.perfectgym.com/v1/appointments/booking/{bookingId}' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/json
successstring
Response
application/json
{ "success": "string" }

Get appointment bookings for a customer

Request

Required Scopes: APPOINTMENTS_READ

Get appointment bookings with a period starting and ending within a timeframe of +/- 2 weeks for a specific customer

Security
ApiKeyAuth
Query
customerIdinteger(int64)required

Id of the customer

curl -i -X GET \
  'https://open-api-demo.open-api.perfectgym.com/v1/appointments/booking?customerId=0' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE'

Responses

OK

Bodyapplication/jsonArray [
bookingIdinteger(int64)required

Unique ID of the appointment booking

Example: 2033
bookingStatusstringrequired

Status of the appointment booking

Enum ValueDescription
BOOKED

Customer is successfully booked

CANCELED

Customer booking is canceled

BOOKED_WITH_CONFIRMATION_REQUIRED

Customer booking is successful, but confirmation is required

Example: "BOOKED"
startDateTimestring(date-time)required

Start date and time of the appointment booking

endDateTimestring(date-time)required

End date and time of the appointment booking

titlestring

Title of the appointment booking

Example: "Mission Beach body"
durationinteger(int32)

Duration of the appointment booking in minutes

Example: 45
categorystring

Category of the appointment booking

Example: "Fitness"
descriptionstring

Description of the appointment booking

Example: "Get your body ready for beaches"
imgUrlstring

Image URL assigned to display this appointment booking

instructorsArray of objects(Instructor)

Instructors list of the appointment booking

appointmentStatusstringrequired

The status of an appointment

Enum ValueDescription
COMPLETED

The appointment is completed.

CANCELED

The appointment is canceled.

PLANNED

The appointment is planned.

Example: "COMPLETED"
participantStatusstringrequired

The status of a participant

Enum ValueDescription
PARTICIPATING

The customer is participating.

UNSET

The participation status is not set.

NOT_PARTICIPATING

The customer is not participating.

Example: "PARTICIPATING"
]
Response
application/json
[ { "bookingId": 2033, "bookingStatus": "BOOKED", "startDateTime": "2019-08-24T14:15:22Z", "endDateTime": "2019-08-24T14:15:22Z", "title": "Mission Beach body", "duration": 45, "category": "Fitness", "description": "Get your body ready for beaches", "imgUrl": "string", "instructors": [], "appointmentStatus": "COMPLETED", "participantStatus": "PARTICIPATING" } ]

Checkin vouchers

Redeem checkin vouchers

Operations
Operations

Cross Studio

Cross studio operations

Operations

Customers

Get customers and contracts

Operations

Customers Account

Retrieve customer accounting details

Operations

Customers Communication

Retrieve customer communication details

Operations
Operations
Operations
Operations
Operations
Operations

Membership Self-service

Manage membership contracts

Operations
Operations
Operations
Operations

Trial Offers

Get trial offers information

Operations