# Classes Class and slots operations ## Get classes - [GET /v1/classes](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/getactiveclasses.md): Required Scopes: Returns classes with at least one scheduled appointment for the period of one day before to fourteen days ahead ## Get class by id - [GET /v1/classes/{classId}](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/getclassbyid.md): Required Scopes: Returns a class for specified id ## Get classes slots - [GET /v1/classes/slots](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/getclassslotsformultipleclasses.md): Required Scopes: Returns class slots within the timeframe of daysAhead starting from slotWindowStartDate, for multiple classes ## Get class slots - [GET /v1/classes/{classId}/slots](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/getclassslots.md): Required Scopes: Returns class slots for specified class id and the period of one day before to fourteen days ahead ## Get class slot by id - [GET /v1/classes/{classId}/slots/{classSlotId}](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/getclassslotbyid.md): Required Scopes: Returns class slots for specified class slot id ## Book a class slot - [POST /v1/classes/booking/book](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/bookclassslot.md): Required Scopes: Book a class slot for given customer ## Validate class slot is bookable - [POST /v1/classes/booking/validate](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/validateclassslot.md): Required Scopes: Validate class slot is available to book for given customer ## Get class booking by id - [GET /v1/classes/booking/{bookingId}](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/getclassbookingbyid.md): Required Scopes: Returns class booking for specified booking id ## Cancel a class booking - [DELETE /v1/classes/booking/{bookingId}](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/cancelclassslotbyid.md): Required Scopes: Cancel booking of a class slot for given bookingId ## Get class bookings by customer id - [GET /v1/classes/booking](https://redocly.sportalliance.com/apis/perfectgym/openapi/openapi/classes/getclassbookingsbycustomerid.md): Required Scopes: Returns class booking with a period starting and ending within a timeframe of +/- 2 weeks for a specific customer