Get started
API BASE URL
The SGA API provides programmatic access to Sales data.
To use this API, you need a Client ID, Client Secret, Redirect Url, and Client Refresh token. Please contact SGA to get your client credentials.
Security warning:
Calls to this API should only be done with server side code. If an unauthorized user gets access to your Client ID, Client Secret, Redirect Url, and Client Refresh token, they would be able to access all methods exposed through this API.
Pulse User Permissions
A user must be set up in SGA which grants them access to Pulse information. The minimum permission needed is Sales - _Usage (Allow). If the API user does not have this permission no other information will be obtained, regardless of additional permissions. Further permissions needed are defined under each endpoint.
SGA Accounting User Permissions
A user must be set up in SGA which grants them access to SGA Accounting information. The minimum permission needed is General Ledger- _Usage (Allow). If the API user does not have this permission no other information will be obtained, regardless of additional permissions. Further permissions needed are defined under each endpoint.
Get access token for client credentials
# Curl example
curl \
-X POST {baseUrl}/Sales/API/Login/oauth2 \
-H 'Authorization: Bearer {refresh_token}' \
-F 'grant_type=client_credentials' \
-F 'client_id={client_id}' \
-F 'client_secret={client_secret}' \
-F 'redirect_uri={redirect_uri}'
Step 1: Get access token with POST request
To generate an access_token
for your client credentials you must make a POST request to the following URL:
/Sales/API/Login/oauth2
with the POST parameters of {refresh_token}, {client_id}, {client_secret}, and {redirect_uri} matching your client credentials.
Your {refresh_token} must be present in the header of the request as Authorization: Bearer {refresh_token}
Step 2: Use access token to access API
To make calls to the API, a valid access_token must be present in the header of the request as Authorization: Bearer {access_token}
Result example :
{
"access_token": "sdS3vboo8gHMShXfKGkR...",
"expires_in": "3600",
"token_type": "bearer"
}
POST PARAMETERS
Field | Type | Description |
---|---|---|
grant_type | String | Always 'client_credentials'. |
client_id | String | Your Client ID. |
client_secret | String | Your Client Secret. |
redirect_uri | String | Your Client Redirect Uri. |
RESPONSE
Field | Type | Description |
---|---|---|
access_token | String | The generated access token for your client credentials that can be used in the Authorization header for API requests. |
expires_in | Integer | The number of seconds the access token is valid for. Once the access token expires a new access token must be requested following the steps above. A response with a status of HTTP 500 will be returned from the API when an expired access token is used when attempting to access the API. |
token_type | String | Always 'bearer'. |
Get access token for user
# Login url example
/Sales/API/Login?client_id={client_id}&response_type=code&redirect_uri={redirect_uri}&response_mode=query&state={state}
# Curl example to exchange code for access token
curl \
-X POST {baseUrl}/Sales/API/Login/oauth2 \
-H 'Authorization: Bearer {refresh_token}' \
-F 'grant_type=authorization_code' \
-F 'client_id={client_id}' \
-F 'client_secret={client_secret}' \
-F 'code={code}' \
-F 'redirect_uri={redirect_uri}'
Step 1: Redirect user to login
To generate an access_token
for a user's credentials you must first redirect the user to the following URL:
/Sales/API/Login?client_id={client_id}&response_type=code&redirect_uri={redirect_uri}&response_mode=query&state={state}
with the query parameters of {client_id}, and {redirect_uri} matching your client credentials. And {state}
matching a randomly generated number to check when the user is redirected back to your site's redirect uri.
Step 2: Handle user redirect after login
After the user logins in on the above url, the user will be redirected back to your site via the {redirect_url} with the query parameters of code
and state
.
An example redirect URL may look like:
{redirect_uri}?code=FbVEOep9qOATWdn4K5u7xz8qOC&state=1234
Once the user has been redirect back to your site, first verify that the state
query parameter matches the state
parameter you sent to the /Sales/API/Login endpoint to prevent cross site request forgery attacks.
Step 3: Get access token for code
Then exchange the code
for an access token by making a POST request to the following URL:
/Sales/API/Login/oauth2
with the POST parameters of {client_id}, {client_secret}, {redirect_uri} matching your client credentials and code matching the code above.
Your {refresh_token} must be present in the header of the request as Authorization: Bearer {refresh_token}
Step 4: Use access token to access API
To make calls to the API, a valid access_token must be present in the header of the request as Authorization: Bearer {access_token}
Alternative password grant_type:
NOTE: Before using this option, you must consult with SGA Software first. This method requires pre-approval by SGA Software and any clients.
To generate an access_token
for a member without a redirect, a {grant_type} of 'password' can be used. This method of generating an access token only works with member accounts and requires the {Email} and {Password} POST parameters to be passed to the /Sales/API/Login/oauth2 end point.
You can exchange member information for an access token by making a POST request to the following URL:
/Sales/API/Login/oauth2
with the POST parameters of {grant_type}, {client_id}, {client_secret}, {redirect_uri}, {Email}, and {Password}. The optional POST parameter of {AccessID} can be used in place of {Email} to refer to the member associated with the passed {AccessID}.
WARNING: Member passwords should never be stored on your site.
Access token result example :
{
"access_token": "sdS3vboo8gHMShXfKGkR...",
"expires_in": "3600",
"token_type": "bearer",
"refresh_token": "85544545HM5ShXf54k1...",
"MemberID": 12345,
"FamilyID": 0
}
POST PARAMETERS
Field | Type | Description |
---|---|---|
grant_type | String | Always 'authorization_code' or 'password'. |
client_id | String | Your Client ID. |
client_secret | String | Your Client Secret. |
redirect_uri | String | Your Client Redirect Uri. |
code | String | The code obtained after the user logged in and was redirected back to your site with the code parameter in the query string. |
String | Member email. Required when the grant_type is 'password' | |
Password | String | Member password. Required when the grant_type is 'password' |
RESPONSE
Field | Type | Description |
---|---|---|
access_token | String | The generated access token for the user login that can be used in the Authorization header for API requests. |
expires_in | Integer | The number of seconds the access token is valid for. Once the access token expires a new access token must be requested by completing another post request to the /Sales/API/Login/oauth2 endpoint with the refresh_token and grant_type=refresh_token. A response with a status of HTTP 500 will be returned from the API when an expired access token is used when attempting to access the API. |
token_type | String | Always 'bearer'. |
refresh_token | String | The refresh token that can be used to generate a new access token for the user when the access token expires. |
MemberID | Integer | The Member ID that identifies the member associated with the access token. |
FamilyID | Integer | The Family ID that identifies the member associated with the access token. |
Search for members
Required Permission: Sales-Members(Modify)
# Example Search members URL
/Sales/API/Member?MemberType=I&DisplayStart=0&DisplayLength=100
To search members you must make a GET request to the following URL:
/Sales/API/Member
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing members.
The DisplayStart
and DisplayLength
parameters can be passed to indicate how many members to return
Result example :
[
{"MemberID":12345,
"FamilyID":0,
"MemberFamilyID":"12345-0",
"IsPrimary":true,
"ProfileID":null,
"Username":"12345",
"BranchID":500,
"MemberType":"I",
"Salutation":"",
"FirstName":"John",
"MiddleName":"",
"LastName":"Doe",
"Suffix":"",
"FullName":" John Doe",
"FamilyOrganizationName":"Doe Family",
"FirstLastName":"John Doe",
"FirstMiddleLastName":"John Doe",
"LastFirstName":"Doe, John",
"LastFirstMiddleName":"Doe, John",
"OrganizationName":"",
"DisplayName":"John Doe",
"Alias":"",
"HasAlias":false,
"OrganizationTypeID":0,
"Website":"",
"BirthDate":"1965-01-01T00:00:00",
"Age":55,
"Gender":"M",
"GenderName":"Male",
"PreferredAddressID":1,
"PreferredAddress":{"MemberID":12345,"AddressID":0,"AddressTypeID":"Home","Address1":"123 Example road","Address2":"","City":"Example city","State":"CA","Zip":"123456","ZipExt":null,"CountryID":"US","PositionName":"","OrganizationName":"","IsPreferred":false},
"HasPreferredAddress":true,
"PreferredPhoneID":1,
"PreferredPhone":{"MemberID":12345,"PhoneID":0,"PhoneTypeID":"Home","PhoneNumber":"555-555-5555","Extension":"","CountryID":"US","ReceiveTextAlerts":true,"PhoneWithExtension":"555-555-5555","IsPreferred":false},
"HasPreferredPhone":true,
"PreferredEmailID":1,
"PreferredEmail":{"MemberID":12345,"EmailID":0,"EmailTypeID":"Home","EmailAddress":"johndoe@gmail.com","IsPreferred":false},
"HasPreferredEmail":true,
"ActiveMembershipID":12345,
"Position":"",
"PositionName":null,
"Organization":null,
"OrganizationTypeName":null,
"ActiveMembership":{"RegistrationID":12345,"BranchName":"YMCA -Branch","ProductName":"Adult Membership (Ages 28-64)","StatusID":"A","BeginDate":"2018-05-12T00:00:00","EndDate":"9999-12-31T00:00:00","CancellationID":0,"MembershipClass":"I","MembershipLevel":"F","AllowAccess":true,"InCart":false,"BillingFrequency":null,"BillingFrequencyName":null,"RecurringHold":false,"RecurringHoldBeginDate":"0001-01-01T00:00:00","RecurringHoldEndDate":"0001-01-01T00:00:00","Url":"/Sales/MemberActivity?MemberID=12345","MemberID":12345,"FamilyID":0,"ActivityID":1111,"_Year":9999,"Year":9999,"_Period":99,"Period":99,"ActivityCode":"110-500-9999-99-1111-99","_ProductTypeID":110,"ProductTypeID":110,"_BranchID":500,"BranchID":500,"_ProductID":1111,"ProductID":1111,"_UnitID":99,"UnitID":99,"Modifiers":null},
"HasActiveMembership":true,
"JoinDate":"2017-02-11T00:00:00",
"AccessID":"123456",
"DenyAccess":true,
"DenyRecurringHold":false,
"HasFutureRecurringHold":false,
"DenySales":false,"Status":1,
"Deceased":false,
"Hide":false,
"AllowHide":false,
"HasImage":true,
"ModifyDate":"2019-12-01T12:55:27.007"
}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
MemberType | String | (optional) (I for individual or O for Organization) |
MemberID | Integer | (optional) Member identifier |
FamilyID | Integer | (optional) Family identifier |
AccessID | String | (optional) Member Access ID |
String | (optional) Member email | |
Address | String | (optional) Member Address |
FirstName | String | (optional) Member first name |
LastName | String | (optional) Member last name |
Alias | String | (optional) Member alias |
OrganizationName | String | (optional) Member Organization Name |
Gender | String | (optional) M=Male F=Female |
PhoneNumber | String | (optional) Member phone number |
BirthDate | String | (optional) Valid date String representing member birth date |
Age | Integer | (optional) Member age |
Hide | Integer | (optional) 1=Show only active and active override no status, 2=Only hidden, 3=All |
BranchID | Integer | (optional) Member branch ID |
PrimaryMemberOnly | boolean | (optional) Whether to only return primary members |
MembershipStatus | Integer | (optional) 0=All, 1=Active, 2=Inactive. The default is All. |
DisplayLength | Integer | (optional) Number of members to return. The default is 100 |
DisplayStart | Integer | (optional) Number of members to skip before returning members |
SortColumn | String | (optional) Valid column values are "MemberID", "LastFirstName", "BirthDate", "Age", "Gender", "Address1", "PhoneNumber", "EmailAddress", "AccessStatus", "Alias", "OrganizationName", "OrganizationTypeName", "Status", "Position" |
SortDirection | String | (optional) asc for ascending or desc for descending. |
ModifiedOnOrAfter | Date | If specified, only members modified on or after the passed date will be returned. |
LoadActiveMembershipModifiers | boolean | (optional) Whether to load the modifiers JSON array property on the ActiveMembership JSON object property. If true, an array of modifier objects will be loaded into the Modifiers property on the ActiveMembership property. Each Modifier object, will have the properties of ModifierID, Name, BeginDate, EndDate, ExpirationFrequency, ExpirationFrequencyUnit, ModifierCategoryID, and ModifierCategory. |
RESPONSE
Field | Type | Description |
---|---|---|
MemberID | Integer | Member Identifier |
FamilyID | Integer | Family Identifier |
IsPrimary | Boolean | Whether member is the primary member of the family |
Username | String | Member username |
BranchID | Integer | Member branchID |
MemberType | String | I=Individual, O=Organization |
Salutation | String | Member salutation |
FirstName | String | Member first name |
MiddleName | String | Member Middle Name |
LastName | String | Member last name |
Suffix | String | Member name suffix |
FamilyOrganizationName | String | Member family organization name |
OrganizationName | String | Member organziation name |
Alias | String | Member Alias |
HasAlias | Boolean | Whether member has an alias |
Website | String | Member Website |
BirthDate | date | Member birth date |
Age | Integer | Member age |
Gender | String | M=Male F=Female |
PreferredAddress | Object | Object representing member's preferred address. |
PreferredPhone | Object | Object representing the member's preferred phone. |
PreferredEmail | Object | Object reprsenting the member's preferred email. |
Position | String | Member position |
JoinDate | date | Member join date |
Status | Integer | Hide=0, Active=1, ActiveOverride=2 |
Deceased | Boolean | |
ActiveMembership | Object | Object representing member's active membership. |
HasActiveMembership | Boolean | Whether user has active membership |
AccessID | String | Member Access ID (barcode). |
Get member details
Required Permission: Sales-Members(Allow)
# Example get details for single member URL
/Sales/API/Member/12345-0
To get details for a single primary member you must make a GET request to the following URL:
/Sales/API/Member/{MemberID}
To get member details for a Member ID and Family ID you must make a GET request to the following URL:
/Sales/API/Member/{MemberFamilyID}
{MemberID} or {MemberFamilyID} are required URL route parameters. {MemberFamilyID} represents the MemberID-FamilyID combination for a single member. When just {MemberID} is used, the primary member of a family will be gotten.
If the request is successful, a HTTP 200
response will be returned with a JSON object representing the member.
Result example :
{
Member:{"MemberID":12345,
"FamilyID":0,
"MemberFamilyID":"12345-0",
"IsPrimary":true,
"ProfileID":null,
"Username":"12345",
"BranchID":500,
"MemberType":"I",
"Salutation":"",
"FirstName":"John",
"MiddleName":"",
"LastName":"Doe",
"Suffix":"",
"FullName":" John Doe",
"FamilyOrganizationName":"Doe Family",
"FirstLastName":"John Doe",
"FirstMiddleLastName":"John Doe",
"LastFirstName":"Doe, John",
"LastFirstMiddleName":"Doe, John",
"OrganizationName":"",
"DisplayName":"John Doe",
"Alias":"",
"HasAlias":false,
"OrganizationTypeID":0,
"Website":"",
"BirthDate":"1965-01-01T00:00:00",
"Age":55,
"Gender":"M",
"GenderName":"Male",
"PreferredAddressID":1,
"PreferredAddress":{"MemberID":12345,"AddressID":0,"AddressTypeID":"Home","Address1":"123 Example road","Address2":"","City":"Example city","State":"CA","Zip":"123456","ZipExt":null,"CountryID":"US","PositionName":"","OrganizationName":"","IsPreferred":false},
"HasPreferredAddress":true,
"PreferredPhoneID":1,
"PreferredPhone":{"MemberID":12345,"PhoneID":0,"PhoneTypeID":"Home","PhoneNumber":"555-555-5555","Extension":"","CountryID":"US","ReceiveTextAlerts":true,"PhoneWithExtension":"555-555-5555","IsPreferred":false},
"HasPreferredPhone":true,
"PreferredEmailID":1,
"PreferredEmail":{"MemberID":12345,"EmailID":0,"EmailTypeID":"Home","EmailAddress":"johndoe@gmail.com","IsPreferred":false},
"HasPreferredEmail":true,
"ActiveMembershipID":12345,
"Position":"",
"PositionName":null,
"Organization":null,
"OrganizationTypeName":null,
"ActiveMembership":{"RegistrationID":12345,"BranchName":"YMCA -Branch","ProductName":"Adult Membership (Ages 28-64)","StatusID":"A","BeginDate":"2018-05-12T00:00:00","EndDate":"9999-12-31T00:00:00","CancellationID":0,"MembershipClass":"I","MembershipLevel":"F","AllowAccess":true,"InCart":false,"BillingFrequency":null,"BillingFrequencyName":null,"RecurringHold":false,"RecurringHoldBeginDate":"0001-01-01T00:00:00","RecurringHoldEndDate":"0001-01-01T00:00:00","Url":"/Sales/MemberActivity?MemberID=12345","MemberID":12345,"FamilyID":0,"ActivityID":1111,"_Year":9999,"Year":9999,"_Period":99,"Period":99,"ActivityCode":"110-500-9999-99-1111-99","_ProductTypeID":110,"ProductTypeID":110,"_BranchID":500,"BranchID":500,"_ProductID":1111,"ProductID":1111,"_UnitID":99,"UnitID":99,"Modifiers":null},
"HasActiveMembership":true,
"JoinDate":"2017-02-11T00:00:00",
"AccessID":"123456",
"DenyAccess":true,
"DenyRecurringHold":false,
"HasFutureRecurringHold":false,
"DenySales":false,"Status":1,
"Deceased":false,
"Hide":false,
"AllowHide":false,
"HasImage":true,
"ModifyDate":"2019-12-01T12:55:27.007"
}
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
FamilyID | Integer | (optional) Family Identifier |
IncludeImage | Boolean | (optional) If true(1), then the Base 64 string of the Member's image will be added to the response as the ImageBase64 property. |
LoadActiveMembershipModifiers | boolean | (optional) Whether to load the modifiers JSON array property on the ActiveMembership JSON object property. If true, an array of modifier objects will be loaded into the Modifiers property on the ActiveMembership property. Each Modifier object, will have the properties of ModifierID, Name, BeginDate, EndDate, ExpirationFrequency, ExpirationFrequencyUnit, ModifierCategoryID, and ModifierCategory. |
RESPONSE
Field | Type | Description |
---|---|---|
MemberID | Integer | Member Identifier |
FamilyID | Integer | Family Identifier |
IsPrimary | Boolean | Whether member is the primary member of the family |
Username | String | Member username |
BranchID | Integer | Member branchID |
MemberType | String | I=Individual, O=Organization |
Salutation | String | Member salutation |
FirstName | String | Member first name |
MiddleName | String | Member Middle Name |
LastName | String | Member last name |
Suffix | String | Member name suffix |
FamilyOrganizationName | String | Member family organization name |
OrganizationName | String | Member organziation name |
Alias | String | Member Alias |
HasAlias | Boolean | Whether member has an alias |
Website | String | Member Website |
BirthDate | date | Member birth date |
Age | Integer | Member age |
Gender | String | M=Male F=Female |
PreferredAddress | Object | Object representing member's preferred address. |
PreferredPhone | Object | Object representing the member's preferred phone. |
PreferredEmail | Object | Object representing the member's preferred email. |
Position | String | Member position |
JoinDate | date | Member join date |
Status | Integer | Hide=0, Active=1, ActiveOverride=2 |
Deceased | Boolean | |
ActiveMembership | Object | Object representing member's active membership. |
HasActiveMembership | Boolean | Whether user has active membership |
AccessID | String | Member Access ID (barcode). |
Get current member details
Required Permission: Sales-Members(Allow)
# Example get details for the single member associated with an access_token URL
/Sales/API/Member/Current
To get details for a single member associated with the current access_token you must make a GET request to the following URL:
/Sales/API/Member/Current
This end point does not require any query parameters. Instead, it gets the member associated with the current access_token that was gotten from a member login.
If the request is successful, a HTTP 200
response will be returned with a JSON object representing the member.
Result example :
{
Member:{"MemberID":12345,
"FamilyID":0,
"MemberFamilyID":"12345-0",
"IsPrimary":true,
"ProfileID":null,
"Username":"12345",
"BranchID":500,
"MemberType":"I",
"Salutation":"",
"FirstName":"John",
"MiddleName":"",
"LastName":"Doe",
"Suffix":"",
"FullName":" John Doe",
"FamilyOrganizationName":"Doe Family",
"FirstLastName":"John Doe",
"FirstMiddleLastName":"John Doe",
"LastFirstName":"Doe, John",
"LastFirstMiddleName":"Doe, John",
"OrganizationName":"",
"DisplayName":"John Doe",
"Alias":"",
"HasAlias":false,
"OrganizationTypeID":0,
"Website":"",
"BirthDate":"1965-01-01T00:00:00",
"Age":55,
"Gender":"M",
"GenderName":"Male",
"PreferredAddressID":1,
"PreferredAddress":{"MemberID":12345,"AddressID":0,"AddressTypeID":"Home","Address1":"123 Example road","Address2":"","City":"Example city","State":"CA","Zip":"123456","ZipExt":null,"CountryID":"US","PositionName":"","OrganizationName":"","IsPreferred":false},
"HasPreferredAddress":true,
"PreferredPhoneID":1,
"PreferredPhone":{"MemberID":12345,"PhoneID":0,"PhoneTypeID":"Home","PhoneNumber":"555-555-5555","Extension":"","CountryID":"US","ReceiveTextAlerts":true,"PhoneWithExtension":"555-555-5555","IsPreferred":false},
"HasPreferredPhone":true,
"PreferredEmailID":1,
"PreferredEmail":{"MemberID":12345,"EmailID":0,"EmailTypeID":"Home","EmailAddress":"johndoe@gmail.com","IsPreferred":false},
"HasPreferredEmail":true,
"ActiveMembershipID":12345,
"Position":"",
"PositionName":null,
"Organization":null,
"OrganizationTypeName":null,
"ActiveMembership":{"RegistrationID":12345,"BranchName":"YMCA -Branch","ProductName":"Adult Membership (Ages 28-64)","StatusID":"A","BeginDate":"2018-05-12T00:00:00","EndDate":"9999-12-31T00:00:00","CancellationID":0,"MembershipClass":"I","MembershipLevel":"F","AllowAccess":true,"InCart":false,"BillingFrequency":null,"BillingFrequencyName":null,"RecurringHold":false,"RecurringHoldBeginDate":"0001-01-01T00:00:00","RecurringHoldEndDate":"0001-01-01T00:00:00","Url":"/Sales/MemberActivity?MemberID=12345","MemberID":12345,"FamilyID":0,"ActivityID":1111,"_Year":9999,"Year":9999,"_Period":99,"Period":99,"ActivityCode":"110-500-9999-99-1111-99","_ProductTypeID":110,"ProductTypeID":110,"_BranchID":500,"BranchID":500,"_ProductID":1111,"ProductID":1111,"_UnitID":99,"UnitID":99,"Modifiers":null},
"HasActiveMembership":true,
"JoinDate":"2017-02-11T00:00:00",
"AccessID":"123456",
"DenyAccess":true,
"DenyRecurringHold":false,
"HasFutureRecurringHold":false,
"DenySales":false,"Status":1,
"Deceased":false,
"Hide":false,
"AllowHide":false,
"HasImage":true,
"ModifyDate":"2019-12-01T12:55:27.007"
}
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
IncludeImage | Boolean | (optional) If true(1), then the Base 64 string of the Member's image will be added to the response as the ImageBase64 property. |
LoadActiveMembershipModifiers | boolean | (optional) Whether to load the modifiers JSON array property on the ActiveMembership JSON object property. If true, an array of modifier objects will be loaded into the Modifiers property on the ActiveMembership property. Each Modifier object, will have the properties of ModifierID, Name, BeginDate, EndDate, ExpirationFrequency, ExpirationFrequencyUnit, ModifierCategoryID, and ModifierCategory. |
RESPONSE
Field | Type | Description |
---|---|---|
MemberID | Integer | Member Identifier |
FamilyID | Integer | Family Identifier |
IsPrimary | Boolean | Whether member is the primary member of the family |
Username | String | Member username |
BranchID | Integer | Member branchID |
MemberType | String | I=Individual, O=Organization |
Salutation | String | Member salutation |
FirstName | String | Member first name |
MiddleName | String | Member Middle Name |
LastName | String | Member last name |
Suffix | String | Member name suffix |
FamilyOrganizationName | String | Member family organization name |
OrganizationName | String | Member organziation name |
Alias | String | Member Alias |
HasAlias | Boolean | Whether member has an alias |
Website | String | Member Website |
BirthDate | date | Member birth date |
Age | Integer | Member age |
Gender | String | M=Male F=Female |
PreferredAddress | Object | Object representing member's preferred address. |
PreferredPhone | Object | Object representing the member's preferred phone. |
PreferredEmail | Object | Object representing the member's preferred email. |
Position | String | Member position |
JoinDate | date | Member join date |
Status | Integer | Hide=0, Active=1, ActiveOverride=2 |
Deceased | Boolean | |
ActiveMembership | Object | Object representing member's active membership. |
HasActiveMembership | Boolean | Whether user has active membership |
AccessID | String | Member Access ID (barcode). |
Get member registrations
Required Permission: Sales-Members(Allow), Sales-Activities(Allow)
# Example get registrations for a member url
/Sales/API/Member/Registrations?MemberID=12345
To get registrations for a member you must make a GET request to the following URL:
/Sales/API/Member/Registrations
{MemberID} is a required query string parameter if the {ForCurrentMember} query string parameter is false (0). If the {ForCurrentMember} query string parameter is true (1), then registrations will be shown for the member associated with the current access_token.
If the request is successful, a HTTP 200
response will be returned with a JSON object with a property called 'registrations' containing a JSON array of registrations and a property called 'total' containing the total number of registrations.
Result example :
{
"total":1,
"registrations":[
{"MemberID":12345,
"FamilyID":0,
"FirstName":"John",
"MiddleName":"P",
"LastName":"Doe",
"BirthDate":"1985-01-01T00:00:00",
"Age":35,
"Gender":"M",
"PreferredAddress":{"MemberID":12345,
"AddressID":0,
"AddressTypeID":"Home",
"Address1":"123 Street",
"Address2":"",
"City":"Akron City",
"State":"AK",
"Zip":"124",
"ZipExt":null,
"CountryID":"US"
}
"PreferredPhone":{"MemberID":12345,
"PhoneID":0,
"PhoneTypeID":"Home",
"PhoneNumber":"555-555-5555",
"Extension":"",
"CountryID":"US",
"ReceiveTextAlerts":true,
"PhoneWithExtension":"555-555-5555"
},
"PreferredEmail":{"MemberID":12345,
"EmailID":0,
"EmailTypeID":"Home",
"EmailAddress":"johndoe@test.com"
},
"ProductName":"Adult Membership (Ages 28-64)",
"Dates":"08/27/2019 - 12/31/9999",
"Days":"Sun to Sat",
"ProductTypeID":110,
"ProductTypeDescription":"110: Membership",
"BranchID":100,
"BranchName":"Branch YMCA",
"ActivityCode":"110-100-9999-99-123456-99",
"AccessStatus":"Deny",
"Status":"Active",
"CancellationReason":null,
"RegistrationID":123456}
]}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
MemberID | Integer | (required) Member Identifier |
FamilyID | Integer | (optional) Family Identifier |
ForCurrentMember | Boolean | (optional) If true (1), then registrations will be gotten for the member associated with the current access_token. |
MemberStatus | Integer | (optional) Member Status (0 = Hide, 1 = Active, 2 = Active (Override)) |
PriceFrequency | String | (optional) Price Frequency of registration("F" = One Time, "W" = Weekly, "2W" = Every 2 Weeks, "M" = Monthly, "Q" = Quarterly, "BA" = Biannually, "A" = Annually) |
StatusID | String | (optional) Activity Status ("A" = Active, "C" = Cancelled, "W" = Wait List) |
BeginDate | Date | (optional) Registration begin date |
EndDate | Date | (optional) Registration end date |
DateRange | String | (optional) String representing registration date range("CUSTOM" = Custom date range, "ALL" = All, "30" = Last 30 Days, "60" = Last 60 Days, "90" = Last 90 Days, "TY" = This Year, "LY" = Last Year) |
ProductTypeID | Integer | (optional) Product Type ID associated with offering |
OnlyWithBalance | Boolean | (optional) Only include activities with a balance |
ThirdPartyMemberID | Integer | (optional) Member ID of third party |
FromProductID | Integer | (optional) From Product ID range |
ToProductID | Integer | (optional) To Product ID range |
FromUnitID | Integer | (optional) From Unit ID range |
ToUnitID | Integer | (optional) To Unit ID range |
DisplayLength | Integer | (optional) Number of registrations to return default is 100 |
DisplayStart | Integer | (optional) Number of registrations to skip before returning registrations default is 0 |
ModifiedOnOrAfter | Date | If specified, only member registrations modified on or after the passed date will be returned. |
RESPONSE
Field | Type | Description |
---|---|---|
MemberID | Integer | Member Identifier |
FamilyID | Integer | Family Identifier |
FirstName | String | Member first name |
MiddleName | String | Member Middle Name |
LastName | String | Member last name |
BirthDate | Date | Member birth date |
Age | Integer | Member age |
Gender | String | M=Male, F=Female |
PreferredAddress | Object | JSON Object representing member's preferred address. |
PreferredPhone | Object | JSON Object representing member's preferred phone. |
PreferredEmail | Object | JSON Object representing member's preferred email. |
ProductName | String | Product Name |
Dates | String | Date range member is registered for |
Days | String | Days range member is registered for |
ProductTypeID | Integer | Product Type Identifier |
ProductTypeDescription | String | Product Type Description |
ActivityCode | String | Activity Code |
AccessStatus | String | Allow or Deny |
Status | String | Active, Waiting (Some Days), Waiting, Cancelled, or Renewed |
CancellationReason | String | Reason for cancellation |
RegistrationID | Integer | Registration Identifier |
Check in member
Required Permission: Sales-Members(Allow), Member Check In(Allow)
# Example check a member into an access point url:
/Sales/API/Member/CheckIn?AccessPointID=18&MemberFamilyID=67314-0
To check a member into an access point you must make a GET request to the following URL:
/Sales/API/Member/CheckIn
{AccessPointID} is a required query string parameter. {MemberFamilyID} is a required query string parameter if {AccessID} is not passed.
If the request is successful, a HTTP 200
response will be returned with a JSON object with properties indicating if a member check in at a specified access point was successful.
Result example :
{
"IsGranted":true,
"Errors": []}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
MemberFamilyID | String | (optional) Member Family Identifier in form (MemberID-FamilyID) |
AccessID | String | (optional) Access Identifier. Required if MemberFamilyID is not specified |
AccessPointID | Integer | (required) Access Point Identifier |
RESPONSE
Field | Type | Description |
---|---|---|
IsGranted | Boolean | True if the check in was successful and access is granted |
Errors | JSON array | JSON array of string error messages indicating why an access was not granted if IsGranted is false. |
Write to access log
Required Permission: Sales-Members(Allow), Member Check In(Allow)
# Example CURL to manually write to member access log
curl \
-X POST {baseUrl}/Sales/API/Member/WriteToAccessLog \
-H 'Authorization: Bearer {access_token}' \
-d 'AccessID=123456&AccessPointID=18&CheckInDateTime=01/15/2021 12:05 PM'
To manually write to the member access log you must make a POST request to the following URL:
/Sales/API/Member/WriteToAccessLog
This endpoint will write to the access log but will not validate the access. It is used to allow outside sources to write to the check in log and assumes the check in was already validated and successful.
If the request is successful, a HTTP 200
response will be returned with a JSON object with a boolean property called 'Success'.
Result example :
{"Success":true}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
MemberFamilyID | String | (optional) Member Family Identifier in form (MemberID-FamilyID) |
AccessID | String | (optional) Access Identifier. Required if MemberFamilyID is not specified |
AccessPointID | Integer | (required) Access Point Identifier |
CheckInDateTime | DateTime | (required) Date time of the check in in format M/dd/yyyy hh:mm tt. The time is assumed to be in the local time zone. |
Status | String | (optional) Access Status. (A=Allowed, D=Denied) |
MessageID | Integer | (optional) Access MessageID. |
RESPONSE
Field | Type | Description |
---|---|---|
Success | Boolean | True if the access log entry was written successfully. |
Search member access
Required Permission: Sales-Members(Allow), Member Check In(Allow)
# Example search member access url:
/Sales/API/Member/SearchMemberAccess?BeginDate=08/01/2022&EndDate=08/20/2022&AccessPointID=1&MemberID=12345
To search member access(check ins/scans) for a particiular branch, access point, date range, and member, you must make a GET request to the following URL:
/Sales/API/Member/SearchMemberAccess
Each object in the JSON list returned contains properties for MemberID, FamilyID, MemberName, Gender, Age, AccessBranchID, AccessPointID, Day, Date, Time, Status, Message, ScannedByUser, AccessID, and Membership.
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects with properties defining member access.
Result example :
[{"MemberID": 12345,
"FamilyID": 0,
"MemberName": "John Doe",
"Gender": "M",
"Age": 21,
"AccessBranchID": 10,
"AccessPointID": 1,
"Day": "Tue",
"Date": "Aug 9 2022",
"Time": "3:57 PM",
"CheckedInDateTime":"2021-04-02T16:49:57Z",
"Status": "Allow",
"Message": "Welcome",
"ScannedByUser": "SGA",
"AccessID": "123456",
"Membership": "Two Adult Family"}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
BeginDate | Date | (required) Date to start searching for |
EndDate | Date | (required) Date to end searching for |
AccessPointID | Integer | (optional) Access point ID to search for |
AccessBranchID | Integer | (optional) Access branch ID to search for |
MemberID | Integer | (optional) Member ID to search for |
FamilyID | Integer | (optional) Family ID to search for |
Status | String | (optional) Status to search for (A=Allow, D=Deny, O=Override) |
IncludeDeleted | Boolean | (optional) If true, then deleted access records will be included |
RESPONSE
Field | Type | Description |
---|---|---|
MemberID | Integer | Member Identifier |
FamilyID | Integer | Family Identifier |
AccessID | String | Access Identifier |
MemberName | String | Member name |
Gender | String | Member gender |
Age | String | Member age |
AccessBranchID | Integer | Branch Identifier |
AccessPointID | Integer | Access Point Identifier |
Day | String | Acesss day of week |
Date | String | Access Date |
Time | String | Access Time |
CheckedInDateTime | String | Access Date Time in UTC Format |
Message | String | Access Message |
ScannedByUser | String | Access Scanned by User |
Membership | String | Member Membership |
Deleted | Boolean | True if the access has been deleted |
Get members allowed access
Required Permission: Sales-Members(Allow), Member Check In(Allow)
# Example get members allowed access url:
/Sales/API/Member/MembersAllowedAccess
To get a list defining members and what access points they can access you must make a GET request to the following URL:
/Sales/API/Member/MembersAllowedAccess
Each object in the JSON list returned contains properties for MemberID, FamilyID, AccessID, AccessPointID, and AccessBranchID to indicate if the member is allowed to access the AccessPointID and has an active registration. Every member that matches the product ranges is returned. This endpoint checks all access point requirements and all access points that match the FromAccessPointID and ToAccessPointID parameters. This will take a long time to return, especially if the parameters are left wide open.
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects with properties indicating the members allowed access. Only members allowed access will be contained in the JSON array.
Result example :
[{"MemberID": 12345,
"FamilyID": 0,
"AccessID": "1511254",
"AccessPointID":1,
"AccessBranchID": 10},
{"MemberID": 55445,
"FamilyID": 0,
"AccessID": "5252255",
"AccessPointID":1,
"AccessBranchID": 11}]
Result example when GroupByMember :
[{"MemberID":12345,"FamilyID":0,
"AccessID":"1511254","AccessPointIDs":[6,3,1,13,4,8,5,11,2]},
{"MemberID":55445,"FamilyID":0,
"AccessID":"5252255","AccessPointIDs":[8,5,11,3,6,1,4,13,2]}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
AccessBranchID | Integer | (optional) Branch Identifier to check access for |
ProductTypeID | Integer | (optional) Product Type Identifier to check access for |
ProductID | Integer | (optional) Product Identifier to check access for |
AccessID | String | (optional) Specific Access Identifier to check and return results for |
IncludeFamily | Boolean | (optional) If IncludeFamily = 1, then all members attached to the registration will be included. Otherwise, only the member that holds the registration will be included. |
FromAccessPointID | Integer | (optional) From Access Point Identifier to check access for |
ToAccessPointID | Integer | (optional) To Access Point Identifier to check access for |
AccessPointIDs | String | (optional) Specific Access Point Identifiers to check and return results for separated by commas (ex: 1,3,5) |
GroupByMember | Boolean | (optional) If GroupByMember = 1, then records will be returned grouped by Member-Family ID. Each JSON object in the array will have properties for MemberID, FamilyID, AccessID, and AccessPointIDs where AccessPointIDs is an array of access point IDs the member can access. |
FormID | Integer | (optional) Form ID to return a form value for. Must be passed with ColumnID |
ColumnID | Integer | (optional) Column ID to return a form value for. If passed with FormID, a new FormValue property will return with each JSON row mapping to the form column value for that current member. |
RESPONSE
Field | Type | Description |
---|---|---|
MemberID | Integer | Member Identifier |
FamilyID | Integer | Family Identifier |
AccessID | String | Access Identifier |
AccessPointID | Integer | Access Point Identifier |
AccessBranchID | Integer | Access Branch Identifier |
Get members allowed access alternate
Required Permission: Sales-Members(Allow), Member Check In(Allow)
# Example get members allowed access alternate url:
/Sales/API/Member/MemberAlternateAccess
To get a list defining members that have access to a specific product you must make a GET request to the following URL:
/Sales/API/Member/MemberAlternateAccess
Each object in the JSON list returned contains properties for MemberID, FamilyID, AccessID, and AccessBranchID to indicate if the member is allowed to access the AccessBranchID and has an active registration. Every member that matches the product ranges is returned.
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects with properties indicating the members allowed access. Only members allowed access will be contained in the JSON array.
Result example :
[{"MemberID": 12345,
"FamilyID": 0,
"AccessID": "1511254",
"AccessBranchID": 10},
{"MemberID": 55445,
"FamilyID": 0,
"AccessID": "5252255",
"AccessBranchID": 11}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
AccessBranchID | Integer | (optional) Branch Identifier to check access for |
ProductTypeID | Integer | (optional) Product Type Identifier to check access for |
ProductID | Integer | (optional) Product Identifier to check access for |
AccessID | String | (optional) Specific Access Identifier to check and return results for |
IncludeFamily | Boolean | (optional) If IncludeFamily = 1, then all members attached to the registration will be included. Otherwise, only the member that holds the registration will be included. |
FormID | Integer | (optional) Form ID to return a form value for. Must be passed with ColumnID |
ColumnID | Integer | (optional) Column ID to return a form value for. If passed with FormID, a new FormValue property will return with each JSON row mapping to the form column value for that current member. |
RESPONSE
Field | Type | Description |
---|---|---|
MemberID | Integer | Member Identifier |
FamilyID | Integer | Family Identifier |
AccessID | String | Access Identifier |
AccessBranchID | Integer | Access Branch Identifier |
Get member image
Required Permission: Sales-Members(Allow)
# Example get member image url:
/Sales/API/Member/GetMemberImage?MemberID=1234&FamilyID=0&ModifiedOnOrAfter=01/15/2021 12:05 PM
To get a binary response representing the member's image you must make a GET request to the following URL:
/Sales/API/Member/GetMemberImage
The MemberID and FamilyID query string parameters are required.
If the request is successful, a HTTP 200
response will be returned with a binary response representing the member's image.
Result example :
{Binary Image}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
MemberID | Integer | (Required) Member Identifier |
FamilyID | Integer | (Required) Family Identifier |
ModifiedOnOrAfter | DateTime | (Optional) Modified on or after date time in format M/dd/yyyy hh:mm tt. The time is assumed to be in the local time zone. If no image is found modified on or after the passed value, a blank binary image response with a Content-Length of 0 will be returned. |
RESPONSE
Field | Type | Description |
---|---|---|
Binary file | Binary | Binary image file |
Update Nationwide Membership Person ID
Required Permission: Sales-Members(Allow)
# Example CURL to update Nationwide Membership Person ID
curl \
-X PUT {baseUrl}/Sales/API/Member/UpdateMemberPersonID \
-H 'Authorization: Bearer {access_token}' \
-d 'MemberPersonIdList=[{
"PersonId":32522,
"YUSABranchID":"98",
"LocalMemberID":"1441978-0",
"MemberFirstName":"Scott",
"MemberLastName":"Armstrong",
"MemberJoinDateOriginal":"32095",
"MemberJoinDateCurrent":"",
"MemberCreatedDateUtc":"",
"MemberLastUpdatedDateUtc":""
}]'
To update the Nationwide Membership Person ID for a member you must make a PUT request to the following URL:
/Sales/API/Member/UpdateMemberPersonID
This endpoint will update the local member associated with the LocalMemberID and set the PersonID field to the passed PersonId JSON property.
If the request is successful, a HTTP 200
response will be returned with a JSON object with a boolean property called 'HasErrors', integer property called 'NbrOfMembersUpdated', and string array property called 'ErrorMessages'.
Result example :
{"HasErrors":false, "NbrOfMembersUpdated": 1, "ErrorMessages": []}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
MemberPersonIdList | JSON Array | (required) JSON array of objects representing members to update and their Person IDs. |
RESPONSE
Field | Type | Description |
---|---|---|
HasErrors | Boolean | True if errors occurred. |
NbrOfMembersUpdated | Integer | The number of members updated successfully. |
ErrorMessages | String Array | Any errors that occurred during the update. |
Recover member password
# Example CURL to send recover password email
curl \
-X POST {baseUrl}/Sales/API/Member/RecoverPassword \
-H 'Authorization: Bearer {access_token}' \
-d 'Email=johndoe@gmail.com'
To get send a recover password email to a member you must make a POST request to the following URL:
/Sales/API/Member/RecoverPassword
{Email} is a required query string parameter. The email must match a member in the system for the email to send successfully.
If the request is successful, a HTTP 200
response will be returned with a JSON object with a boolean property called 'success'.
Result example :
{"success":true}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
String | (required) Member email. Must match a member in the system. |
RESPONSE
Field | Type | Description |
---|---|---|
success | Boolean | True if password recover email was sent successfully. |
Change member password
# Example CURL to change a member password
curl \
-X POST {baseUrl}/Sales/API/Member/ChangePassword \
-H 'Authorization: Bearer {access_token}' \
-d 'client_id={client_id}&client_secret={client_secret}&Email=johndoe@gmail.com&OldPassword=123&NewPassword=12345&ConfirmNewPassword=12345'
To get change a member's password you must make a POST request to the following URL:
/Sales/API/Member/ChangePassword
{client_id}, {client_secret}, {Email}, {OldPassword}, {NewPassword}, and {ConfirmNewPassword} are required POST parameters.
This end point will change a member's password and then email the member indicating that their password has been changed.
If the request is successful, a HTTP 200
response will be returned with a JSON object with a boolean property called 'success'.
Result example :
{"success":true}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
client_id | String | (required) Must match your client_id. |
client_secret | String | (required) Must match your client_secret. |
String | (required) Member email. Must match a member in the system. | |
OldPassword | String | (required) Member current password. Must match the current member's password. |
NewPassword | String | (required) New member password. |
ConfirmNewPassword | String | (required) Must match NewPassword. |
RESPONSE
Field | Type | Description |
---|---|---|
success | Boolean | True if password change was completed successfully. |
Get member details for login
# Example CURL to get member details for login
curl \
-X POST {baseUrl}/Sales/API/Member/GetMemberDetailsForLogin \
-H 'Authorization: Bearer {access_token}' \
-d 'client_id={client_id}&client_secret={client_secret}&Email=johndoe@gmail.com&Password=1234'
To get member details for a login you must make a POST request to the following URL:
/Sales/API/Member/GetMemberDetailsForLogin
{client_id}, {client_secret}, {Email}, and {Password} are required POST parameters.
This end point will validate the login and return a JSON object representing the member details and if the login was successful.
If the request is successful, a HTTP 200
response will be returned with a JSON object with a property of 'MemberDetails' representing a JSON object with the member details associated with the login and a boolean property of 'Authorized' representing if the login was successful.
Result example :
{"Authorized":true,
"MemberDetails":{"MemberID":68145,"FamilyID":0,"MemberFamilyID":"68145-0",
"IsPrimary":true,"BranchID":0,"MemberType":"I","Salutation":"","FirstName":"Test","MiddleName":"","LastName":"Last",
"Suffix":"","FullName":" Test Last","FamilyOrganizationName":"Last Family","FirstLastName":"Test Last",
"FirstMiddleLastName":"Test Last","LastFirstName":"Last, Test",
"LastFirstMiddleName":"Last, Test","OrganizationName":"","DisplayName":"Test Last",
"Alias":"","HasAlias":false,"OrganizationTypeID":0,"Website":"","BirthDate":"1980-05-21T00:00:00",
"Age":40,"AgeInMonths":486,"Gender":"M",
"PreferredAddressID":0,"PreferredAddress":null,"HasPreferredAddress":false,"PreferredPhoneID":1,
"PreferredPhone":{"MemberID":68145,"PhoneID":0,"PhoneTypeID":"Mobile","PhoneNumber":"123-456-9622","Extension":"","CountryID":"US","ReceiveTextAlerts":true,"PhoneWithExtension":"123-456-9622","_UsedBy":[],"UsedBy":[],"IsPreferred":false},
"HasPreferredPhone":true,"PreferredEmailID":1,
"PreferredEmail":{"MemberID":68145,"EmailID":0,"EmailTypeID":"Home","EmailAddress":"testemail@gmail.com","IsPreferred":false,"ReceiveEmails":false}, "HasPreferredEmail":true,"ActiveMembershipID":0,"Position":"","PositionName":null,
"Organization":null,"OrganizationTypeName":null,"ActiveMembership":{"RegistrationID":104949,"BranchName":"YMCA Branch","ProductName":"Adult Membership (27-64 yrs)","StatusID":"A","BeginDate":"2020-12-02T00:00:00","EndDate":"9999-12-31T00:00:00","CancellationID":0,"MembershipClass":"I","MembershipLevel":"F","AllowAccess":true,"InCart":true,"BillingFrequency":"M","BillingFrequencyName":"Monthly","RecurringHold":false,"RecurringHoldBeginDate":"0001-01-01T00:00:00","RecurringHoldEndDate":"0001-01-01T00:00:00","MemberID":68145,"FamilyID":0,"ActivityID":13289,"_Year":9999,"Year":9999,"_Period":99,"Period":99,"ActivityCode":"110-100-9999-99-11130-99","_ProductTypeID":110,"ProductTypeID":110,"_BranchID":100,"BranchID":100,"_ProductID":11130,"ProductID":11130,"_UnitID":99,"UnitID":99},"HasActiveMembership":true,
"JoinDate":"0001-01-01T00:00:00","AccessID":null,"DenyAccess":true,"DenyRecurringHold":false,"HasFutureRecurringHold":false,
"DenyAccessToUse":true,"DenySales":false,"Status":1,"Deceased":false,"Hide":false,"AllowHide":false,
"ModifyDate":"2020-12-02T08:30:57.447","Addresses":[],
"Phones":[{"MemberID":68145,"PhoneID":1,"PhoneTypeID":"Mobile","PhoneNumber":"123-456-9622","Extension":"","CountryID":"US","ReceiveTextAlerts":true,"PhoneWithExtension":"123-456-9622","_UsedBy":["Test Last"],
"UsedBy":["Test Last"],"IsPreferred":true}],"Emails":[{"UsedBy":[{"MemberID":68145,"FamilyID":0,"EmailID":1,"FirstLastName":"Test Last"}],"MemberID":68145,"EmailID":1,"EmailTypeID":"Home","EmailAddress":"testemail@gmail.com","IsPreferred":true,"ReceiveEmails":true}],"MiscInformationList":[],"StatusComment":"","OverrideHouseholdMembershipCount":false,"OverrideHouseholdMembershipCountComment":"","Tag":null,"NbrOfAttachments":0}}
POST PARAMETERS
Field | Type | Description |
---|---|---|
client_id | String | (required) Must match your client_id. |
client_secret | String | (required) Must match your client_secret. |
String | (required) Member email. Must match a member in the system. | |
Password | String | (required) Member current password. Must match the current member's password. |
RESPONSE
Field | Type | Description |
---|---|---|
MemberDetails | JSON Object | JSON object representing the member details associated with the login. |
Authorized | Boolean | True if login was successful. |
Authorize Member
# Example CURL to validate and authorize a member login
curl \
-X POST {baseUrl}/Sales/API/Member/AuthorizeMember \
-H 'Authorization: Bearer {access_token}' \
-H 'Content-Type: application/json' \
-d '{"associationNumber": "1234", "loginId": "testemail@email.com"}'
To authorize a member login you must make a POST request to the following URL:
/Sales/API/Member/AuthorizeMember
The body of the request should be a JSON object with the properties of associationNumber and loginId. The header of the request must contain the authorization bearer token gotten from the OAuth2 member login get access token for user process.
This end point will validate the login and return a JSON array with one JSON object representing the member details if the login was successful.
If the request is successful, a HTTP 200
response will be returned with a JSON array with one JSON object representing the member details associated with the login.
Result example :
[
{
"associationNumber": "1234",
"localMemberId": "017728-66",
"barcode": "138138",
"email": "testemail@email.com",
"firstName": "YMCA",
"lastName": "YMCA",
"gender": "Male",
"dob": "2020-06-01",
"Alias": "",
"status": "Active"
}
]
JSON POST PARAMETERS
Field | Type | Description |
---|---|---|
loginId | String | (required) Must match the member email or access ID. |
RESPONSE
Field | Type | Description |
---|---|---|
localMemberId | String | MemberID-FamilyID string |
MemberID | Integer | Member Identifier |
FamilyID | Integer | FamilyID Identifier |
MemberFamilyID | String | Member Family Identifier in form (MemberID-FamilyID) |
barcode | String | Member Access ID |
String | Member Email | |
firstName | String | Member First Name |
lastName | String | Member Last Name |
Alias | String | Member Alias |
gender | String | Member Gender |
dob | String | Member Date of Birth |
status | String | Member Status (Active, Inactive) |
Search for products
Required Permission: Sales-Cart(Allow)
# Example Search products URL
/Sales/API/Product/Search?ProductTypeID=651&BranchID=400&ProductID=65491&Year=2020&IncludePrices=1
To search products you must make a GET request to the following URL:
/Sales/API/Product/Search
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing products.
Result example :
[
{"ActivityID":12345,
"ActivityCode":"651-400-2020-99-65491-09",
"Status":"Available",
"DaysOffered":"Mon to Fri",
"BeginDate":"01/01/2020",
"EndDate":"07/01/2020",
"Time":"3:30 PM - 5:30 PM",
"Prices":[{"PriceID":24,"PriceName":"Facility Member",
"Frequency":"One Time","Amount":45.00,
"Display":"B","Variable":"N","Duration":"E",
"DayPrice1":0.00,"DayPrice2":0.00,"DayPrice3":0.00,"DayPrice4":0.00,"DayPrice5":0.00,"DayPrice6":0.00}],
"Ages":"5 to 15",
"Gender":"Any",
"Location":"",
"Category":null,
"MembershipLevel":"No Membership Required",
"ProductTypeID":651,
"ProductTypeName":"Product",
"BranchID":400,
"BranchName":"YMCA Branch Center",
"ProductID":12345,
"ProductName":"Late Pick-up",
"UnitID":9,
"Year":2020,
"Period":99,
"Description":"3:30 PM-5:30PM.",
"Requirements":null,
"Images":"/Meta/Item/GetImage?ImageID=58",
"CompleteUrl":"https://membersite.sgasoftware.com/Sales/Product/Details?ActivityID=12345",
"FullMemberBrowseBeginDate":"07/09/2024 12:00 AM","FullMemberBrowseEndDate":"07/09/2024 11:59 PM","ProgramMemberBrowseBeginDate":"07/09/2024 12:00 AM",
"ProgramMemberBrowseEndDate":"07/09/2024 11:59 PM","NonMemberBrowseBeginDate":"07/09/2024 12:00 AM","NonMemberBrowseEndDate":"07/09/2024 11:59 PM",
"StaffBrowseBeginDate":"07/09/2024 12:00 AM","StaffBrowseEndDate":"07/09/2024 11:59 PM","OverrideRegistrationDates":"false",
"FullMemberRegistrationBeginDate":"07/09/2024 12:00 AM","FullMemberRegistrationEndDate":"07/09/2024 11:59 PM","ProgramMemberRegistrationBeginDate":"07/09/2024 12:00 AM",
"ProgramMemberRegistrationEndDate":"07/09/2024 11:59 PM","NonMemberRegistrationBeginDate":"07/09/2024 12:00 AM","NonMemberRegistrationEndDate":"07/09/2024 11:59 PM",
"StaffRegistrationBeginDate":"07/09/2024 12:00 AM","StaffRegistrationEndDate":"07/09/2024 11:59 PM", "AllowBrowse": "Staff Only", "AllowRegistration": "Staff Only"}
]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
ProductTypeID | String | (optional) Product type ID filter |
BranchID | String | (optional) Branch ID filter separate multiple branch IDs with commas |
CategoryID | String | (optional) Category ID filter |
DaysOffered | String | (optional) Days of the week separated by commas that the product occurs on ex: (Monday, Wednesday, Friday) |
TimesOfDay | String | (optional) Times the product occurs on separated by commas valid options are Morning, MidDay, Afternoon, Evening |
BirthDate | Date | (optional) Returns products that have age requirements that apply to that birth date |
Age | Integer | (optional) Returns products that have age requirements that apply to that age in years |
BeginDate | Date | (optional) Products with a begin date greater than or equal to this date will be returned |
EndDate | Date | (optional) Products that have a begin date less than or equal to this date will be returned |
Gender | String | (optional) M=Male, F=Female |
ProductID | String | (optional) Product ID filter |
UnitID | String | (optional) Unit ID filter |
Year | Int | (optional) Year filter |
Period | Int | (optional) Period filter |
MembershipLevel | String | (optional) F = Full Privilege, P = Program, O = Other |
MembershipClass | String | (optional) I = Individual, H = Household |
ModifiedOnOrAfter | Date | If specified, only products modified on or after the passed date will be returned. |
IncludePrices | Int | If specified and equal to 1, the product JSON returned will contain a Prices product array property. |
FromDateOverride | Date | (optional) An optional override from date for the current date that will be checked against the browse dates |
ToDateOverride | Date | (optional) An optional override to date for the current date that will be checked against the browse dates. (Ex: products that can be browsed between FromDateOverride and ToDateOverride will be returned) |
FromDateName | String | (optional) Used with the CurrentDate parameter to indicate the type to check against (Staff, FullMember, ProgramMember, NonMember) |
ToDateName | String | (optional) Used with the CurrentDate parameter to indicate the to type to check against (Staff, FullMember, ProgramMember, NonMember) |
ExcludeRowLimit | Int | If specified and equal to 1, the products returned will not be limited. Otherwise, only 10,000 rows will return. |
RESPONSE
Field | Type | Description |
---|---|---|
ActivityID | Integer | Activity Identifier |
ActivityCode | String | Activity code |
Status | String | Product status (Cancelled, Inactive, Open, Wait List Available, Sold Out) |
DaysOffered | String | Days of week product offered |
BeginDate | Date | Product begin date |
EndDate | Date | Product end date |
Time | String | Times product offered |
Prices | JSON Array | JSON array of product cost and frequency if IncludePrices is passed as 1 |
Ages | String | Age range description |
Gender | String | Product gender allowed |
Location | String | Product location |
Category | String | Product category |
MembershipLevel | String | Product membership level(Any Membership, Program Membership, Program and Non-member, Non-member, No Membership required) |
ProductTypeID | Int | Product product type ID |
ProductTypeName | String | Product product type name |
BranchID | Integer | Product Branch ID |
BranchName | String | Product branch name |
ProductID | Integer | Product product ID |
ProductName | String | Product product name |
UnitID | Integer | Product unit ID |
Year | Integer | Product Year |
Period | Integer | Product period |
Description | String | Product description |
Requirements | String | Product requirements |
Images | String | List of image urls separated by commas. |
CompleteUrl | String | Complete member site activity URI. |
FullMemberBrowseBeginDate | Date | Full Member Browse Begin Date |
FullMemberBrowseEndDate | Date | Full Member Browse End Date |
ProgramMemberBrowseBeginDate | Date | Program Member Browse Begin Date |
ProgramMemberBrowseEndDate | Date | Program Member Browse End Date |
NonMemberBrowseBeginDate | Date | Non Member Browse Begin Date |
NonMemberBrowseEndDate | Date | Non Member Browse End Date |
StaffBrowseBeginDate | Date | Staff Browse Begin Date |
StaffBrowseEndDate | Date | Staff Browse End Date |
OverrideRegistrationDates | Boolean | Override Registration Dates |
FullMemberRegistrationBeginDate | Date | Full Member Registration Begin Date |
FullMemberRegistrationEndDate | Date | Full Member Registration End Date |
ProgramMemberRegistrationBeginDate | Date | Program Member Registration Begin Date |
ProgramMemberRegistrationEndDate | Date | Program Member Registration End Date |
NonMemberRegistrationBeginDate | Date | Non Member Registration Begin Date |
NonMemberRegistrationEndDate | Date | Non Member Registration End Date |
StaffRegistrationBeginDate | Date | Staff Registration Begin Date |
StaffRegistrationEndDate | Date | Staff Registration End Date |
AllowBrowse | String | Defines who can browse the product ('Public, Member & Staff', 'Member & Staff', 'Staff Only') |
AllowRegistration | String | Defines who can register the product ('Public, Member & Staff', 'Member & Staff', 'Staff Only') |
Prices JSON PROPERTIES
Field | Type | Description |
---|---|---|
PriceID | Integer | Price ID for the price |
PriceName | String | Name of Price |
Frequency | String | Name of Frequency (F = Flat, M = Monthly, W= Weekly) |
Amount | Decimal | Amount of Frequency |
Display | String | Display Frequency (N = No, S = Staff, M = Member, B = Member & Staff) |
Variable | String | Is Variable Frequency (N = No, S = Staff, M = Member, B = Member & Staff. If True for M, then the Rate can be changed by the Member on the MemberSite. Or if for Staff S is True, the rate can be changed by Staff during the sale.) |
Duration | Name | Duration of Frequency (E = End Date, 1 = End Date 1 Cycle, C = Continuous, B = Both) |
DayPrice1 | Decimal | Price for Day 1 |
DayPrice2 | Decimal | Price for Day 2 |
DayPrice3 | Decimal | Price for Day 3 |
DayPrice4 | Decimal | Price for Day 4 |
DayPrice5 | Decimal | Price for Day 5 |
DayPrice6 | Decimal | Price for Day 6 |
Get product details
Required Permission: Sales-Cart(Allow)
# Example URL to get details for a single product
/Sales/API/Product/Details?ActivityID=12345
To get details for a single product you must make a GET request to the following URL:
/Sales/API/Product/Details
If the request is successful, a HTTP 200
response will be returned with a JSON object representing the product.
Result example :
{
"ActivityID":12345,
"ActivityCode":"651-400-2020-99-65491-09",
"Status":"Available",
"DaysOffered":"Mon to Fri",
"BeginDate":"01/01/2020",
"EndDate":"07/01/2020",
"Time":"3:30 PM - 5:30 PM",
"Price":"One Time $85 to $95",
"Ages":"5 to 15",
"Gender":"Any",
"Location":"",
"Category":null,
"MembershipLevel":"No Membership Required",
"ProductTypeID":651,
"ProductTypeName":"Product",
"BranchID":400,
"BranchName":"YMCA Branch Center",
"ProductID":12345,
"ProductName":"Late Pick-up",
"UnitID":9,
"Year":2020,
"Period":99,
"Description":"3:30 PM-5:30PM.",
"Requirements":null,
"Images":"/Meta/Item/GetImage?ImageID=58",
"CompleteUrl":"https://membersite.sgasoftware.com/Sales/Product/Details?ActivityID=12345"
}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
ActivityID | Integer | (optional) If not passed, then the ActivityCode or Activity Code part parameters must be passed. |
ActivityCode | String | (optional) Full Activity code associated with product Activity code parts |
all must be specified: ProductTypeID | Integer | (optional) Product Type ID |
BranchID | Integer | (optional) Branch ID |
ProductID | Integer | (optional) Product ID |
UnitID | Integer | (optional) Unit ID |
Year | Integer | (optional) Year |
Period | Integer | (optional) Period |
RESPONSE
Field | Type | Description |
---|---|---|
ActivityID | Integer | Activity Identifier |
ActivityCode | String | Activity code |
Status | String | Product status (Cancelled, Inactive, Open, Wait List Available, Sold Out) |
DaysOffered | String | Days of week product offered |
BeginDate | Date | Product begin date |
EndDate | Date | Product end date |
Time | String | Times product offered |
Price | String | Product cost and frequency |
Ages | String | Age range description |
Gender | String | Product gender allowed |
Location | String | Product location |
Category | String | Product category |
MembershipLevel | String | Product membership level(Any Membership, Program Membership, Program and Non-member, Non-member, No Membership required) |
ProductTypeID | Int | Product product type ID |
ProductTypeName | String | Product product type name |
BranchID | Integer | Product Branch ID |
BranchName | String | Product branch name |
ProductID | Integer | Product product ID |
ProductName | String | Product product name |
UnitID | Integer | Product unit ID |
Year | Integer | Product Year |
Period | Integer | Product period |
Description | String | Product description |
Requirements | String | Product requirements |
Images | String | List of image urls separated by commas. |
CompleteUrl | String | Complete member site activity URI. |
Get product registrations
Required Permission: Sales-Members(Allow), Sales-Activities(Allow)
# Example get registrations for a product url
/Sales/API/Product/Registrations?ProductTypeID=110
To get registrations for a product you must make a GET request to the following URL:
/Sales/API/Product/Registrations
Registrations can be gotten for just a product type by using the ProductTypeID query string parameter or an activity code by using the ActivityCode parameter.
If the request is successful, a HTTP 200
response will be returned with a JSON object with a property called 'registrations' containing a JSON array of registrations and a property called 'total' containing the total number of registrations.
Result example :
{
"total":1,
"registrations":[
{"MemberID":12345,
"FamilyID":0,
"FirstName":"John",
"MiddleName":"P",
"LastName":"Doe",
"BirthDate":"1985-01-01T00:00:00",
"Age":35,
"Gender":"M",
"PreferredAddress":{"MemberID":12345,
"AddressID":0,
"AddressTypeID":"Home",
"Address1":"123 Street",
"Address2":"",
"City":"Akron City",
"State":"AK",
"Zip":"124",
"ZipExt":null,
"CountryID":"US"
}
"PreferredPhone":{"MemberID":12345,
"PhoneID":0,
"PhoneTypeID":"Home",
"PhoneNumber":"555-555-5555",
"Extension":"",
"CountryID":"US",
"ReceiveTextAlerts":true,
"PhoneWithExtension":"555-555-5555"
},
"PreferredEmail":{"MemberID":12345,
"EmailID":0,
"EmailTypeID":"Home",
"EmailAddress":"johndoe@test.com"
},
"ProductName":"Adult Membership (Ages 28-64)",
"Dates":"08/27/2019 - 12/31/9999",
"Days":"Sun to Sat",
"ProductTypeID":110,
"ProductTypeDescription":"110: Membership",
"BranchID":100,
"BranchName":"Branch YMCA",
"ActivityCode":"110-100-9999-99-123456-99",
"AccessStatus":"Deny",
"Status":"Active",
"CancellationReason":null,
"RegistrationID":123456}
]}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
ActivityID | Integer | (optional) If not passed, then the ActivityCode or ProductTypeID parameters must be passed. |
ActivityCode | String | (optional) Full Activity code associated with product Activity code parts |
MemberID | Integer | (optional) Member Identifier |
FamilyID | Integer | (optional) Family Identifier |
MemberStatus | Integer | (optional) Member Status (0 = Hide, 1 = Active, 2 = Active (Override)) |
PriceFrequency | String | (optional) Price Frequency of registration("F" = One Time, "W" = Weekly, "2W" = Every 2 Weeks, "M" = Monthly, "Q" = Quarterly, "BA" = Biannually, "A" = Annually) |
StatusID | String | (optional) Activity Status ("A" = Active, "C" = Cancelled, "W" = Wait List) |
BeginDate | Date | (optional) Registration begin date |
EndDate | Date | (optional) Registration end date |
DateRange | String | (optional) String representing registration date range("CUSTOM" = Custom date range, "ALL" = All, "30" = Last 30 Days, "60" = Last 60 Days, "90" = Last 90 Days, "TY" = This Year, "LY" = Last Year) |
ProductTypeID | Integer | (optional) Product Type ID associated with offering |
OnlyWithBalance | Boolean | (optional) Only include activities with a balance |
ThirdPartyMemberID | Integer | (optional) Member ID of third party |
FromProductID | Integer | (optional) From Product ID range |
ToProductID | Integer | (optional) To Product ID range |
FromUnitID | Integer | (optional) From Unit ID range |
ToUnitID | Integer | (optional) To Unit ID range |
DisplayLength | Integer | (optional) Number of registrations to return default is 100 |
DisplayStart | Integer | (optional) Number of registrations to skip before returning registrations default is 0 |
ModifiedOnOrAfter | Date | If specified, only product registrations modified on or after the passed date will be returned. |
RESPONSE
Field | Type | Description |
---|---|---|
MemberID | Integer | Member Identifier |
FamilyID | Integer | Family Identifier |
FirstName | String | Member first name |
MiddleName | String | Member Middle Name |
LastName | String | Member last name |
BirthDate | Date | Member birth date |
Age | Integer | Member age |
Gender | String | M=Male, F=Female |
PreferredAddress | Object | JSON Object representing member's preferred address. |
PreferredPhone | Object | JSON Object representing member's preferred phone. |
PreferredEmail | Object | JSON Object representing member's preferred email. |
ProductName | String | Product Name |
Dates | String | Date range member is registered for |
Days | String | Days range member is registered for |
ProductTypeID | Integer | Product Type Identifier |
ProductTypeDescription | String | Product Type Description |
ActivityCode | String | Activity Code |
AccessStatus | String | Allow or Deny |
Status | String | Active, Waiting (Some Days), Waiting, Cancelled, or Renewed |
CancellationReason | String | Reason for cancellation |
RegistrationID | Integer | Registration Identifier |
Get product roster
Required Permission: Sales-Members(Allow), Sales-Activities(Allow)
# Example get roster for a product url
/Sales/API/Product/Roster?ProductTypeID=300&MemberID=12345
To get a roster you must make a GET request to the following URL:
/Sales/API/Product/Roster
ProductTypeID is a required query string parameter.
If the request is successful, a HTTP 200
response will be returned with a JSON object with a property called 'rosters' containing a JSON array of roster objects and a property called 'total' containing the total number of roster objects.
Result example :
{"total":1,"rosters":[
{"MemberID":12345,
"FamilyID":0,
"FirstName":"John",
"MiddleName":"P",
"LastName":"Doe",
"Phone":"555-555-5555",
"GroupName":null,
"AssignmentType":"Unassigned",
"StaffTypeName":null,
"Email":"johndoe@test.com",
"ProductID":11680,
"ProductName":"Adult Beginner Swim Lessons",
"Dates":"07/01/2019 - 09/29/2019",
"Days":"Thu",
"GroupCategory":null,
"GroupSubCategory":null,
"Age":35,
"BirthDate":"1985-01-01T00:00:00",
"City":"Akron City",
"ProductTypeID":300,
"BranchID":400,
"BranchName":"YMCA Branch Center",
"Year":"9999",
"Period":"99",
"UnitID":"99"}
]}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
ProductTypeID | Integer | (required) Product Type ID |
SortColumn | Integer | (optional) 0 = Member Name, 1 = Phone, 2 = Group Name, 3 = Assignment Type, 4 = Staff Type, 5 = Email, 6 = Unit ID, 7 = Begin Date, 9 = Group Category, 10 = Group Subcategory, 11 = Age, 12 = Birth Date, 13 = City, 14 = MemberID, 15 = Branch Name, 16 = Year, 17 = Period |
SortDirection | String | (optional) asc = ascending, desc = descending |
BranchID | Integer | (optional) Branch ID |
FromProductID | Integer | (optional) From Product ID |
ToProductID | Integer | (optional) To Product ID |
FromUnitID | Integer | (optional) From Unit ID |
ToUnitID | Integer | (optional) To Unit ID |
FromYear | Integer | (optional) From Year |
ToYear | Integer | (optional) To Year |
FromPeriod | Integer | (optional) From Period |
ToPeriod | Integer | (optional) To Period |
OfferedToday | Boolean | (optional) If true, will only return rosters for product offerings that are offered today |
BeginDate | Date | (optional) Offering Begin Date |
EndDate | Date | (optional) Offering End Date |
SubCategoryID | String | (optional) Represents Category ID and Sub Category ID should be a string in the form of CategoryID-SubCategoryID |
ProductName | String | (optional) Product name |
ProductTag | String | (optional) Product Tag |
IncludeCancellations | Boolean | (optional) Include Cancellations |
MemberID | Integer | (optional) Member Identifier |
DisplayLength | Integer | (optional) Number of roster objects to return default is 100 |
DisplayStart | Integer | (optional) Number of roster objects to skip |
ModifiedOnOrAfter | Date | If specified, only product roster objects modified on or after the passed date will be returned. |
RESPONSE
Field | Type | Description |
---|---|---|
MemberID | Integer | Member identifier |
FamilyID | Integer | Family identifier |
FirstName | String | Member first name |
MiddleName | String | Member middle name |
LastName | String | Member last name |
Phone | String | Member phone |
GroupName | String | Group name |
AssignmentType | String | Assignment type |
StaffTypeName | String | Staff type name |
String | Member email | |
ProductID | Integer | Product ID |
ProductName | String | Product name |
Dates | String | Date range |
Days | String | Days range |
GroupCategory | String | Group category |
GroupSubCategory | String | Group subcategory |
Age | Integer | Member age |
BirthDate | Date | Member birth date |
City | String | Member city |
ProductTypeID | Integer | Product type identifier |
BranchID | Integer | Branch identifier |
BranchName | String | Branch name |
Year | Integer | Year |
Period | Integer | Period |
UnitID | Integer | Unit identifier |
Search branches
Required Permission: Sales-Branches(Allow)
# Example search branches url
/Sales/API/Branch
To search branches you must make a GET request to the following URL:
/Sales/API/Branch
BranchID is an optional query string parameter.
If the request is successful, a HTTP 200
response will be returned with a JSON array of branch objects.
Result example :
[{"BranchID":100,
"Name":"Branch at YMCA",
"Abbreviation":"BR",
"Address1":"123 Road Street",
"Address2":"",
"City":"Akron",
"State":"AK",
"Zip":"12345",
"Contact":"",
"Phone":"123-456-7891",
"PhoneExtension":"",
"Deleted":false,
"LoginLevel": "Public, Member & Staff",
"SortOrder": 1,
"AlternateBranchID": "3337"}
]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
BranchID | Integer | (optional) Branch ID to search for |
BranchName | String | (optional) Branch Name to search for |
AlternateBranchID | String | (optional) Alternate Branch ID to search for |
RESPONSE
Field | Type | Description |
---|---|---|
BranchID | Integer | Branch identifier |
Name | String | Branch name |
Abbreviation | String | Branch abbreviation |
Address1 | String | Branch address line 1 |
Address2 | String | Branch address line 2 |
City | String | Branch city |
State | String | Branch state |
Zip | String | Branch zip |
Contact | String | Branch contact |
Phone | String | Branch phone |
PhoneExtension | String | Branch phone extension |
Deleted | Boolean | If is deleted |
LoginLevel | String | Branch login level |
SortOrder | Integer | Branch Sort Order |
AlternateBranchID | String | Branch Alternate Branch ID |
Set Alternate Branch
Required Permission: Sales-Branches(Allow)
# Example CURL to set an Alternate Branch ID
curl \
-X POST {baseUrl}/Sales/API/Branch/UpdateAlternateBranchID \
-H 'Authorization: Bearer {access_token}' \
-d 'BranchID=10&AlternateBranchID=1234'
To set an alternate branch ID for a branch you must make a POST request to the following URL:
/Sales/API/Branch/UpdateAlternateBranchID
{BranchID} and {AlternateBranchID} are required POST parameters.
This end point will update the AlternateBranchID for the branch associated with the passed BranchID.
If the request is successful, a HTTP 200
response will be returned with a JSON object with a boolean property called 'success'.
Result example :
{"success":true}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
BranchID | Integer | (required) The BranchID associated with the branch to update. |
AlternateBranchID | String | (required) The AlternateBranchID to set. |
RESPONSE
Field | Type | Description |
---|---|---|
success | Boolean | True if the update was completed successfully. |
Get company information
Required Permission: SignOn-Options(Modify)
# Example get company information url
/Sales/API/Branch/GetCompanyInformation
To get company information you must make a GET request to the following URL:
/Sales/API/Branch/GetCompanyInformation
If the request is successful, a HTTP 200
response will be returned with a JSON object representing company information.
Result example :
{"CompanyName":"YMCA",
"CompanyAddress1":"123 Road Street",
"CompanyAddress2":"",
"CompanyCity":"Akron",
"CompanyState":"AK",
"CompanyZip":"12345",
"CompanyPhone":"123-456-7891",
"CompanyEmail":"email@Email.com"}
RESPONSE
Field | Type | Description |
---|---|---|
CompanyName | String | Company name |
CompanyAddress1 | String | Company address line 1 |
CompanyAddress2 | String | Company address line 2 |
CompanyCity | String | Company city |
CompanyState | String | Company state |
CompanyZip | String | Company zip |
CompanyPhone | String | Company Phone |
CompanyEmail | String | Company email |
Get Branch capacity
Required Permission: SignOn-Options(Modify)
# Example get branch capacity url
/Sales/API/Branch/GetBranchCapacity
To get branch capacity information you must make a GET request to the following URL:
/Sales/API/Branch/GetBranchCapacity
If the request is successful, a HTTP 200
response will be returned with a JSON array representing capacity information.
Result example :
[{"BranchID": "010", "BranchName": "Association Office", "CurrentCapacity": 25, "MaxCapacity": 50, "PercentFull": 50,
"Rooms": [{"AccessPointID": 1, "AccessPointName": "Childcare room", "CurrentCapacity": 5, "MaxCapacity": 10, "PercentFull": 50}]
}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
BranchID | Integer | (optional) The BranchID to search for. |
IncludeRoomCapacity | Boolean | (optional) Set to 1 to include room capacity. |
RESPONSE
Field | Type | Description |
---|---|---|
BranchID | Integer | Branch ID |
BranchName | String | Branch Name |
CurrentCapacity | Integer | Current capacity |
MaxCapacity | Integer | Max Capacity |
PercentFull | Integer | Percent Full |
Rooms | JSON Array | Array of objects defining capacity for every room check in access point for the branch. |
Search product names
Required Permission: Sales-Products(Allow)
# Example search product names url
/Sales/API/ProductSettings?ProductTypeID=110
To search product names you must make a GET request to the following URL:
/Sales/API/ProductSettings
ProductTypeID and all other query string parameters are optional.
If the request is successful, a HTTP 200
response will be returned with a JSON array of product name objects.
Result example :
[{"ProductNameID":3766,
"ProductTypeID": 110,
"ProductTypeName":"Converted Balances & Credits",
"ProductID":"99998",
"ProductName":"Converted Credit","CategoryName":null,
"SubCategoryName":null,
"Tags":"","MembershipClass":" ","MembershipLevel":" ",
"AllowAccess":"No",
"AllowNationwideMembership":"No"},
{"ProductNameID":3767,
"ProductTypeID": 110,
"ProductTypeName":"Converted Balances & Credits",
"ProductID":"99999",
"ProductName":"Converted Balance Owed","CategoryName":null,
"SubCategoryName":null,
"Tags":"","MembershipClass":" ","MembershipLevel":" ",
"AllowAccess":"No",
"AllowNationwideMembership":"No"}
]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
ProductTypeID | Integer | (optional) Product Type ID |
FromProductID | Integer | (optional) From product ID lower range |
ToProductID | Integer | (optional) To product ID upper range |
Name | String | (optional) Product name |
ProductTag | String | (optional) Product tag |
IncludeDeleted | Boolean | (optional) If true, deleted product names will be included |
SubCategoryID | String | (optional) CategoryID and SubCategoryID in format CategoryID-SubCategoryID |
RESPONSE
Field | Type | Description |
---|---|---|
ProductNameID | Integer | Product name identifier |
ProductTypeID | String | Product type ID |
ProductTypeName | String | Product type name |
ProductID | String | Product identifier |
ProductName | String | Product Name |
CategoryName | String | Category Name |
SubCategoryName | String | Sub Category Name |
Tags | String | Tags |
MembershipClass | String | Membership Class (Individual or Household) |
MembershipLevel | String | Membership level (Full Privilege, Program, or Other) |
AllowAccess | String | Yes or No |
AllowNationwideMembership | String | Yes or No |
Get product name details
Required Permission: Sales-Products(Allow)
# Example get product name details url
/Sales/API/ProductSettings/3766
To get details for a single product name you must make a GET request to the following URL:
/Sales/API/ProductSettings/{ProductNameID}
{ProductNameID} is a required route parameter.
If the request is successful, a HTTP 200
response will be returned with a JSON object representing the product name.
Result example :
{"ProductNameID":3766,
"ProductTypeID": 110,
"ProductTypeName":"Converted Balances & Credits",
"ProductID":"99998",
"ProductName":"Converted Credit","CategoryName":null,
"SubCategoryName":null,
"Tags":"","MembershipClass":" ","MembershipLevel":" ",
"AllowAccess":"No",
"AllowNationwideMembership":"No"}
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
ProductNameID | Integer | (required) Product name identifier associated with product name to return |
IncludeDeleted | Boolean | (optional) If true, deleted product names will be included |
RESPONSE
Field | Type | Description |
---|---|---|
ProductNameID | Integer | Product name identifier |
ProductTypeID | String | Product type ID |
ProductTypeName | String | Product type name |
ProductID | String | Product identifier |
ProductName | String | Product Name |
CategoryName | String | Category Name |
SubCategoryName | String | Sub Category Name |
Tags | String | Tags |
MembershipClass | String | Membership Class (Individual or Household) |
MembershipLevel | String | Membership level (Full Privilege, Program, or Other) |
AllowAccess | String | Yes or No |
AllowNationwideMembership | String | Yes or No |
Search product categories
Required Permission: Sales-Product Categories(Allow)
# Example search product categories url
/Sales/API/ProductSettings/SearchCategories?ProductTypeID=110
To search product categories you must make a GET request to the following URL:
/Sales/API/ProductSettings/SearchCategories
ProductTypeID is an optional query string parameter.
If the request is successful, a HTTP 200
response will be returned with a JSON array of product category objects.
Result example :
[{"CategoryID": 1, "ProductTypeID":110,"ProductTypeName":"Membership",
"LoginLevel":"Staff, Member, And Public",
"Name":"Membership Adult","SubCategoryList":null},
{"CategoryID": 2, "ProductTypeID":110,"ProductTypeName":"Membership",
"LoginLevel":"Staff, Member, And Public",
"Name":"Membership Household","SubCategoryList":null}
]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
ProductTypeID | Integer | (optional) Product Type ID |
RESPONSE
Field | Type | Description |
---|---|---|
CategoryID | Integer | Category ID |
ProductTypeID | Integer | Product Type ID |
ProductTypeName | String | Product Type Name |
LoginLevel | String | Login level |
Name | String | Category name |
SubCategoryList | String | List of sub categories |
Search product types
Required Permission: Sales-Product Types(Allow)
# Example search product types url
/Sales/API/ProductSettings/SearchProductTypes
To search product types you must make a GET request to the following URL:
/Sales/API/ProductSettings/SearchProductTypes
Product types are the highest level of a product. These determine how a product behaves and what all features and fields it includes.
If the request is successful, a HTTP 200
response will be returned with a JSON array of product type objects.
Result example :
[{"ProductTypeID":110,"Name":"Membership",
"LoginLevels":"Public, Member & Staff"},
{"ProductTypeID":150,"Name":"Guest Passes & Tours",
"LoginLevels":"Staff Only"},
{"ProductTypeID":170,"Name":"Joiners Fees",
"LoginLevels":"Public, Member & Staff"},
{"ProductTypeID":200,"Name":"Fitness",
"LoginLevels":"Public, Member & Staff"}
]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
IncludeDeleted | Boolean | (optional) True if deleted product types should be included. |
RESPONSE
Field | Type | Description |
---|---|---|
ProductTypeID | Integer | Product Type ID |
Name | String | Product Type Name |
LoginLevels | String | Product Type Login Levels (Public, Member & Staff, Member & Staff, Staff Only, None) |
Search product periods
Required Permission: Sales-Product Periods(Allow)
# Example search product types url
/Sales/API/ProductSettings/SearchProductPeriods?ProductTypeID=301&FromYear=2020&ToYear=9999&FromPeriod=0&ToPeriod=99
To search product types you must make a GET request to the following URL:
/Sales/API/ProductSettings/SearchProductPeriods
Product periods specify a particular season within the year. They are set for each Product Type and Branch and define the dates when members can register for products.
If the request is successful, a HTTP 200
response will be returned with a JSON array of product period objects.
Result example :
[{"ProductTypeID":301,
"ProductTypeName":"Swim: One Time Fee's",
"BranchID":100,"BranchName":"Quincy YMCA",
"Year":9999,"Period":99,"PeriodName":"Forever",
"DefaultProductBeginDate":"01/01/0001",
"DefaultProductEndDate":"12/31/9999",
"FullMemberBeginDate":"01/01/1900",
"FullMemberEndDate":"12/31/9999",
"ProgramMemberBeginDate":"01/01/1900",
"ProgramMemberEndDate":"12/31/9999",
"NonMemberBeginDate":"01/01/1900",
"NonMemberEndDate":"12/31/9999",
"StaffBeginDate":"01/01/1900",
"StaffEndDate":"12/31/9999"}
]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
ProductTypeID | Integer | (optional) Product Type ID |
BranchID | Integer | (optional) Branch ID |
FromYear | Integer | (optional) From Year |
ToYear | Integer | (optional) To Year |
FromPeriod | Integer | (optional) From Period |
ToPeriod | Integer | (optional) To Period |
IncludeDeleted | Boolean | (optional) True if deleted product periods should be included |
DisplayLength | Integer | (optional) Number of product periods to return default is 100 |
DisplayStart | Integer | (optional) Number of product periods to skip |
RESPONSE
Field | Type | Description |
---|---|---|
ProductTypeID | Integer | Product Type ID |
ProductTypeName | String | Product Type Name |
BranchID | Integer | Branch ID |
BranchName | String | Branch Name |
Year | Integer | Year |
Period | Integer | Period |
PeriodName | Integer | Period Name |
DefaultProductBeginDate | Date | Default Product Begin Date |
DefaultProductEndDate | Date | Default Product End Date |
FullMemberBeginDate | Date | Full Member Begin Date |
FullMemberEndDate | Date | Full Member End Date |
ProgramMemberBeginDate | Date | Program Member Begin Date |
ProgramMemberEndDate | Date | Program Member End Date |
NonMemberBeginDate | Date | Non Member Begin Date |
NonMemberEndDate | Date | Non Member End Date |
StaffBeginDate | Date | Staff Begin Date |
StaffEndDate | Date | Staff End Date |
Search for calendar events
Required Permission: Sales-Calendar Events(Modify)
# Example Search calendar events URL
/Sales/API/CalendarEvent?BeginDate=09/01/2020&EndDate=09/07/2020&LocationID=12
To search calendar events you must make a GET request to the following URL:
/Sales/API/CalendarEvent
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing calendar events. Each object in the array, will have properties for hour and the events that occur on that hour.
Result example :
[{"Hour":8,"Events":[{"EventID":14341,
"Name":"Downtown Pool Lane 1","Description":"Lane reservation may be used for lap swim or self-led water exercise routines.","BranchID":10,"BeginDate":"2020-09-02T04:45:00","EndDate":"2020-09-02T05:45:00",
"EventDate":"2020-09-02T04:45:00","IsAllDay":false,
"IsRecurring":false,"RecurringPattern":"","NotificationFrequency":"","NotificationFrequencyNumber":0,"NotificationStatus":0,
"CategoryID":2,"LocationID":6,"InstructorID":6,"BranchName":"YMCA of Greater Somewhere","CategoryName":"Lap Swim","LocationName":"Lap Pool",
"InstructorName":"Self-Guided","HexColor":"","TimeString":"4:45 am - 5:45 am","BeginTimeMilitary":"04:45",
"EndTimeMilitary":"05:45","TimeElapsed":"(1 hour)","DaysOfWeekString":"Wed","ReservationsEnabled":true,
"ShowReserveButtonsBeforeReservationsBegin":false,"WaitlistEnabled":false,"WaitlistOpenings":0,"AutoAddFromWaitlist":false,
"SendWaitlistNotification":false,"NbrOfAttendees":0,"Openings":1,"TimeBeforeEventReservationsBegin":864000000000,"TimeBeforeEventReservationsEnd":36000000000,
"MinimumAge":9,"MaximumAge":255,"MembershipLevel":"F","Reservations":null,"Waitlists":null,"Attendees":null,"RsvpBeginDateUtc":"2020-09-01T08:45:00Z",
"RsvpBeginDateFacility":"2020-09-01T04:45:00","RsvpEndDateUtc":"2020-09-02T07:45:00Z","RsvpEndDateFacility":"2020-09-02T03:45:00"}]},
{"Hour":9,"Events":[{"EventID":895,
"Name":"Aqua Fit","Description":"","BranchID":100,"BeginDate":"2020-09-04T09:00:00","EndDate":"2020-09-04T10:00:00",
"IsAllDay":false,
"IsRecurring":true,"RecurringPattern":"FREQ=WEEKLY;BYDAY=FR;",
"CategoryID":6,"LocationID":12,"InstructorID":74,"BranchName":"Branch YMCA","CategoryName":"Water",
"LocationName":"Main Pool","InstructorName":"Joe N.","DateString":"Friday, September 4 2020",
"TimeString":"9:00 am - 10:00 am","BeginTimeMilitary":"09:00","EndTimeMilitary":"10:00","TimeElapsed":"(1 hour)",
"DaysOfWeekString":"Fri","ReservationsEnabled":false,"Openings":0,"TimeBeforeEventReservationsBegin":null,"TimeBeforeEventReservationsEnd":null,
"ShowReserveButtonsBeforeReservationsBegin":false,"WaitlistEnabled":false,"WaitlistOpenings":0,"AutoAddFromWaitlist":false,
"MinimumAge":0,"MaximumAge":0,"MembershipLevel":"E","Reservations":null,"ReservationsBeginDateJson":{"Year":1,"Month":1,"Day":1,"Hour":5,"Minute":0,"Second":0,"IsUTC":1},
"ReservationsEndDateJson":{"Year":9999,"Month":12,"Day":31,"Hour":23,"Minute":59,"Second":59,"IsUTC":1}}]}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
BeginDate | Date | (required) Date to start looking for calendar events |
EndDate | Date | (required) Date to stop looking for calendar events |
LoadReservations | Boolean | (optional) If true(1), reservations in the form of an array of reservation objects with the MemberID, FamilyID, and EventID properties for the event will be loaded into the Reservations property. |
MemberID | Integer | (optional) If a Member ID is passed, only events that have reservations with that Member ID will be returned |
FamilyID | Integer | (optional) If a Family ID is passed with Member ID, only events that have reservations with the specific member associated with the Member ID and Family ID will be returned |
MemberFamilyID | String | (optional) If a MemberFamilyID in the form of MemberID-FamilyID is passed, only events that have reservations with the specific member associated with the Member ID and Family ID will be returned |
BranchID | Integer | (optional) Branch ID where events take place |
CategoryID | Integer | (optional) Category ID for events |
LocationID | Integer | (optional) Location ID for events |
InstructorID | Integer | (optional) Instructor ID for events |
RESPONSE EVENT PROPERTIES
Field | Type | Description |
---|---|---|
EventID | Integer | Event identifier |
Name | String | Event name |
Description | String | Event description |
BranchID | Integer | Event Branch ID |
BeginDate | Date | Event begin date |
EndDate | Date | Event end date |
IsAllDay | Boolean | True if event takes place all day |
IsRecurring | Boolean | True if event is recurring and occurs more than once on a schedule |
RecurringPattern | String | Basic RFC5545 format string that represents the event's recurring pattern (ex: Recur monthly="FREQ=MONTHLY;" recur yearly="FREQ=YEARLY;" recur daily="FREQ=DAILY;" recur weekly by day="FREQ=WEEKLY;BYDAY=SU,TU,TH,SA;" where the BYDAY property can use the day values MO="Monday", TU="Tuesday", WE="Wednesday", TH="Thursday", FR="Friday", SA="Saturday", SU="Sunday" |
CategoryID | Integer | Event Category ID |
LocationID | Integer | Event Location ID |
InstructorID | Integer | Event Instructor ID |
BranchName | String | Event Branch Name |
CategoryName | String | Event Category Name |
LocationName | String | Event Location Name |
InstructorName | String | Event Instructor Name |
DateString | String | Long string representing event date |
TimeString | String | Long string representing event time range |
BeginTimeMilitary | String | Start time of event in military time |
EndTimeMilitary | String | End time of the event in military time |
TimeElapsed | String | Long string representing hours between begin time and end time |
DaysOfWeekString | String | Days of week event occurs on separated by commas |
ReservationsEnabled | Boolean | If reservations are enabled for this event |
Openings | Integer | Reservation slot openings |
TimeBeforeEventReservationsBegin | Integer | Amount of time in ticks prior to the event start time that reservations begin |
TimeBeforeEventReservationsEnd | Integer | Amount of time in ticks prior to the event start time that reservations end |
MinimumAge | Integer | Minimum age for event reservations |
MaximumAge | Integer | Maximum age for event reservations |
MembershipLevel | String | The membership level required to make a reservation (A=Any Membership, F=Full Privilege Members Only, P=Program Members Only, O=Program or Non-Members Only, N=Non-Members Only, E=Everyone) |
Reservations | JSON array | JSON array of objects that represent reservations for the event |
ReservationsBeginDateJson | JSON Object | JSON object representing the UTC time of when reservations begin |
ReservationsEndDateJson | JSON Object | JSON object representing the UTC time of when reservations end |
Search for events in class schedule format
Required Permission: Sales-Calendar Events(Modify)
# Example Search calendar events in class schedule format URL
/Sales/API/CalendarEvent/SearchClassScheduleEvents?BeginDate=09/01/2020&EndDate=09/07/2020&LocationID=12
To search calendar events in class schedule format you must make a GET request to the following URL:
/Sales/API/CalendarEvent/SearchClassScheduleEvents
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing calendar events in class schedule format.
Result example :
[{"title":"All Ages - Teaching Pool","recurType":"",
"eventSeriesInstanceCount":0,"eventSeriesStartDate":"",
"status":"Confirmed","createdDate":"2020-09-03T10:30:00Z","lastUpdatedDate":"2020-09-03T10:30:00Z",
"meetingLink":"","equipment":"","hostName":"Self-Guided",
"eventSeriesId":14614,"level":"",
"category":"Open Swim","eventImage":"","startDate":"2020-09-03T10:30:00Z",
"endDate":"2020-09-03T11:15:00Z","location":"Teaching Pool",
"BranchName":"Branch YMCA","LocationName":"Teaching Pool",
"ReservationsEnabled":true,"WaitlistEnabled":true,"WaitlistOpenings":5,
"NbrOfAttendees":0,"Openings":10,"MinimumAge":12,"MaximumAge":99, "Cancelled": false,
"NbrOfReservations":2,"NbrOfWaitlists":0,,"ReservationsBeginDateJson":{"Year":1,"Month":1,"Day":1,"Hour":5,"Minute":0,"Second":0,"IsUTC":1},
"ReservationsEndDateJson":{"Year":9999,"Month":12,"Day":31,"Hour":23,"Minute":59,"Second":59,"IsUTC":1}}]}}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
BeginDate | Date | (required) Date to start looking for calendar events |
EndDate | Date | (required) Date to stop looking for calendar events |
MemberID | Integer | (optional) If a Member ID is passed, only events that have reservations with that Member ID will be returned |
FamilyID | Integer | (optional) If a Family ID is passed with Member ID, only events that have reservations with the specific member associated with the Member ID and Family ID will be returned |
MemberFamilyID | String | (optional) If a MemberFamilyID in the form of MemberID-FamilyID is passed, only events that have reservations with the specific member associated with the Member ID and Family ID will be returned |
WaitlistMemberID | Integer | (optional) If a Waitlist Member ID is passed, only events that have waitlists with that Member ID will be returned |
WaitlistFamilyID | Integer | (optional) If a Waitlist Family ID is passed with Member ID, only events that have waitlists with the specific member associated with the Member ID and Family ID will be returned |
WaitlistMemberFamilyID | String | (optional) If a WaitlistMemberFamilyID in the form of MemberID-FamilyID is passed, only events that have waitlists with the specific member associated with the Member ID and Family ID will be returned |
BranchID | Integer | (optional) Branch ID where events take place |
CategoryID | Integer | (optional) Category ID for events |
LocationID | Integer | (optional) Location ID for events |
InstructorID | Integer | (optional) Instructor ID for events |
EventID | Integer | (optional) Event ID to search for |
BranchIDs | String | (optional) Branch IDs where events take place in comma string delimited format ex: (10,12,13) |
CategoryIDs | String | (optional) Category IDs for events in comma string delimited format ex: (110,112,113) |
LocationIDs | String | (optional) Location IDs for events in comma string delimited format ex: (55,77,88) |
InstructorIDs | String | (optional) Instructor IDs for events in comma string delimited format ex: (1,22,33) |
RESPONSE EVENT PROPERTIES
Field | Type | Description |
---|---|---|
title | String | Event name |
recurType | String | Basic RFC5545 format string that represents the event's recurring pattern (ex: Recur monthly="FREQ=MONTHLY;" recur yearly="FREQ=YEARLY;" recur daily="FREQ=DAILY;" recur weekly by day="FREQ=WEEKLY;BYDAY=SU,TU,TH,SA;" where the BYDAY property can use the day values MO="Monday", TU="Tuesday", WE="Wednesday", TH="Thursday", FR="Friday", SA="Saturday", SU="Sunday" |
eventSeriesInstanceCount | Integer | Event series instance count always 0 |
eventSeriesStartDate | String | Event series start date if event is recurring in UTC format |
status | String | Event status |
createdDate | String | Event create date in UTC Format |
lastUpdatedDate | String | Event last updated date in UTC Format |
meetingLink | String | Event meeting link always blank |
description | String | Event description |
equipment | String | Event equipment always blank |
hostName | String | Event host name (instructor name) |
eventSeriesId | Integer | Event ID |
level | String | Event level always blank |
category | String | Event category |
eventImage | String | Event image always blank |
startDate | String | Event start date in UTC Format |
endDate | String | Event end date in UTC Format |
location | String | Event location |
BranchID | Integer | Event Branch ID |
BranchName | String | Event Branch Name |
LocationName | String | Event Location Name |
LocationID | Integer | Event Location ID |
InstructorID | Integer | Event Instructor ID |
CategoryID | Integer | Event Category ID |
ReservationsEnabled | Boolean | If reservations are enabled for this event |
WaitlistEnabled | Boolean | If waitlists are enabled for this event |
WaitlistOpenings | Integer | Waitlist slot openings |
NbrOfAttendees | Integer | Number of attendees entered by staff |
Openings | Integer | Reservation slot openings |
MinimumAge | Integer | Minimum age for event reservations |
MaximumAge | Integer | Maximum age for event reservations |
Cancelled | Boolean | True if the event is cancelled |
NbrOfReservations | Integer | Current number of members that have reserved a spot. Openings-NbrOfReservations = Current total number of open reservation spots |
NbrOfWaitlists | Integer | Current number of members that have reserved a waitlist spot. WaitlistOpenings-NbrOfWaitlists = Current total number of open waitlist spots |
ReservationsBeginDateJson | JSON Object | JSON object representing the UTC time of when reservations begin |
ReservationsEndDateJson | JSON Object | JSON object representing the UTC time of when reservations end |
PassedMemberFamilyIDHasReservation | Boolean | True if the passed MemberID and FamilyID has a reservation for the event |
PassedWaitlistMemberFamilyIDHasWaitlist | Boolean | True if the passed WaitlistMemberID and WaitlistFamilyID has a waitlist for the event |
EventDate | String | Event date in UTC Format |
Search for waitlists and reservations
Required Permission: Sales-Calendar Events(Modify)
# Example Search calendar waitlists and reservations URL
/Sales/API/CalendarEvent/SearchWaitlistsAndReservations?BeginDate=09/01/2020&EndDate=09/07/2020&MemberID=123&FamilyID=-1
To search calendar waitlists and reservations you must make a GET request to the following URL:
/Sales/API/CalendarEvent/SearchWaitlistsAndReservations
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing calendar events that the passed member has waitlists and reservations for.
Result example :
[{"title":"All Ages - Teaching Pool","recurType":"",
"eventSeriesInstanceCount":0,"eventSeriesStartDate":"",
"status":"Confirmed","createdDate":"2020-09-03T10:30:00Z","lastUpdatedDate":"2020-09-03T10:30:00Z",
"meetingLink":"","equipment":"","hostName":"Self-Guided",
"eventSeriesId":14614,"level":"",
"category":"Open Swim","eventImage":"","startDate":"2020-09-03T10:30:00Z",
"endDate":"2020-09-03T11:15:00Z","location":"Teaching Pool",
"BranchName":"Branch YMCA","LocationName":"Teaching Pool",
"ReservationsEnabled":true,"WaitlistEnabled":true,"WaitlistOpenings":5,
"NbrOfAttendees":0,"Openings":10,"MinimumAge":12,"MaximumAge":99,
"NbrOfReservations":2,"NbrOfWaitlists":0,,"ReservationsBeginDateJson":{"Year":1,"Month":1,"Day":1,"Hour":5,"Minute":0,"Second":0,"IsUTC":1},
"ReservationsEndDateJson":{"Year":9999,"Month":12,"Day":31,"Hour":23,"Minute":59,"Second":59,"IsUTC":1}, "IsReservation": true, "IsWaitlist": false, "MemberID": 123, "FamilyID": 1, "IsCancelled": false}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
BeginDate | Date | (required) Date to start looking for waitlists and reservations |
EndDate | Date | (required) Date to stop looking for waitlists and reservations |
MemberID | Integer | (optional) If a Member ID is passed, only waitlists and reservations with that Member ID will be returned |
FamilyID | Integer | (optional) If a Family ID is passed with Member ID, only waitlists and reservations with the specific member associated with the Member ID and Family ID will be returned |
MemberFamilyID | String | (optional) If a MemberFamilyID in the form of MemberID-FamilyID is passed, only waitlists and reservations with the specific member associated with the Member ID and Family ID will be returned |
RESPONSE EVENT PROPERTIES
Field | Type | Description |
---|---|---|
title | String | Event name |
recurType | String | Basic RFC5545 format string that represents the event's recurring pattern (ex: Recur monthly="FREQ=MONTHLY;" recur yearly="FREQ=YEARLY;" recur daily="FREQ=DAILY;" recur weekly by day="FREQ=WEEKLY;BYDAY=SU,TU,TH,SA;" where the BYDAY property can use the day values MO="Monday", TU="Tuesday", WE="Wednesday", TH="Thursday", FR="Friday", SA="Saturday", SU="Sunday" |
eventSeriesInstanceCount | Integer | Event series instance count always 0 |
eventSeriesStartDate | String | Event series start date if event is recurring in UTC format |
status | String | Event status |
createdDate | String | Event create date in UTC Format |
lastUpdatedDate | String | Event last updated date in UTC Format |
meetingLink | String | Event meeting link always blank |
description | String | Event description |
equipment | String | Event equipment always blank |
hostName | String | Event host name (instructor name) |
eventSeriesId | Integer | Event ID |
level | String | Event level always blank |
category | String | Event category |
eventImage | String | Event image always blank |
startDate | String | Event start date in UTC Format |
endDate | String | Event end date in UTC Format |
location | String | Event location |
BranchID | Integer | Event Branch ID |
BranchName | String | Event Branch Name |
LocationName | String | Event Location Name |
ReservationsEnabled | Boolean | If reservations are enabled for this event |
WaitlistEnabled | Boolean | If waitlists are enabled for this event |
WaitlistOpenings | Integer | Waitlist slot openings |
NbrOfAttendees | Integer | Number of attendees entered by staff |
Openings | Integer | Reservation slot openings |
MinimumAge | Integer | Minimum age for event reservations |
MaximumAge | Integer | Maximum age for event reservations |
NbrOfReservations | Integer | Current number of members that have reserved a spot. Openings-NbrOfReservations = Current total number of open reservation spots |
NbrOfWaitlists | Integer | Current number of members that have reserved a waitlist spot. WaitlistOpenings-NbrOfWaitlists = Current total number of open waitlist spots |
ReservationsBeginDateJson | JSON Object | JSON object representing the UTC time of when reservations begin |
ReservationsEndDateJson | JSON Object | JSON object representing the UTC time of when reservations end |
IsReservation | Boolean | True if the object is a reservation |
IsWaitlist | Boolean | True if the object is a waitlist |
Member | String | Member first and last name associated with the waitlist/reservation |
MemberID | Integer | Member ID associated with the waitlist/reservation |
FamilyID | Integer | Family ID associated with the waitlist/reservation |
IsCancelled | Boolean | True if the reservation/waitlist is cancelled |
Import calendar events
Required Permission: Sales-Calendar Events(Modify)
# Example CURL to import calendar events
curl \
-X POST {baseUrl}/Sales/API/CalendarEvent/ImportEvents \
-H 'Authorization: Bearer {access_token}' \
-d 'Events=[{"EventID":0, "Name": "Test event import not recurring", "Description": "Import 1", "IsAllDay": false, "RecurringPattern": "", "BeginDate": "09/01/2020", "EndDate": "09/01/2020", "MilitaryBeginTime": "3:00","MilitaryEndTime": "5:00", "BranchID": 100, "CategoryID": 0, "LocationID": 0, "InstructorID": 0, "Category": "", "Location": "", "Instructor": "","ReservationsEnabled": false, "Openings": 0, "TimeBeforeEventReservationsBegin": 0,"TimeBeforeEventReservationsEnd": 0, "MinimumAge": 0, "MaximumAge": 200, "MembershipLevel": "E"}]'
To import calendar events you must make a POST request to the following URL:
/Sales/API/CalendarEvent/ImportEvents
The request must contain a POST parameter of Events that represents a JSON array of events to import. Events that already exist for the EventID will be updated. Instructors, Categories, and Locations that do not exist will be created.
If the request is successful, a HTTP 200
response will be returned with a JSON object containing properties for NumberOfEventsUpdated and NumberOfEventsCreated.
Example JSON of Events to pass to Sales/API/CalendarEvent/ImportEvents to create:
[
{"EventID":0, "Name": "Test event import not recurring", "Description": "Import 1", "IsAllDay": false, "RecurringPattern": "", "BeginDate": "09/01/2020", "EndDate": "09/01/2020", "MilitaryBeginTime": "3:00",
"MilitaryEndTime": "5:00", "BranchID": 100, "CategoryID": 0, "LocationID": 0, "InstructorID": 0, "Category": "", "Location": "", "Instructor": "",
"ReservationsEnabled": false, "Openings": 0, "TimeBeforeEventReservationsBegin": 0,
"TimeBeforeEventReservationsEnd": 0, "MinimumAge": 0, "MaximumAge": 200, "MembershipLevel": "E"},
{"EventID":0, "Name": "Test event import recurring", "Description": "Import 2 recurring weekly on Tuesdays and Thursdays", "IsAllDay": false, "RecurringPattern": "FREQ=WEEKLY;BYDAY=TU,TH;",
"BeginDate": "09/15/2020", "EndDate": "10/19/2020", "MilitaryBeginTime": "4:00",
"MilitaryEndTime": "6:00", "BranchID": 100, "CategoryID": 0, "LocationID": 0, "InstructorID": 0, "Category": "", "Location": "", "Instructor": "",
"ReservationsEnabled": false, "Openings": 0, "TimeBeforeEventReservationsBegin": 0,
"TimeBeforeEventReservationsEnd": 0, "MinimumAge": 0, "MaximumAge": 200, "MembershipLevel": "E"},
{"EventID":0, "Name": "Test event import create category and location for branch", "Description": "Import 3 create category and location for branch if they do not exist", "IsAllDay": false, "RecurringPattern": "",
"BeginDate": "09/02/2020", "EndDate": "09/02/2020", "MilitaryBeginTime": "2:00",
"MilitaryEndTime": "5:00", "BranchID": 100, "CategoryID": 0, "LocationID": 0, "InstructorID": 0, "Category": "Category name to create", "Location": "Location name to create", "Instructor": "",
"ReservationsEnabled": false, "Openings": 0, "TimeBeforeEventReservationsBegin": 0,
"TimeBeforeEventReservationsEnd": 0, "MinimumAge": 0, "MaximumAge": 200, "MembershipLevel": "E"},
{"EventID":0, "Name": "Test event import with reservations", "Description": "Import 4 with reservations only for non recurring events", "IsAllDay": false, "RecurringPattern": "",
"BeginDate": "09/03/2020", "EndDate": "09/03/2020", "MilitaryBeginTime": "3:00",
"MilitaryEndTime": "16:00", "BranchID": 100, "CategoryID": 0, "LocationID": 0, "InstructorID": 0, "Category": "", "Location": "", "Instructor": "",
"ReservationsEnabled": true, "Openings": 2, "TimeBeforeEventReservationsBegin": 86400,
"TimeBeforeEventReservationsEnd": 900, "MinimumAge": 0, "MaximumAge": 200, "MembershipLevel": "E"}
]
Response:
{"NumberOfEventsUpdated":0,"NumberOfEventsCreated":4}
POST PARAMETERS
Field | Type | Description |
---|---|---|
Events | JSON Array | (required) JSON array of Calendar events to create or update. If the event already exists for the EventID, it will be updated. If the event does not exist, it will be created. |
IMPORT EVENT PROPERTIES
Field | Type | Description |
---|---|---|
EventID | Integer | Event identifier |
Name | String | Event name. Always required. |
Description | String | Event description. |
BranchID | Integer | Event Branch ID |
BeginDate | Date | Event begin date. Always required. |
EndDate | Date | Event end date. Always required. |
IsAllDay | Boolean | True if event takes place all day |
RecurringPattern | String | Basic RFC5545 format string that represents the event's recurring pattern (ex: Recur monthly="FREQ=MONTHLY;" recur yearly="FREQ=YEARLY;" recur daily="FREQ=DAILY;" recur weekly by day="FREQ=WEEKLY;BYDAY=SU,TU,TH,SA;" where the BYDAY property can use the day values MO="Monday", TU="Tuesday", WE="Wednesday", TH="Thursday", FR="Friday", SA="Saturday", SU="Sunday" |
CategoryID | Integer | Event Category ID |
LocationID | Integer | Event Location ID |
InstructorID | Integer | Event Instructor ID |
Category | String | Event Category Name. Category will be created if it does not exist. |
Location | String | Event Location Name. Location will be created if it does not exist. |
Instructor | String | Event Instructor Name. Instructor will be created if it does not exist. |
MilitaryBeginTime | String | Start time of event in military time. Required if event is not all day (IsAllDay=false). |
MilitaryEndTime | String | End time of the event in military time. Required if event is not all day (IsAllDay=false). |
ReservationsEnabled | Boolean | If reservations are enabled for this event. Reservations can only be enabled for non recurring events. |
Openings | Integer | Reservation slot openings |
WaitlistEnabled | Boolean | If waitlists are enabled for this event. Waitlists can only be enabled for non recurring events. |
WaitlistOpenings | Integer | Waitlist slot openings |
TimeBeforeEventReservationsBegin | Integer | Amount of time in seconds prior to the event start time that reservations begin |
TimeBeforeEventReservationsEnd | Integer | Amount of time in seconds prior to the event start time that reservations end |
MinimumAge | Integer | Minimum age for event reservations |
MaximumAge | Integer | Maximum age for event reservations |
MembershipLevel | String | The membership level required to make a reservation (A=Any Membership, F=Full Privilege Members Only, P=Program Members Only, O=Program or Non-Members Only, N=Non-Members Only, E=Everyone) |
Search for calendar event reservations
Required Permission: Sales-Calendar Events(Allow)
# Example Search calendar event reservations URL
/Sales/API/CalendarEvent/SearchReservations?EventID=123
To search calendar event reservations you must make a GET request to the following URL:
/Sales/API/CalendarEvent/SearchReservations
{EventID} is a required query string parameter.
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing calendar event reservations.
Result example :
[{"EventID":123,
"MemberID":1111,
"FamilyID":0},
{"EventID":123,
"MemberID":1234,
"FamilyID":1}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
EventID | Integer | (required) The EventID associated with the calendar event to search reservations for. The EventID can be gotten by searching calendar events with the /Sales/API/CalendarEvent endpoint. |
RESPONSE PROPERTIES
Field | Type | Description |
---|---|---|
EventID | Integer | Event identifier |
MemberID | Integer | Member identifier associated with the member reservation is for. |
FamilyID | Integer | Family identifier associated with the member reservation is for. |
Search for calendar event waitlists
Required Permission: Sales-Calendar Events(Allow)
# Example Search calendar event waitlists URL
/Sales/API/CalendarEvent/SearchWaitLists?EventID=123
To search calendar event waitlists you must make a GET request to the following URL:
/Sales/API/CalendarEvent/SearchWaitLists
{EventID} is a required query string parameter.
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing calendar event waitlists. The waitlists are ordered by CreateDateTime and the oldest waitlist will be first in the returned array.
Result example :
[{"EventID":123,
"MemberID":1111,
"FamilyID":0},
{"EventID":123,
"MemberID":1234,
"FamilyID":1}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
EventID | Integer | (required) The EventID associated with the calendar event to search waitlists for. The EventID can be gotten by searching calendar events with the /Sales/API/CalendarEvent endpoint. |
RESPONSE PROPERTIES
Field | Type | Description |
---|---|---|
EventID | Integer | Event identifier |
MemberID | Integer | Member identifier associated with the member waitlist is for. |
FamilyID | Integer | Family identifier associated with the member waitlist is for. |
Check member event eligibility
Required Permission: Sales-Calendar Events(Modify)
# Example Check if member family is eligible to make a reservation for an event URL
/Sales/API/CalendarEvent/CheckEligibility?EventID=1&MemberID=1234
To check if a member is eligible to make a reservation/waitlist for an event you must make a GET request to the following URL:
/Sales/API/CalendarEvent/CheckEligibility
{EventID} is a required query string parameter. If the {MemberID} query string parameter is not passed, the member will be gotten from the access token. If the {FamilyID} query string parameter is not passed and the {MemberID} parameter is passed, eligibility will be checked for every member in the family. The optional {CheckToAddToWaitList} boolean query string parameter can be passed to check if the member is eligible to be added to the waitlist.
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing if a member is eligible to make a reservation/waitlist.
Result example :
[{"EventID":1,
"MemberID":1234,
"FamilyID":0,
"MemberFamilyID": "1234-0",
"MemberName": "John Doe",
"IsEligible": false,
"HasReservation": false,
"HasWaitList": false,
"ErrorMessage": "Reservations did not begin yet."},
{"EventID":1,
"MemberID":1234,
"FamilyID":1,
"MemberFamilyID": "1234-1",
"MemberName": "Jane Doe",
"IsEligible": false,
"HasReservation": false,
"HasWaitList": false,
"ErrorMessage": "Member must be at least 21 years old to attend this event."}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
EventID | Integer | (required) The EventID associated with the calendar event to check reservation eligibility for. |
MemberID | Integer | (optional) Member ID associated with member. If the current access token is associated with a member, the parameter is optional and the elgibility will be checked for the member associated with the access token. |
FamilyID | Integer | (optional) Family ID associated with member. If Family ID is not passed, eligibility will be checked for every member in the family. |
CheckToAddToWaitList | Boolean | (optional) Indicates if the endpoint should check if the member is eligible to be added to the waitlist. If the value is 0, the endpoint will check if the member is valid to make a reservation. If the value is 1, the endpoint will check if the member is valid to make a waitlist. |
RESPONSE PROPERTIES
Field | Type | Description |
---|---|---|
EventID | Integer | Event identifier |
MemberID | Integer | Member identifier |
FamilyID | Integer | Family identifier |
MemberFamilyID | String | MemberID - FamilyID |
MemberName | String | First and last name of the member |
IsEligible | Boolean | True if member can make a reservation for this event |
HasReservation | Boolean | True if member has already made a reservation for this event |
HasWaitList | Boolean | True if member has already made a waitlist for this event |
ErrorMessage | String | Gives more information on why the member is not eligible to make a reservation/waitlist if IsEligible is false. |
Make event reservation
Required Permission: Sales-Calendar Events(Modify)
# Example CURL to make calendar event reservation
curl \
-X POST {baseUrl}/Sales/API/CalendarEvent/MakeReservation \
-H 'Authorization: Bearer {access_token}' \
-d 'EventID=1234&MemberID=1111&FamilyID=0'
To make a calendar event reservation you must make a POST request to the following URL:
/Sales/API/CalendarEvent/MakeReservation
The request must contain the POST parameters of EventID, MemberID, and FamilyID.
If the request is successful, a HTTP 200
response will be returned with a JSON object containing a boolean property called 'success'.
Response:
{"success":true}
POST PARAMETERS
Field | Type | Description |
---|---|---|
EventID | Integer | (required) The event ID associated with the calendar event that the reservation is for. The EventID can be gotten by searching calendar events with the /Sales/API/CalendarEvent endpoint. |
MemberID | Integer | (required) MemberID associated with member reservation is for. |
FamilyID | Integer | (required) FamilyID assocated with member reservation is for. |
RESPONSE
Field | Type | Description |
---|---|---|
success | Boolean | True if reservation was made successfully |
Cancel event reservation
Required Permission: Sales-Calendar Events(Modify)
# Example CURL to cancel calendar event reservation
curl \
-X POST {baseUrl}/Sales/API/CalendarEvent/CancelReservation \
-H 'Authorization: Bearer {access_token}' \
-d 'EventID=1234&MemberID=1111&FamilyID=0'
To cancel a calendar event reservation you must make a POST request to the following URL:
/Sales/API/CalendarEvent/CancelReservation
The request must contain the POST parameters of EventID, MemberID, and FamilyID.
If the request is successful, a HTTP 200
response will be returned with a JSON object containing a boolean property called 'success'.
Response:
{"success":true}
POST PARAMETERS
Field | Type | Description |
---|---|---|
EventID | Integer | (required) The event ID associated with the calendar event that the reservation is for. The EventID can be gotten by searching calendar events with the /Sales/API/CalendarEvent endpoint. |
MemberID | Integer | (required) MemberID associated with member reservation is for. |
FamilyID | Integer | (required) FamilyID assocated with member reservation is for. |
RESPONSE
Field | Type | Description |
---|---|---|
success | Boolean | True if reservation was cancelled successfully |
Make event waitlist
Required Permission: Sales-Calendar Events(Modify)
# Example CURL to make calendar event waitlist
curl \
-X POST {baseUrl}/Sales/API/CalendarEvent/MakeWaitList \
-H 'Authorization: Bearer {access_token}' \
-d 'EventID=1234&MemberID=1111&FamilyID=0'
To make a calendar event waitlist you must make a POST request to the following URL:
/Sales/API/CalendarEvent/MakeWaitList
The request must contain the POST parameters of EventID, MemberID, and FamilyID.
If the request is successful, a HTTP 200
response will be returned with a JSON object containing a boolean property called 'success'.
Response:
{"success":true}
POST PARAMETERS
Field | Type | Description |
---|---|---|
EventID | Integer | (required) The event ID associated with the calendar event that the waitlist is for. The EventID can be gotten by searching calendar events with the /Sales/API/CalendarEvent endpoint. |
MemberID | Integer | (required) MemberID associated with member waitlist is for. |
FamilyID | Integer | (required) FamilyID assocated with member waitlist is for. |
RESPONSE
Field | Type | Description |
---|---|---|
success | Boolean | True if waitlist was made successfully |
Cancel event waitlist
Required Permission: Sales-Calendar Events(Modify)
# Example CURL to cancel calendar event waitlist
curl \
-X POST {baseUrl}/Sales/API/CalendarEvent/CancelWaitList \
-H 'Authorization: Bearer {access_token}' \
-d 'EventID=1234&MemberID=1111&FamilyID=0'
To cancel a calendar event waitlist you must make a POST request to the following URL:
/Sales/API/CalendarEvent/CancelWaitList
The request must contain the POST parameters of EventID, MemberID, and FamilyID.
If the request is successful, a HTTP 200
response will be returned with a JSON object containing a boolean property called 'success'.
Response:
{"success":true}
POST PARAMETERS
Field | Type | Description |
---|---|---|
EventID | Integer | (required) The event ID associated with the calendar event that the waitlist is for. The EventID can be gotten by searching calendar events with the /Sales/API/CalendarEvent endpoint. |
MemberID | Integer | (required) MemberID associated with member waitlist is for. |
FamilyID | Integer | (required) FamilyID assocated with member waitlist is for. |
RESPONSE
Field | Type | Description |
---|---|---|
success | Boolean | True if waitlist was cancelled successfully |
Search for calendar categories
Required Permission: Sales-Calendar Events(Allow)
# Example Search calendar categories URL
/Sales/API/CalendarEvent/SearchCategories
To search calendar categories you must make a GET request to the following URL:
/Sales/API/CalendarEvent/SearchCategories
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing calendar categories.
Result example :
[{"CategoryID":1,
"Name":"Fitness",
"Deleted":false}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
IncludeDeleted | Boolean | (optional) If deleted categories should be included. |
RESPONSE PROPERTIES
Field | Type | Description |
---|---|---|
CategoryID | Integer | Category identifier |
Name | String | Category name |
Deleted | Boolean | If category is deleted. |
Search for calendar locations
Required Permission: Sales-Calendar Events(Allow)
# Example Search calendar locations URL
/Sales/API/CalendarEvent/SearchLocations
To search calendar locations you must make a GET request to the following URL:
/Sales/API/CalendarEvent/SearchLocations
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing calendar locations.
Result example :
[{"LocationID":1,
"BranchID": 123,
"Name":"Swimming Pool",
"Deleted":false,
"BranchName": "YMCA Branch"}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
BranchID | Integer | (optional) Branch identifier. |
IncludeDeleted | Boolean | (optional) If deleted locations should be included. |
RESPONSE PROPERTIES
Field | Type | Description |
---|---|---|
LocationID | Integer | Location identifier |
BranchID | Integer | Branch identifier |
Name | String | Location name |
Deleted | Boolean | If category is deleted. |
BranchName | String | Branch name |
Search for calendar instructors
Required Permission: Sales-Calendar Events(Allow)
# Example Search calendar instructors URL
/Sales/API/CalendarEvent/SearchInstructors
To search calendar instructors you must make a GET request to the following URL:
/Sales/API/CalendarEvent/SearchInstructors
If the request is successful, a HTTP 200
response will be returned with a JSON array of objects representing calendar instructors.
Result example :
[{"InstructorID":1,
"BranchID": 123,
"Name":"John Doe",
"Deleted":false,
"BranchName": "YMCA Branch"}]
QUERY PARAMETERS
Field | Type | Description |
---|---|---|
BranchID | Integer | (optional) Branch identifier. |
IncludeDeleted | Boolean | (optional) If deleted instructors should be included. |
RESPONSE PROPERTIES
Field | Type | Description |
---|---|---|
InstructorID | Integer | Instructor identifier |
BranchID | Integer | Branch identifier |
Name | String | Instructor name |
Deleted | Boolean | If category is deleted. |
BranchName | String | Branch name |
Get calendar descriptors
Required Permission: Sales-Calendar Events(Allow)
# Example Get calendar descriptors URL
/Sales/API/CalendarEvent/GetBranchAndLocationDescriptors
To get calendar descriptors you must make a GET request to the following URL:
/Sales/API/CalendarEvent/GetBranchAndLocationDescriptors
If the request is successful, a HTTP 200
response will be returned with a JSON object with the properties of BranchDisplayName and LocationDisplayName.
Result example :
{"BranchDisplayName":"Branch",
"LocationDisplayName": "Type"}
RESPONSE PROPERTIES
Field | Type | Description |
---|---|---|
BranchDisplayName | String | The display name for the branch calendar filter. This value could be used as the branch filter label. |
LocationDisplayName | String | The display name for the location calendar filter. This value could be used as the location filter label. |
Response codes
The API uses the following response codes:
Error Code | Meaning |
---|---|
200 | Response was successful. |
201 | Response was successful and record was created. |
400 | API resource was not found. |
401 | Unauthorized to access this type of API resource with explanation. |
403 | Forbidden to access this type of API resource without explanation. |
404 | API resource was not found or forbidden to access this type of API resource. |
500 |
Internal server error. May occur if access_token is not present in the authorization header when requesting API resources or if the token is expired.
|
501 | API resource is not implemented yet. |