Perfect Gym api

Club visits

Club visit is a summary representation of a single club member visit to your club.

Club visit properties

Club visit is described by the following properties

Name Type Description
id long Unique identifier of club visit.
userId long User identifier.
timestamp long Timestamp. Indicates when resource was last modified.
enterDate datetime Club entrance date.
exitDate datetime Club exit date.
club Club Club user has visited.
isDeleted bool Indicates if resource is deleted.

List user club visits with timestamp alt text alt text

GET Users/ClubVisits

Returns paginated list of user's club visits.

Employee mode parameters

Name Type Description
userId long Required. User identifier. Request returns club visits for user identified with userId.
timestamp long Required. Timestamp. Request returns club visits with timestamp grater then timestamp, defaults to 0

User mode parameters

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

Example request

In this example we fetch list of all user (identified with userId = 123) club visits with timestamp greater then 254000

curl -i 
     -X GET 
     -H "Authorization: Bearer  $ACCESS_TOKEN"  
     http://yoursubdomain.perfectgym.com/Api/Users/ClubVisits?userId=123&timestamp=254000

Example response

Status: 200 OK
{
  "elements": [
    {
      "enterDate": "2015-07-01T16:17:38",
      "exitDate": "2015-07-01T17:30:25",
      "club": {
        "id": 9,
        "timestamp": 255968,
        "name": "Club Monaco",
        "shortName": "Monaco",
        "symbol": "MON",
        "type": "Platinum",
        "openDate": "2015-01-01",
        "latitude": 52.51038,
        "longitude": 13.39763,
        "email": "club@clubmonaco.com",
        "phoneNumber": "+49 12 123 456 789",
        "timezone": "Central European Standard Time",
        "address": {
          "line1": "Rue Grimaldi 47",
          "line2": "",
          "city": "Monaco",
          "postalCode": "10-117",
          "country": "Monaco"
        },
        "isDeleted": false,
        "isHidden": false
      },
      "id": 219,
      "userId": 123,
      "timestamp": 219102,
      "isDeleted": false
    },
    {
      "enterDate": "2015-11-24T17:06:50",
      "exitDate": "2015-11-24T18:51:16",
      "club": {
        "id": 9,
        "timestamp": 255968,
        "name": "Club Monaco",
        "shortName": "Monaco",
        "symbol": "MON",
        "type": "Platinum",
        "openDate": "2015-01-01",
        "latitude": 52.51038,
        "longitude": 13.39763,
        "email": "club@clubmonaco.com",
        "phoneNumber": "+49 12 123 456 789",
        "timezone": "Central European Standard Time",
        "address": {
          "line1": "Rue Grimaldi 47",
          "line2": "",
          "city": "Monaco",
          "postalCode": "10-117",
          "country": "Monaco"
        },
        "isDeleted": false,
        "isHidden": false
      },
      "id": 333,
      "userId": 123,
      "timestamp": 410378,
      "isDeleted": false
    },
    {
      "enterDate": "2015-11-25T09:57:07",
      "exitDate": "2015-11-25T13:04:44",
      "club": {
        "id": 9,
        "timestamp": 255968,
        "name": "Club Monaco",
        "shortName": "Monaco",
        "symbol": "MON",
        "type": "Platinum",
        "openDate": "2015-01-01",
        "latitude": 52.51038,
        "longitude": 13.39763,
        "email": "club@clubmonaco.com",
        "phoneNumber": "+49 12 123 456 789",
        "timezone": "Central European Standard Time",
        "address": {
          "line1": "Rue Grimaldi 47",
          "line2": "",
          "city": "Monaco",
          "postalCode": "10-117",
          "country": "Monaco"
        },
        "isDeleted": false,
        "isHidden": false
      },
      "id": 340,
      "userId": 123,
      "timestamp": 410472,
      "isDeleted": false
    },
    {
      "enterDate": "2015-11-30T16:14:52",
      "exitDate": "2015-11-30T18:27:00",
      "club": {
        "id": 9,
        "timestamp": 255968,
        "name": "Club Monaco",
        "shortName": "Monaco",
        "symbol": "MON",
        "type": "Platinum",
        "openDate": "2015-01-01",
        "latitude": 52.51038,
        "longitude": 13.39763,
        "email": "club@clubmonaco.com",
        "phoneNumber": "+49 12 123 456 789",
        "timezone": "Central European Standard Time",
        "address": {
          "line1": "Rue Grimaldi 47",
          "line2": "",
          "city": "Monaco",
          "postalCode": "10-117",
          "country": "Monaco"
        },
        "isDeleted": false,
        "isHidden": false
      },
      "id": 349,
      "userId": 123,
      "timestamp": 412023,
      "isDeleted": false
    }
  ]
}

List all club visits with timestamp alt text

GET Users/ClubVisits/All

Returns paginated list of all user's club visits.

Employee mode parameters

Name Type Description
timestamp long Required. Timestamp. Request returns club visits with timestamp grater then timestamp, defaults to 0

Example request

In this example we fetch list of all club visits with timestamp greater then 254000

curl -i 
     -X GET 
     -H "Authorization: Bearer  $ACCESS_TOKEN"  
     http://yoursubdomain.perfectgym.com/Api/Users/ClubVisits/All?timestamp=254000
Perfect Gym api