Add a tag to a member
curl --request POST \
--url https://api.gymdesk.com/members/{memberId}/tags \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"tag": "VIP"
}'import requests
url = "https://api.gymdesk.com/members/{memberId}/tags"
payload = { "tag": "VIP" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tag: 'VIP'})
};
fetch('https://api.gymdesk.com/members/{memberId}/tags', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gymdesk.com/members/{memberId}/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tag' => 'VIP'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Unauthorized",
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}{
"message": "Resource not found",
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}{
"message": "Tag 'VIP' already exists for member 123.",
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}{
"message": "Validation failed",
"errors": {
"name": [
"Field is required"
],
"email": [
"Must be a valid email address"
]
},
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}Members
Add a tag to a member
Attach a tag to the member. Returns 409 if the tag is already attached.
POST
/
members
/
{memberId}
/
tags
Add a tag to a member
curl --request POST \
--url https://api.gymdesk.com/members/{memberId}/tags \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"tag": "VIP"
}'import requests
url = "https://api.gymdesk.com/members/{memberId}/tags"
payload = { "tag": "VIP" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tag: 'VIP'})
};
fetch('https://api.gymdesk.com/members/{memberId}/tags', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gymdesk.com/members/{memberId}/tags",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tag' => 'VIP'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"message": "Unauthorized",
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}{
"message": "Resource not found",
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}{
"message": "Tag 'VIP' already exists for member 123.",
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}{
"message": "Validation failed",
"errors": {
"name": [
"Field is required"
],
"email": [
"Must be a valid email address"
]
},
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}⌘I
