cURL
curl -H "Authorization: Bearer <access_token>" \
https://api.fitsociety.io/public/v1/coaches/<coachId>const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fitsociety.io/public/v1/coaches/{coachId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/coaches/{coachId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"coach": {
"_id": "66f7b8b1e13c8d25f4d3d90a",
"firstName": "John",
"lastName": "Doe",
"email": "john@fitsociety.io",
"role": "Coach",
"language": "nl",
"trainerStatus": true,
"image": "https://cdn.example.com/coach.jpg",
"lastActive": "2024-08-20T10:00:00.000Z",
"online": false
}
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1,
"retryAfterSeconds": 1
}
}
}Coaches
Get a coach
Fetches one coach in the authenticated company. The token must include coaches:read.
GET
/
public
/
v1
/
coaches
/
{coachId}
cURL
curl -H "Authorization: Bearer <access_token>" \
https://api.fitsociety.io/public/v1/coaches/<coachId>const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fitsociety.io/public/v1/coaches/{coachId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fitsociety.io/public/v1/coaches/{coachId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"coach": {
"_id": "66f7b8b1e13c8d25f4d3d90a",
"firstName": "John",
"lastName": "Doe",
"email": "john@fitsociety.io",
"role": "Coach",
"language": "nl",
"trainerStatus": true,
"image": "https://cdn.example.com/coach.jpg",
"lastActive": "2024-08-20T10:00:00.000Z",
"online": false
}
},
"meta": {
"requestId": "4f849d7d-f4f1-45cc-b4b7-3984a3d17f83",
"rateLimit": {
"limit": 10,
"remaining": 9,
"resetSeconds": 1,
"retryAfterSeconds": 1
}
}
}⌘I