CROWDMANAGERCROWDMANAGER

Loyalty Summary

Description

The loyalty summary resource represents the current loyalty point balance of the given individual, along with his rank and a collection of awarded distinctions.


Fields

Name Description Type Supported Methods
balance The current point balance of the individual. long GET
distinctions A list of all the distinctions in the loyalty scheme with information about the ones earned by the individual. list of distinction GET
rank The current rank of the individual. rank GET
ranks A list of all available ranks in the loyalty scheme. list of rank GET

Distinction

Description

A distinction is an award given to any individual that gains enough points in total, or in a sliding window of time, depending on the loyalty scheme configuration.

E.g. a Frequent Visitor distinction is granted to every individual that obtains 30 points within a sliding window of the last 30 days.

Distinctions promote constantly earning points without adding a competitive element among individuals.

Fields

Name Description Type Supported Methods
id Id of the distinction. long GET
name The name of the distinction as configured in the loyalty scheme. string GET
description The description of the distinction as configured in the loyalty scheme string GET
imageUrl A URL that can be used to display the image of the distinction. The URL requires no authentication and can be embedded directly in client apps/sites. string GET
isEarned A flag determining if the individual is currently granted this distinction. bool GET

Rank

Description

A rank is an award given to any individual that gains enough points in total, or in a sliding window of time, to be positioned higher than a given fraction of all individuals depending on the loyalty scheme configuration.

E.g. a Gold Rank is granted to individuals that were placed within top 10% of all individuals in a ranking of points earned in a sliding window of the last 30 days. A Silver Rank is granted to individuals placed between 10% and 30% of all individuals in the same ranking.

Ranks promote constantly earning points in a highly competitive environment suitable for the most hard-core fans.

Fields

Name Description Type Supported Methods
id Id of the rank. long GET
name The name of the rank as configured in the loyalty scheme. string GET
description The description of the rank as configured in the loyalty scheme string GET
threshold The threshold required to obtain the rank. E.g. 0.01 means that the rank is granted to top 1% of individuals. double GET
imageUrl A URL that can be used to display the image of the rank. The URL requires no authentication and can be embedded directly in client apps/sites. string GET

Permissions


Read

List the loyalty summary for an individual given his/her credential.

Endpoint

GET https://api.crowdmanager.io/v2/{organization-id}/mypage/loyaltysummary

Warning The endpoint uses application/json content type instead of application/vnd.api+json used by most other endpoints in the API. The Accept header is entirely optional.

QUERY Parameters

Name Description Required
type The type of credential used. Supported values: phone, email. True
value The URL-encoded value of the credential. For phones, the value should follow the E164 RFC3966. True

Example

Request

GET https://api.crowdmanager.io/v2/1201/mypage/loyaltysummary?type=phone&value=%2B4722345678
Authorization: Basic aaabbbccc111222333

Response

{
   "balance":56,
   "rank":{
      "id":95,
      "name":"Gold Supporter",
      "description":"Top 1% within last 365 days",
      "imageUrl":"https://mypage.crowdmanager.io/assets/images/rank-placeholder.png",
      "threshold":0.01
   },
   "ranks":[
      {
         "id":96,
         "name":"Bronze Supporter",
         "description":"Top 30% within last 365 days",
         "imageUrl":"https://mypage.crowdmanager.io/assets/images/rank-placeholder.png",
         "threshold":0.3
      },
      {
         "id":110,
         "name":"Silver Supporter",
         "description":"Top 10% within last 365 days",
         "imageUrl":"https://mypage.crowdmanager.io/assets/images/rank-placeholder.png",
         "threshold":0.1
      },
      {
         "id":95,
         "name":"Gold Supporter",
         "description":"Top 1% within last 365 days",
         "imageUrl":"https://mypage.crowdmanager.io/assets/images/rank-placeholder.png",
         "threshold":0.01
      }
   ],
   "distinctions":[
      {
         "id":1393,
         "name":"FastEarning",
         "description":"FastEarning",
         "imageUrl":"https://mypage.crowdmanager.io/assets/images/distinction-placeholder.png",
         "isEarned":false
      },
      {
         "id":131,
         "name":"VIP",
         "description":"1000 points within last 365 days",
         "imageUrl":"https://mypage.crowdmanager.io/assets/images/distinction-placeholder.png",
         "isEarned":false
      },
      {
         "id":133,
         "name":"Regular Member",
         "description":"50 points ever",
         "imageUrl":"https://mypage.crowdmanager.io/assets/images/distinction-placeholder.png",
         "isEarned":false
      },
      {
         "id":134,
         "name":"Premium Member",
         "description":"10 points within last 30 days",
         "imageUrl":"https://mypage.crowdmanager.io/assets/images/distinction-placeholder.png",
         "isEarned":false
      }
   ]
}