Perfect Gym api

Classes types

Each fitness class has a class type assigned . Class type is for example 'Zumba', and a class is an instance of a class type (for example Zumba at 'Fibo' club, starting on 2015-12-21 18:00). Class types are global accross all clubs of a company (in case company has more then 1 club).

Class type properties

Class type is described by the following properties

Name Type Description
id long Unique identifier of class type.
timestamp long Timestamp. Indicates when resource was last modified.
isDeleted bool Indicates if resource is deleted.
name string Class type name.
description string Class type description.
colorRGB string Representing the color set for class.
photoUrl string Class type photo URL.
iconUrl string Class type icon URL.
rating Rating Class type rating.
ageFromMonths int Class type age restriction lower bound.
ageToMonths int Class type age restriction upper bound.
category Category Class type category.
secondCategory Category Class type second category.
translations Array An array of ClassTypeTranslation objects, lass type translations.
attributes Array An array of CustomAttribute objects, class type custom attributes.
availableAtTheClub Array An array of clubs where classes are held.

List classes types with timestamp alt text alt text

GET Classes/ClassesTypes

Returns paginated classes type list.

Parameters

Name Type Description
timestamp long Timestamp. Request returns classes types with timestamp grater then timestamp, defaults to 0.

Example request

In this example we fetch list of all classes types (timestamp parameter defaults to 0) available in a company.

curl -i 
     -X GET 
     -H "Authorization: Bearer  $ACCESS_TOKEN"  
     http://yoursubdomain.perfectgym.com/Api/Classes/ClassesTypes

Example response

Status: 200 OK
{
  "elements": [
    {
      "id": 1,
      "timestamp": 263952,
      "name": "Box",
      "photoUrl": "",
      "iconUrl": "",
      "description": "Box perfectly combines cardio and strength training under the guise of groove!",
      "rating": {
        "rating": 4.1,
        "votesCount": 1234,
        "rankingSort": 2.3
      },
      "category": {
        "id": 2,
        "category": "MIX",
        "imageUrl": "https://yourdomain.perfectgym.pl/Api/Files/Photo?xxxxxxxxx",
        "isDeleted": false,
        "isProductRequiredForBooking": false,
        "name": "Mix",
        "timestamp": 1223165441
      }
    },
    {
      "id": 2,
      "timestamp": 382653,
      "name": "POWER JOGA",
      "photoUrl": "",
      "iconUrl": "",
      "description": "Power Yoga is definitely an intense workout that will make you sweat.",
      "rating": {
        "rating": 4.1,
        "votesCount": 4321,
        "rankingSort": 4.3
      },
      "category": {
        "id": 2,
        "category": "MIX",
        "imageUrl": "https://yourdomain.perfectgym.pl/Api/Files/Photo?xxxxxxxxx",
        "isDeleted": false,
        "isProductRequiredForBooking": false,
        "name": "Mix",
        "timestamp": 1223165441
      }
    }
  ]
}
Perfect Gym api