Perfect Gym api

User details

User details is detaild representation of single club member in your gym.

User details properties

User details holds the same data as User plus some detailed features of a user. Only user details specyfic properties are described here.

Name Type Description
personalId string User personal identifier.
number string User number.
cardNumber string User membership card number.
cardIsBlocked bool User membership current card status.
facebookId long Identifier of Facebook account user has signed up for end user account with. For details see Sign up with Facebook.
email string User email address.
emailAddressIsConfirmed bool Does email address has been confirmed by the user.
birthDate string User birth date.
isForeigner bool Indicates if user is a forigner.
hasAccount bool Indicates if user has signed up for end user account.
hasPassword bool Indicates if user has provided password for his end user account.
language string User preferred language .
phoneNumber string User phone number.
idCardName string User identity card name.
idCardNumber string User identity card number.
legalGuardian string User legal guardian full name.
newsletterAgreement bool Indicates if user accept newsletter agreement.
termsAndConditionsAgreement bool Indicates if user accept terms and conditions agreement.
address Address User address.
contracts array An array of Contract objects, each representing user's contract.
cards array An array of Card objects, each representing user's membership card.
directDebit DirectDebit User direct debit information.
homeClubId long User home club identifier.
registeredAtClubId long User registration club identifier.
isActive bool Indicates if cuser is marked as active.
prepaidAmount decimal User prepaid account value .
employee Employee If user is a employee, field contains employee details .

Retrive detailed information about user identified by user unique identifier alt text

GET Users/User

Returns detailed user informations.

Parameters

Name Type Description
userId long User's identifier.

Example request

In this example we fetch user (with id = 1) detailed information.

curl -i 
     -X GET 
     -H "Authorization: Bearer  $ACCESS_TOKEN"  
     http://yoursubdomain.perfectgym.com/Api/Users/User?userId=1

Example response

Status: 200 OK
{
  "elements": [
    {
      "id": 1,
      "timestamp": 447183,
      "personalId": "80010101234",
      "number": "102000001",
      "cardNumber": "",
      "firstName": "Jan",
      "lastName": "Nowak",
      "email": "nowak@example.com",
      "emailAddressIsConfirmed": false,
      "photoUrl": "",
      "coverPhotoUrl": "",
      "birthDate": "1944-09-17T00:00:00",
      "isForeigner": false,
      "sex": "Male",
      "phoneNumber": "0048123456789",
      "idCardName": "Passport",
      "idCardNumber": "ABC 123456",
      "legalGuardian": "",
      "newsletterAgreement": false,
      "termsAndConditionsAgreement": false,
      "address": {
        "country": "Poland",
        "city": "Warszawa",
        "postalCode": "20-259",
        "line1": "al. Jerozolimskie 114",
        "line2": ""
      },
      "directDebit": {
        "accountNumber": "",
        "ownerName": "",
        "street": "",
        "cityAndPostalCode": "",
        "documentUrl": ""
      },
      "homeClubId": 12,
      "registeredAtClubId": "",
      "isActive": true,
      "isDeleted": false,
      "contracts": [
        {
          "id": 10358,
          "timestamp": 350287,
          "signUpDate": "2014-03-28T00:00:00",
          "startDate": "2014-04-01T00:00:00",
          "cancelDate": "2015-03-31T23:59:59",
          "endDate": "2015-03-31T23:59:59",
          "isCurrent": false,
          "membership": {
            "id": 1,
            "timestamp": 349423,
            "name": "Open",
            "isActive": true,
            "isDeleted": false
          },
          "paymentPlan": {
            "id": 2,
            "timestamp": 252688,
            "name": "Student weekly 45",
            "isActive": true,
            "isDeleted": false
          },
          "discounts": [
            {
              "id": 10,
              "isActive": true,
              "name": "50%",
              "administartionFeeDiscountType": "ValueDiscount",
              "joiningFeeDiscountType": "None",
              "membershipFeeDiscountType": "PercentDiscount",
              "administartionFeeDiscountValue": 0,
              "joiningFeeDiscountValue": "",
              "membershipFeeDiscountValue": 50
            }
          ],
          "isActive": true,
          "isDeleted": false
        }
      ]
    }
  ]
}

Retrive detailed information about user identified by parameters alt text

GET Users/Search

Returns detailed user informations.

Parameters

Name Type Description
email string User email address.
cardNumber string User card number.
userNumber string User number.
personalId long User personal id.
userId long User id.
phone string User mobile phone number

Example request

In this example we fetch user (with email = john.fibo@perfectgym.ok) detailed information.

curl -i 
     -X GET 
     -H "Authorization: Bearer  $ACCESS_TOKEN"  
     http://yoursubdomain.perfectgym.com/Api/Users/Search?email=john.fibo@perfectgym.pl

Example response

