Appointment, bookable appointment and slots operations
PerfectGym Next API (1.13.2)
- 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
- Online offer operations
- Payment operations
- Get studio information
- Get trial offers information
https://open-api-demo.open-api.perfectgym.com/
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookable-trial-offers/classes
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/bookable-trial-offers/classes
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookable-trial-offers/classes?offset=0&sliceSize=50' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'{ "result": [ { … } ], "hasNext": true, "offset": "1234567890" }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookable-trial-offers/appointments/bookable
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/bookable-trial-offers/appointments/bookable
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookable-trial-offers/appointments/bookable?offset=0&sliceSize=50' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'OK
List of bookable trial offer appointments
Unique ID of the trial offer configuration containing the bookable trial offer appointment
Trial offer bookable appointment
Unique ID of the bookable appointment
Title of the bookable appointment
Duration of the bookable appointment in minutes
Category of the bookable appointment
Description of the bookable appointment
{ "result": [ { … } ], "hasNext": true, "offset": "1234567890" }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/config/{configId}
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/config/{configId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/config/{configId}' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'OK
Represents a term
The trial offer lead data configuration
The ID of the trial offer lead data config
Represents the mode of an input field
| Enum Value | Description |
|---|---|
| OPTIONAL | The input is optional |
| INACTIVE | The input is disabled |
| MANDATORY | The input is mandatory |
Represents the mode of an input field
| Enum Value | Description |
|---|---|
| OPTIONAL | The input is optional |
| INACTIVE | The input is disabled |
| MANDATORY | The input is mandatory |
Represents the mode of an input field
| Enum Value | Description |
|---|---|
| OPTIONAL | The input is optional |
| INACTIVE | The input is disabled |
| MANDATORY | The input is mandatory |
{ "id": 1, "name": "Probeangebot", "preventMultipleBookingsTerm": { "value": 2, "unit": "WEEK" }, "contingent": 2, "confirmationOfBookingTerm": { "value": 2, "unit": "WEEK" }, "allowBookingForLeads": true, "leadDataConfig": { "trialOfferLeadDataConfigId": 1, "genderMode": "INACTIVE", "dateOfBirthMode": "INACTIVE", "telephoneMode": "INACTIVE", "addressMode": "INACTIVE" } }
Full Lead customer data with address
Unique ID of the third party customer in the third party system
Gender of the customer
| Enum Value | Description |
|---|---|
| MALE | Male gender of the customer |
| FEMALE | Female gender of the customer |
| UNISEX | Unisex gender of the customer |
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/lead/validate
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/lead/validate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/lead/validate \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"leadCustomerData": {
"thirdPartyId": "A1000",
"firstname": "Max",
"secondFirstname": "Peter",
"lastname": "Mustermann",
"secondLastname": "Meier",
"email": "example@email.com",
"gender": "MALE",
"dateOfBirth": "2000-10-10",
"telephone": "5006001112",
"language": {
"languageCode": "de",
"countryCode": "DE"
},
"address": {
"street": "Burgring",
"houseNumber": "23A",
"zipCode": "13000",
"city": "Berlin"
}
},
"trialOfferConfigId": 1
}'Full Lead customer data with address
Unique ID of the third party customer in the third party system
Gender of the customer
| Enum Value | Description |
|---|---|
| MALE | Male gender of the customer |
| FEMALE | Female gender of the customer |
| UNISEX | Unisex gender of the customer |
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/lead/create
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/lead/create
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/lead/create \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"leadCustomerData": {
"thirdPartyId": "A1000",
"firstname": "Max",
"secondFirstname": "Peter",
"lastname": "Mustermann",
"secondLastname": "Meier",
"email": "example@email.com",
"gender": "MALE",
"dateOfBirth": "2000-10-10",
"telephone": "5006001112",
"language": {
"languageCode": "de",
"countryCode": "DE"
},
"address": {
"street": "Burgring",
"houseNumber": "23A",
"zipCode": "13000",
"city": "Berlin"
}
},
"trialOfferConfigId": 1
}'{ "leadCustomerId": 1001 }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookable-trial-offers/classes/{classId}/slots
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/bookable-trial-offers/classes/{classId}/slots
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookable-trial-offers/classes/{classId}/slots?offset=0&sliceSize=50' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'OK
List of class slots
Class slot start date and time with zone
Class slot end date and time with zone
Class slot earliest booking date and time with zone
Class slot latest booking date and time with zone
Maximum number of waiting list participants allowed for a class slot
Current number of booked participants of a class slot
Additional participants added by the operator
{ "result": [ { … } ], "hasNext": true, "offset": "1234567890" }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookable-trial-offers/appointments/bookable/{bookableAppointmentId}/slots
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/bookable-trial-offers/appointments/bookable/{bookableAppointmentId}/slots
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookable-trial-offers/appointments/bookable/{bookableAppointmentId}/slots?customerId=0&daysAhead=1&slotWindowStartDate=2019-08-24' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'[ { "startDateTime": "2022-06-22T08:00:00.000+02:00[Europe/Berlin]", "endDateTime": "2022-06-22T10:00:00.000+02:00[Europe/Berlin]", "instructors": [ … ] } ]
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/classes/booking/validate
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/classes/booking/validate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/classes/booking/validate \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"customerId": 203,
"classSlotId": 20334
}'OK
Status of the booking validation
| Enum Value | Description |
|---|---|
| AVAILABLE | Booking is possible |
| NO_CONTINGENT | Customer doesn't have required contingent |
| BOOKING_LIMIT_REACHED | Waiting List/Max participant list exceeded |
| CUSTOMER_ALREADY_BOOKED | Customer already added to class slot |
| CUSTOMER_IDLE | Customer has an idle period during the time of the class slot |
| STUDIO_CLOSED | Studio is closed during period |
| 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 |
| NOT_AVAILABLE | Booking is not possible for other reasons |
| DISPLAY_ONLY | Class is display only |
{ "validationStatus": "AVAILABLE" }
Start date time of the bookable appointment slot
End date time of the bookable appointment slot
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/appointments/booking/validate
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/appointments/booking/validate
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/appointments/booking/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
]
}'OK
Status of the booking validation
| Enum Value | Description |
|---|---|
| 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 |
{ "validationStatus": "RESOURCE_NOT_AVAILABLE" }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/classes/booking/book
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/classes/booking/book
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/classes/booking/book \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: YOUR_API_KEY_HERE' \
-d '{
"customerId": 203,
"classSlotId": 20334
}'OK
Status of the class slot booking
| Enum Value | Description |
|---|---|
| BOOKED | Customer is successfully booked |
| CANCELED | Customer booking is canceled |
| BOOKED_WITH_CONFIRMATION_REQUIRED | Customer is booked, but booking confirmation is required |
| WAITING_LIST | Customer is assigned to waiting list |
The status of a class slot
| Enum Value | Description |
|---|---|
| COMPLETED | The class slot is completed. |
| CANCELED | The class slot is canceled. |
| PLANNED | The class slot is planned. |
{ "bookingId": 2033, "bookingStatus": "BOOKED", "classSlotId": 14928, "classId": 14928, "customerId": 14925548, "classSlotStatus": "COMPLETED", "participantStatus": "PARTICIPATING" }
Start date time of the bookable appointment slot
End date time of the bookable appointment slot
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/appointments/booking/book
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/appointments/booking/book
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/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
]
}'OK
Status of the appointment booking
| Enum Value | Description |
|---|---|
| BOOKED | Customer is successfully booked |
| CANCELED | Customer booking is canceled |
| BOOKED_WITH_CONFIRMATION_REQUIRED | Customer booking is successful, but confirmation is required |
The status of an appointment
| Enum Value | Description |
|---|---|
| COMPLETED | The appointment is completed. |
| CANCELED | The appointment is canceled. |
| PLANNED | The appointment is planned. |
{ "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" }
- Demo tenant
https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookings/{bookingId}/confirm
- Mock server
https://redocly.sportalliance.com/_mock/apis/perfectgym/openapi/openapi/v1/trial-offers/bookings/{bookingId}/confirm
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://open-api-demo.open-api.perfectgym.com/v1/trial-offers/bookings/{bookingId}/confirm' \
-H 'X-API-KEY: YOUR_API_KEY_HERE'{ "status": "CONFIRMED" }