A class represents one of the gym’s classes, like "weightlifting" or "yoga". To show the class on the Gympass app and website, you need to create a slot that combines the class with a specific date and time it will occur. See slots session to see how to register a slot.
It's the human-readable name of the class. Max of 255 characters.
String
True
description
It's the human-readable description of the class.
String
True
notes
These are the human-readable notes that you can add to the class details.
String
False
bookable
It indicates if the class can be reserved. Values: True or False.
Boolean
True
visible
It indicates if the class is visible at Gympass app and website. Set this field to False if you want to hide the class for a while. If this is set to False, all related slots won’t be shown. Values: True or False.
Boolean
True
product_id
It's the product identifier at Gympass (yoga, swimming). If you don’t know this, please ask about it to your Gympass contact.
Int
True
reference
It's a field used by the partner to link a class between Gympass Booking API and its integrated system.
String
False
system_id
Id of partner's integrated system at Gympass.
Int
False
categories
Array of IDs chosen from a list of categories provided by Gympass that specifies what kind of activity that class is about. (e.g. Yoga, Functional, Pilates...).
List - Int
False
Headers
Field
Description
Content-Type
application/json
Authorization
Bearer {{Gympass Auth Token}} - If you do not have this token, ask it to Gympass contact.
Path Variables
Field
Description
gym_id
It's the identifier of the gym at Gympass. Provided by Gympass.
Bearer {{Gympass Auth Token}} - If you do not have this token, ask it to Gympass contact.
Path Variables
Field
Description
gym_id
The identifier of the gym at Gympass. Provided by Gympass.
class_id
The identifier of the class at Gympass. Returned when creating a Class.
Query String Parameters
Field
Description
show-deleted (Optional)
true Shows the deleted class. false {default} Does not show the deleted class
show-deleted=true Will show the results for both Class_ids that have been deleted and that are non-deleted. show-deleted=false will only show non-deleted Class_ids
It's the human-readable name of the class. Max of 255 characters.
String
True
description
It's the human-readable description of the class.
String
True
notes
These are the human-readable notes that you can add to the class details.
String
False
bookable
It indicates if the class can be reserved. Values: True or False.
Boolean
True
visible
It indicates if the class is visible at Gympass app and website. Set this field to False if you want to hide the class for a while. If this is set to False, all related slots won’t be shown. Values: True or False.
Boolean
True
product_id
It's the product identifier at Gympass (yoga, swimming). If you don’t know this, please ask about it to your Gympass contact.
Int
True
reference
It's a field used by the partner to link a class between Gympass Booking API and its integrated system.
String
False
categories
Array of IDs chosen from a list of categories provided by Gympass that specifies what kind of activity that class is about. (e.g. Yoga, Functional, Pilates...)
List - Int
False
Headers
Field
Description
Content-Type
application/json
Authorization
Bearer {{Gympass Auth Token}} - If you do not have this token, ask it to Gympass contact.
Path Variables
Field
Description
gym_id
The identifier of the gym at Gympass. Provided by Gympass.
class_id
The identifier of the class at Gympass. Returned when create a Class.
Response
204 - No Content
Slots
A slot represents a class with specific date and time. For example, you can have a class called Yoga with a slot on Sunday at 9 AM and another slot on Monday at 8 AM.
A slot is always related to a class that was previously registered. See class session to find out how to register a class.
The class slot time should be entered based on the location of the gym. Ex: 2019-07-30T10:00:00-05:00 will create a class on July 30th 10AM for a gym located in the East Coast timezone, UTC -5.
Date
True
room
It's the human-readable room name at the gym. Max of 200 characters.
String
False
status
It’s the slot status. The default value is 1. Values: inactive = 0 or active = 1.
Int
False
length_in_minutes
It's the class duration in minutes. Max length duration is 180.
Int
True
total_capacity
It's the total capacity of users on a given class slot. For example, if you just have 10 bikes, you can set it to 10. Max total capacity is 32000.
Int
True
total_booked
It's the total amount of bookings on a given class slot. Note that every time a class slot is booked through Gympass app and website or not, the best practice is that you update this information using this endpoint. This way we can always show properly the slots that you already have available, providing the best experience to the users.
Int
True
product_id
It's the product identifier at Gympass (yoga, swimming). If you don’t know this, please ask about it to your Gympass contact.
Int
True
cancellable_until
The deadline used to control the early cancellation for the booking (without penalty). It should be entered based on the location of the gym. After that, it will be considered a late cancel. Ex: 2019-07-30T15:00:00-05:00.
Date
False
rate
The max rate is 5.0.
Decimal
False
booking_window
Booking window represents the date and time that a user can book a slot. If the user is outside of this range of dates and times they can’t book this slot. The booking window is composed of the "opens_at" and "closes_at" attributes explained below.
Decimal
False
opens_at
The opening time to book a class slot. It should be entered based on the location of the gym. Ex: 2019-07-20T13:00:00-05:00. If none is informed, the slot will be available just after creation.
Date
False
closes_at
The limit time to book a class slot. It should be entered based on the location of the gym. Ex: 2019-07-29T21:00:00-05:00. If none is informed the slot will be considered closed to be booked at occur_date
Date
False
instructors
You can set none or multiple instructors for a class slot. This represents a list of the instructors, and for each one you can send the instructor's "name" and whether they are a "substitute" or not, as explained below.
List
False
name
The name of the instructor. Max of 100 characters.
String
True
substitute
Indicates if it’s a substitute instructor. Values: True or False.
Boolean
True
virtual
Indicates if the class slots is virtual or presential.
Boolean
False
virtual_class_url
If this is a virtual class, you can put here the url that the user will need to use to access the class virtually.
String
False
Headers
Field
Description
Accept
application/json
Authorization
Bearer {{Gympass Auth Token}} - If you do not have this token, ask it to Gympass contact.
Path Variables
Field
Description
gym_id
The identifier of the gym at Gympass. Provided by Gympass.
class_id
The identifier of the class at Gympass. Returned when create a Class.
1curl --location --request GET '{{booking-api-url}}/booking/v1/gyms/:gym_id/classes/:class_id/slots?from=2019-09-09T00:00:00%2B03:00&to=2019-09-09T23:59:59%2B03:00'\
It updates partial info of the slot. For now, it is just possible to update total_booked and/or total_capacity. We recommend as good practice inform at least one of these fields. If you need to update other slot's information, please use PUT - Update.
It's the total capacity of users on a given class slot. For example, if you just have 10 bikes, you can set it to 10. Max total capacity is 32000.
Int
True, if total_booked not sent
total_booked
It's the total amount of bookings on a given class slot. Note that every time a class slot is booked, through Gympass app and website or not, the best practice is that you update this information using this endpoint. This way we can properly always show the slots that you already have available, providing the best experience to the users.
Int
True, if total_capacity not sent
virtual_class_url
If this is a virtual class, you can put here the url that the user will need to use to access the class virtually.
String
False
Headers
Field
Description
Accept
application/json
Authorization
Bearer {{Gympass Auth Token}} - If you do not have this token, ask it to Gympass contact.
Path Variables
Field
Value
gym_id
The identifier of the gym at Gympass. Provided by Gympass.
class_id
The identifier of the class at Gympass. Returned when creating a Class.
slot_id
The identifier of the Slot at Gympass. Returned when creating a Slot.
The class slot time should be entered based on the location of the gym. Ex: 2019-07-09T10:00:00-03:00 will create a class on July 9th 10AM for a gym located in the timezone UTC-3.
Date
True
room
It's the human-readable room name at the gym. Max of 200 characters.
String
False
status
It’s the slot status. The default value is 1. Values: inactive = 0 or active = 1.
Int
False
length_in_minutes
It's the class duration in minutes. Max length duration is 200.
Int
True
total_capacity
It's the total capacity of users on a given class slot. For example, if you just have 10 bikes, you can set it to 10. Max total capacity is 32000.
Int
True
total_booked
It's the total amount of bookings on a given class slot. Note that every time a class slot is booked through Gympass app and website or not, the best practice is that you update this information using this endpoint. This way we can always show properly the slots that you already have available, providing the best experience to the users.
Int
True
product_id
It's the product identifier at Gympass (yoga, swimming). If you don’t know this, please ask about it to your Gympass contact.
Date
True
cancellable_until
The deadline used to control the early cancellation for the booking (without penalty). It should be entered based on the location of the gym. After that, it will be considered a late cancel. Ex: 2019-07-09T09:00:00-03:00.
Date
False
rate
The max rate is 5.0.
Decimal
False
booking_window
Booking window represents the date and time that a user can book a slot. If the user is outside of this range of dates and times they can’t book this slot. The booking window is composed of the "opens_at" and "closes_at" attributes explained below.
Date
False
opens_at
The opening time to book a class slot. It should be entered based on the location of the gym. Ex: 2019-07-20T13:00:00.000Z. If none is informed, the slot will be available just after creation.
Date
False
closes_at
The limit date to book a class slot. It should be entered based on the location of the gym. Ex: 2019-07-29T21:00:00.000Z. If none is informed the slot will be considered closed to be booked at occur_date
Date
False
instructors
You can set none or multiple instructors for a class slot. This represents a list of the instructors, and for each one you can send the instructor's "name" and whether they are a "substitute" or not, as explained below.
List
False
name
The name of the instructor. Max of 100 characters.
String
True
substitute
Indicates if it’s a substitute instructor. Values: True or False.
Boolean
True
virtual
Indicates if the class slots is virtual or presential.
Boolean
False
virtual_class_url
If this is a virtual class, you can put here the url that the user will need to use to access the class virtually.
String
False
Headers
Field
Description
Accept
application/json
Authorization
Bearer {{Gympass Auth Token}} - If you do not have this token, ask it to Gympass contact.
Path Variables
Field
Value
gym_id
The identifier of the gym at Gympass. Provided by Gympass.
class_id
The identifier of the class at Gympass. Returned when create a Class.
slot_id
The identifier of the Slot at Gympass. Returned when create a Slot.
A Product determines what gyms a user can access on a Gympass plan. In addition, the product also represents an activity that the user can perform, so it is data that is commonly required to provide on most requests, such as for creating a class.
For this purpose, we provide an API that allows you to retrieve all Products that are associated with a GymID, so you can use the correct Product IDs on your integration setup.
The above example would reserve a booking. When calling the PATCH update you must pass through either a 2 (Reserved Booking), a 3 (Rejected Booking) or 5 (Cancelled by the Gym)
Request Params
Field
Description
Type
Required
class_id
The class id related to that booking.
Int
True
status
If the gym is accepting or rejecting the booking. Values: 2 (Reserved), 3 (Rejected) or 5 (Cancelled by the Gym)
Int
True
reason
The reason is used commonly when the booking is rejected.
String
False
virtual_class_url
If this is a virtual class, you can put here the URL that the user will need to use to access the class virtually.
String
False
Headers
Field
Description
Accept
application/json
Authorization
Bearer {{Gympass Auth Token}} - If you do not have this token, ask it to Gympass contact.
Path Variables
Field
Value
gym_id
The identifier of the gym at Gympass. Provided by Gympass.
booking_number
The booking identifier at Gympass. Returned when creating a Booking.
If the gym is accepting or rejecting the booking. See Allowed values
String
True
reason
The reason is used commonly when the booking is rejected.
String
False
reason_category
The reason category is used to categorize a rejected booking. Required if the status is REJECTED. See Allowed values
String
False
virtual_class_url
If this is a virtual class, you can put here the URL that the user will need to use to access the class virtually.
String
False
Headers
Field
Description
Accept
application/json
Authorization
Bearer {{Gympass Auth Token}} - If you do not have this token, ask it to Gympass contact.
Path Variables
Field
Value
gym_id
The identifier of the gym at Gympass. Provided by Gympass.
booking_number
The booking identifier at Gympass. Returned when creating a Booking.
List of status allowed
Value
RESERVED
REJECTED
CANCELLED_BY_GYM
List of reason categories allowed
Value
Description
CLASS_IS_FULL
Booking declined because the class is full
USAGE_RESTRICTION
Booking declined because of usage limits
USER_IS_ALREADY_BOOKED
Booking attempt declined because you've already booked this class
SPOT_NOT_AVAILABLE
Booking declined because there are no spots available
USER_DOES_NOT_EXIST
Booking declined because you need to visit the partner to register first
CHECK_IN_AND_CANCELATION_WINDOWS_CLOSED
Booking declined because you are not able to book this class right now
CLASS_HAS_BEEN_CANCELED
Booking declined because the class is no longer available
CLASS_NOT_FOUND
Booking declined because the class wasn't found
USER_PROFILE_CMS
Booking declined because of a user profile error
TECHNICAL_ERROR
Booking declined because of a technical error
PREREQUISITES
Booking declined because this class has prerequisites
GENERAL_ERROR
Booking declined because something went wrong
Response
204 - 0K - no content
Categories
A class category is an ID chosen from a list of categories provided by Gympass that specifies what kind of activity that class is about. (e.g. Yoga, Functional, Pilates...)