Skip to content

Version 2

Lee Sambridge edited this page May 28, 2024 · 14 revisions

Endurance Zone API - Version 2

Endpoints

Create new member

A new member is created by POSTing to the following JSON body to the endpoint:

HTTP Response Values

    HTTP - 200 - Succesfull creation of a new member
    HTTP - 400 - The payload sent is not correct or valid

[POST] /v2/newmember

{
    "EmailAddress": "email@endurancezone.com",
    "PartnerMemberId" : ID
    "Type": "new",
    "firstName" : "FIRSTNAME",
    "lastName" : "LASTNAME",
    "country" :"UK",
    "memberLevel" :"Basic"
}
Name Description
FirstName Member first name
LastName Member last name
EmailAddress Member's email address
PartnerMemberId (Optional) Your unique identifier for this member
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

All fields are required.

A successful response looks like:

{
    "ResultDetails": "Member created successfully",
    "MemberUrl": "https://rewards.client.com/preload/client?iframe=ffe2SLrm4qrvyulsci",
       "Member": {
        "RenewalDate": "2025-05-27",
        "API": "Members",
        "JoinDate": "2024-05-28",
        "ResultDetails": "Lookup Results",
        "Result": "200-OK",
        "MemberURL": "https:///preload/sport80?iframe=4a73bchuqo5k5qh",
        "MemberLevel": "Basic",
        "LastName": "wZYCtDggWbIIaWFpbeeU",
        "Status": "Active",
        "FirstName": "wZYCtDggWbIIaWFpbeeU",
        "EmailAddress": "wzyctdggwbiiawfpbeeu@endurancezone.com",
        "Id": 15140131
    }
}

Renew member

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

HTTP Response Values

    HTTP - 200 - Succesfull renewal
    HTTP - 404 - Either the email address or the Partner Member Id used could not be found

[PATCH] /v2/renewmember

A renewal of a membership is created by PATCHing to the following JSON body to the endpoint:


{
    "EmailAddress": "email@emai.com",
    "PartnerMemberId" : ID
}
Field Description
EmailAddress Member's email address
PartnerMemberId Your unique identifier for this member
RenewDate UTC Date Time (optional - defaults to a year from now)

A successful response looks like:

{
    "ResultDetails": "Member subscription renewed successfully",
    "MemberUrl": "https://rewards.client.com/preload/client?iframe=ffe2SLrm4qrvyulsci",
     "Member": {
        "RenewalDate": "2025-05-27",
        "API": "Members",
        "JoinDate": "2024-04-25",
        "ResultDetails": "Lookup Results",
        "Result": "200-OK",
        "MemberURL": "https:///preload/sport80?iframe=vgnppl6vhJpUq1q2EaPV",
        "MemberLevel": "Basic",
        "LastName": "LASTNAME",
        "Status": "Active",
        "FirstName": "FIRSTNAME",
        "EmailAddress": "EMAIL@endurancezone.com",
        "Id": 15006401
    }
}

Manage member

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

When a member manage request is received, if a member 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 Member level i.e. Basic -> Premium, Premium -> Premium Plus, Premium -> Basic etc…

HTTP Response Values

    HTTP - 200 - Succesfull updated the supplied member
    HTTP - 400 - The payload sent is not correct or valid
    HTTP - 404 - Either the email address or the Partner Member Id used could not be found

[PATCH] /v2/managemember

Managing a membership is updated by PATCHing to the following JSON body to the endpoint:

{
    "EmailAddress": "7gvcwltsco77jvevl3h9@endurancezone.com",
    "firstName" : "FIRSTNAME",
    "lastName" : "{{randomString}}",
    "country" :"UK",
    "memberLevel" :"Basic",
    "NewEmailAddress": "{{randomString}}@endurancezone.com",
    "PartnerMemberId" : ID
}
Field Description
EmailAddress Member's email address
PartnerMemberId Your unique identifier for this member
Type Manage (Case insensitive)
FirstName Member first name
LastName Member 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 member, 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.

A successful response looks like:

{
    "ResultDetails": "Member details updated successfully",
    "Result": "200-OK",
    "Member": {
        "RenewalDate": "2025-05-27",
        "API": "Members",
        "JoinDate": "2024-04-25",
        "ResultDetails": "Lookup Results",
        "Result": "200-OK",
        "MemberURL": "https:///preload/sport80?iframe=vgnppl6vhJpUq1q2EaPV",
        "MemberLevel": "Basic",
        "LastName": "LASTNAME",
        "Status": "Active",
        "FirstName": "FIRSTNAME",
        "EmailAddress": "email@emai.com",
        "Id": 15006401
    }
}

Cancel member

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

[POST] /v2/CancelMember

HTTP Response Values

    HTTP - 200 - Succesfull creation of a new member
    HTTP - 400 - The payload sent is not correct or valid
    HTTP - 404 - Either the email address or the Partner Member Id used could not be found

Canceling a membership by POSTINGing to the following JSON body to the endpoint:

{
    "EmailAddress": "email@emai.com",
    "PartnerMemberId" : ID
}
Field Description
EmailAddress Member's email address
PartnerMemberId Your unique identifier for this member

A successful response looks like:

{
    "ResultDetails": "Member subscription cancelled successfully",
    "MemberUrl": "200-OK",
    "Member": {
        "RenewalDate": "2025-05-27",
        "API": "Members",
        "JoinDate": "2024-05-28",
        "ResultDetails": "Lookup Results",
        "Result": "200-OK",
        "MemberURL": "",
        "MemberLevel": "Basic",
        "LastName": "YtKxlpbKzjkqHy38VoO4",
        "Status": "Cancelled",
        "FirstName": "YtKxlpbKzjkqHy38VoO4",
        "EmailAddress": "ytkxlpbkzjkqhy38voo4@endurancezone.com_cancelled",
        "Id": 15140134
    }
}

Lookup member

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

HTTP Response Values

    HTTP - 200 - Succesfull lookup and find of members details
    HTTP - 404 - Either the email address or the Partner Member Id used could not be found

[GET] /lookupmember/EmailAddress={{emailAddress}}&PartnerMemberId={{ID}}

Query String Paremeter Description
EmailAddress Member's email address
PartnerMemberId Your unique identifier for this member

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",
    "Id": 15006401
}

Clone this wiki locally