Deprecated - API v1 will be switched off on 01.07.2022. Please upgrade to API v2
User photo
This API lets you assign photo to a club user.
Assign photo to a club user
POST Users/Photo
Request assigns photo to a club user.
Parameters
Name | Type | Description |
---|---|---|
userId |
long |
Required. User identifier. Request assigns new photo to user identified by userId . |
Body parameters
Name | Type | Description |
---|---|---|
extension |
string |
Photo file extension. Possible values:
|
data |
string |
Photo data base64 encoded. |
Response
Example request
In this example we assign photo to a user with id
= 236
.
curl -X POST -H "Authorization: Bearer $ACCESS_TOKEN" -H "Content-Type: application/json" -d '{ "extension": "png", "data": "... photo data ...", }' http://yoursubdomain.perfectgym.com/Api/Users/Photo?userId=236
Example response
Status: 200 OK
{
"elements": [
{
"id": 236,
"timestamp": 448035,
"personalId": "80010101234",
"number": "2b7b02df-08ae-4720-a3ce-a594bfc46d47",
"cardNumber": "",
"firstName": "John",
"lastName": "Fibo",
"email": "john.fibo@perfectgym.pl",
"emailAddressIsConfirmed": false,
"phoneNumber": "0048123456789",
"idCardName": "Passport",
"idCardNumber": "ABC 123456",
"legalGuardian": "",
"photoUrl": "http://yoursubdomain.perfectgym.com/Api/Files/Photo?photoId=78",
"coverPhotoUrl": "",
"birthDate": "1978-06-01T00:00:00",
"isForeigner": false,
"sex": "Male",
"newsletterAgreement": false,
"termsAndConditionsAgreement": false,
"address": {
"country": "Poland",
"city": "Warszawa",
"postalCode": "02-962",
"line1": "ul. Przyczolkowa 334",
"line2": ""
},
"directDebit": {
"accountNumber": "",
"ownerName": "",
"street": "",
"cityAndPostalCode": "",
"documentUrl": ""
},
"homeClubId": 12,
"registeredAtClubId": "",
"isActive": true,
"isDeleted": false,
"contracts": [
]
}
]
}