GET /users
Verifies that the given userId exists in Club OS and you have access to it.
GET https://api.club-os.com/users?clubLocationId=[clubLocationId]&userId=[userId]
Parameters
The following fields must be included as parameters in the URL of the request.
Variable | Type | Description |
---|---|---|
clubLocationId | Integer | The Club OS unique id for the club location you wish to access. Club OS will provide these to you. |
userId | Integer | The Club OS unique id for the user you are requesting. |
Response Message
The following message will be returned when the request succeeds.
Message | Description |
User was found | The user was found and you have access to them. |
POST /users
Add a user to the system.
POST https://api.club-os.com/users?clubLocationId=[clubLocationId]
Parameters
The following fields must be included as parameters in the URL of the request.
Variable | Type | Description |
---|---|---|
clubLocationId | Integer | The 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.
Property | Type | Required | Default | Description |
---|---|---|---|---|
role | String | Y | One of 'member', 'trainer', 'salesperson', 'manager', or 'frontdesk'. | |
fullAccount | Boolean | Y | false | 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 a Full account. |
sendEmail | Boolean | Y | false | If true, sends a welcome email to the member if they are created successfully and an email address was sent. |
trainerId | Integer | N | The Club OS unique id for the trainer of the user being added or updated. | |
salespersonId | Integer | N | The Club OS unique id for the salesperson of the user being added or updated (applies to members only). | |
templateUsername | String | N | The username of the template account that should be applied to the user (applies to members only). | |
localUserId | String | Y | Your systems unique id for the user. | |
firstName | String | Y | User first name. | |
lastName | String | N | User last name. | |
String | N | Email address of the user. This will also be the username for the Club OS account. If left blank, the user will not be able to login to Club OS. | ||
password | String | N | Password for the account. If left blank, one will be auto-generated. Only applies if email exists and is valid. | |
gender | String | Y | 'M' for male, 'F' for female. | |
birthDate | Date (M-d-YYYY) | N | User date of birth. | |
joinDate | Date (M-d-YYYY) | N | The date the User joined the club. | |
guestPassStart | Date (M-d-YYYY) | N | The start date of the user's guest pass. | |
guestPassEnd | Date (M-d-YYYY) | N | The end date of the users's guest pass. | |
homePhone | String | N | User home phone number. | |
workPhone | String | N | User work phone number. | |
mobilePhone | String | N | User mobile phone number. | |
address1 | String | N | User address line 1. | |
address2 | String | N | User address line 2. | |
city | String | N | User full city. | |
state | String | N | User 2 letter state code, i.e. PA for Pennsylvania. | |
zip | String | N | User zip code. |
Response Messages
One of the following messages will be returned when the request succeeds.
Message | Description |
Member Created | Member account successfully created. |
Member Found | Member account exists in the system already. |
Trainer Created | Trainer account was successfully created. |
Trainer Found | Trainer account exists in the system already. |
Salesperson Created | Salesperson account successfully created. |
Salesperson Found | Salesperson account exists in the system already. |
PUT /users
Update a users account type and deleted status. If the user has been previously deleted, they will be undeleted after a successful PUT request.
PUT https://api.club-os.com/users?clubLocationId=[clubLocationId]
Parameters
The following fields must be included as parameters in the URL of the request.
Variable | Type | Description |
---|---|---|
clubLocationId | Integer | The 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.
Property | Type | Required | Default | Description |
---|---|---|---|---|
userId | Integer | Y | The Club OS unique id for the member to update. | |
fullAccount | Boolean | Y | false | 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. This field only applies to member accounts. false - Make the member a Basic account. true - Make the member full account. |
guestPassStart | Date (M-d-YYYY) | N | The start date of the user's guest pass. Only saved if present, i.e. NULL or "" value will not update the record in Club OS. | |
guestPassEnd | Date (M-d-YYYY) | N | The end date of the users's guest pass. Only saved if present, i.e. NULL or "" value will not update the record in Club OS. |
Response Messages
One of the following messages will be returned when the request succeeds.
Message | Description |
<name> was made FULL | The account was made FULL. |
<name> was made BASIC | The account was made BASIC. |
DELETE /users
Delete a users account from Club OS.
DELETE https://api.club-os.com/users?clubLocationId=[clubLocationId]&userId=[userId]
Parameters
The following fields must be included as parameters in the URL of the request.
Variable | Type | Description |
---|---|---|
clubLocationId | Integer | The Club OS unique id for the club location you wish to access. Club OS will provide these to you. |
userId | Integer | The Club OS unique id for the user you are deleting. |
Response Messages
The following message will be returned when the request succeeds.
Message | Description |
<name> was deleted | The account was made deleted. |