Skip to content

Version 1

Lee Sambridge edited this page May 29, 2024 · 8 revisions

Endurance Zone API - Version 1

Endpoints

Create new user

A new user is created by POSTing to the following endpoint:

[POST] /members

Form field Description
FirstName User first name
LastName User last name
EmailAddress User's email address
PartnerMemberId (Optional) Your unique identifier for this user
Country Acceptable values are: USA,UK,Canada,Europe,Mexico,Australia,New Zealand,Africa,India,Dubai,Austria,Belgium,Bulgaria,Switzerland,Germany,Denmark,Spain,France,Ireland,Italy,Luxembourg,Monaco,Netherlands,Norway,Sweden,Singapore,South Africa,UAE - *additional countries can be enabled as part of the onboarding
Type New (Case insensitive)
MemberLevel Acceptable values are: Basic, Basic Plus, Premium, Premium Plus

All form fields are required.

A successful response looks like:

{
    "ResultDetails": "User created successfully",
    "MemberUrl": "https://rewards.client.com/preload/client?iframe=ffe2SLrm4qrvyulsci",
    "Result": "200-OK"
}

Renew user

Renewing a subscription will set the renewal date to one year from the current date and will set the user status to ‘Active’. Either an EmailAddress or PartnerMemberId must be specified to identify the user that should be renewed.

[POST] /members

Form field Description
EmailAddress User's email address
PartnerMemberId Your unique identifier for this user
Type Renewal (Case insensitive)

A successful response looks like:

{
    "ResultDetails": "User subscription renewed successfully",
    "MemberUrl": "https://rewards.client.com/preload/client?iframe=ffe2SLrm4qrvyulsci",
    "Result": "200-OK"
}

Manage user

User details can be edited by submitting a request to the manage user endpoint including all required information. Either an EmailAddress or PartnerMemberId must be specified to identify the user that is being changed.

When a user manage request is received, if a user exists with a matching login, that record will be updated to reflect the submitted information. The fields that are updated are:

  • First Name
  • Last Name
  • MemberLevel
  • Email address

Managing members would typically be used to upgrade or downgrade a User level i.e. Basic -> Premium, Premium -> Premium Plus, Premium -> Basic etc…

[POST] /members

Form field Description
EmailAddress User's email address
PartnerMemberId Your unique identifier for this user
Type Manage (Case insensitive)
FirstName User first name
LastName User last name
Country Acceptable values are: USA,UK,Canada,Europe,Mexico,Australia,New Zealand,Africa,India,Dubai,Austria,Belgium,Bulgaria,Switzerland,Germany,Denmark,Spain,France,Ireland,Italy,Luxembourg,Monaco,Netherlands,Norway,Sweden,Singapore,South Africa,UAE - *additional countries can be enabled as part of the onboarding
MemberLevel Acceptable values are: Basic, Basic Plus, Premium, Premium Plus
NewEmailAddress New email address

If you wish to change the email address of a user, the new email address should be added as an optional parameter titled ‘NewEmailAddress’. FirstName, LastName and MemberLevel can be changed directly in the submitted parameters.

Cancel user

To cancel a user use the following endpoint and form fields. Either an EmailAddress or PartnerMemberId must be specified to identify the user that should be cancelled.

[POST] /members

Form field Description
EmailAddress User's email address
PartnerMemberId Your unique identifier for this user
Type Cancel (Case insensitive)

A successful response looks like:

{
    "ResultDetails": "User subscription cancelled successfully",
    "Result": "200-OK"
}

Lookup user

Use the following endpoint and form fields to retrieve information related to a specific user. Either an EmailAddress or PartnerMemberId must be specified to identify the user that is being looked up.

[POST] /members

Form field Description
EmailAddress User's email address
PartnerMemberId Your unique identifier for this user
Type Lookup (Case insensitive)

A typical response would be:

{
    "RenewalDate": "2024-12-05",
    "API": "Members",
    "JoinDate": "2023-12-06",
    "ResultDetails": "Lookup Results",
    "Result": "200-OK",
    "Identifier": 8791480,
    "MemberURL": "https://rewards.client.com/preload/client?iframe=ffe2SLrm4qrvyulsci",
    "MemberLevel": "Basic",
    "LastName": "LastName",
    "Status": "Active",
    "FirstName": "FirstName",
    "EmailAddress": "newone@test.com"
}

Clone this wiki locally