New API available - faster and more powerful!

Check it out!
Perfect Gym api
Deprecated - API v1 will be switched off on 01.07.2022. Please upgrade to API v2

User friends

This API lets you assign a friend to a full member user account.

Overview

Verify connection possibility alt text

GET Users/VerifyFriendConnection

Request checks if two users can be connected as friends in Perfect Gym system.

Parameters

Name Type Description
fullMemberUserId long Required. Full member user identifier. Request checks if user identified with friendUserId can be assigned as friend to user identified by fullMemberUserId.
friendUserId long Required. Friend user identifier. Request checks if user identified with friendUserId can be assigned as friend to user identified by fullMemberUserId.

Response

User details including user friends list.

Example request

In this example we check if user with id = 521 can be assigned as friend of user with id = 236.


curl -X POST 
     -H "Authorization: Bearer $ACCESS_TOKEN" 
     -H "Content-Type: application/json"      
    http://yoursubdomain.perfectgym.com/Api/Users/VerifyFriendConnection?fullMemberUserId=236&friendUserId=521

Execute connection alt text

GET Users/ConnectFriend

Request assigns friend to a full club member.

Parameters

Name Type Description
fullMemberUserId long Required. Full member user identifier. Request assignes user identified with friendUserId as a friend of club member identified with fullMemberUserId.
friendUserId long Required. Friend user identifier. Request assignes user identified with friendUserId as a friend of club member identified with fullMemberUserId.
dateFrom dateTime Required. Start relationship between the user and friends
dateUntil dateTime End relationship between the user and friends

Response

User details including user friends list.

Example request

In this example user with id = 521 as friend of user with id = 236.


curl -X POST 
     -H "Authorization: Bearer $ACCESS_TOKEN" 
     -H "Content-Type: application/json"      
    http://yoursubdomain.perfectgym.com/Api/Users/ConnectFriend?fullMemberUserId=236&friendUserId=521

Get friend status

GET Users/FriendStatus

Get information on the relationship between the user and friends in time

Parameters

Name Type Description
userId long Required. User identifier.

Response

Friends status.

Example request

In this example we get information about full member users connected to friend with id = 236.


curl -X GET 
     -H "Authorization: Bearer $ACCESS_TOKEN" 
     -H "Content-Type: application/json" 
     
    http://yoursubdomain.perfectgym.com/Api/Users/FriendStatus?userId=236

Example response

Status: 200 OK
{
  "elements": [
    {
      "userId": 10,
      "dateFrom": "2016-01-26T00:00:00",
      "dateTo": "2016-02-26T00:00:00"
    }
  ]
}

Gets connected friends

GET Users/Friends

Get information on the relationship between the user and friends in time

Parameters

Name Type Description
userId long Required. User identifier.

Response

Friends status.

Example request

In this example we get information about friends connected to full member user with id = 236.


curl -X GET 
     -H "Authorization: Bearer $ACCESS_TOKEN" 
     -H "Content-Type: application/json" 
     
    http://yoursubdomain.perfectgym.com/Api/Users/Friends?userId=236

Example response

Status: 200 OK
{
  "elements": [
    {
      "userId": 10,
      "dateFrom": "2016-01-26T00:00:00",
      "dateTo": "2016-02-26T00:00:00"
    }
  ]
}
Perfect Gym api