Status: 200 OK
{
  "elements": [
    {
      "id": 1,
      "timestamp": 447183,
      "personalId": "80010101234",
      "number": "102000001",
      "cardNumber": "",
      "firstName": "Jan",
      "lastName": "Nowak",
      "email": "nowak@example.com",
      "emailAddressIsConfirmed": false,
      "photoUrl": "",
      "coverPhotoUrl": "",
      "birthDate": "1944-09-17T00:00:00",
      "isForeigner": false,
      "sex": "Male",
      "phoneNumber": "0048123456789",
      "idCardName": "Passport",
      "idCardNumber": "ABC 123456",
      "legalGuardian": "",
      "newsletterAgreement": false,
      "termsAndConditionsAgreement": false,
      "address": {
        "country": "Poland",
        "city": "Warszawa",
        "postalCode": "20-259",
        "line1": "al. Jerozolimskie 114",
        "line2": ""
      },
      "directDebit": {
        "accountNumber": "",
        "ownerName": "",
        "street": "",
        "cityAndPostalCode": "",
        "documentUrl": ""
      },
      "homeClubId": 12,
      "registeredAtClubId": "",
      "isActive": true,
      "isDeleted": false,
      "contracts": [
        {
          "id": 10358,
          "timestamp": 350287,
          "signUpDate": "2014-03-28T00:00:00",
          "startDate": "2014-04-01T00:00:00",
          "cancelDate": "2015-03-31T23:59:59",
          "endDate": "2015-03-31T23:59:59",
          "isCurrent": false,
          "membership": {
            "id": 1,
            "timestamp": 349423,
            "name": "Open",
            "isActive": true,
            "isDeleted": false
          },
          "paymentPlan": {
            "id": 2,
            "timestamp": 252688,
            "name": "Student weekly 45",
            "isActive": true,
            "isDeleted": false
          },
          "discounts": [
            {
              "id": 10,
              "isActive": true,
              "name": "50%",
              "administartionFeeDiscountType": "ValueDiscount",
              "joiningFeeDiscountType": "None",
              "membershipFeeDiscountType": "PercentDiscount",
              "administartionFeeDiscountValue": 0,
              "joiningFeeDiscountValue": "",
              "membershipFeeDiscountValue": 50
            }
          ],
          "isActive": true,
          "isDeleted": false
        }
      ]
    }
  ]
}

Retrive authenticated user detailed informations alt text

GET Users/User

Returns detailed user informations.

Example request

In this example we fetch authenticated user detailed information.

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

Example response

Status: 200 OK
{
  "elements": [
    {
      "id": 1,
      "timestamp": 447183,
      "personalId": "80010101234",
      "number": "102000001",
      "cardNumber": "",
      "firstName": "Jan",
      "lastName": "Nowak",
      "email": "nowak@example.com",
      "emailAddressIsConfirmed": false,
      "photoUrl": "",
      "coverPhotoUrl": "",
      "birthDate": "1944-09-17T00:00:00",
      "isForeigner": false,
      "sex": "Male",
      "phoneNumber": "0048123456789",
      "idCardName": "Passport",
      "idCardNumber": "ABC 123456",
      "legalGuardian": "",
      "newsletterAgreement": false,
      "termsAndConditionsAgreement": false,
      "address": {
        "country": "Poland",
        "city": "Warszawa",
        "postalCode": "20-259",
        "line1": "al. Jerozolimskie 114",
        "line2": ""
      },
      "directDebit": {
        "accountNumber": "",
        "ownerName": "",
        "street": "",
        "cityAndPostalCode": "",
        "documentUrl": ""
      },
      "homeClubId": 12,
      "registeredAtClubId": "",
      "isActive": true,
      "isDeleted": false,
      "contracts": [
        {
          "id": 10358,
          "timestamp": 350287,
          "signUpDate": "2014-03-28T00:00:00",
          "startDate": "2014-04-01T00:00:00",
          "cancelDate": "2015-03-31T23:59:59",
          "endDate": "2015-03-31T23:59:59",
          "isCurrent": false,
          "membership": {
            "id": 1,
            "timestamp": 349423,
            "name": "Open",
            "isActive": true,
            "isDeleted": false
          },
          "paymentPlan": {
            "id": 2,
            "timestamp": 252688,
            "name": "Student weekly 45",
            "isActive": true,
            "isDeleted": false
          },
          "discounts": [
            {
              "id": 10,
              "isActive": true,
              "name": "50%",
              "administartionFeeDiscountType": "ValueDiscount",
              "joiningFeeDiscountType": "None",
              "membershipFeeDiscountType": "PercentDiscount",
              "administartionFeeDiscountValue": 0,
              "joiningFeeDiscountValue": "",
              "membershipFeeDiscountValue": 50
            }
          ],
          "isActive": true,
          "isDeleted": false
        }
      ]
    }
  ]
}
Perfect Gym api