List memberships
curl --request GET \
--url https://api.gymdesk.com/memberships \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.gymdesk.com/memberships"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.gymdesk.com/memberships', 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/memberships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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;
}{
"data": [
{
"id": 1000,
"academyId": 123,
"name": "Monthly Unlimited Membership",
"active": true,
"familyMembership": false,
"pricing": {
"type": "recurring",
"price": {
"amount": 49.99,
"currency": "USD"
},
"signupFee": {
"amount": 149.99,
"currency": "USD"
},
"latePaymentFee": {
"amount": 10,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": "P1M",
"maxNumberOfPayments": null,
"familyDiscounts": null,
"familyPricing": null
},
"duration": {
"type": "ongoing",
"timeLimitedOptions": null,
"enrollmentPeriodOptions": null
},
"access": {
"type": "unlimited",
"memberCapacity": null,
"limitOptions": null,
"allowedProgramIds": [
101,
102
]
}
},
{
"id": 1001,
"academyId": 123,
"name": "Pay Per Session Membership",
"active": true,
"familyMembership": false,
"pricing": {
"type": "per_session_fee",
"price": {
"amount": 15,
"currency": "USD"
},
"signupFee": {
"amount": 25,
"currency": "USD"
},
"latePaymentFee": {
"amount": 0,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": null,
"maxNumberOfPayments": null,
"familyDiscounts": null,
"familyPricing": null
},
"duration": {
"type": "ongoing",
"timeLimitedOptions": null,
"enrollmentPeriodOptions": null
},
"access": {
"type": "session_limit",
"memberCapacity": null,
"limitOptions": {
"amount": 1,
"unit": "payment"
},
"allowedProgramIds": [
103
]
}
},
{
"id": 458,
"academyId": 999,
"name": "Two Sessions Per Week (Yearly Membership)",
"active": true,
"familyMembership": false,
"pricing": {
"type": "recurring",
"price": {
"amount": 899,
"currency": "USD"
},
"signupFee": {
"amount": 49.99,
"currency": "USD"
},
"latePaymentFee": {
"amount": 10,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": "P1Y",
"maxNumberOfPayments": null,
"familyDiscounts": null,
"familyPricing": null
},
"duration": {
"type": "time_limited",
"timeLimitedOptions": {
"membershipDuration": "P1Y",
"endOfMembershipAction": "cancel_membership",
"chargeSignupFeeOnRenewal": false
},
"enrollmentPeriodOptions": null
},
"access": {
"type": "session_limit",
"memberCapacity": null,
"limitOptions": {
"amount": 2,
"unit": "week"
},
"allowedProgramIds": [
101,
104
]
}
},
{
"id": 2000,
"academyId": 123,
"name": "Family Unlimited Membership",
"active": true,
"familyMembership": true,
"pricing": {
"type": "recurring",
"price": {
"amount": 99.99,
"currency": "USD"
},
"signupFee": {
"amount": 50,
"currency": "USD"
},
"latePaymentFee": {
"amount": 10,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": "P1M",
"maxNumberOfPayments": null,
"familyDiscounts": null,
"familyPricing": [
{
"memberCount": 2,
"price": {
"amount": 99.99,
"currency": "USD"
}
},
{
"memberCount": 3,
"price": {
"amount": 129.99,
"currency": "USD"
}
},
{
"memberCount": 4,
"price": {
"amount": 149.99,
"currency": "USD"
}
},
{
"memberCount": 5,
"price": {
"amount": 169.99,
"currency": "USD"
}
}
]
},
"duration": {
"type": "ongoing",
"timeLimitedOptions": null,
"enrollmentPeriodOptions": null
},
"access": {
"type": "unlimited",
"memberCapacity": null,
"limitOptions": null,
"allowedProgramIds": [
101,
102
]
}
},
{
"id": 2001,
"academyId": 123,
"name": "Individual Monthly - Family Discount Available",
"active": true,
"familyMembership": false,
"pricing": {
"type": "recurring",
"price": {
"amount": 149.99,
"currency": "USD"
},
"signupFee": {
"amount": 99.99,
"currency": "USD"
},
"latePaymentFee": {
"amount": 10,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": "P1M",
"maxNumberOfPayments": null,
"familyDiscounts": [
{
"memberOrdinal": 2,
"discountType": "percentage",
"discountAmount": 10
},
{
"memberOrdinal": 3,
"discountType": "percentage",
"discountAmount": 15
},
{
"memberOrdinal": 4,
"discountType": "percentage",
"discountAmount": 20
}
],
"familyPricing": null
},
"duration": {
"type": "ongoing",
"timeLimitedOptions": null,
"enrollmentPeriodOptions": null
},
"access": {
"type": "unlimited",
"memberCapacity": null,
"limitOptions": null,
"allowedProgramIds": [
101,
102,
103
]
}
}
],
"related": {
"programs": [
{
"id": 101,
"name": "Brazilian Jiu Jitsu"
},
{
"id": 102,
"name": "Muay Thai"
},
{
"id": 103,
"name": "Wrestling"
},
{
"id": 104,
"name": "Judo"
}
]
},
"meta": {
"currentPage": 1,
"from": 1,
"lastPage": 1,
"perPage": 100,
"to": 5,
"total": 5
},
"links": {
"first": "https://api.gymdesk.com/v1/memberships?page=1&perPage=100",
"last": "https://api.gymdesk.com/v1/memberships?page=1&perPage=100",
"prev": null,
"next": null
}
}{
"message": "Unauthorized",
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}{
"message": "Resource not found",
"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"
}Memberships
List memberships
List membership definitions available in the academy.
GET
/
memberships
List memberships
curl --request GET \
--url https://api.gymdesk.com/memberships \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.gymdesk.com/memberships"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.gymdesk.com/memberships', 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/memberships",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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;
}{
"data": [
{
"id": 1000,
"academyId": 123,
"name": "Monthly Unlimited Membership",
"active": true,
"familyMembership": false,
"pricing": {
"type": "recurring",
"price": {
"amount": 49.99,
"currency": "USD"
},
"signupFee": {
"amount": 149.99,
"currency": "USD"
},
"latePaymentFee": {
"amount": 10,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": "P1M",
"maxNumberOfPayments": null,
"familyDiscounts": null,
"familyPricing": null
},
"duration": {
"type": "ongoing",
"timeLimitedOptions": null,
"enrollmentPeriodOptions": null
},
"access": {
"type": "unlimited",
"memberCapacity": null,
"limitOptions": null,
"allowedProgramIds": [
101,
102
]
}
},
{
"id": 1001,
"academyId": 123,
"name": "Pay Per Session Membership",
"active": true,
"familyMembership": false,
"pricing": {
"type": "per_session_fee",
"price": {
"amount": 15,
"currency": "USD"
},
"signupFee": {
"amount": 25,
"currency": "USD"
},
"latePaymentFee": {
"amount": 0,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": null,
"maxNumberOfPayments": null,
"familyDiscounts": null,
"familyPricing": null
},
"duration": {
"type": "ongoing",
"timeLimitedOptions": null,
"enrollmentPeriodOptions": null
},
"access": {
"type": "session_limit",
"memberCapacity": null,
"limitOptions": {
"amount": 1,
"unit": "payment"
},
"allowedProgramIds": [
103
]
}
},
{
"id": 458,
"academyId": 999,
"name": "Two Sessions Per Week (Yearly Membership)",
"active": true,
"familyMembership": false,
"pricing": {
"type": "recurring",
"price": {
"amount": 899,
"currency": "USD"
},
"signupFee": {
"amount": 49.99,
"currency": "USD"
},
"latePaymentFee": {
"amount": 10,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": "P1Y",
"maxNumberOfPayments": null,
"familyDiscounts": null,
"familyPricing": null
},
"duration": {
"type": "time_limited",
"timeLimitedOptions": {
"membershipDuration": "P1Y",
"endOfMembershipAction": "cancel_membership",
"chargeSignupFeeOnRenewal": false
},
"enrollmentPeriodOptions": null
},
"access": {
"type": "session_limit",
"memberCapacity": null,
"limitOptions": {
"amount": 2,
"unit": "week"
},
"allowedProgramIds": [
101,
104
]
}
},
{
"id": 2000,
"academyId": 123,
"name": "Family Unlimited Membership",
"active": true,
"familyMembership": true,
"pricing": {
"type": "recurring",
"price": {
"amount": 99.99,
"currency": "USD"
},
"signupFee": {
"amount": 50,
"currency": "USD"
},
"latePaymentFee": {
"amount": 10,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": "P1M",
"maxNumberOfPayments": null,
"familyDiscounts": null,
"familyPricing": [
{
"memberCount": 2,
"price": {
"amount": 99.99,
"currency": "USD"
}
},
{
"memberCount": 3,
"price": {
"amount": 129.99,
"currency": "USD"
}
},
{
"memberCount": 4,
"price": {
"amount": 149.99,
"currency": "USD"
}
},
{
"memberCount": 5,
"price": {
"amount": 169.99,
"currency": "USD"
}
}
]
},
"duration": {
"type": "ongoing",
"timeLimitedOptions": null,
"enrollmentPeriodOptions": null
},
"access": {
"type": "unlimited",
"memberCapacity": null,
"limitOptions": null,
"allowedProgramIds": [
101,
102
]
}
},
{
"id": 2001,
"academyId": 123,
"name": "Individual Monthly - Family Discount Available",
"active": true,
"familyMembership": false,
"pricing": {
"type": "recurring",
"price": {
"amount": 149.99,
"currency": "USD"
},
"signupFee": {
"amount": 99.99,
"currency": "USD"
},
"latePaymentFee": {
"amount": 10,
"currency": "USD"
},
"earlyCancellationFee": {
"amount": 0,
"currency": "USD"
},
"frequency": "P1M",
"maxNumberOfPayments": null,
"familyDiscounts": [
{
"memberOrdinal": 2,
"discountType": "percentage",
"discountAmount": 10
},
{
"memberOrdinal": 3,
"discountType": "percentage",
"discountAmount": 15
},
{
"memberOrdinal": 4,
"discountType": "percentage",
"discountAmount": 20
}
],
"familyPricing": null
},
"duration": {
"type": "ongoing",
"timeLimitedOptions": null,
"enrollmentPeriodOptions": null
},
"access": {
"type": "unlimited",
"memberCapacity": null,
"limitOptions": null,
"allowedProgramIds": [
101,
102,
103
]
}
}
],
"related": {
"programs": [
{
"id": 101,
"name": "Brazilian Jiu Jitsu"
},
{
"id": 102,
"name": "Muay Thai"
},
{
"id": 103,
"name": "Wrestling"
},
{
"id": 104,
"name": "Judo"
}
]
},
"meta": {
"currentPage": 1,
"from": 1,
"lastPage": 1,
"perPage": 100,
"to": 5,
"total": 5
},
"links": {
"first": "https://api.gymdesk.com/v1/memberships?page=1&perPage=100",
"last": "https://api.gymdesk.com/v1/memberships?page=1&perPage=100",
"prev": null,
"next": null
}
}{
"message": "Unauthorized",
"correlationId": "01890c1a-9b2d-7c3e-8f12-3456789abcde"
}{
"message": "Resource not found",
"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"
}Authorizations
Query Parameters
Required range:
x >= 1Add related resources to the related property.
Available options:
program Sort by field. Prefix with '-' for descending order.
Available options:
name, -name Page number for pagination
Required range:
x >= 1Number of items per page
Required range:
1 <= x <= 100⌘I
