Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

GET /memberships

Verifies that the given membershipId exists in Club OS and you have access to it.  

GET httphttps://api.club-os.com/memberships?clubLocationId=[clubLocationId]&membershipId=[membershipId]

Parameters

The following fields must be included as parameters in the URL of the request.

VariableTypeDescription
clubLocationIdIntegerThe Club OS unique id for the club location you wish to access. Club OS will provide these to you.
membershipIdIntegerThe Club OS unique id for the membership you are requesting.

POST /memberships

Add a user membership to the system.

POST httphttps://api.club-os.com/memberships?clubLocationId=[clubLocationId]

...

Parameters

The following fields must be included as parameters in the body URL of the HTTP request.

Default
PropertyVariableTypeRequiredDescription
roleclubLocationIdStringY One of 'member', 'trainer', 'salesperson'.
fullAccountBooleanYfalse

Club OS has 2 types of member accounts, Full and Basic. Full means they get access to both nutrition and/or workout features based on the club's service plan.

false - Make the member a Basic account.

true - Make the member full account.

trainerIdIntegerNIntegerThe Club OS unique id for the club location you wish to access. Club OS will provide these to you.
Request Body

The following fields must be included in the body of the HTTP request as a valid JSON string.  

Note:  If the membership being added belongs to a Club OS lead account and the status is true, then the lead will be converted to a member on a successful request.

...

PropertyTypeRequiredDefaultDescription
memberIdIntegerY The Club OS unique id for the trainer of the user being added or updatedmember who bought the membership.
salespersonIdIntegerN The Club OS unique id for the salesperson of the user being added or updated (applies to members only).
templateUsernameStringN The username of the template account that should be applied to the user (applies to members only).
localUserIdwho sold the membership. If null, the default sales support account will be used.
localMembershipIdStringY Your systems unique id for the usermembership.
firstNamestatusStringBooleanY User first name.
lastNameStringN User last name.
emailStringY Email address of the user.
genderStringY 'M' for male, 'F' for female.
birthdatefalse

true - the membership is active and the customer is caught up on payments.

false - the membership is inactive due to deliquent billing, membership cancellation, etc.

autoRenewBooleanYfalse

true - membership auto-renews.

false - membership does not auto-renew.

startDateDate (M-d-YYYY)Y The effective start date of the membership.
endDateDate (M-d-YYYY)N User The end date of birththe membership if one exists.
joinDatesaleDateDate (M-d-YYYY)NY The date the User joined the club.
homePhoneStringN User home phone number.
workPhoneStringN User work phone number.
mobilePhoneStringN User mobile phone number.
address1StringN User address line 1.
address2StringN User address line 2.
cityStringN User full city.
stateStringN User 2 letter state code, i.e. PA for Pennsylvania.
zipStringN User zip code.

PUT /users

Update a users account type

of the sale.
nameStringY The name of the membership, i.e. 'Gold', 'Silver', 'Platinum'
paidOnSaleDecimalY The amount paid on the saleDate, or the date the membership was purchased.
downPaymentNameStringC 

The name of the down payment, i.e. 'Initiation Fee', or 'First Month Fee'. Required if

the downPaymentSubtotal is included in the request.

downPaymentSubtotalDecimalC The amount of the down payment without taxes. Required if no recurPaymentSubtotal.
downPaymentTaxesDecimalN 

The amount of taxes on the down payment.

recurPaymentNameStringC 

The name of the recurring payment, i.e. 'Membership Dues'. Required if

recurPaymentSubtotal is included in the request.

recurPaymentSubtotalDecimalC The amount of the recurring payment without taxes. Required if no downPaymentSubtotal.
recurPaymentTaxesDecimalN The amount of taxes on the recurring payment.
recurTypeStringNmonthlyOne of 'monthly' or 'weekly'.
trainerIdIntegerN 

If the memberId is for a Club OS lead and the membership status is true,

this is the Club OS unique id for the trainer who will be assigned to the lead account.

templateUsernameStringN 

If the memberId is for a Club OS lead and the membership status is true,

this is the username of a Club OS template to be applied to the lead account.

sendEmailBooleanNfalse

If the memberId is for a Club OS lead and the membership status is true,

this will send a welcome email to the lead account.

usernameStringN 

The username of the new account (if lead converted). Default is to use email.

passwordStringN 

The password of the new account (if lead converted). Default will be auto-generated.

Response Messages

One of the following messages will be returned when the request succeeds.

MessageDescription
membership createdMembership successfully created.
membership created and lead convertedMembership successfully updated and lead converted to member.
membership existsMembership exists already, use PUT method instead.

PUT /memberships

Update a membership in the system.  

PUT https://api.club-os.com/usersmemberships?clubLocationId=[clubLocationId]

...

Parameters

The following fields must be included as parameters in the URL of the request.

VariableTypeDescription
clubLocationIdIntegerThe Club OS unique id for the club location you wish to access. Club OS will provide these to you.
Request Body

Any of the fields below may be included in the body of the HTTP request as a valid JSON string.  Only fields included in the request will be updated.  For example, if you only wanted to change the status of the membership, the JSON should be { membershipId: "clubOsMembershipId", status: "false"}.

PropertyTypeRequiredDefaultDescription
userIdmembershipIdIntegerY The Club OS unique id for the member to updatefullAccountBooleanYfalse

Club OS has 2 types of member accounts, Full and Basic. Full means they get access to both nutrition and/or workout features based on the club's service plan.

false - Make the member a Basic account.

true - Make the member full accountmembership to update.
salespersonIdIntegerN The Club OS unique id for the salesperson who sold the membership.
statusBooleanN 

true - the membership is active and the customer is caught up on payments.

false - the membership is inactive due to deliquent billing, membership cancellation, etc.

autoRenewBooleanN 

true - membership auto-renews.

false - membership does not auto-renew.

startDateDate (M-d-YYYY)N The effective start date of the membership.
endDateDate (M-d-YYYY)N The end date of the membership if one exists.
saleDateDate (M-d-YYYY)N The date of the sale.
nameStringN The name of the membership, i.e. 'Gold', 'Silver', 'Platinum'
paidOnSaleDecimalN The amount paid on the saleDate, or the date the membership was purchased.
downPaymentNameStringN The name of the down payment, i.e. 'Initiation Fee', or 'First Month Fee'
downPaymentSubtotalDecimalN The amount of the down payment without taxes.
downPaymentTaxesDecimalN 

The amount of taxes on the down payment.

recurPaymentNameStringN The name of the recurring payment, i.e. 'Membership Dues'.
recurPaymentSubtotalDecimalN The amount of the recurring payment without taxes.
recurPaymentTaxesDecimalN The amount of taxes on the recurring payment.
recurTypeStringNmonthlyOne of 'monthly' or 'weekly'.
Response Messages

One of the following messages will be returned when the request succeeds.

MessageDescription
membership updatedMembership successfully updated.
membership not foundMembership could not be found based on the given membershipId.