Home

TrueLoyal Loyalty API

v2
Base URL
https://api.zinrelo.com/v2

The reference for every endpoint of the TrueLoyal Loyalty API, which is made up of the Admin, UI and Guest APIs. See the Loyalty API guides to create API keys and authenticate, and for rate limits and status codes.

Authentication

api_keyapiKey

An API key of your program. Admin API only.

API Key: api-key in header

access_tokenapiKey

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

API Key: access-token in header

partner_idapiKey

Your program's partner ID.

API Key: partner-id in header

Admin API

admin

Authenticated with an API key and your partner ID.

Admin API

Members

admin_members

List Members

GET
https://api.zinrelo.com/v2/loyalty/members

Parameters

start_cursorstringquery

For the first request, you do not need to send the start_cursor in the request param. The start cursor value will be populated in the response of the API call. You can use that value to fetch the next pages.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

enrolment_datestring{"gt":"01/21/2022"}query

This can be used to filter the list of members based on their enrolment_date. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: enrolment_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: enrolment_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: enrolment_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: enrolment_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: enrolment_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: enrolment_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

last_modified_datestring{"lt":"01/21/2022"}query

This can be used to filter the list of members based on their last_modified date. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: last_modified_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: last_modified_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: last_modified_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: last_modified_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: last_modified_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: last_modified_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

member_statusstringquery

Defaults to “active”. The other acceptable values are “blocked” and “opted_out”.

member_tagsArray<string>query

This can be used to filter the list of members based on the values they are tagged with. Child parameters are:

contain_all_of: Pass a single string which may contain one tag or multiple tags separated by comma to get a list of all members whose member tags list contains all the passed values in their member tags list. Example: {"contain_all_of":"active"}

contain_any_of: Pass a single string which may contain one tag or multiple tags separated by comma to get a list of all members whose member tags list contains at least one of the passed values. Example: {"contain_any_of":"active"}

contain_none_of: Pass a single string which may contain one tag or multiple tags separated by comma to get a list of all members whose member tags list contains none of the passed values. Example: {"contain_none_of":"active"}

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OK

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

List Members
curl -X GET 'https://api.zinrelo.com/v2/loyalty/members'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/members')
data = response.json()
{
  "data": {
    "total": 48,
    "next_cursor": "eyJzZWFyY2hfYWZ0ZXIiOiBbMTY3NDY0MzQzNjY2NV0sICJzdGFydF9pbmRleCI6IDJ9",
    "members": [
      {
        "last_name": "Doe",
        "twitter_handle": "www.twitter.com/john",
        "revenue": 0,
        "lifetime_points_expired": 0,
        "last_modified_date": "2023-02-07T06:00:05.345Z",
        "available_points": 10000,
        "lifetime_points_earned": 10000,
        "pending_points": 1000,
        "referral_URL": "https://zinrelo.com/ref/JOH4N54C",
        "member_status": "active",
        "email_address": "johndoe@gmail.com",
        "id": "63e1e8e47d5790000dc0c81b",
        "first_name": "John",
        "member_tags": [
          "memberadded",
          "membercreated"
        ],
        "referrer_code": "ANA855D6",
        "tier_info": {
          "current_period_start": "03/01/2022",
          "loyalty_tier_name": "Silver",
          "loyalty_tier_id": "zrl_silver",
          "current_period_end": "02/28/2023",
          "qualified_points": 0
        },
        "custom_attributes": {
          "City_Name": "Paris",
          "Marital_Status": "Married",
          "Income_Source": "Service",
          "Age_In_Years": "37",
          "Gender_Identity": "Male",
          "Graduation_Date": "15/12/1989 00:00:00"
        },
        "first_purchase_date": "12/12/2021",
        "lifetime_points_deducted": 0,
        "phone_number": "+1-65070177596",
        "points_expiration_schedule": null,
        "instagram_handle": "www.instagram.com/john",
        "referrer_name": "Anna Scott",
        "aov": null,
        "address": {
          "city": "Palo Alto",
          "country": "US",
          "line2": "537 Lytton Ave",
          "line1": "Suite #200",
          "state": "CA",
          "postal_code": "94307"
        },
        "deleted_date": null,
        "last_purchase_date": "12/02/2022",
        "lifetime_points_redeemed": 0,
        "preferred_language": "English",
        "number_of_purchases": 20,
        "number_of_redemptions": 0,
        "birthdate": "1900-08-26T00:00:00Z",
        "anniversary_date": "2023-02-07T06:00:04.589Z",
        "enrollment_date": "2023-02-07T06:00:04.589Z",
        "member_id": "5779678689"
      },
      {
        "last_name": "Scott",
        "twitter_handle": "www.twitter.com/anna",
        "revenue": 15002,
        "lifetime_points_expired": 0,
        "last_modified_date": "2023-01-25T11:03:55.594Z",
        "available_points": 25002,
        "lifetime_points_earned": 25002,
        "pending_points": 100,
        "referral_URL": "https://zinrelo.com/ref/ANN1QBDY",
        "member_status": "active",
        "email_address": "annascott286@gmail.com",
        "id": "63d107ec354176000a742cd7",
        "first_name": "Anna",
        "member_tags": [
          "exit_campaign_80456"
        ],
        "referrer_code": "463278John",
        "tier_info": {
          "current_period_start": "12/03/2022",
          "loyalty_tier_name": "Platinum",
          "loyalty_tier_id": "zrl_platinum",
          "current_period_end": "02/28/2024",
          "qualified_points": 15002
        },
        "custom_attributes": {
          "traveller_name": "Anna",
          "booking_date": "02/07/2023",
          "preferences": "British Airways",
          "high_value_purchase": 10000,
          "purchase_place": "London"
        },
        "first_purchase_date": "2023-01-25T10:45:47.616Z",
        "lifetime_points_deducted": 0,
        "phone_number": "+1-6507017134",
        "points_expiration_schedule": null,
        "instagram_handle": "www.instagram.com/anna",
        "referrer_name": "John Doe",
        "aov": null,
        "address": {
          "city": "Superior",
          "country": "US",
          "line2": "",
          "line1": "1000 S. McCaslin Blvd., Suite 301",
          "state": "CO",
          "postal_code": "15702"
        },
        "deleted_date": null,
        "last_purchase_date": "2023-01-25T11:03:55.235Z",
        "lifetime_points_redeemed": 0,
        "preferred_language": "English",
        "number_of_purchases": 4,
        "number_of_redemptions": 0,
        "birthdate": "07/01/1997",
        "anniversary_date": "03/12/2022",
        "enrollment_date": "2023-01-25T10:43:56.665Z",
        "member_id": "annascott2355"
      }
    ],
    "more": true
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Create a Loyalty Member

POST
https://api.zinrelo.com/v2/loyalty/members

Body

application/json
member_idstringrequired

Unique Identifier (Member ID) for the member object in the client’s system. Examples include “Customer ID”, “GUID”, “Email Address”, “Phone Number”

first_namestring

First name of the loyalty member.

Please Note: The first name should be less than 100 characters.

last_namestring

Last name of the loyalty member.

Please Note: The last name should be less than 100 characters.

email_addressstring

Email address of the loyalty member. You will not be able to use TrueLoyal’s in-built email notifications if this field is not set.

Note: Optional, if this is not marked as a unique field.

phone_numberstring+91-##########

Phone number of the loyalty member. Format : <+COUNTRY CODE - PHONE NUMBER> E.g : +1-7203332525 COUNTRY CODE defaults to +1

Note: Optional, if this is not marked as a unique field. REQUIRED if marked as unique.

birthdatestring08/26/1979

Birthdate of the loyalty member. Format : <MM/DD/YYYY>

Note: Our API records all date and time fields in UTC time.

anniversary_datestring12/06/2020

Wedding anniversary date of the loyalty member. Format : <MM/DD/YYYY>

Note: Our API records all date and time fields in UTC time.

twitter_handlestring

Twitter username of the loyalty member.

preferred_languagestringenglish

Enter your preferred language.

instagram_handlestring

Instagram username of the loyalty member.

addressobject

Address of the loyalty member. Child Parameters are as follows:

Show child attributes
line1string
line2string
citystring
statestring
countrystring
postal_codestring
referrer_codestring

If a member has used a referral code shared by a friend, which you may have captured in the user registration form, you may pass it in referrer_code to let TrueLoyal identify the friend who referred this member.

member_tagsArray<string>

List of tags that you’d want to tag this member with.

IMPORTANT: Updating the member tags will wipe out the existing tags and add the new array of tags. If you wish to append the new tag to an existing list, please make sure you retrieve the existing tags first , add the new tag to this list of existing tags and then make the update API call.

email_subscription_statusstring

Values can be ‘subscribed’ or ‘unsubscribed’. If ‘unsubscribed’, this member will not receive any email notifications triggered by TrueLoyal. Default value is ‘subscribed’.

member_statusstring

Accepted values in the request are ‘active’ , ‘blocked’, ‘opted_out’. Default is ‘active’. ‘active’ member is the one accumulating loyalty points and has access to rewards and earning opportunities. ‘blocked’ member is prohibited from participating in the program. ‘opted_out’ member is the one who has chosen to opt out of the loyalty program. 

current_tier_idstringzrl_silver

The ID of the tier the member should be assigned.

custom_attributesstring<json>{"wishlist" : ["shirt", "t-shirt"], "preferred stores" : ["USA", "France"] }

Apart from the above parameters, you can also pass in custom attributes that you want TrueLoyal to associate with this member. You will first need to define the custom member attributes and then use the internal IDs in the API to pass the data. All the custom attributes will have to be passed in a dictionary called ‘custom_attributes’ . ’For e . g - Let’s assume you define a new group called - Demographics Info and education, nationality, religion as the custom attributes in that group, the new dictionary that you can pass in the API is as follows:
“custom_attributes”: {"wishlist" : ["shirt", "t-shirt"], "preferred stores" : ["USA", "France"] }

Parameters

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Create a Loyalty Member
curl -X POST 'https://api.zinrelo.com/v2/loyalty/members' \
  -H 'Content-Type: application/json' \
  -d '{
    "member_id": "string",
    "first_name": "string",
    "last_name": "string",
    "email_address": "string",
    "phone_number": "+91-##########",
    "birthdate": "08/26/1979",
    "anniversary_date": "12/06/2020",
    "twitter_handle": "string",
    "preferred_language": "english",
    "instagram_handle": "string",
    "address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "country": "string",
      "postal_code": "string"
    },
    "referrer_code": "string",
    "member_tags": [
      "string"
    ],
    "email_subscription_status": "string",
    "member_status": "string",
    "current_tier_id": "zrl_silver",
    "custom_attributes": "{\"wishlist\" : [\"shirt\", \"t-shirt\"], \"preferred stores\" : [\"USA\", \"France\"] }"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "member_id": "string",
      "first_name": "string",
      "last_name": "string",
      "email_address": "string",
      "phone_number": "+91-##########",
      "birthdate": "08/26/1979",
      "anniversary_date": "12/06/2020",
      "twitter_handle": "string",
      "preferred_language": "english",
      "instagram_handle": "string",
      "address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "state": "string",
        "country": "string",
        "postal_code": "string"
      },
      "referrer_code": "string",
      "member_tags": [
        "string"
      ],
      "email_subscription_status": "string",
      "member_status": "string",
      "current_tier_id": "zrl_silver",
      "custom_attributes": "{\"wishlist\" : [\"shirt\", \"t-shirt\"], \"preferred stores\" : [\"USA\", \"France\"] }"
    }),
});

const data = await response.json();
import requests

payload = {
  "member_id": "string",
  "first_name": "string",
  "last_name": "string",
  "email_address": "string",
  "phone_number": "+91-##########",
  "birthdate": "08/26/1979",
  "anniversary_date": "12/06/2020",
  "twitter_handle": "string",
  "preferred_language": "english",
  "instagram_handle": "string",
  "address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "postal_code": "string"
  },
  "referrer_code": "string",
  "member_tags": [
    "string"
  ],
  "email_subscription_status": "string",
  "member_status": "string",
  "current_tier_id": "zrl_silver",
  "custom_attributes": "{\"wishlist\" : [\"shirt\", \"t-shirt\"], \"preferred stores\" : [\"USA\", \"France\"] }"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty/members', json=payload)
data = response.json()
Request Body
{
  "member_id": "string",
  "first_name": "string",
  "last_name": "string",
  "email_address": "string",
  "phone_number": "+91-##########",
  "birthdate": "08/26/1979",
  "anniversary_date": "12/06/2020",
  "twitter_handle": "string",
  "preferred_language": "english",
  "instagram_handle": "string",
  "address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "postal_code": "string"
  },
  "referrer_code": "string",
  "member_tags": [
    "string"
  ],
  "email_subscription_status": "string",
  "member_status": "string",
  "current_tier_id": "zrl_silver",
  "custom_attributes": "{\"wishlist\" : [\"shirt\", \"t-shirt\"], \"preferred stores\" : [\"USA\", \"France\"] }"
}
{
  "data": {
    "lifetime_points_earned": 100,
    "twitter_handle": "www.twitter.com/john",
    "revenue": 0,
    "lifetime_points_expired": 0,
    "last_modified_date": "03/10/2023 09:24:29",
    "available_points": 100,
    "last_name": "Doe",
    "referral_URL": "https://zinrelo.com//ref/JOH4F47O",
    "member_status": "active",
    "referral_code": "JOH4F47O",
    "email_address": "johndoe@gmail.com",
    "id": "640af74c955940000a629a67",
    "first_name": "John",
    "number_of_activities": "",
    "member_tags": [
      "membercreated",
      "memberadded",
      "addedmember"
    ],
    "referrer_code": "ANN9PJZN",
    "tier_info": {
      "current_period_start": "03/01/2023",
      "loyalty_tier_name": "Silver",
      "loyalty_tier_id": "zrl_silver",
      "current_period_end": "03/31/2023",
      "qualified_points": 100
    },
    "custom_attributes": {
      "City_Name": "Paris",
      "Marital_Status": "Married",
      "Income_Source": "Service",
      "Age_In_Years": "37",
      "Gender_Identity": "Male",
      "Graduation_Date": "15/12/1989 00:00:00"
    },
    "referrer_ID": "6409c685c487dc000b2b3039",
    "first_purchase_date": null,
    "lifetime_points_deducted": 0,
    "phone_number": "+1-6507017759",
    "points_expiration_schedule": [
      {
        "expiration_date": "11-Feb-2024  00:00:00",
        "points": 100
      }
    ],
    "instagram_handle": "www.instagram.com/john",
    "referrer_name": "Anna Scott",
    "aov": 0,
    "address": {
      "city": "Superior",
      "country": "US",
      "line2": "",
      "line1": "1000 S. McCaslin Blvd., Suite 301",
      "state": "CO",
      "postal_code": "12345"
    },
    "deleted_date": null,
    "last_purchase_date": null,
    "pending_points": 200,
    "lifetime_points_redeemed": 0,
    "preferred_language": "english",
    "number_of_purchases": 0,
    "gender": null,
    "number_of_redemptions": 0,
    "birthdate": "01/31/1900",
    "anniversary_date": "07/07/2021",
    "enrollment_date": "03/10/2023 09:24:28",
    "member_id": "greatMRT01003012",
    "email_subscription_status": "subscribed"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Retrieve a Loyalty Member with Member ID

GET
https://api.zinrelo.com/v2/loyalty/members/{member_id}

Parameters

member_idstringjohn.doe@gmail.comrequiredpath

Enter member ID.

idParamstringmember_idrequiredquery

Enter 'member_id' as idParam.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OK

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve a Loyalty Member with Member ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/members/{member_id}'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{member_id}', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/members/{member_id}')
data = response.json()
{
  "data": {
    "lifetime_points_earned": 101,
    "twitter_handle": "www.twitter.com/john",
    "revenue": 1,
    "lifetime_points_expired": 0,
    "last_modified_date": "04/04/2023 08:49:50",
    "available_points": 101,
    "pending_points": 100,
    "last_name": "Doe",
    "referral_URL": "https://shopsocially.com//ref/TES6CMHR",
    "member_status": "opted_out",
    "referral_code": "TES6CMHR",
    "email_address": "johndoe@gmail.com",
    "id": "642be3a67d79420009443840",
    "first_name": "John",
    "number_of_activities": "",
    "member_tags": [
      "memberretrieve",
      "retrievedmember"
    ],
    "referrer_code": null,
    "tier_info": {
      "current_period_start": "04/01/2023",
      "loyalty_tier_name": "Silver_1iuytry*&^%$漢字ës",
      "loyalty_tier_id": "zrl_silver",
      "current_period_end": "04/30/2023",
      "qualified_points": 101
    },
    "custom_attributes": {
      "City_Name": "Paris",
      "Marital_Status": "Married",
      "Income_Source": "Service",
      "Age_In_Years": "37",
      "Gender_Identity": "Male",
      "Graduation_Date": "15/12/1989 00:00:00"
    },
    "referrer_ID": null,
    "first_purchase_date": "04/04/2023",
    "lifetime_points_deducted": 0,
    "phone_number": "+1-65070177596",
    "points_expiration_schedule": [
      {
        "expiration_date": "5-Mar-2024  00:00:00",
        "points": 101
      }
    ],
    "instagram_handle": "www.instagram.com/john",
    "referrer_name": "Anna Scott",
    "aov": 1,
    "address": {
      "city": "Superior",
      "country": "US",
      "line2": "",
      "line1": "1000 S. McCaslin Blvd., Suite 301",
      "state": "CO",
      "postal_code": ""
    },
    "deleted_date": null,
    "last_purchase_date": "04/04/2023",
    "lifetime_points_redeemed": 0,
    "preferred_language": "english",
    "number_of_purchases": 1,
    "gender": null,
    "number_of_redemptions": 0,
    "birthdate": "01/31/1900",
    "anniversary_date": "07/07/2021",
    "enrollment_date": "04/04/2023 08:45:26",
    "member_id": "greatMRT040401",
    "email_subscription_status": "subscribed"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Update a Loyalty Member with Member ID

POST
https://api.zinrelo.com/v2/loyalty/members/{member_id}

Body

application/json
first_namestring

First name of the loyalty member.

Please Note: The first name should be less than 100 characters.

last_namestring

Last name of the loyalty member.

Please Note: The last name should be less than 100 characters.

email_addressstring

Email address of the loyalty member.

phone_numberstring+91-##########

Phone number of the loyalty member. Format : [COUNTRY CODE - PHONE NUMBER] E.g : 91-9960654555 COUNTRY CODE defaults to +1

birthdatestring08/26/1979

Birthdate of the loyalty member. Format : <MM/DD/YYYY>

Note: Our API records all date and time fields in UTC time.

anniversary_datestring12/06/2020

Wedding anniversary date of the loyalty member. Format : <MM/DD/YYYY>

Note: Our API records all date and time fields in UTC time.

preferred_languagestringenglish

Enter your preferred language.

twitter_handlestring

Twitter username of the loyalty member.

instagram_handlestring

Instagram username of the loyalty member.

addressobject

Address of the loyalty member. Child Parameters are as follows:

Show child attributes
line1string
line2string
citystring
statestring
countrystring
postal_codestring
referral_codestringwh36786

If a member used a referral code shared by a friend, which you may have captured in the user registration form, you may pass it in referral_code to let TrueLoyal identify the friend who referred this member.

member_tagsArray<string>

List of tags that you’d want to tag this member with.

IMPORTANT: Updating the member tags will wipe out the existing tags and add the new array of tags. If you wish to append the new tag to an existing list, please make sure you retrieve the existing tags first , add the new tag to this list of existing tags and then make the update API call.

email_subscription_statusstring

Values can be ‘subscribed’ or ‘unsubscribed’ . If ‘unsubscribed’, this member will not receive any email notifications triggered by TrueLoyal.

member_statusstring

Accepted values in the request are ‘active’ , ‘blocked’, ‘opted_out’. Default is ‘active’. ‘active’ member is the one accumulating loyalty points and has access to rewards and earning opportunities. ‘blocked’ member is prohibited from participating in the program. ‘opted_out’ member is the one who has chosen to opt out of the loyalty program. 

opted_out and/or blocked members can become active by passing member_status as 'active'.

current_tier_idstringzrl_gold

The ID of the tier to which the member should be assigned.

IMPORTANT: 

If the tier that you want to assign this member to is lower than the member’s existing tier (Tier downgrade scenario), the next time the member earns points, TrueLoyal will recalculate the qualified points to check whether the member is eligible for a tier upgrade. If the tier that you want to assign this member to, is higher than the member’s existing tier (Tier Upgrade scenario), the next time this member is penalized by means of a ‘Deduct’ transaction, TrueLoyal will recalculate the qualified points to check whether the member has enough points to be on the higher tier or else, this member will be downgraded. 

If you have period based tiers, at the end of every interval, TrueLoyal will check whether the member has enough qualified points to be on a certain tier. If a member does not have enough qualified points, they will be downgraded.

custom_attributesstring<json>{"nationality" : "USA", "Gender" : "Male"}

Apart from the above parameters, you can also update the custom attributes that you would have already defined. Let’s assume, you had defined a new group called - Demographics Info (demographics_info) and education, nationality, religion as the custom attributes in the group and you wish to update the nationality, you can update it as follows: 

“custom_attributes”: { “nationality” : “USA” }

Note: Only the parameters/attributes that you pass in the API request will be updated.

Parameters

member_idstringjohn.doe@gmail.comrequiredpath

Enter member ID.

idParamstringmember_idrequiredquery

Enter 'member_id' as idParam.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Update a Loyalty Member with Member ID
curl -X POST 'https://api.zinrelo.com/v2/loyalty/members/{member_id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "first_name": "string",
    "last_name": "string",
    "email_address": "string",
    "phone_number": "+91-##########",
    "birthdate": "08/26/1979",
    "anniversary_date": "12/06/2020",
    "preferred_language": "english",
    "twitter_handle": "string",
    "instagram_handle": "string",
    "address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "country": "string",
      "postal_code": "string"
    },
    "referral_code": "wh36786",
    "member_tags": [
      "string"
    ],
    "email_subscription_status": "string",
    "member_status": "string",
    "current_tier_id": "zrl_gold",
    "custom_attributes": "{\"nationality\" : \"USA\", \"Gender\" : \"Male\"}"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{member_id}', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "first_name": "string",
      "last_name": "string",
      "email_address": "string",
      "phone_number": "+91-##########",
      "birthdate": "08/26/1979",
      "anniversary_date": "12/06/2020",
      "preferred_language": "english",
      "twitter_handle": "string",
      "instagram_handle": "string",
      "address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "state": "string",
        "country": "string",
        "postal_code": "string"
      },
      "referral_code": "wh36786",
      "member_tags": [
        "string"
      ],
      "email_subscription_status": "string",
      "member_status": "string",
      "current_tier_id": "zrl_gold",
      "custom_attributes": "{\"nationality\" : \"USA\", \"Gender\" : \"Male\"}"
    }),
});

const data = await response.json();
import requests

payload = {
  "first_name": "string",
  "last_name": "string",
  "email_address": "string",
  "phone_number": "+91-##########",
  "birthdate": "08/26/1979",
  "anniversary_date": "12/06/2020",
  "preferred_language": "english",
  "twitter_handle": "string",
  "instagram_handle": "string",
  "address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "postal_code": "string"
  },
  "referral_code": "wh36786",
  "member_tags": [
    "string"
  ],
  "email_subscription_status": "string",
  "member_status": "string",
  "current_tier_id": "zrl_gold",
  "custom_attributes": "{\"nationality\" : \"USA\", \"Gender\" : \"Male\"}"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty/members/{member_id}', json=payload)
data = response.json()
Request Body
{
  "first_name": "string",
  "last_name": "string",
  "email_address": "string",
  "phone_number": "+91-##########",
  "birthdate": "08/26/1979",
  "anniversary_date": "12/06/2020",
  "preferred_language": "english",
  "twitter_handle": "string",
  "instagram_handle": "string",
  "address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "postal_code": "string"
  },
  "referral_code": "wh36786",
  "member_tags": [
    "string"
  ],
  "email_subscription_status": "string",
  "member_status": "string",
  "current_tier_id": "zrl_gold",
  "custom_attributes": "{\"nationality\" : \"USA\", \"Gender\" : \"Male\"}"
}
{
  "lifetime_points_earned": 10000,
  "twitter_handle": "www.twitter.com/john",
  "revenue": 0,
  "lifetime_points_expired": 0,
  "last_modified_date": "02/07/2023 06:00:05",
  "available_points": 10000,
  "pending_points": 100,
  "last_name": "Doe",
  "referral_URL": "https://zinrelo.com/ref/JOH4N54C",
  "member_status": "active",
  "referral_code": "JOH4N54C",
  "email_address": "johndoe@gmail.com",
  "id": "63e1e8e47d5790000dc0c81b",
  "first_name": "John",
  "number_of_activities": "",
  "member_tags": [
    "memberadded",
    "membercreated"
  ],
  "referrer_code": "ANA855D6",
  "tier_info": {
    "current_period_start": "03/01/2022",
    "loyalty_tier_name": "Silver",
    "loyalty_tier_id": "zrl_silver",
    "current_period_end": "02/28/2023",
    "qualified_points": 1000
  },
  "custom_attributes": {
    "City_Name": "Paris",
    "Marital_Status": "Married",
    "Income_Source": "Service",
    "Age_In_Years": "37",
    "Gender_Identity": "Male",
    "Graduation_Date": "15/12/1989 00:00:00"
  },
  "referrer_ID": "63dce02f1c31f902817d0118",
  "first_purchase_date": "09/30/2022",
  "lifetime_points_deducted": 0,
  "phone_number": "+1-6507017759",
  "points_expiration_schedule": [
    {
      "expiration_date": "7-Feb-2024  00:00:00",
      "points": 10000
    }
  ],
  "instagram_handle": "www.instagram.com/john",
  "referrer_name": "Anna Scott",
  "aov": 0,
  "address": {
    "city": "Palo Alto",
    "country": "US",
    "line2": "530 Lytton Ave",
    "line1": "Suite #200",
    "state": "CA",
    "postal_code": "94301"
  },
  "deleted_date": null,
  "last_purchase_date": "12/18/2022",
  "lifetime_points_redeemed": 0,
  "preferred_language": "english",
  "number_of_purchases": 0,
  "number_of_redemptions": 0,
  "birthdate": "08/26/1900",
  "anniversary_date": "10/17/2022",
  "enrollment_date": "10/17/2022 09:59:03",
  "member_id": "76543",
  "email_subscription_status": "subscribed"
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Delete a Loyalty Member with Member ID

DELETE
https://api.zinrelo.com/v2/loyalty/members/{member_id}

Parameters

member_idstringjohn.doe@gmail.comrequiredpath

Enter member ID.

idParamstringmember_idrequiredquery

Enter 'member_id' as idParam.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Delete a Loyalty Member with Member ID
curl -X DELETE 'https://api.zinrelo.com/v2/loyalty/members/{member_id}'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{member_id}', {
  method: 'DELETE',
});

const data = await response.json();
import requests

response = requests.delete('https://api.zinrelo.com/v2/loyalty/members/{member_id}')
data = response.json()
{
  "data": {
    "id": "63e1e8e47d5790000dc0c81b",
    "member_status": "deleted"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Retrieve a Loyalty Member with TrueLoyal-generated ID

GET
https://api.zinrelo.com/v2/loyalty/members/{id}

Parameters

idstring62d6439adfa6b74ab18eb1a6requiredpath

Add TrueLoyal generated ID.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OK

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve a Loyalty Member with TrueLoyal-generated ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/members/{id}'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{id}', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/members/{id}')
data = response.json()
{
  "data": {
    "lifetime_points_earned": 101,
    "twitter_handle": "www.twitter.com/john",
    "revenue": 1,
    "lifetime_points_expired": 0,
    "last_modified_date": "04/04/2023 08:49:50",
    "available_points": 101,
    "pending_points": 100,
    "last_name": "Doe",
    "referral_URL": "https://shopsocially.com//ref/TES6CMHR",
    "member_status": "opted_out",
    "referral_code": "TES6CMHR",
    "email_address": "johndoe@gmail.com",
    "id": "642be3a67d79420009443840",
    "first_name": "John",
    "number_of_activities": "",
    "member_tags": [
      "memberretrieve",
      "retrievedmember"
    ],
    "referrer_code": null,
    "tier_info": {
      "current_period_start": "04/01/2023",
      "loyalty_tier_name": "Silver_1iuytry*&^%$漢字ës",
      "loyalty_tier_id": "zrl_silver",
      "current_period_end": "04/30/2023",
      "qualified_points": 101
    },
    "custom_attributes": {
      "City_Name": "Paris",
      "Marital_Status": "Married",
      "Income_Source": "Service",
      "Age_In_Years": "37",
      "Gender_Identity": "Male",
      "Graduation_Date": "15/12/1989 00:00:00"
    },
    "referrer_ID": null,
    "first_purchase_date": "04/04/2023",
    "lifetime_points_deducted": 0,
    "phone_number": "+1-65070177596",
    "points_expiration_schedule": [
      {
        "expiration_date": "5-Mar-2024  00:00:00",
        "points": 101
      }
    ],
    "instagram_handle": "www.instagram.com/john",
    "referrer_name": "Anna Scott",
    "aov": 1,
    "address": {
      "city": "Superior",
      "country": "US",
      "line2": "",
      "line1": "1000 S. McCaslin Blvd., Suite 301",
      "state": "CO",
      "postal_code": ""
    },
    "deleted_date": null,
    "last_purchase_date": "04/04/2023",
    "lifetime_points_redeemed": 0,
    "preferred_language": "english",
    "number_of_purchases": 1,
    "gender": null,
    "number_of_redemptions": 0,
    "birthdate": "01/31/1900",
    "anniversary_date": "07/07/2021",
    "enrollment_date": "04/04/2023 08:45:26",
    "member_id": "greatMRT040401",
    "email_subscription_status": "subscribed"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Update a Loyalty Member with TrueLoyal-generated ID

POST
https://api.zinrelo.com/v2/loyalty/members/{id}

Body

application/json
first_namestring

First name of the loyalty member.

Please Note: The first name should be less than 100 characters.

last_namestring

Last name of the loyalty member.

Please Note: The last name should be less than 100 characters.

email_addressstring

Email address of the loyalty member.

phone_numberstring+91-##########

Phone number of the loyalty member. Format : [COUNTRY CODE - PHONE NUMBER] E.g : 91-9960654555 COUNTRY CODE defaults to +1

birthdatestring08/26/1979

Birthdate of the loyalty member. Format : <MM/DD/YYYY>

Note: Our API records all date and time fields in UTC time.

anniversary_datestring12/06/2020

Wedding anniversary date of the loyalty member. Format : <MM/DD/YYYY>

Note: Our API records all date and time fields in UTC time.

preferred_languagestringenglish

Enter your preferred language.

twitter_handlestring

Twitter username of the loyalty member.

instagram_handlestring

Instagram username of the loyalty member.

addressobject

Address of the loyalty member. Child Parameters are as follows:

Show child attributes
line1string
line2string
citystring
statestring
countrystring
postal_codestring
referral_codestringwh36786

If a member used a referral code shared by a friend, which you may have captured in the user registration form, you may pass it in referrer_code to let TrueLoyal identify the friend who referred this member.

member_tagsArray<string>

List of tags that you’d want to tag this member with.

IMPORTANT: Updating the member tags will wipe out the existing tags and add the new array of tags. If you wish to append the new tag to an existing list, please make sure you retrieve the existing tags first , add the new tag to this list of existing tags and then make the update API call.

email_subscription_statusstring

Values can be ‘subscribed’ or ‘unsubscribed’ . If ‘unsubscribed’, this member will not receive any email notifications triggered by TrueLoyal.

member_statusstring

Accepted values in the request are ‘active’ , ‘blocked’, ‘opted_out’. Default is ‘active’. ‘active’ member is the one accumulating loyalty points and has access to rewards and earning opportunities. ‘blocked’ member is prohibited from participating in the program. ‘opted_out’ member is the one who has chosen to opt out of the loyalty program. 

opted_out and/or blocked members can become active by passing member_status as 'active'.

current_tier_idstringzrl_gold

The ID of the tier to which the member should be assigned.

IMPORTANT: 

If the tier that you want to assign this member to is lower than the member’s existing tier (Tier downgrade scenario), the next time the member earns points, TrueLoyal will recalculate the qualified points to check whether the member is eligible for a tier upgrade. If the tier that you want to assign this member to, is higher than the member’s existing tier (Tier Upgrade scenario), the next time this member is penalized by means of a ‘Deduct’ transaction, TrueLoyal will recalculate the qualified points to check whether the member has enough points to be on the higher tier or else, this member will be downgraded. 

If you have period based tiers, at the end of every interval, TrueLoyal will check whether the member has enough qualified points to be on a certain tier. If a member does not have enough qualified points, they will be downgraded.

custom_attributesstring<json>{"nationality" : "USA", "Gender" : "Male"}

Apart from the above parameters, you can also update the custom attributes that you would have already defined. Let’s assume, you had defined a new group called - Demographics Info (demographics_info) and education, nationality, religion as the custom attributes in the group and you wish to update the nationality, you can update it as follows: 

"custom_attributes": { "nationality" : "USA" }

Note: Only the parameters/attributes that you pass in the API request will be updated.

Parameters

idstring62d6439adfa6b74ab18eb1a6requiredpath

Add TrueLoyal generated ID.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Update a Loyalty Member with TrueLoyal-generated ID
curl -X POST 'https://api.zinrelo.com/v2/loyalty/members/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "first_name": "string",
    "last_name": "string",
    "email_address": "string",
    "phone_number": "+91-##########",
    "birthdate": "08/26/1979",
    "anniversary_date": "12/06/2020",
    "preferred_language": "english",
    "twitter_handle": "string",
    "instagram_handle": "string",
    "address": {
      "line1": "string",
      "line2": "string",
      "city": "string",
      "state": "string",
      "country": "string",
      "postal_code": "string"
    },
    "referral_code": "wh36786",
    "member_tags": [
      "string"
    ],
    "email_subscription_status": "string",
    "member_status": "string",
    "current_tier_id": "zrl_gold",
    "custom_attributes": "{\"nationality\" : \"USA\", \"Gender\" : \"Male\"}"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{id}', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "first_name": "string",
      "last_name": "string",
      "email_address": "string",
      "phone_number": "+91-##########",
      "birthdate": "08/26/1979",
      "anniversary_date": "12/06/2020",
      "preferred_language": "english",
      "twitter_handle": "string",
      "instagram_handle": "string",
      "address": {
        "line1": "string",
        "line2": "string",
        "city": "string",
        "state": "string",
        "country": "string",
        "postal_code": "string"
      },
      "referral_code": "wh36786",
      "member_tags": [
        "string"
      ],
      "email_subscription_status": "string",
      "member_status": "string",
      "current_tier_id": "zrl_gold",
      "custom_attributes": "{\"nationality\" : \"USA\", \"Gender\" : \"Male\"}"
    }),
});

const data = await response.json();
import requests

payload = {
  "first_name": "string",
  "last_name": "string",
  "email_address": "string",
  "phone_number": "+91-##########",
  "birthdate": "08/26/1979",
  "anniversary_date": "12/06/2020",
  "preferred_language": "english",
  "twitter_handle": "string",
  "instagram_handle": "string",
  "address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "postal_code": "string"
  },
  "referral_code": "wh36786",
  "member_tags": [
    "string"
  ],
  "email_subscription_status": "string",
  "member_status": "string",
  "current_tier_id": "zrl_gold",
  "custom_attributes": "{\"nationality\" : \"USA\", \"Gender\" : \"Male\"}"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty/members/{id}', json=payload)
data = response.json()
Request Body
{
  "first_name": "string",
  "last_name": "string",
  "email_address": "string",
  "phone_number": "+91-##########",
  "birthdate": "08/26/1979",
  "anniversary_date": "12/06/2020",
  "preferred_language": "english",
  "twitter_handle": "string",
  "instagram_handle": "string",
  "address": {
    "line1": "string",
    "line2": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "postal_code": "string"
  },
  "referral_code": "wh36786",
  "member_tags": [
    "string"
  ],
  "email_subscription_status": "string",
  "member_status": "string",
  "current_tier_id": "zrl_gold",
  "custom_attributes": "{\"nationality\" : \"USA\", \"Gender\" : \"Male\"}"
}
{
  "lifetime_points_earned": 10000,
  "twitter_handle": "www.twitter.com/john",
  "revenue": 0,
  "lifetime_points_expired": 0,
  "last_modified_date": "02/07/2023 06:00:05",
  "available_points": 10000,
  "pending_points": 100,
  "last_name": "Doe",
  "referral_URL": "https://zinrelo.com/ref/JOH4N54C",
  "member_status": "active",
  "referral_code": "JOH4N54C",
  "email_address": "johndoe@gmail.com",
  "id": "63e1e8e47d5790000dc0c81b",
  "first_name": "John",
  "number_of_activities": "",
  "member_tags": [
    "memberadded",
    "membercreated"
  ],
  "referrer_code": "ANA855D6",
  "tier_info": {
    "current_period_start": "03/01/2022",
    "loyalty_tier_name": "Silver",
    "loyalty_tier_id": "zrl_silver",
    "current_period_end": "02/28/2023",
    "qualified_points": 1000
  },
  "custom_attributes": {
    "City_Name": "Paris",
    "Marital_Status": "Married",
    "Income_Source": "Service",
    "Age_In_Years": "37",
    "Gender_Identity": "Male",
    "Graduation_Date": "15/12/1989 00:00:00"
  },
  "referrer_ID": "63dce02f1c31f902817d0118",
  "first_purchase_date": "09/30/2022",
  "lifetime_points_deducted": 0,
  "phone_number": "+1-6507017759",
  "points_expiration_schedule": [
    {
      "expiration_date": "7-Feb-2024  00:00:00",
      "points": 10000
    }
  ],
  "instagram_handle": "www.instagram.com/john",
  "referrer_name": "Anna Scott",
  "aov": 0,
  "address": {
    "city": "Palo Alto",
    "country": "US",
    "line2": "530 Lytton Ave",
    "line1": "Suite #200",
    "state": "CA",
    "postal_code": "94301"
  },
  "deleted_date": null,
  "last_purchase_date": "12/18/2022",
  "lifetime_points_redeemed": 0,
  "preferred_language": "english",
  "number_of_purchases": 0,
  "number_of_redemptions": 0,
  "birthdate": "08/26/1900",
  "anniversary_date": "10/17/2022",
  "enrollment_date": "10/17/2022 09:59:03",
  "member_id": "76543",
  "email_subscription_status": "subscribed"
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Delete a Loyalty Member with TrueLoyal-generated ID

DELETE
https://api.zinrelo.com/v2/loyalty/members/{id}

Parameters

idstring62d6439adfa6b74ab18eb1a6requiredpath

Add Trueloyal generated ID.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Delete a Loyalty Member with TrueLoyal-generated ID
curl -X DELETE 'https://api.zinrelo.com/v2/loyalty/members/{id}'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{id}', {
  method: 'DELETE',
});

const data = await response.json();
import requests

response = requests.delete('https://api.zinrelo.com/v2/loyalty/members/{id}')
data = response.json()
{
  "data": {
    "id": "63d107ec354176000a742cd7",
    "member_status": "deleted"
  },
  "success": true
}
{
  "reason": "643e802acd2a36000b07f9829 is not a valid id.",
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
Admin API

Activities

admin_activities

List all activities

GET
https://api.zinrelo.com/v2/loyalty/activities

Parameters

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

List all activities
curl -X GET 'https://api.zinrelo.com/v2/loyalty/activities'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/activities', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/activities')
data = response.json()
{
  "data": {
    "total": 25,
    "activities": [
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "order_subtotal",
          "multiplier": 1
        },
        "enduser_activity_short_description": "Earn points for every dollar you spend in purchases.",
        "activity_id": "made_a_purchase",
        "is_points_expiry_reset_activity": true,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "Earn 100 points for every advisor you talk to.",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-12-08 16:55:20.470000",
        "is_active": true,
        "metadata": {
          "Category": "Chocolate Cake"
        },
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "Product Category",
                "value": "Blue Rainbow"
              },
              {
                "operator": "Between",
                "attribute": "Transaction Date",
                "value": "3/8/2023-3/8/2023"
              },
              {
                "operator": "Equals",
                "attribute": "nationality",
                "value": "American"
              }
            ],
            "rule_value": 10
          },
          {
            "rule_type": "Fixed Points",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "More than X day(s) ago",
                "attribute": "Enrollment Date",
                "value": 30
              }
            ],
            "rule_value": 500
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Less Than",
                "attribute": "Order Value",
                "value": 100
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "After",
                "attribute": "Enrollment Date",
                "value": "11/1/2022"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "After",
                "attribute": "Enrollment Date",
                "value": "1/1/2023"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Gold Tier Rule",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_gold"
              }
            ],
            "rule_value": 2
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "Platinum Tier Rule",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_platinum"
              }
            ],
            "rule_value": 3
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.818000",
        "activity_name": "Loan Installment Payment",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 1000,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you follow us on Instagram.",
        "activity_id": "follow_on_instagram",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-10-30 07:09:02.212000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "LIFETIME"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.886000",
        "activity_name": "Follow on Instagram",
        "extra_config": {
          "business_instagram_username": "pallavi"
        },
        "id": "604f5a3b8152252216f5c1a4",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you create your loyalty account.",
        "activity_id": "created_an_account",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-06-14 09:03:33.343000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Between",
                "attribute": "Enrollment Date",
                "value": "5/3/2021-5/7/2021"
              }
            ],
            "rule_value": 12
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_gold"
              }
            ],
            "rule_value": 1
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.812000",
        "activity_name": "Account Creation",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19a",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 500,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "",
        "activity_id": "9d768_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-06-13 17:13:03.968000",
        "is_active": false,
        "metadata": {
          "Category": "Survey"
        },
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-03-16 07:17:05.038000",
        "activity_name": "",
        "extra_config": {},
        "id": "60505b71bb711d656ab9d252",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you share us on Twitter.",
        "activity_id": "share_on_twitter",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-31 06:39:47.745000",
        "is_active": false,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "WEEK"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.857000",
        "activity_name": "Share on Twitter",
        "extra_config": {
          "tweet_message": "Loving this site! Check it out",
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a1",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": null,
          "multiplier": 1
        },
        "enduser_activity_short_description": "Earn points for writing a review.",
        "activity_id": "write_a_review",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:13:10.021000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "DAY"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.824000",
        "activity_name": "Write a Review",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19c",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 200,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points on your anniversary.",
        "activity_id": "anniversary_bonus",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:07:02.905000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "YEAR"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "More than X day(s) ago",
                "attribute": "Enrollment Date",
                "value": 1
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.836000",
        "activity_name": "Anniversary Bonus",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19e",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "",
        "activity_id": "f00ca_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-17 11:21:50.190000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Awards 3X points, If the subscribing was done between Jan 1, 2020 - March 1, 2020",
            "conditions": [
              {
                "operator": "Between",
                "attribute": "Transaction Date",
                "value": "1/1/2022-3/31/2022"
              }
            ],
            "rule_value": 3
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-05-05 05:29:46.129000",
        "activity_name": "",
        "extra_config": {},
        "id": "60922d4abed0d56677192dcf",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Award points on referral purchase.",
        "activity_id": "referral",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-12 11:10:12.088000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-03-22 08:46:18.898000",
        "activity_name": "Refer a Friend",
        "extra_config": {},
        "id": "6058595abb711d6fa73fcd36",
        "activity_benefit_type": "points_and_coupon_code"
      },
      {
        "points_config": {
          "points": 500,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Enter the code on your LD pack and earn points",
        "activity_id": "684fc_custom_activity",
        "is_points_expiry_reset_activity": true,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "<div data-paperform-id=\"swldehbf\"></div><script>(function() {var script = document.createElement('script'); script.src = \"https://paperform.co/__embed.min.js\"; document.body.appendChild(script); })()</script>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-04-10 11:47:27.127000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-05-05 11:41:57.738000",
        "activity_name": "684fc_custom_activity",
        "extra_config": {},
        "id": "609284851c9396204c8b984b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "activity_id": "a7ee1_custom_activity",
        "is_points_expiry_reset_activity": true,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-03-08 11:01:06.969000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2023-01-23 13:52:30.665000",
        "activity_name": "Custom Activity",
        "extra_config": {},
        "id": "63ce911ef380d8000b8d7753",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward points to wake up your dormant users.",
        "activity_id": "winback_bonus",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-02-24 07:39:20.915000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.842000",
        "activity_name": "Winback Bonus",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19f",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 130,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Award points on birthday.",
        "activity_id": "birthday_bonus",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-02-24 07:27:55.290000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "YEAR"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Award Points to Gold Tiers",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_gold"
              }
            ],
            "rule_value": 5
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.830000",
        "activity_name": "Birthday Bonus",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19d",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Redeemed points will be rolled back for returned orders.",
        "activity_id": "redeemed_points_rollback",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-10-19 14:12:21.667000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2022-10-10 09:17:16.952000",
        "activity_name": "Redeemed Points Rollback",
        "extra_config": {},
        "id": "6343e31ce34bfe022c725dec",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points for uploading a photo.",
        "activity_id": "upload_photo",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-10-06 10:26:28.835000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "DAY"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "manual",
        "created_date": "2022-07-28 06:53:03.616000",
        "activity_name": "Upload a Photo",
        "extra_config": {},
        "id": "62e2324f23d74243d1c5af29",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "receipt_order_value",
          "multiplier": 1
        },
        "enduser_activity_short_description": "Reward users for submitting receipts of their purchases.",
        "activity_id": "submit_a_receipt",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-10-06 09:54:55.183000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "manual",
        "created_date": "2021-03-22 08:56:14.632000",
        "activity_name": "Submit A Receipt",
        "extra_config": {},
        "id": "60585baef5a67a16e1871b56",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "activity_id": "5d1b1_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-07-19 10:06:40.112000",
        "is_active": false,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2022-07-19 10:06:40.112000",
        "activity_name": "Custom Activity",
        "extra_config": {},
        "id": "62d68230e6006a5888211e6b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you share us on Pinterest.",
        "activity_id": "share_on_pinterest",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-07-14 08:17:19.592000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "WEEK"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.873000",
        "activity_name": "Share on Pinterest",
        "extra_config": {
          "pin_post_image": "",
          "pin_post_description": "Awesome products at great prices. You should really check them out.",
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a3",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you follow us on Twitter.",
        "activity_id": "follow_on_twitter",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-07-14 08:17:12.990000",
        "is_active": false,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.867000",
        "activity_name": "Follow on Twitter",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c1a2",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward points to users when they share you on Facebook.",
        "activity_id": "share_on_facebook",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-07-14 08:17:00.673000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "WEEK"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.848000",
        "activity_name": "Share on Facebook",
        "extra_config": {
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a0",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "activity_id": "f46f4_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "<iframe id=\"quiz-form\" width=\"100%\" height=\"300px\"  style=\"margin-top:-50px;border:none !important;\"></iframe>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-06-14 11:09:16.199000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2022-03-03 05:30:58.331000",
        "activity_name": "Quiz form",
        "extra_config": {},
        "id": "622052924e6d9f1dfd89ed88",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": null,
          "multiplier": 1
        },
        "enduser_activity_short_description": "Get rewarded for your purchases by submitting the code you received with your purchase.",
        "activity_id": "code_submission",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-05-19 10:32:40.318000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Award 5x Bonus Points",
            "conditions": [
              {
                "operator": "Between",
                "attribute": "Transaction Date",
                "value": "4/5/2022-7/5/2022"
              }
            ],
            "rule_value": 5
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Postal Code Rule",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "Postal Code",
                "value": 75462
              }
            ],
            "rule_value": 2
          }
        ],
        "approval_method": "immediate",
        "created_date": "2022-05-18 10:05:41.642000",
        "activity_name": "Enter a Code",
        "extra_config": {},
        "id": "6284c4f5dfa6b7425568ba6d",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 500,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "",
        "activity_id": "89fc8_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-04-22 07:07:15.584000",
        "is_active": false,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-03-18 07:05:01.680000",
        "activity_name": "",
        "extra_config": {},
        "id": "6052fb9d4d60ac7069c8361b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "activity_id": "496c7_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-03-17 04:41:58.695000",
        "is_active": false,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2022-03-17 04:41:58.695000",
        "activity_name": "Custom Activity",
        "extra_config": {},
        "id": "6232bc1699b4e119340ec7d3",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "activity_id": "96cbd_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-03-04 05:08:53.512000",
        "is_active": false,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2022-03-04 05:08:53.512000",
        "activity_name": "Custom Activity",
        "extra_config": {},
        "id": "62219ee5d7d5dc534c3f6b97",
        "activity_benefit_type": "points"
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

List all the Eligible Activities for a Member using Member ID

GET
https://api.zinrelo.com/v2/loyalty/members/{member_id}/activities

Parameters

member_idstringjohn.doe@gmail.comrequiredpath
idParamstringmember_idrequiredquery

Enter 'member_id' as idParam.

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

List all the Eligible Activities for a Member using Member ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/members/{member_id}/activities'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{member_id}/activities', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/members/{member_id}/activities')
data = response.json()
{
  "data": {
    "total": 16,
    "activities": [
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "order_subtotal",
          "multiplier": 1
        },
        "enduser_activity_short_description": "Earn points for every dollar you spend in purchases.",
        "activity_id": "made_a_purchase",
        "is_points_expiry_reset_activity": true,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "Earn 100 points for every advisor you talk to.",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-12-08 16:55:20.470000",
        "is_active": true,
        "metadata": {
          "Category": "Chocolate Cake"
        },
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "Product Category",
                "value": "Blue Rainbow"
              },
              {
                "operator": "Between",
                "attribute": "Transaction Date",
                "value": "3/8/2023-3/8/2023"
              },
              {
                "operator": "Equals",
                "attribute": "nationality",
                "value": "American"
              }
            ],
            "rule_value": 10
          },
          {
            "rule_type": "Fixed Points",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "More than X day(s) ago",
                "attribute": "Enrollment Date",
                "value": 30
              }
            ],
            "rule_value": 500
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Less Than",
                "attribute": "Order Value",
                "value": 100
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "After",
                "attribute": "Enrollment Date",
                "value": "11/1/2022"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "After",
                "attribute": "Enrollment Date",
                "value": "1/1/2023"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Gold Tier Rule",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_gold"
              }
            ],
            "rule_value": 2
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "Platinum Tier Rule",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_platinum"
              }
            ],
            "rule_value": 3
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.818000",
        "activity_name": "Loan Installment Payment",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 1000,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you follow us on Instagram.",
        "activity_id": "follow_on_instagram",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-10-30 07:09:02.212000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "LIFETIME"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.886000",
        "activity_name": "Follow on Instagram",
        "extra_config": {
          "business_instagram_username": "pallavi"
        },
        "id": "604f5a3b8152252216f5c1a4",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you create your loyalty account.",
        "activity_id": "created_an_account",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-06-14 09:03:33.343000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Between",
                "attribute": "Enrollment Date",
                "value": "5/3/2021-5/7/2021"
              }
            ],
            "rule_value": 12
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_gold"
              }
            ],
            "rule_value": 1
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.812000",
        "activity_name": "Account Creation",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19a",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": null,
          "multiplier": 1
        },
        "enduser_activity_short_description": "Earn points for writing a review.",
        "activity_id": "write_a_review",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:13:10.021000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "DAY"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.824000",
        "activity_name": "Write a Review",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19c",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 200,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points on your anniversary.",
        "activity_id": "anniversary_bonus",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:07:02.905000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "YEAR"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "More than X day(s) ago",
                "attribute": "Enrollment Date",
                "value": 1
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.836000",
        "activity_name": "Anniversary Bonus",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19e",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "",
        "activity_id": "f00ca_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-17 11:21:50.190000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Awards 3X points, If the subscribing was done between Jan 1, 2020 - March 1, 2020",
            "conditions": [
              {
                "operator": "Between",
                "attribute": "Transaction Date",
                "value": "1/1/2022-3/31/2022"
              }
            ],
            "rule_value": 3
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-05-05 05:29:46.129000",
        "activity_name": "",
        "extra_config": {},
        "id": "60922d4abed0d56677192dcf",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Award points on referral purchase.",
        "activity_id": "referral",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-12 11:10:12.088000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-03-22 08:46:18.898000",
        "activity_name": "Refer a Friend",
        "extra_config": {},
        "id": "6058595abb711d6fa73fcd36",
        "activity_benefit_type": "points_and_coupon_code"
      },
      {
        "points_config": {
          "points": 500,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Enter the code on your LD pack and earn points",
        "activity_id": "684fc_custom_activity",
        "is_points_expiry_reset_activity": true,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "<div data-paperform-id=\"swldehbf\"></div><script>(function() {var script = document.createElement('script'); script.src = \"https://paperform.co/__embed.min.js\"; document.body.appendChild(script); })()</script>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-04-10 11:47:27.127000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-05-05 11:41:57.738000",
        "activity_name": "684fc_custom_activity",
        "extra_config": {},
        "id": "609284851c9396204c8b984b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "activity_id": "a7ee1_custom_activity",
        "is_points_expiry_reset_activity": true,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-03-08 11:01:06.969000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2023-01-23 13:52:30.665000",
        "activity_name": "Custom Activity",
        "extra_config": {},
        "id": "63ce911ef380d8000b8d7753",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 130,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Award points on birthday.",
        "activity_id": "birthday_bonus",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-02-24 07:27:55.290000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "YEAR"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Award Points to Gold Tiers",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_gold"
              }
            ],
            "rule_value": 5
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.830000",
        "activity_name": "Birthday Bonus",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19d",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points for uploading a photo.",
        "activity_id": "upload_photo",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-10-06 10:26:28.835000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "DAY"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "manual",
        "created_date": "2022-07-28 06:53:03.616000",
        "activity_name": "Upload a Photo",
        "extra_config": {},
        "id": "62e2324f23d74243d1c5af29",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "receipt_order_value",
          "multiplier": 1
        },
        "enduser_activity_short_description": "Reward users for submitting receipts of their purchases.",
        "activity_id": "submit_a_receipt",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-10-06 09:54:55.183000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "manual",
        "created_date": "2021-03-22 08:56:14.632000",
        "activity_name": "Submit A Receipt",
        "extra_config": {},
        "id": "60585baef5a67a16e1871b56",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you share us on Pinterest.",
        "activity_id": "share_on_pinterest",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-07-14 08:17:19.592000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "WEEK"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.873000",
        "activity_name": "Share on Pinterest",
        "extra_config": {
          "pin_post_image": "",
          "pin_post_description": "Awesome products at great prices. You should really check them out.",
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a3",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward points to users when they share you on Facebook.",
        "activity_id": "share_on_facebook",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-07-14 08:17:00.673000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "WEEK"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.848000",
        "activity_name": "Share on Facebook",
        "extra_config": {
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a0",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "activity_id": "f46f4_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "<iframe id=\"quiz-form\" width=\"100%\" height=\"300px\"  style=\"margin-top:-50px;border:none !important;\"></iframe>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-06-14 11:09:16.199000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2022-03-03 05:30:58.331000",
        "activity_name": "Quiz form",
        "extra_config": {},
        "id": "622052924e6d9f1dfd89ed88",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": null,
          "multiplier": 1
        },
        "enduser_activity_short_description": "Get rewarded for your purchases by submitting the code you received with your purchase.",
        "activity_id": "code_submission",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-05-19 10:32:40.318000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Award 5x Bonus Points",
            "conditions": [
              {
                "operator": "Between",
                "attribute": "Transaction Date",
                "value": "4/5/2022-7/5/2022"
              }
            ],
            "rule_value": 5
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Postal Code Rule",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "Postal Code",
                "value": 75462
              }
            ],
            "rule_value": 2
          }
        ],
        "approval_method": "immediate",
        "created_date": "2022-05-18 10:05:41.642000",
        "activity_name": "Enter a Code",
        "extra_config": {},
        "id": "6284c4f5dfa6b7425568ba6d",
        "activity_benefit_type": "points"
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

List all the Eligible Activities for a Member using TrueLoyal-generated Member ID

GET
https://api.zinrelo.com/v2/loyalty/members/{id}/activities

Parameters

idstring62d6439adfa6b74ab18eb1a6requiredpath

Add TrueLoyal generated ID.

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

List all the Eligible Activities for a Member using TrueLoyal-generated Member ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/members/{id}/activities'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{id}/activities', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/members/{id}/activities')
data = response.json()
{
  "data": {
    "total": 16,
    "activities": [
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "order_subtotal",
          "multiplier": 1
        },
        "enduser_activity_short_description": "Earn points for every dollar you spend in purchases.",
        "activity_id": "made_a_purchase",
        "is_points_expiry_reset_activity": true,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "Earn 100 points for every advisor you talk to.",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-12-08 16:55:20.470000",
        "is_active": true,
        "metadata": {
          "Category": "Chocolate Cake"
        },
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "Product Category",
                "value": "Blue Rainbow"
              },
              {
                "operator": "Between",
                "attribute": "Transaction Date",
                "value": "3/8/2023-3/8/2023"
              },
              {
                "operator": "Equals",
                "attribute": "nationality",
                "value": "American"
              }
            ],
            "rule_value": 10
          },
          {
            "rule_type": "Fixed Points",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "More than X day(s) ago",
                "attribute": "Enrollment Date",
                "value": 30
              }
            ],
            "rule_value": 500
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Less Than",
                "attribute": "Order Value",
                "value": 100
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "After",
                "attribute": "Enrollment Date",
                "value": "11/1/2022"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "After",
                "attribute": "Enrollment Date",
                "value": "1/1/2023"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Gold Tier Rule",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_gold"
              }
            ],
            "rule_value": 2
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "Platinum Tier Rule",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_platinum"
              }
            ],
            "rule_value": 3
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.818000",
        "activity_name": "Loan Installment Payment",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 1000,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you follow us on Instagram.",
        "activity_id": "follow_on_instagram",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-10-30 07:09:02.212000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "LIFETIME"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.886000",
        "activity_name": "Follow on Instagram",
        "extra_config": {
          "business_instagram_username": "pallavi"
        },
        "id": "604f5a3b8152252216f5c1a4",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you create your loyalty account.",
        "activity_id": "created_an_account",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-06-14 09:03:33.343000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Between",
                "attribute": "Enrollment Date",
                "value": "5/3/2021-5/7/2021"
              }
            ],
            "rule_value": 12
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_gold"
              }
            ],
            "rule_value": 1
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.812000",
        "activity_name": "Account Creation",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19a",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": null,
          "multiplier": 1
        },
        "enduser_activity_short_description": "Earn points for writing a review.",
        "activity_id": "write_a_review",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:13:10.021000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "DAY"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.824000",
        "activity_name": "Write a Review",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19c",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 200,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points on your anniversary.",
        "activity_id": "anniversary_bonus",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:07:02.905000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "YEAR"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Update Attribute",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "operator": "More than X day(s) ago",
                "attribute": "Enrollment Date",
                "value": 1
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.836000",
        "activity_name": "Anniversary Bonus",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19e",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "",
        "activity_id": "f00ca_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-17 11:21:50.190000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Awards 3X points, If the subscribing was done between Jan 1, 2020 - March 1, 2020",
            "conditions": [
              {
                "operator": "Between",
                "attribute": "Transaction Date",
                "value": "1/1/2022-3/31/2022"
              }
            ],
            "rule_value": 3
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-05-05 05:29:46.129000",
        "activity_name": "",
        "extra_config": {},
        "id": "60922d4abed0d56677192dcf",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Award points on referral purchase.",
        "activity_id": "referral",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-12 11:10:12.088000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-03-22 08:46:18.898000",
        "activity_name": "Refer a Friend",
        "extra_config": {},
        "id": "6058595abb711d6fa73fcd36",
        "activity_benefit_type": "points_and_coupon_code"
      },
      {
        "points_config": {
          "points": 500,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Enter the code on your LD pack and earn points",
        "activity_id": "684fc_custom_activity",
        "is_points_expiry_reset_activity": true,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "<div data-paperform-id=\"swldehbf\"></div><script>(function() {var script = document.createElement('script'); script.src = \"https://paperform.co/__embed.min.js\"; document.body.appendChild(script); })()</script>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-04-10 11:47:27.127000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2021-05-05 11:41:57.738000",
        "activity_name": "684fc_custom_activity",
        "extra_config": {},
        "id": "609284851c9396204c8b984b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "activity_id": "a7ee1_custom_activity",
        "is_points_expiry_reset_activity": true,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-03-08 11:01:06.969000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2023-01-23 13:52:30.665000",
        "activity_name": "Custom Activity",
        "extra_config": {},
        "id": "63ce911ef380d8000b8d7753",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 130,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Award points on birthday.",
        "activity_id": "birthday_bonus",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-02-24 07:27:55.290000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "YEAR"
              }
            ],
            "rule_value": 0
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Award Points to Gold Tiers",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "User Tier",
                "value": "zrl_gold"
              }
            ],
            "rule_value": 5
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.830000",
        "activity_name": "Birthday Bonus",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19d",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points for uploading a photo.",
        "activity_id": "upload_photo",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-10-06 10:26:28.835000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "DAY"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "manual",
        "created_date": "2022-07-28 06:53:03.616000",
        "activity_name": "Upload a Photo",
        "extra_config": {},
        "id": "62e2324f23d74243d1c5af29",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "receipt_order_value",
          "multiplier": 1
        },
        "enduser_activity_short_description": "Reward users for submitting receipts of their purchases.",
        "activity_id": "submit_a_receipt",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-10-06 09:54:55.183000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "manual",
        "created_date": "2021-03-22 08:56:14.632000",
        "activity_name": "Submit A Receipt",
        "extra_config": {},
        "id": "60585baef5a67a16e1871b56",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Earn points when you share us on Pinterest.",
        "activity_id": "share_on_pinterest",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-07-14 08:17:19.592000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "WEEK"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.873000",
        "activity_name": "Share on Pinterest",
        "extra_config": {
          "pin_post_image": "",
          "pin_post_description": "Awesome products at great prices. You should really check them out.",
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a3",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward points to users when they share you on Facebook.",
        "activity_id": "share_on_facebook",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-07-14 08:17:00.673000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Frequency",
            "is_archived": false,
            "is_active": true,
            "conditions_matching_policy": "match_all",
            "rule_name": "",
            "conditions": [
              {
                "frequency_value": "1",
                "frequency_range": "WEEK"
              }
            ],
            "rule_value": 0
          }
        ],
        "approval_method": "immediate",
        "created_date": "2021-03-15 12:59:39.848000",
        "activity_name": "Share on Facebook",
        "extra_config": {
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a0",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "activity_id": "f46f4_custom_activity",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "<iframe id=\"quiz-form\" width=\"100%\" height=\"300px\"  style=\"margin-top:-50px;border:none !important;\"></iframe>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-06-14 11:09:16.199000",
        "is_active": true,
        "metadata": {},
        "rules_config": null,
        "approval_method": "immediate",
        "created_date": "2022-03-03 05:30:58.331000",
        "activity_name": "Quiz form",
        "extra_config": {},
        "id": "622052924e6d9f1dfd89ed88",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": null,
          "multiplier": 1
        },
        "enduser_activity_short_description": "Get rewarded for your purchases by submitting the code you received with your purchase.",
        "activity_id": "code_submission",
        "is_points_expiry_reset_activity": false,
        "show_on_guest_dashboard": true,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-05-19 10:32:40.318000",
        "is_active": true,
        "metadata": {},
        "rules_config": [
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Award 5x Bonus Points",
            "conditions": [
              {
                "operator": "Between",
                "attribute": "Transaction Date",
                "value": "4/5/2022-7/5/2022"
              }
            ],
            "rule_value": 5
          },
          {
            "rule_type": "Bonus Multiplier",
            "is_archived": false,
            "is_active": false,
            "conditions_matching_policy": "match_all",
            "rule_name": "Postal Code Rule",
            "conditions": [
              {
                "operator": "Equals",
                "attribute": "Postal Code",
                "value": 75462
              }
            ],
            "rule_value": 2
          }
        ],
        "approval_method": "immediate",
        "created_date": "2022-05-18 10:05:41.642000",
        "activity_name": "Enter a Code",
        "extra_config": {},
        "id": "6284c4f5dfa6b7425568ba6d",
        "activity_benefit_type": "points"
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Retrieve an Activity using Activity ID

GET
https://api.zinrelo.com/v2/loyalty/activities/{activity_id}

Parameters

activity_idstringmade_a_purchaserequiredpath

Enter activity ID.

idParamstringactivity_idrequiredquery

Enter 'activity_id' as idParam.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve an Activity using Activity ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/activities/{activity_id}'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/activities/{activity_id}', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/activities/{activity_id}')
data = response.json()
{
  "data": {
    "points_config": {
      "points_computation_type": "multiplier_based",
      "attribute_to_multiply": "order_subtotal",
      "multiplier": 1
    },
    "enduser_activity_short_description": "Earn points for every dollar you spend in purchases.",
    "activity_id": "made_a_purchase",
    "is_points_expiry_reset_activity": true,
    "show_on_guest_dashboard": true,
    "enduser_activity_description_html": "Earn 100 points for every advisor you talk to.",
    "activity_card_background_image_url": "",
    "is_qualified_for_tier_upgrade": false,
    "last_modified_date": "2023-12-08 16:55:20.470000",
    "is_active": true,
    "metadata": {
      "Category": "Chocolate Cake"
    },
    "rules_config": [
      {
        "rule_type": "Bonus Multiplier",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "Equals",
            "attribute": "Product Category",
            "value": "Blue Rainbow"
          },
          {
            "operator": "Between",
            "attribute": "Transaction Date",
            "value": "3/8/2023-3/8/2023"
          },
          {
            "operator": "Equals",
            "attribute": "nationality",
            "value": "American"
          }
        ],
        "rule_value": 10
      },
      {
        "rule_type": "Fixed Points",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "More than X day(s) ago",
            "attribute": "Enrollment Date",
            "value": 30
          }
        ],
        "rule_value": 500
      },
      {
        "rule_type": "Update Attribute",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "Less Than",
            "attribute": "Order Value",
            "value": 100
          }
        ],
        "rule_value": 0
      },
      {
        "rule_type": "Update Attribute",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "After",
            "attribute": "Enrollment Date",
            "value": "11/1/2022"
          }
        ],
        "rule_value": 0
      },
      {
        "rule_type": "Update Attribute",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "After",
            "attribute": "Enrollment Date",
            "value": "1/1/2023"
          }
        ],
        "rule_value": 0
      },
      {
        "rule_type": "Bonus Multiplier",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "Gold Tier Rule",
        "conditions": [
          {
            "operator": "Equals",
            "attribute": "User Tier",
            "value": "zrl_gold"
          }
        ],
        "rule_value": 2
      },
      {
        "rule_type": "Bonus Multiplier",
        "is_archived": false,
        "is_active": true,
        "conditions_matching_policy": "match_all",
        "rule_name": "Platinum Tier Rule",
        "conditions": [
          {
            "operator": "Equals",
            "attribute": "User Tier",
            "value": "zrl_platinum"
          }
        ],
        "rule_value": 3
      }
    ],
    "approval_method": "immediate",
    "created_date": "2021-03-15 12:59:39.818000",
    "activity_name": "Loan Installment Payment",
    "extra_config": {},
    "id": "604f5a3b8152252216f5c19b",
    "activity_benefit_type": "points"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Retrieve an Activity using TrueLoyal-generated ID

GET
https://api.zinrelo.com/v2/loyalty/activities/{id}

Parameters

idstring62d6439adfa6b74ab18eb1a6requiredpath

Add Trueloyal generated ID.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve an Activity using TrueLoyal-generated ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/activities/{id}'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/activities/{id}', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/activities/{id}')
data = response.json()
{
  "data": {
    "points_config": {
      "points_computation_type": "multiplier_based",
      "attribute_to_multiply": "order_subtotal",
      "multiplier": 1
    },
    "enduser_activity_short_description": "Earn points for every dollar you spend in purchases.",
    "activity_id": "made_a_purchase",
    "is_points_expiry_reset_activity": true,
    "show_on_guest_dashboard": true,
    "enduser_activity_description_html": "Earn 100 points for every advisor you talk to.",
    "activity_card_background_image_url": "",
    "is_qualified_for_tier_upgrade": false,
    "last_modified_date": "2023-12-08 16:55:20.470000",
    "is_active": true,
    "metadata": {
      "Category": "Chocolate Cake"
    },
    "rules_config": [
      {
        "rule_type": "Bonus Multiplier",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "Equals",
            "attribute": "Product Category",
            "value": "Blue Rainbow"
          },
          {
            "operator": "Between",
            "attribute": "Transaction Date",
            "value": "3/8/2023-3/8/2023"
          },
          {
            "operator": "Equals",
            "attribute": "nationality",
            "value": "American"
          }
        ],
        "rule_value": 10
      },
      {
        "rule_type": "Fixed Points",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "More than X day(s) ago",
            "attribute": "Enrollment Date",
            "value": 30
          }
        ],
        "rule_value": 500
      },
      {
        "rule_type": "Update Attribute",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "Less Than",
            "attribute": "Order Value",
            "value": 100
          }
        ],
        "rule_value": 0
      },
      {
        "rule_type": "Update Attribute",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "After",
            "attribute": "Enrollment Date",
            "value": "11/1/2022"
          }
        ],
        "rule_value": 0
      },
      {
        "rule_type": "Update Attribute",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "",
        "conditions": [
          {
            "operator": "After",
            "attribute": "Enrollment Date",
            "value": "1/1/2023"
          }
        ],
        "rule_value": 0
      },
      {
        "rule_type": "Bonus Multiplier",
        "is_archived": false,
        "is_active": false,
        "conditions_matching_policy": "match_all",
        "rule_name": "Gold Tier Rule",
        "conditions": [
          {
            "operator": "Equals",
            "attribute": "User Tier",
            "value": "zrl_gold"
          }
        ],
        "rule_value": 2
      },
      {
        "rule_type": "Bonus Multiplier",
        "is_archived": false,
        "is_active": true,
        "conditions_matching_policy": "match_all",
        "rule_name": "Platinum Tier Rule",
        "conditions": [
          {
            "operator": "Equals",
            "attribute": "User Tier",
            "value": "zrl_platinum"
          }
        ],
        "rule_value": 3
      }
    ],
    "approval_method": "immediate",
    "created_date": "2021-03-15 12:59:39.818000",
    "activity_name": "Loan Installment Payment",
    "extra_config": {},
    "id": "604f5a3b8152252216f5c19b",
    "activity_benefit_type": "points"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Retrieve Custom Attribute for an Activity using Activity ID

GET
https://api.zinrelo.com/v2/loyalty/activities/{activity_id}/attributes

Parameters

activity_idstringreferralrequiredpath

Enter activity ID.

idParamstringactivity_idrequiredquery

Enter 'activity_id' as idParam.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve Custom Attribute for an Activity using Activity ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/activities/{activity_id}/attributes'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/activities/{activity_id}/attributes', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/activities/{activity_id}/attributes')
data = response.json()
{
  "data": {
    "attributes": [
      {
        "attribute_name": "number of purchases",
        "attribute_id": "no_of_purchases_number",
        "attribute_type": "Number"
      },
      {
        "attribute_name": "place of purchases",
        "attribute_id": "place_of_purchases_text",
        "attribute_type": "String"
      },
      {
        "attribute_name": "List of number",
        "attribute_id": "list_of_number",
        "attribute_type": "List"
      },
      {
        "attribute_name": "List of dictionary",
        "attribute_id": "list_of_dictionary",
        "attribute_type": "List"
      },
      {
        "attribute_name": "List of dictionary New",
        "attribute_id": "list_of_dictionary_new",
        "attribute_type": "List"
      },
      {
        "attribute_name": "customer_enrollment",
        "attribute_id": "customer_enrollment_list",
        "attribute_type": "List"
      },
      {
        "attribute_name": "customer_enrollment_batch",
        "attribute_id": "customer_enrollment_batch",
        "attribute_type": "List"
      },
      {
        "attribute_name": "customer_dob",
        "attribute_id": "customer_dob_number",
        "attribute_type": "Number"
      },
      {
        "attribute_name": "customer_name",
        "attribute_id": "customer_name_text",
        "attribute_type": "String"
      },
      {
        "attribute_name": "customer_anniversary",
        "attribute_id": "customer_anniversary_date",
        "attribute_type": "Date"
      },
      {
        "attribute_name": "customer_dob",
        "attribute_id": "customer_dob_twitter",
        "attribute_type": "Number"
      }
    ],
    "activity_id": "made_a_purchase",
    "total": 11
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Retrieve Custom Attribute for an Activity using TrueLoyal-generated ID

GET
https://api.zinrelo.com/v2/loyalty/activities/{id}/attributes

Parameters

idstringrequiredpath

Add Trueloyal generated activity ID.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve Custom Attribute for an Activity using TrueLoyal-generated ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/activities/{id}/attributes'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/activities/{id}/attributes', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/activities/{id}/attributes')
data = response.json()
{
  "data": {
    "attributes": [
      {
        "attribute_name": "number of purchases",
        "attribute_id": "no_of_purchases_number",
        "attribute_type": "Number"
      },
      {
        "attribute_name": "place of purchases",
        "attribute_id": "place_of_purchases_text",
        "attribute_type": "String"
      },
      {
        "attribute_name": "List of number",
        "attribute_id": "list_of_number",
        "attribute_type": "List"
      },
      {
        "attribute_name": "List of dictionary",
        "attribute_id": "list_of_dictionary",
        "attribute_type": "List"
      },
      {
        "attribute_name": "List of dictionary New",
        "attribute_id": "list_of_dictionary_new",
        "attribute_type": "List"
      },
      {
        "attribute_name": "customer_enrollment",
        "attribute_id": "customer_enrollment_list",
        "attribute_type": "List"
      },
      {
        "attribute_name": "customer_enrollment_batch",
        "attribute_id": "customer_enrollment_batch",
        "attribute_type": "List"
      },
      {
        "attribute_name": "customer_dob",
        "attribute_id": "customer_dob_number",
        "attribute_type": "Number"
      },
      {
        "attribute_name": "customer_name",
        "attribute_id": "customer_name_text",
        "attribute_type": "String"
      },
      {
        "attribute_name": "customer_anniversary",
        "attribute_id": "customer_anniversary_date",
        "attribute_type": "Date"
      },
      {
        "attribute_name": "customer_dob",
        "attribute_id": "customer_dob_twitter",
        "attribute_type": "Number"
      }
    ],
    "activity_id": "made_a_purchase",
    "total": 11
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}
Admin API

Rewards

admin_rewards

List All Rewards

GET
https://api.zinrelo.com/v2/loyalty/rewards

Parameters

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

List All Rewards
curl -X GET 'https://api.zinrelo.com/v2/loyalty/rewards'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/rewards', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/rewards')
data = response.json()
{
  "data": {
    "total": 10,
    "rewards": [
      {
        "reward_name": "New Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 11:09:52",
        "is_active": false,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/02/2023 08:45:56",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 0,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "640062440266f8000a4305c7",
        "reward_id": "reward_1d72a",
        "metadata": {
          "Brand": "Nescafe",
          "Location": "London"
        },
        "reward_value": "0"
      },
      {
        "reward_name": "Test Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 11:09:44",
        "is_active": false,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/06/2023 10:52:10",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "6405c5daf7e368000c9de4e9",
        "reward_id": "reward_82805",
        "metadata": {
          "Brand": "Nescafe",
          "Location": "London"
        },
        "reward_value": "15"
      },
      {
        "reward_name": "New Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:10:31",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/01/2023 12:50:37",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 10,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "63ff4a1dfed629000bacf55c",
        "reward_id": "reward_a0d68",
        "metadata": {
          "Brand": "Nescafe"
        },
        "reward_value": "0"
      },
      {
        "reward_name": "Test Rewards within reach ",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:10:29",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "02/10/2023 07:27:32",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1000,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "63e5f1e458a3ad000d03be8f",
        "reward_id": "reward_f484f",
        "metadata": {
          "Brand": "Davidoff",
          "Location": "London"
        },
        "reward_value": "10"
      },
      {
        "reward_name": "New Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:10:27",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "12/19/2022 10:42:30",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 10,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "63a040161507dc000848e630",
        "reward_id": "reward_4fcf1",
        "metadata": {
          "Brand": "Starbucks",
          "Location": "London"
        },
        "reward_value": "0"
      },
      {
        "reward_name": "Product Redemption Type reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "product_id": "2",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:09:44",
        "is_active": true,
        "product_url": "http://18.143.114.190/battle-field.html",
        "reward_sub_type": "Product Redemption",
        "created_date": "12/09/2022 08:20:38",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Go to the <a href=\"{{PRODUCT_URL}}\" target=\"_blank\"> product page </a> and add this product to cart. Apply the coupon code at checkout",
        "id": "6392efd671891b0009b5a74b",
        "reward_id": "reward_2ed89",
        "metadata": {
          "Brand": "Costa Coffee",
          "Location": "US"
        },
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/de6010baeefdd69737338afe3793944a.png"
      },
      {
        "reward_name": "$5 OFF COUPON",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:09:42",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "12/09/2022 08:20:38",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "6392efd671891b0009b5a74a",
        "reward_id": "reward_ac6fc",
        "metadata": {
          "Brand": "Nescafe",
          "Location": "India"
        },
        "reward_value": "5"
      },
      {
        "reward_name": "New Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/02/2023 08:46:05",
        "is_active": false,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/02/2023 08:46:05",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 0,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "6400624d0266f8000b127ffb",
        "reward_id": "reward_a3371",
        "metadata": {
          "Brand": "Costa Coffee",
          "Location": "UK"
        },
        "reward_value": "0"
      },
      {
        "reward_name": "$15 OFF COUPON",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/02/2023 06:37:25",
        "is_active": false,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "12/09/2022 08:20:38",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 10,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "6392efd671891b0009b5a74c",
        "reward_id": "reward_043ee",
        "metadata": {
          "Brand": "Dunkin",
          "Location": "India"
        },
        "reward_value": "15"
      },
      {
        "reward_name": "New Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/01/2023 13:16:50",
        "is_active": false,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/01/2023 13:16:50",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 0,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "63ff5042fed629000c00aa7f",
        "reward_id": "reward_2a0af",
        "metadata": {
          "Brand": "Nescafe",
          "Location": "Paris"
        },
        "reward_value": "0"
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Get Eligible Rewards with Member ID

GET
https://api.zinrelo.com/v2/loyalty/members/{member_id}/rewards

Parameters

member_idstringjohn.doe@gmail.comrequiredpath
idParamstringmember_idrequiredquery

Enter 'member_id' as idParam.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Get Eligible Rewards with Member ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/members/{member_id}/rewards'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{member_id}/rewards', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/members/{member_id}/rewards')
data = response.json()
{
  "data": {
    "total": 4,
    "rewards": [
      {
        "reward_name": "Product Redemption Type reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "product_id": "2",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/14/2023 11:22:38",
        "is_active": true,
        "product_url": "http://18.143.114.190/battle-field.html",
        "reward_sub_type": "Product Redemption",
        "created_date": "12/09/2022 08:20:38",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Go to the <a href=\"{{PRODUCT_URL}}\" target=\"_blank\"> product page </a> and add this product to cart. Apply the coupon code at checkout",
        "id": "6392efd671891b0009b5a74b",
        "reward_id": "reward_2ed89",
        "metadata": {
          "Brand": "Nescafe",
          "Location": "London"
        },
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/de6010baeefdd69737338afe3793944a.png"
      },
      {
        "reward_name": "New Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:10:31",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/01/2023 12:50:37",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 10,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "63ff4a1dfed629000bacf55c",
        "reward_id": "reward_a0d68",
        "metadata": {
          "Brand": "Davidoff",
          "Location": "US"
        },
        "reward_value": "0"
      },
      {
        "reward_name": "New Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:10:27",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "12/19/2022 10:42:30",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 10,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "63a040161507dc000848e630",
        "reward_id": "reward_4fcf1",
        "metadata": {
          "Brand": "Dunkin",
          "Location": "India"
        },
        "reward_value": "0"
      },
      {
        "reward_name": "$5 OFF COUPON",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:09:42",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "12/09/2022 08:20:38",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "6392efd671891b0009b5a74a",
        "reward_id": "reward_ac6fc",
        "metadata": {
          "Brand": "Nescafe",
          "Location": "India"
        },
        "reward_value": "5"
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Get Eligible Rewards with TrueLoyal-generated Member ID

GET
https://api.zinrelo.com/v2/loyalty/members/{id}/rewards

Parameters

idstring62d6439adfa6b74ab18eb1a6requiredpath

Add Trueloyal generated ID.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Get Eligible Rewards with TrueLoyal-generated Member ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/members/{id}/rewards'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{id}/rewards', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/members/{id}/rewards')
data = response.json()
{
  "data": {
    "total": 4,
    "rewards": [
      {
        "reward_name": "Product Redemption Type reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "product_id": "2",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/14/2023 11:22:38",
        "is_active": true,
        "product_url": "http://18.143.114.190/battle-field.html",
        "reward_sub_type": "Product Redemption",
        "created_date": "12/09/2022 08:20:38",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Go to the <a href=\"{{PRODUCT_URL}}\" target=\"_blank\"> product page </a> and add this product to cart. Apply the coupon code at checkout",
        "id": "6392efd671891b0009b5a74b",
        "reward_id": "reward_2ed89",
        "metadata": {
          "Brand": "Nescafe",
          "Location": "London"
        },
        "reward_card_background_image_url": "https://d1qbqkkh49kht1.cloudfront.net/de6010baeefdd69737338afe3793944a.png"
      },
      {
        "reward_name": "New Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:10:31",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/01/2023 12:50:37",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 10,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "63ff4a1dfed629000bacf55c",
        "reward_id": "reward_a0d68",
        "metadata": {
          "Brand": "Davidoff",
          "Location": "US"
        },
        "reward_value": "0"
      },
      {
        "reward_name": "New Reward",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:10:27",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "12/19/2022 10:42:30",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 10,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "63a040161507dc000848e630",
        "reward_id": "reward_4fcf1",
        "metadata": {
          "Brand": "Dunkin",
          "Location": "India"
        },
        "reward_value": "0"
      },
      {
        "reward_name": "$5 OFF COUPON",
        "enduser_reward_confirmation_html": "<div class=\"coupon_code_div\">_COUPON_CODE_</div><div style=\"margin-top: 15px;\"> A copy of the code has been emailed to _USER_EMAIL_.</div>",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "redemption_eligibility_criteria": "Tier Based",
        "show_on_guest_dashboard": false,
        "last_modified_date": "03/13/2023 10:09:42",
        "is_active": true,
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "12/09/2022 08:20:38",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "6392efd671891b0009b5a74a",
        "reward_id": "reward_ac6fc",
        "metadata": {
          "Brand": "Nescafe",
          "Location": "India"
        },
        "reward_value": "5"
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}
Admin API

Transactions

admin_transactions

Award Points

POST
https://api.zinrelo.com/v2/loyalty/transactions/award

Body

application/json
member_idstringjohn.doe@gmail.comrequired

Unique Identifier (Member ID) for the member object in the client’s system which was used while creating a member in TrueLoyal.

activity_idstringmade_a_purchaserequired

Unique ID that identifies an activity in TrueLoyal. This is the activity against which the transaction has to be recorded.

transaction_datestring10/05/2019 23:10:55

Add the transaction date of the activity. The transaction date would be considered for all activities except for the submit a receipt activity. Format : MM/DD/YYYY HH:MM:SS

Note: Our API records all date and time fields in UTC time.

points_passedinteger<int32>1000

Set custom points for an activity. You can set custom points for all activities except made_a_purchase activity.

transaction_attributesstring<json>{ "tags" : ["tag1","tag2"], "reason" : "purchase", "order_id" : "75", "coupons" : "$5OFFVYZ", "order_total" : "1000", "order_subtotal" : "1000", "products" : [{ "product_id": "112", "product_quantity": "1", "product_category": "tshirt", "product_price": "15", "product_title": "Sweatshirt", "product_image_url": "" }, { "product_id": "980", "product_quantity": "2", "product_category": "Sales", "product_price": "10.017", "product_title": "Pant", "product_image_url": "" }] }

Every activity has a two predefined transaction attributes - reason and tags. While awarding points for an activity, data can be passed in these attributes.

Custom attributes: In addition to the predefined attributes, you can define custom attributes for each activity and pass data in those attributes. 

The custom attribute should be created in advance. To create custom attributes for your store, reach out to your account manager at support.trueloyal.com.

Note: "transaction_attributes" is mandatory only for 3 of the predefined activities.

made_a_purchase activity

Mandatory attributes are order_id, order_total, order_subtotal.

The order_subtotal should be greater than 0.01

A sample structure of the transaction_attributes for the made_a_purchase activity is given below:

{
"tags" : ["tag1","tag2"],
"reason" : "purchase",
"order_id" : "75",
"coupons" : "$5OFFVYZ,$10FFEDT,$05RTNVLW",
"order_total" : "1000",
"order_subtotal" : "1000",

"products" : [{
"product_id": "112",
"product_quantity": "1",
"product_category": "tshirt, blue range, on sale",
"product_price": "15",
"product_title": "Sweatshirt",
"product_image_url": ""
},

{
"product_id": "980",
"product_quantity": "2",
"product_category": "sales, straight range of pants, formals, on 10% discount",
"product_price": "10.017",
"product_title": "Pant",
"product_image_url": ""
}]

}

Note:

- The attributes like “product_id”, “product_price”, “product_quantity” and “product_title” are mandatory only when you pass product attributes.

- The order subtotal should be calculated as the sum of the subtotals of all products in the order, without taking into account any discounts. The discounted price needs to be adjusted in products and passed accordingly.

- When individual product prices are provided, the subtotal is ignored.

- In instances where product information is absent, the purchase amount is derived from the 'order_subtotal' field.

submit_a_receipt activity

Mandatory attribute is 'receipt_files'. 'receipt_uid' is the optional field. Expected data is a list of images/pdfs encoded in base64 format. To convert an image to base64 format, click here.

A sample structure of the transaction_attributes for the submit_a_receipt activity is given below:

{"receipt_files":[""]}

upload_photo activity

Mandatory attribute is image_file. Expected data is a list of images/pdfs encoded in base64 format. To convert an image to base64 format, click here.

A sample structure of the transaction_attributes for the upload_photo activity is given below:

{"image_file": [""]}

To know more about the transaction attributes for Award API, click here.

approval_datestring10/15/2019 16:10:50

Date and time on which the transaction will be auto approved. Format : MM/DD/YYYY HH:MM:SS.

Note: Our API records all date and time fields in UTC time.

points_expiration_datestring10/10/2019 23:10:55

Pass the date and time for point expiration.

Format- MM/DD/YYYY HH:MM:SS

Note: Our API records all date and time fields in UTC time.

Parameters

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Award Points
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/award' \
  -H 'Content-Type: application/json' \
  -d '{
    "member_id": "john.doe@gmail.com",
    "activity_id": "made_a_purchase",
    "transaction_date": "10/05/2019 23:10:55",
    "points_passed": 1000,
    "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"order_id\" : \"75\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
    "approval_date": "10/15/2019 16:10:50",
    "points_expiration_date": "10/10/2019 23:10:55"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/award', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "member_id": "john.doe@gmail.com",
      "activity_id": "made_a_purchase",
      "transaction_date": "10/05/2019 23:10:55",
      "points_passed": 1000,
      "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"order_id\" : \"75\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
      "approval_date": "10/15/2019 16:10:50",
      "points_expiration_date": "10/10/2019 23:10:55"
    }),
});

const data = await response.json();
import requests

payload = {
  "member_id": "john.doe@gmail.com",
  "activity_id": "made_a_purchase",
  "transaction_date": "10/05/2019 23:10:55",
  "points_passed": 1000,
  "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"order_id\" : \"75\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
  "approval_date": "10/15/2019 16:10:50",
  "points_expiration_date": "10/10/2019 23:10:55"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/award', json=payload)
data = response.json()
Request Body
{
  "member_id": "john.doe@gmail.com",
  "activity_id": "made_a_purchase",
  "transaction_date": "10/05/2019 23:10:55",
  "points_passed": 1000,
  "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"order_id\" : \"75\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
  "approval_date": "10/15/2019 16:10:50",
  "points_expiration_date": "10/10/2019 23:10:55"
}
{
  "data": {
    "status": "approved",
    "points_expiration_date": "21-Aug-2023 00:00:00",
    "auto_approval_date": "29-June-2023 05:12:41",
    "last_modified_date": "21-Mar-2023 05:12:41",
    "redemptions_list": [],
    "award_info": {
      "activity_id": "made_a_purchase",
      "points": 1000,
      "points_status": "approved",
      "activity_name": "Purchase on website"
    },
    "id": "64193cc9df192b000a6d1374",
    "approver_details": {
      "approver_name": "System",
      "approver_id": null
    },
    "approved_date": "21-Mar-2023 05:12:41",
    "member_id": "greatMRT090399656",
    "created_date": "21-Mar-2023 05:12:41",
    "transaction_type": "award",
    "transaction_attributes": {
      "order_total": 110,
      "order_subtotal": 100,
      "order_id": "887y12",
      "tags": [
        "purchasemade",
        "madeapurchaseactivity"
      ],
      "currency": "$",
      "coupon_code": "abtrojkl",
      "reason": "THird",
      "products": [
        {
          "product_id": "12",
          "is_excluded": false,
          "product_category": "[u'Essentials', u'Sale', u'test', u'gdgd']",
          "product_url": "https://www.product.com",
          "product_price": "50",
          "product_points_per_quantity": 500,
          "bonus_multiplier": 0,
          "product_quantity": "1",
          "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
          "product_title": "RelaxedFitSweatshirt-Mintgreen"
        },
        {
          "product_id": "98012",
          "is_excluded": false,
          "product_category": "[u'Sale', u'test', u'gdgd']",
          "product_url": "https://www.product.com",
          "product_price": "25",
          "product_points_per_quantity": 250,
          "bonus_multiplier": 0,
          "product_quantity": "2",
          "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
          "product_title": "Sweatshirt"
        }
      ],
      "coupons": "abtrojkl"
    },
    "additional_data": {
      "activity_multiplier": 10
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Redeem Points

POST
https://api.zinrelo.com/v2/loyalty/transactions/redeem

Body

application/json
member_idstringjohn.doe@gmail.comrequired

Unique Identifier (Member ID) for the member object in the client’s system which was used while creating a member in TrueLoyal.

reward_idstringreward_bc668required

Unique ID that identifies a reward in TrueLoyal. This is the ID of the reward against which the redemption transaction has to be recorded.

transaction_attributesstring<json>{ "reason" : "redeem", "tags" : ["purchasenmade","redeemingpoints"] }

Every activity has a two predefined transaction attributes - reason and tags. While redeeming points for an activity, data can be passed in these attributes.

For example:

{
"reason" : "redeem",
"tags" : ["purchasenmade","redeemingpoints"]
}

Custom attributes: In addition to the predefined attributes, you can define custom attributes for each activity and pass data in those attributes. 

The custom attribute should be created in advance. To create custom attributes for your store, reach out to your account manager at support@zinrelo.com.

points_to_be_redeemedinteger<int32>

REQUIRED: only for flexible redemption. The number of points to be redeemed; it also accepts 0 points.

statusstringpending

Pass the redemption status—approved or pending. If no entry is passed, the transaction will be redeemed, and its status will be approved.

Parameters

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Redeem Points
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/redeem' \
  -H 'Content-Type: application/json' \
  -d '{
    "member_id": "john.doe@gmail.com",
    "reward_id": "reward_bc668",
    "transaction_attributes": "{ \"reason\" : \"redeem\", \"tags\" : [\"purchasenmade\",\"redeemingpoints\"] }",
    "points_to_be_redeemed": 0,
    "status": "pending"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/redeem', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "member_id": "john.doe@gmail.com",
      "reward_id": "reward_bc668",
      "transaction_attributes": "{ \"reason\" : \"redeem\", \"tags\" : [\"purchasenmade\",\"redeemingpoints\"] }",
      "points_to_be_redeemed": 0,
      "status": "pending"
    }),
});

const data = await response.json();
import requests

payload = {
  "member_id": "john.doe@gmail.com",
  "reward_id": "reward_bc668",
  "transaction_attributes": "{ \"reason\" : \"redeem\", \"tags\" : [\"purchasenmade\",\"redeemingpoints\"] }",
  "points_to_be_redeemed": 0,
  "status": "pending"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/redeem', json=payload)
data = response.json()
Request Body
{
  "member_id": "john.doe@gmail.com",
  "reward_id": "reward_bc668",
  "transaction_attributes": "{ \"reason\" : \"redeem\", \"tags\" : [\"purchasenmade\",\"redeemingpoints\"] }",
  "points_to_be_redeemed": 0,
  "status": "pending"
}
{
  "data": {
    "status": "pending",
    "transaction_attributes": {
      "reason": "redeem",
      "source_of_redemption": "api",
      "tags": [
        "purchasenmade",
        "redeemingpoints"
      ]
    },
    "last_modified_date": "22-Mar-2023 05:54:11",
    "additional_data": {
      "points_to_be_redeemed": 1400
    },
    "approver_details": {
      "approver_name": "System",
      "approver_id": null
    },
    "approved_date": "22-Mar-2023 05:54:11",
    "reward_info": {
      "reward_name": "&#36;15 OFF COUPON",
      "points_status": "redemption_pending",
      "coupon_code": "81c0bd3b",
      "reward_link": null,
      "reward_id": "reward_9c350",
      "points": 1400
    },
    "member_id": "5779678689",
    "created_date": "22-Mar-2023 05:54:11",
    "transaction_type": "redeem",
    "id": "641a9804c2161f000ee6e469"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Return Points

POST
https://api.zinrelo.com/v2/loyalty/transactions/return

Body

application/json
member_idstringjohn.doe@gmail.comrequired

Unique Identifier (Member ID) for the member object in the client’s system which was used while creating a member in TrueLoyal.

transaction_attributesstring<json>{ "order_id" : "56789", "returned_product_id" : "1235BCDI", "returned_product_quantity" : 2}

In order to return points for "made_a_purchase" activity, the mandatory field is order_id. With this, you can also pass returned_product_id and returned_product_quantity together or just returned_amount. 

Note: If you just pass "order_id," the amount will be fully returned.

For example:

{

"tags" : ["ProductReturn"],
"reason" : "Order partially returned",
"order_id" : "56789",
"returned_amount" : "200"
}

or

{
"order_id" : "56789",
"returned_product_id" : "1235BCDI",
"returned_product_quantity" : 2
}

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Return Points
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/return' \
  -H 'Content-Type: application/json' \
  -d '{
    "member_id": "john.doe@gmail.com",
    "transaction_attributes": "{ \"order_id\" : \"56789\", \"returned_product_id\" : \"1235BCDI\", \"returned_product_quantity\" : 2}"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/return', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "member_id": "john.doe@gmail.com",
      "transaction_attributes": "{ \"order_id\" : \"56789\", \"returned_product_id\" : \"1235BCDI\", \"returned_product_quantity\" : 2}"
    }),
});

const data = await response.json();
import requests

payload = {
  "member_id": "john.doe@gmail.com",
  "transaction_attributes": "{ \"order_id\" : \"56789\", \"returned_product_id\" : \"1235BCDI\", \"returned_product_quantity\" : 2}"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/return', json=payload)
data = response.json()
Request Body
{
  "member_id": "john.doe@gmail.com",
  "transaction_attributes": "{ \"order_id\" : \"56789\", \"returned_product_id\" : \"1235BCDI\", \"returned_product_quantity\" : 2}"
}
{
  "data": {
    "status": "approved",
    "transaction_attributes": {
      "returned_product_id": null,
      "tags": [
        "productreturned",
        "returned"
      ],
      "order_id": "7597659870",
      "reason": "Order partially returned",
      "returned_amount": 200,
      "returned_product_quantity": null
    },
    "last_modified_date": "22-Mar-2023 06:14:15",
    "additional_data": {
      "returned_orders_revenue": 200,
      "product_id": null,
      "quantity": 1
    },
    "approver_details": {
      "approver_name": "System",
      "approver_id": null
    },
    "approved_date": "22-Mar-2023 06:14:15",
    "member_id": "5779678689",
    "created_date": "22-Mar-2023 06:14:15",
    "transaction_type": "deduct",
    "id": "641a9cb7c2161f000c2eb553",
    "deduct_info": {
      "points": 200,
      "points_status": "deducted",
      "unable_to_deduct": 0
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Deduct Points

POST
https://api.zinrelo.com/v2/loyalty/transactions/deduct

Body

application/json
member_idstringjohn.doe@gmail.comrequired

Unique Identifier (Member ID) for the member object in the client’s system which was used while creating a member in TrueLoyal.

points_to_be_deductednumber<double>100required

Number of points to be deducted.

transaction_attributesstring<json>{"reason" : "deduct", "tags" : ["deductionmade","productreturned"]}

Apart from the above parameters, you can also pass custom attributes for deduct activities, like reason and tags. 

For example:

{
"reason" : "deduct",
"tags" : ["deductionmade","productreturned"]
}

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Deduct Points
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/deduct' \
  -H 'Content-Type: application/json' \
  -d '{
    "member_id": "john.doe@gmail.com",
    "points_to_be_deducted": 100,
    "transaction_attributes": "{\"reason\" : \"deduct\", \"tags\" : [\"deductionmade\",\"productreturned\"]}"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/deduct', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "member_id": "john.doe@gmail.com",
      "points_to_be_deducted": 100,
      "transaction_attributes": "{\"reason\" : \"deduct\", \"tags\" : [\"deductionmade\",\"productreturned\"]}"
    }),
});

const data = await response.json();
import requests

payload = {
  "member_id": "john.doe@gmail.com",
  "points_to_be_deducted": 100,
  "transaction_attributes": "{\"reason\" : \"deduct\", \"tags\" : [\"deductionmade\",\"productreturned\"]}"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/deduct', json=payload)
data = response.json()
Request Body
{
  "member_id": "john.doe@gmail.com",
  "points_to_be_deducted": 100,
  "transaction_attributes": "{\"reason\" : \"deduct\", \"tags\" : [\"deductionmade\",\"productreturned\"]}"
}
{
  "data": {
    "status": "approved",
    "transaction_attributes": {
      "reason": "deduct",
      "tags": [
        "deductionmade",
        "productreturned"
      ]
    },
    "last_modified_date": "22-Mar-2023 06:19:35",
    "additional_data": {},
    "approver_details": {
      "approver_name": "System",
      "approver_id": null
    },
    "approved_date": "22-Mar-2023 06:19:35",
    "member_id": "5779678689",
    "created_date": "22-Mar-2023 06:19:35",
    "transaction_type": "deduct",
    "id": "641a9df7c2161f000c2eb56a",
    "deduct_info": {
      "points": 100,
      "points_status": "deducted"
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Reverse Points with Transaction ID

POST
https://api.zinrelo.com/v2/loyalty/transactions/{id}/reverse

Parameters

idstring62dfc6c6595b7b17ebbf7148requiredpath

Enter transaction ID.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Reverse Points with Transaction ID
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/{id}/reverse'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{id}/reverse', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/{id}/reverse')
data = response.json()
{
  "data": {
    "status": "approved",
    "transaction_attributes": {
      "reason": "Transaction reversed",
      "tags": [
        "reversedtransaction",
        "reversed"
      ]
    },
    "last_modified_date": "22-Mar-2023 06:24:57",
    "additional_data": {
      "award_transaction_id": "640200a652e6a100098e7208"
    },
    "approver_details": {
      "approver_name": "System",
      "approver_id": null
    },
    "approved_date": "22-Mar-2023 06:24:57",
    "member_id": "5779678689",
    "created_date": "22-Mar-2023 06:24:57",
    "transaction_type": "deduct",
    "id": "641a9f39d2e73e0009ca2ec5",
    "deduct_info": {
      "points": 10000,
      "points_status": "deducted"
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Reverse Points using Unique Transaction Attribute

POST
https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/reverse

Parameters

unique_transaction_attributestring752245347requiredpath

Pass the value that was stored against the client internal id.

idParamstringorder_idrequiredquery

The idParam for purchase activity will be order_id, but if you have created any unique transaction attribute like serial_number, invoice_number, etc., then place it as an idParam.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Reverse Points using Unique Transaction Attribute
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/reverse'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/reverse', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/reverse')
data = response.json()
{
  "data": {
    "status": "approved",
    "transaction_attributes": {
      "reason": "Transaction reversed",
      "tags": [
        "reversedtransaction",
        "reversed"
      ]
    },
    "last_modified_date": "14-Nov-2022 09:20:16",
    "additional_data": {
      "award_transaction_id": "6368bb4fc7f28f000c2fcf76"
    },
    "approver_details": {
      "approver_name": "System",
      "approver_id": "null"
    },
    "approved_date": "14-Nov-2022 09:20:16",
    "member_id": "john6543",
    "created_date": "14-Nov-2022 09:20:16",
    "transaction_type": "deduct",
    "id": "63720850a042a3000dc1f1c9",
    "deduct_info": {
      "points": 1000,
      "points_status": "deducted"
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Retrieve a Transaction with Transaction ID

GET
https://api.zinrelo.com/v2/loyalty/transactions/{id}

Parameters

idstring62dfc6c6595b7b17ebbf7148requiredpath

Enter transaction ID.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve a Transaction with Transaction ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/transactions/{id}'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{id}', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/transactions/{id}')
data = response.json()
{
  "data": {
    "status": "approved",
    "points_expiration_date": "03-Mar-2026 00:00:00",
    "auto_approval_date": "",
    "last_modified_date": "22-Mar-2023 06:28:51",
    "redemptions_list": [],
    "award_info": {
      "activity_id": "created_an_account",
      "points": 10000,
      "points_status": "exhausted",
      "activity_name": "Account Creation"
    },
    "id": "640200a652e6a100098e7208",
    "approver_details": {
      "approver_name": "System",
      "approver_id": null
    },
    "approved_date": "03-Mar-2023 14:13:58",
    "member_id": "5779678689",
    "created_date": "03-Mar-2023 14:13:58",
    "transaction_type": "award",
    "transaction_attributes": {
      "reason": null,
      "tags": []
    },
    "additional_data": {
      "activity_multiplier": 1
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Modify a pending Award Transaction with Transaction ID

POST
https://api.zinrelo.com/v2/loyalty/transactions/{id}

Body

application/json
transaction_attributesstring<json>{ "tags" : ["tag1","tag2"], "reason" : "purchase", "coupons" : "$5OFFVYZ", "order_total" : "1000", "order_subtotal" : "1000", "products" : [{ "product_id": "112", "product_quantity": "1", "product_category": "tshirt", "product_price": "15", "product_title": "Sweatshirt", "product_image_url": "" }, { "product_id": "980", "product_quantity": "2", "product_category": "Sales", "product_price": "10.017", "product_title": "Pant", "product_image_url": "" }] }

Every award activity can be modified using this API. You can change the custom attributes for each activity as well as the predefined attributes.

Let's take the example of made_a_purchase activity:

Mandatory attributes are order_total and order_subtotal.

A sample structure of the transaction_attributes for the made_a_purchase activity is given below:

{
"tags" : ["tag1","tag2"],
"reason" : "purchase",
"coupons" : "$5OFFVYZ",
"order_total" : "1000",
"order_subtotal" : "1000",

"products" : [{
"product_id": "112",
"product_quantity": "1",
"product_category": "tshirt",
"product_price": "15",
"product_title": "Sweatshirt",
"product_image_url": ""
},

{
"product_id": "980",
"product_quantity": "2",
"product_category": "Sales",
"product_price": "10.017",
"product_title": "Pant",
"product_image_url": ""
}]

}

Note: You cannot modify the upload_a_photo, submit_a_receipt and code_submission activities.

approval_datestring10/15/2019 16:10:00

Date and time on which the transaction will be auto approved. Format : MM/DD/YYYY HH:MM:SS

Note: Our API records all date and time fields in UTC time.

Parameters

idstring62dfc6c6595b7b17ebbf7148requiredpath

Enter transaction ID.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OK

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Modify a pending Award Transaction with Transaction ID
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
    "approval_date": "10/15/2019 16:10:00"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{id}', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
      "approval_date": "10/15/2019 16:10:00"
    }),
});

const data = await response.json();
import requests

payload = {
  "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
  "approval_date": "10/15/2019 16:10:00"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/{id}', json=payload)
data = response.json()
Request Body
{
  "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
  "approval_date": "10/15/2019 16:10:00"
}
"{\n  \"data\": {\n    \"status\": \"pending\",\n    \"points_expiration_date\": \"22-Mar-2026 00:00:00\",\n    \"auto_approval_date\": \"23-Oct-2023 16:10:00\",\n    \"last_modified_date\": \"22-Mar-2023 09:21:19\",\n     \"redemptions_list\": [],\n    \"award_info\": {\n      \"activity_id\": \"made_a_purchase\",\n      \"points\": 1000,\n      \"points_status\": \"pending\",\n      \"activity_name\": \"Purchase on website\"\n    },\n    \"id\": \"641ac88fc2161f000b21ff5e\",\n    \"approver_details\": {\n      \"approver_name\": \"System\",\n      \"approver_id\": null\n    },\n    \"approved_date\": \"\",\n    \"member_id\": \"5779678689\",\n    \"created_date\": \"22-Mar-2023 09:21:18\",\n    \"transaction_type\": \"award\",\n    \"transaction_attributes\": {\n      \"order_total\": 1000,\n      \"products\": [\n        {\n          \"product_id\": \"112\",\n          \"is_excluded\": false,\n          \"product_category\": \"tshirt\",\n          \"product_url\": \"www.zinrelo.com/sweatshirts\",\n          \"product_price\": \"15\",\n          \"product_points_per_quantity\": 15,\n          \"bonus_multiplier\": 0,\n          \"product_quantity\": \"1\",\n          \"product_image_url\": \"https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252\",\n          \"product_title\": \"Sweatshirt\"\n        },\n        {\n          \"product_id\": \"980\",\n          \"is_excluded\": false,\n          \"product_category\": \"Sales\",\n          \"product_url\": \"www.zinrelo.com/pant\",\n          \"product_price\": \"10.017\",\n          \"product_points_per_quantity\": 10,\n          \"bonus_multiplier\": 0,\n          \"product_quantity\": \"2\",\n          \"product_image_url\": \"https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252\",\n          \"product_title\": \"Pant\"\n        }\n      ],\n      \"coupon_code\": \"$5OFFVYZ\",\n      \"order_id\": \"7590984210\",\n      \"booked_location\": null,\n      \"age\": null,\n      \"tags\": [\n        \"productpurchased\",\n        \"transactioninpendingstatus\"\n      ],\n      \"currency\": \"dollars\",\n      \"reason\": \"purchase\",\n      \"favourite_cuisine\": \"indian\",\n      \"product_list\": [\"pants\", \"t-shirt\", \"trousers\"],\n      \"gender\": \"Male\",\n      \"favourite_destination\": \"London\",\n      \"order_subtotal\": 1000,\n      \"coupons\": \"$5OFFVYZ\"\n    },\n    \"additional_data\": {\n      \"activity_multiplier\": 1,\n      \"history\": [\n        {\n          \"activity_multiplier\": 1,\n          \"zrl_products\": [\n            {\n              \"category\": \"tshirt\",\n              \"product_id\": \"112\",\n              \"is_excluded\": false,\n              \"title\": \"Sweatshirt\",\n              \"url\": \"www.zinrelo.com/tshirt\",\n              \"price\": \"15\",\n              \"product_points_per_quantity\": 15,\n              \"bonus_multiplier\": 0,\n              \"img_url\": \"https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252\",\n              \"quantity\": \"1\"\n            },\n            {\n              \"category\": \"Sales\",\n              \"product_id\": \"980\",\n              \"is_excluded\": false,\n              \"title\": \"Pant\",\n              \"url\": \"www.zinrelo.com/pant\",\n              \"price\": \"10.017\",\n              \"product_points_per_quantity\": 10,\n              \"bonus_multiplier\": 0,\n              \"img_url\": \"https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252\",\n              \"quantity\": \"2\"\n            }\n          ],\n    }\n  },\n  \"success\": true\n}"
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Retrieve a transaction with Order ID

GET
https://api.zinrelo.com/v2/loyalty/transactions/{order_id}

Parameters

order_idstringrequiredpath

Enter the order id.

idParamstringorder_idrequiredquery

Enter 'order_id' as idParam.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve a transaction with Order ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/transactions/{order_id}'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{order_id}', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/transactions/{order_id}')
data = response.json()
{
  "data": {
    "points_expiration_date": "23-Aug-2023 06:00:11",
    "auto_approval_date": "07-Sep-2022 06:00:11",
    "last_modified_date": "23-Aug-2022 06:00:48",
    "award_info": {
      "activity_id": "made_a_purchase",
      "points": 10000,
      "points_status": "approved",
      "activity_name": "Purchase on website"
    },
    "id": "63046ceb8d7cfa7d39a18457",
    "approver_details": {
      "approver_name": "System",
      "approver_id": null
    },
    "approved_date": "23-Aug-2022 06:00:48",
    "member_id": "76543",
    "created_date": "23-Aug-2022 06:00:11",
    "transaction_type": "award",
    "transaction_attributes": {
      "order_total": 1000,
      "order_subtotal": 10000,
      "order_id": "70",
      "tags": [
        "purchasemade",
        "octoberpurchase"
      ],
      "currency": null,
      "coupon_code": null,
      "reason": "purchase",
      "products": [
        {
          "product_id": "112",
          "is_excluded": false,
          "product_category": "tshirt",
          "product_url": null,
          "product_price": 15,
          "product_points_per_quantity": 15,
          "bonus_multiplier": 0,
          "product_quantity": 1,
          "product_image_url": "",
          "product_title": "Sweatshirt"
        },
        {
          "product_id": "980",
          "is_excluded": "false",
          "product_category": "Sales",
          "product_url": null,
          "product_price": 10,
          "product_points_per_quantity": 10,
          "bonus_multiplier": 0,
          "product_quantity": 2,
          "product_image_url": "",
          "product_title": "Pant"
        }
      ],
      "coupons": null
    },
    "additional_data": {
      "activity_multiplier": 1
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Retrieve a Transaction using Unique Transaction Attribute

GET
https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}

Parameters

idParamstringorder_idrequiredquery

The idParam for purchase activity will be order_id, but if you have created any unique transaction attribute like serial_number, invoice_number, etc., then place it as an idParam.

unique_transaction_attributestring752245347requiredpath

Pass the value that was stored against the client internal id.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OK

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve a Transaction using Unique Transaction Attribute
curl -X GET 'https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}')
data = response.json()
{
  "data": {
    "status": "approved",
    "points_expiration_date": "07-Nov-2023 00:00:00",
    "auto_approval_date": "19-Nov-2022 16:10:00",
    "last_modified_date": "14-Nov-2022 09:19:17",
    "redemptions_list": [
      {
        "redemption_id": "reward_b7f19",
        "redeemed_points": 500,
        "id": "65c1cbbd40aba100353b5c68"
      },
      {
        "redemption_id": "reward_b7f34",
        "redeemed_points": 500,
        "id": "65c1cbbe40aba100353b5c6b"
      }
    ],
    "award_info": {
      "activity_id": "made_a_purchase",
      "points": 1000,
      "points_status": "approved",
      "activity_name": "Purchase on website"
    },
    "id": "6368bb4fc7f28f000c2fcf76",
    "approver_details": {
      "approver_name": "System",
      "approver_id": "null"
    },
    "approved_date": "14-Nov-2022 09:19:17",
    "member_id": "john76543",
    "created_date": "07-Nov-2022 07:55:31",
    "transaction_type": "award",
    "transaction_attributes": {
      "order_total": 1000,
      "order_subtotal": 1000,
      "order_id": "752245347",
      "tags": [
        "retrieveatransaction",
        "transactionretrieved"
      ],
      "currency": "Dollars",
      "coupon_code": "$5OFFVYZ",
      "reason": "purchase",
      "products": [
        {
          "product_id": "1126",
          "is_excluded": false,
          "product_category": "tshirt",
          "product_url": "www.zinrelo.com/sweatshirt",
          "product_price": "15",
          "product_points_per_quantity": 15,
          "bonus_multiplier": 0,
          "product_quantity": "1",
          "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
          "product_title": "Sweatshirt"
        },
        {
          "product_id": "980",
          "is_excluded": false,
          "product_category": "Sales",
          "product_url": "www.zinrelo.com/pant",
          "product_price": "10.017",
          "product_points_per_quantity": 10,
          "bonus_multiplier": 0,
          "product_quantity": "2",
          "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
          "product_title": "Pant"
        }
      ],
      "coupons": "$5OFFVYZ"
    },
    "additional_data": {
      "activity_multiplier": 1,
      "history": [
        {
          "activity_multiplier": 1,
          "zrl_products": [
            {
              "category": "tshirt",
              "product_id": "112",
              "is_excluded": false,
              "title": "Sweatshirt",
              "url": "www.zinrelo.com/tshirt",
              "price": "15",
              "product_points_per_quantity": 15,
              "bonus_multiplier": 0,
              "img_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
              "quantity": "1"
            },
            {
              "category": "Sales",
              "product_id": "980",
              "is_excluded": false,
              "title": "Pant",
              "url": "www.zinrelo.com/pant",
              "price": "10.017",
              "product_points_per_quantity": 10,
              "bonus_multiplier": 0,
              "img_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
              "quantity": "2"
            }
          ],
          "current_loyalty_level_id": "zrl_silver",
          "custom_attributes": {},
          "points": 1000,
          "created_time": "2022-11-07 07:55:31.854000"
        }
      ]
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Modify a pending Award Transaction using Unique Transaction Attribute

POST
https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}

Body

application/json
transaction_attributesstring<json>{ "tags" : ["tag1","tag2"], "reason" : "purchase", "order_id" : "75", "coupons" : "$5OFFVYZ", "order_total" : "1000", "order_subtotal" : "1000", "products" : [{ "product_id": "112", "product_quantity": "1", "product_category": "tshirt", "product_price": "15", "product_title": "Sweatshirt", "product_image_url": "" }, { "product_id": "980", "product_quantity": "2", "product_category": "Sales", "product_price": "10.017", "product_title": "Pant", "product_image_url": "" }] }

Every award activity can be modified using this API. You can change the custom attributes for each activity as well as the predefined attributes.

Let's take the example of made_a_purchase activity:

Mandatory attributes are order_total and order_subtotal.

A sample structure of the transaction_attributes for the made_a_purchase activity is given below:

{
"tags" : ["tag1","tag2"],
"reason" : "purchase",
"coupons" : "$5OFFVYZ",
"order_total" : "1000",
"order_subtotal" : "1000",

"products" : [{
"product_id": "112",
"product_quantity": "1",
"product_category": "tshirt",
"product_price": "15",
"product_title": "Sweatshirt",
"product_image_url": ""
},

{
"product_id": "980",
"product_quantity": "2",
"product_category": "Sales",
"product_price": "10.017",
"product_title": "Pant",
"product_image_url": ""
}]

}

Note: You cannot modify the upload_a_photo, submit_a_receipt and code_submission activities.

approval_datestring10/15/2019 16:10:00

Date and time on which the transaction will be auto approved. Format : ;MM/DD/YYYY HH:MM:SS

Note: Our API records all date and time fields in UTC time.

Parameters

unique_transaction_attributestring752245347requiredpath

Pass the value that was stored against the client internal id.

idParamstringorder_idrequiredquery

The idParam for purchase activity will be order_id, but if you have created any unique transaction attribute like serial_number, invoice_number, etc., then replace it as an idParam.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Modify a pending Award Transaction using Unique Transaction Attribute
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}' \
  -H 'Content-Type: application/json' \
  -d '{
    "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"order_id\" : \"75\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
    "approval_date": "10/15/2019 16:10:00"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"order_id\" : \"75\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
      "approval_date": "10/15/2019 16:10:00"
    }),
});

const data = await response.json();
import requests

payload = {
  "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"order_id\" : \"75\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
  "approval_date": "10/15/2019 16:10:00"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}', json=payload)
data = response.json()
Request Body
{
  "transaction_attributes": "{ \"tags\" : [\"tag1\",\"tag2\"], \"reason\" : \"purchase\", \"order_id\" : \"75\", \"coupons\" : \"$5OFFVYZ\", \"order_total\" : \"1000\", \"order_subtotal\" : \"1000\",  \"products\" : [{ \"product_id\": \"112\", \"product_quantity\": \"1\", \"product_category\": \"tshirt\", \"product_price\": \"15\", \"product_title\": \"Sweatshirt\", \"product_image_url\": \"\" },  { \"product_id\": \"980\", \"product_quantity\": \"2\", \"product_category\": \"Sales\", \"product_price\": \"10.017\", \"product_title\": \"Pant\", \"product_image_url\": \"\" }]  }",
  "approval_date": "10/15/2019 16:10:00"
}
{
  "data": {
    "status": "pending",
    "points_expiration_date": "07-Nov-2023 00:00:00",
    "auto_approval_date": "19-Nov-2022 16:10:00",
    "last_modified_date": "07-Nov-2022 08:01:19",
    "redemptions_list": [],
    "award_info": {
      "activity_id": "made_a_purchase",
      "points": 1000,
      "points_status": "redemption_pending",
      "activity_name": "Purchase on website"
    },
    "id": "6368bb4fc7f28f000c2fcf76",
    "approver_details": {
      "approver_name": "System",
      "approver_id": "null"
    },
    "approved_date": "14-Nov-2022 09:19:17",
    "member_id": "76543",
    "created_date": "07-Nov-2022 07:55:31",
    "transaction_type": "award",
    "transaction_attributes": {
      "order_total": 1000,
      "order_subtotal": 1000,
      "order_id": "752245347",
      "tags": [
        "transactionmodified",
        "modifyingawardtransaction"
      ],
      "currency": "Dollars",
      "coupon_code": "$5OFFVYZ",
      "reason": "purchase",
      "products": [
        {
          "product_id": "1126",
          "is_excluded": false,
          "product_category": "tshirt",
          "product_url": "www.zinrelo.com/sweatshirt",
          "product_price": "15",
          "product_points_per_quantity": 15,
          "bonus_multiplier": 0,
          "product_quantity": "1",
          "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
          "product_title": "Sweatshirt"
        },
        {
          "product_id": "980",
          "is_excluded": false,
          "product_category": "Sales",
          "product_url": "www.zinrelo.com/pant",
          "product_price": "10.017",
          "product_points_per_quantity": 10,
          "bonus_multiplier": 0,
          "product_quantity": "2",
          "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
          "product_title": "Pant"
        }
      ],
      "coupons": "$5OFFVYZ"
    },
    "additional_data": {
      "activity_multiplier": 1,
      "history": [
        {
          "activity_multiplier": 1,
          "zrl_products": [
            {
              "category": "tshirt",
              "product_id": "112",
              "is_excluded": false,
              "title": "Sweatshirt",
              "url": "www.zinrelo.com/tshirt",
              "price": "15",
              "product_points_per_quantity": 15,
              "bonus_multiplier": 0,
              "img_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
              "quantity": "1"
            },
            {
              "category": "Sales",
              "product_id": "980",
              "is_excluded": false,
              "title": "Pant",
              "url": "www.zinrelo.com/pant",
              "price": "10.017",
              "product_points_per_quantity": 10,
              "bonus_multiplier": 0,
              "img_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
              "quantity": "2"
            }
          ],
          "current_loyalty_level_id": "zrl_silver",
          "custom_attributes": {},
          "points": 1000,
          "created_time": "2022-11-07 07:55:31.854000"
        }
      ]
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Approve a Pending Award/Redeem Transaction using ID

POST
https://api.zinrelo.com/v2/loyalty/transactions/{id}/approve

Parameters

idstring62dfc6c6595b7b17ebbf7148requiredpath

Enter transaction ID.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Approve a Pending Award/Redeem Transaction using ID
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/{id}/approve'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{id}/approve', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/{id}/approve')
data = response.json()
{
  "data": {
    "status": "approved",
    "points_expiration_date": "03-Mar-2026 00:00:00",
    "auto_approval_date": "",
    "last_modified_date": "22-Mar-2023 06:28:51",
    "redemptions_list": [],
    "award_info": {
      "activity_id": "created_an_account",
      "points": 10000,
      "points_status": "exhausted",
      "activity_name": "Account Creation"
    },
    "id": "640200a652e6a100098e7208",
    "approver_details": {
      "approver_name": "System",
      "approver_id": null
    },
    "approved_date": "03-Mar-2023 14:13:58",
    "member_id": "5779678689",
    "created_date": "03-Mar-2023 14:13:58",
    "transaction_type": "award",
    "transaction_attributes": {
      "reason": null,
      "tags": []
    },
    "additional_data": {
      "activity_multiplier": 1
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Approve a pending award transaction using Order ID

POST
https://api.zinrelo.com/v2/loyalty/transactions/{order_id}/approve

Parameters

order_idstringrequiredpath

Enter the order id.

idParamstringorder_idrequiredquery

Enter 'order_id' as idParam.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Approve a pending award transaction using Order ID
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/{order_id}/approve'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{order_id}/approve', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/{order_id}/approve')
data = response.json()
{
  "data": {
    "points_expiration_date": "17-Oct-2023 12:33:29",
    "auto_approval_date": "01-Nov-2022 12:33:29",
    "last_modified_date": "17-Oct-2022 12:54:12",
    "award_info": {
      "activity_id": "made_a_purchase",
      "points": 1000,
      "points_status": "approved",
      "activity_name": "Purchase on website"
    },
    "id": "634d4b9a1b2037000deb12d1",
    "approver_details": {
      "approver_name": "System",
      "approver_id": null
    },
    "approved_date": "17-Oct-2022 12:54:12",
    "member_id": "76543",
    "created_date": "17-Oct-2022 12:33:29",
    "transaction_type": "award",
    "transaction_attributes": {
      "order_total": 1000,
      "order_subtotal": 1000,
      "order_id": "75000",
      "tags": [
        "purchasemade",
        "novemberpurchase"
      ],
      "currency": null,
      "coupon_code": "$5OFFVYZ",
      "reason": "purchase",
      "products": [
        {
          "product_id": "112",
          "is_excluded": false,
          "product_category": "tshirt",
          "product_url": null,
          "product_price": 15,
          "product_points_per_quantity": 15,
          "bonus_multiplier": 0,
          "product_quantity": 1,
          "product_image_url": "",
          "product_title": "Sweatshirt"
        },
        {
          "product_id": "980",
          "is_excluded": false,
          "product_category": "Sales",
          "product_url": null,
          "product_price": 10,
          "product_points_per_quantity": 10,
          "bonus_multiplier": 0,
          "product_quantity": 2,
          "product_image_url": "",
          "product_title": "Pant"
        }
      ],
      "coupons": "$5OFFVYZ"
    },
    "additional_data": {
      "activity_multiplier": 1
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Approve a Pending Award/Redeem Transaction using Unique Transaction Attribute

POST
https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/approve

Parameters

unique_transaction_attributestring752245347requiredpath

Pass the value that was stored against the client internal id.

idParamstringorder_idrequiredquery

The idParam for purchase activity will be order_id, but if you have created any unique transaction attribute like serial_number, invoice_number, etc., then replace it as an idParam.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Approve a Pending Award/Redeem Transaction using Unique Transaction Attribute
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/approve'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/approve', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/approve')
data = response.json()
{
  "data": {
    "status": "approved",
    "points_expiration_date": "17-Oct-2023 00:00:00",
    "auto_approval_date": "",
    "last_modified_date": "17-Oct-2022 12:50:50",
    "redemptions_list": [],
    "award_info": {
      "activity_id": "made_a_purchase",
      "points": 1000,
      "points_status": "approved",
      "activity_name": "Purchase on website"
    },
    "id": "634d4c87dfa6b7678ea4dd1a",
    "approver_details": {
      "approver_name": "System",
      "approver_id": "null"
    },
    "approved_date": "17-Oct-2022 12:50:50",
    "member_id": "76543",
    "created_date": "17-Oct-2022 12:37:26",
    "transaction_type": "award",
    "transaction_attributes": {
      "order_total": 1000,
      "order_subtotal": 1000,
      "order_id": "750001",
      "tags": [
        "purchasemade",
        "novemberpurchse"
      ],
      "currency": "Dollars",
      "coupon_code": "$5OFFVYZ",
      "reason": "purchase",
      "products": [
        {
          "product_id": "1126",
          "is_excluded": false,
          "product_category": "tshirt",
          "product_url": "www.zinrelo.com/sweatshirt",
          "product_price": "15",
          "product_points_per_quantity": 15,
          "bonus_multiplier": 0,
          "product_quantity": "1",
          "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
          "product_title": "Sweatshirt"
        },
        {
          "product_id": "980",
          "is_excluded": false,
          "product_category": "Sales",
          "product_url": "www.zinrelo.com/pant",
          "product_price": "10.017",
          "product_points_per_quantity": 10,
          "bonus_multiplier": 0,
          "product_quantity": "2",
          "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/220px-Far_Cry_5_boxshot_1024x1024@2x.jpg?v=1528970252",
          "product_title": "Pant"
        }
      ],
      "coupons": "$5OFFVYZ"
    },
    "additional_data": {
      "activity_multiplier": 1
    }
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Reject a pending award/redeem transaction using ID

POST
https://api.zinrelo.com/v2/loyalty/transactions/{id}/reject

Parameters

idstring62dfc6c6595b7b17ebbf7148requiredpath

Enter transaction ID.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject | object

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Reject a pending award/redeem transaction using ID
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/{id}/reject'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{id}/reject', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/{id}/reject')
data = response.json()
{
  "data": {
    "status": "rejected",
    "transaction_attributes": {
      "reason": "redeem",
      "source_of_redemption": "api",
      "tags": [
        "purchasenmade",
        "redeemingpoints"
      ]
    },
    "last_modified_date": "17-Oct-2022 12:41:47",
    "additional_data": {
      "points_to_be_redeemed": 1000
    },
    "approver_details": {
      "approver_name": "Zinrelo",
      "approver_id": "zinrelo57578"
    },
    "approved_date": "17-Oct-2022 12:41:47",
    "reward_info": {
      "reward_name": "$5 OFF COUPON",
      "points_status": "redemption_cancelled",
      "coupon_code": "AEAD49CC",
      "reward_link": null,
      "reward_id": "reward_bc668",
      "points": 1000
    },
    "member_id": "76543",
    "created_date": "17-Oct-2022 12:41:47",
    "transaction_type": "redeem",
    "id": "634d4d8be6006a68add5893b"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

Reject a Pending Award/Redeem Transaction using Unique Transaction Attribute

POST
https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/reject

Parameters

unique_transaction_attributestring752245347requiredpath

Pass the value that was stored against the client internal id.

idParamstringorder_idrequiredquery

The idParam for purchase activity will be order_id, but if you have created any unique transaction attribute like serial_number, invoice_number, etc., then replace it as an idParam.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

Reject a Pending Award/Redeem Transaction using Unique Transaction Attribute
curl -X POST 'https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/reject'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/reject', {
  method: 'POST',
});

const data = await response.json();
import requests

response = requests.post('https://api.zinrelo.com/v2/loyalty/transactions/{unique_transaction_attribute}/reject')
data = response.json()
{
  "data": {
    "status": "rejected",
    "transaction_attributes": {
      "reason": "redeem",
      "source_of_redemption": "api",
      "tags": [
        "purchasenmade",
        "redeemingpoints"
      ]
    },
    "last_modified_date": "17-Oct-2022 12:41:47",
    "additional_data": {
      "points_to_be_redeemed": 1000
    },
    "approver_details": {
      "approver_name": "Zinrelo",
      "approver_id": "zinrelo57578"
    },
    "approved_date": "17-Oct-2022 12:41:47",
    "reward_info": {
      "reward_name": "$5 OFF COUPON",
      "points_status": "redemption_cancelled",
      "coupon_code": "AEAD49CC",
      "reward_link": null,
      "reward_id": "reward_bc668",
      "points": 1000
    },
    "member_id": "76543",
    "created_date": "17-Oct-2022 12:41:47",
    "transaction_type": "redeem",
    "id": "634d4d8be6006a68add5893b"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

List all Transactions

GET
https://api.zinrelo.com/v2/loyalty/transactions

Parameters

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

approved_datestring{"eq":"01/21/2022"}query

This can be used to filter the list of transactions based on their approved_date in Trueloyal. Child parameters are:

p>To filter dates 'equal to' a particular date, use operator "eq". Example: approved_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: approved_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: approved_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: approved_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: approved_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: approved_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

created_datestring{"gt":"01/21/2022"}query

This can be used to filter the list of transactions based on their created_date in Trueloyal. Child parameters are

p>To filter dates 'equal to' a particular date, use operator "eq". Example: created_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: created_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: created_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: created_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: created_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: created_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

last_modified_datestring{"gte":"01/21/2022"}query

This can be used to filter the list of transactions based on their last_modified date in Trueloyal. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: last_modified_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: last_modified_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: last_modified_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: last_modified_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: last_modified_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: last_modified_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

points_expiration_datestring{"lte":"01/21/2022"}query

This can be used to filter the list of transactions based on their points_expiration_date in Trueloyal. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: points_expiration_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: points_expiration_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: points_expiration_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: points_expiration_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: points_expiration_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: points_expiration_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

points_statusstringquery

This filter will return the point status.

The value can be passed as:

eq: Accepted values are ‘approved, rejected, pending, redeemed, deducted, expired, redemption_pending, redemption_cancelled, pending_deduction, auto_rejected and auto_approved.' Pass the value of the status to get a list of all transactions with points_status equal to the value passed.

For example- {"eq":"approved"}

in: Pass a single string which may contain one status or multiple statuses separated by comma to get a list of all transactions whose points_status is one of the values passed.

For example- {"in":"approved, rejected"}

statusstringquery

This filter will return transaction status.

eq: Accepted values are Approved/ Rejected/ Pending.

For example- {"eq":"approved"}

in: Pass a single string which may contain one status or multiple statuses separated by comma to get a list of all transactions whose points_status is one of the values passed.

For example- {"in":"approved, rejected"}

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OK

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

List all Transactions
curl -X GET 'https://api.zinrelo.com/v2/loyalty/transactions'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/transactions', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/transactions')
data = response.json()
{
  "data": {
    "total": 15,
    "next_cursor": 100,
    "transactions": [
      {
        "status": "approved",
        "points_expiration_date": "15-Dec-2023 00:00:00",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7fe8",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7f20",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "auto_approval_date": "",
        "last_modified_date": "29-Mar-2023 11:17:22",
        "award_info": {
          "activity_id": "birthday_bonus",
          "points": 100,
          "points_status": "approved",
          "activity_name": "Birthday Bonus"
        },
        "id": "64241e42df3c93000ab0550a",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "29-Mar-2023 11:17:22",
        "member_id": "6487956750503",
        "created_date": "29-Mar-2023 11:17:21",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "testing",
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "pending",
        "points_expiration_date": "22-Mar-2026 00:00:00",
        "redemptions_list": [],
        "auto_approval_date": "23-Oct-2023 16:10:00",
        "last_modified_date": "22-Mar-2023 09:21:19",
        "award_info": {
          "activity_id": "made_a_purchase",
          "points": 1000,
          "points_status": "pending",
          "activity_name": "Purchase on website"
        },
        "id": "641ac88fc2161f000b21ff5e",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "",
        "member_id": "5779678689",
        "created_date": "22-Mar-2023 09:21:18",
        "transaction_type": "award",
        "transaction_attributes": {
          "order_total": 1000,
          "products": [
            {
              "product_id": "112",
              "is_excluded": false,
              "product_category": "tshirt",
              "product_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_price": "15",
              "product_points_per_quantity": 15,
              "bonus_multiplier": 0,
              "product_quantity": "1",
              "product_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097610.png",
              "product_title": "Sweatshirt"
            },
            {
              "product_id": "980",
              "is_excluded": false,
              "product_category": "Sales",
              "product_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_price": "10.017",
              "product_points_per_quantity": 10,
              "bonus_multiplier": 0,
              "product_quantity": "2",
              "product_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_title": "Pant"
            }
          ],
          "coupon_code": "$5OFFVYZ",
          "order_id": "7590984210",
          "booked_location": null,
          "age": null,
          "tags": [
            "successful",
            "purchased"
          ],
          "currency": "$",
          "reason": "purchase",
          "favourite_cuisine": "Indian",
          "gender": null,
          "order_subtotal": 1000,
          "coupons": "$5OFFVYZ"
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "22-Mar-2026 00:00:00",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7f22",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7f8",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "auto_approval_date": "",
        "last_modified_date": "22-Mar-2023 09:15:00",
        "award_info": {
          "activity_id": "made_a_purchase",
          "points": 1000,
          "points_status": "approved",
          "activity_name": "Purchase on website"
        },
        "id": "641ac714ce841d000b9d0e7c",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "22-Mar-2023 09:15:00",
        "member_id": "5779678689",
        "created_date": "22-Mar-2023 09:14:59",
        "transaction_type": "award",
        "transaction_attributes": {
          "order_total": 1000,
          "products": [
            {
              "product_id": "112",
              "is_excluded": false,
              "product_category": "tshirt",
              "product_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_price": "15",
              "product_points_per_quantity": 15,
              "bonus_multiplier": 0,
              "product_quantity": "1",
              "product_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_title": "Sweatshirt"
            },
            {
              "product_id": "980",
              "is_excluded": false,
              "product_category": "Sales",
              "product_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_price": "10.017",
              "product_points_per_quantity": 10,
              "bonus_multiplier": 0,
              "product_quantity": "2",
              "product_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_title": "Pant"
            }
          ],
          "coupon_code": "$5OFFVYZ",
          "order_id": "75909842",
          "booked_location": "UK",
          "age": 25,
          "tags": [
            "awarded",
            "purchased"
          ],
          "currency": "$",
          "reason": "purchase",
          "favourite_cuisine": "Chinese",
          "order_subtotal": 1000,
          "coupons": "$5OFFVYZ"
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": "Transaction reversed",
          "tags": []
        },
        "last_modified_date": "22-Mar-2023 06:28:51",
        "additional_data": {
          "award_transaction_id": "640200a652e6a100098e7208"
        },
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "22-Mar-2023 06:24:57",
        "member_id": "pallavi+1003@zinrelo.com",
        "created_date": "22-Mar-2023 06:24:57",
        "transaction_type": "deduct",
        "id": "641a9f39d2e73e0009ca2ec5",
        "deduct_info": {
          "points": 10000,
          "points_status": "deducted"
        }
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": "deduct",
          "tags": [
            "deductionmade",
            "productreturned"
          ]
        },
        "last_modified_date": "22-Mar-2023 06:23:24",
        "additional_data": {},
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "22-Mar-2023 06:19:35",
        "member_id": "5779678689",
        "created_date": "22-Mar-2023 06:19:35",
        "transaction_type": "deduct",
        "id": "641a9df7c2161f000c2eb56a",
        "deduct_info": {
          "points": 100,
          "points_status": "deducted"
        }
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "returned_product_id": null,
          "tags": [],
          "order_id": "7597659870",
          "reason": "Order partially returned",
          "returned_amount": 200,
          "returned_product_quantity": null
        },
        "last_modified_date": "22-Mar-2023 06:16:21",
        "additional_data": {
          "returned_orders_revenue": 200,
          "product_id": "BNIE087",
          "quantity": 1
        },
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "22-Mar-2023 06:14:15",
        "member_id": "5779678689",
        "created_date": "22-Mar-2023 06:14:15",
        "transaction_type": "deduct",
        "id": "641a9cb7c2161f000c2eb553",
        "deduct_info": {
          "points": 200,
          "points_status": "deducted"
        }
      },
      {
        "status": "rejected",
        "transaction_attributes": {
          "reason": "Product Redemption Failed",
          "source_of_redemption": "api",
          "tags": [
            "purchasemade",
            "redeemingpoints"
          ]
        },
        "last_modified_date": "22-Mar-2023 06:09:12",
        "additional_data": {
          "points_to_be_redeemed": 1400
        },
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "22-Mar-2023 05:54:11",
        "reward_info": {
          "reward_name": "&#36;15 OFF COUPON",
          "points_status": "redemption_cancelled",
          "coupon_code": "81c0bd3b",
          "reward_link": null,
          "reward_id": "reward_9c350",
          "points": 1400
        },
        "member_id": "5779678689",
        "created_date": "22-Mar-2023 05:54:11",
        "transaction_type": "redeem",
        "id": "641a9804c2161f000ee6e469"
      },
      {
        "status": "approved",
        "points_expiration_date": "03-Mar-2026 00:00:00",
        "redemptions_list": [],
        "auto_approval_date": "",
        "last_modified_date": "22-Mar-2023 06:28:51",
        "award_info": {
          "activity_id": "created_an_account",
          "points": 10000,
          "points_status": "exhausted",
          "activity_name": "Account Creation"
        },
        "id": "640200a652e6a100098e7208",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "03-Mar-2023 14:13:58",
        "member_id": "pallavi+1003@zinrelo.com",
        "created_date": "03-Mar-2023 14:13:58",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "accountcreated",
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": "Deleted",
          "tags": []
        },
        "last_modified_date": "03-Mar-2023 14:11:12",
        "additional_data": {},
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "03-Mar-2023 14:11:12",
        "member_id": "6401ff828bae46000a6b8932",
        "created_date": "03-Mar-2023 14:11:12",
        "transaction_type": "deduct",
        "id": "6402000076759900104870e5",
        "deduct_info": {
          "points": 10000,
          "points_status": "deducted"
        }
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": "Deleted",
          "tags": []
        },
        "last_modified_date": "03-Mar-2023 14:11:11",
        "additional_data": {},
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "03-Mar-2023 14:11:11",
        "member_id": "6401feba11a735000c24a260",
        "created_date": "03-Mar-2023 14:11:11",
        "transaction_type": "deduct",
        "id": "6401ffff76759900134870f0",
        "deduct_info": {
          "points": 10000,
          "points_status": "deducted"
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "03-Mar-2026 00:00:00",
        "auto_approval_date": "",
        "last_modified_date": "03-Mar-2023 14:10:31",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7f05",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7fe7",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "award_info": {
          "activity_id": "created_an_account",
          "points": 10000,
          "points_status": "approved",
          "activity_name": "Account Creation"
        },
        "id": "6401ffd7bc8a7b03ed0b2fce",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "03-Mar-2023 14:10:31",
        "member_id": "pallavi+1001@zinrelo.com",
        "created_date": "03-Mar-2023 14:10:31",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": null,
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "17-Jun-2023 00:00:00",
        "redemptions_list": [],
        "auto_approval_date": "",
        "last_modified_date": "26-Feb-2023 00:25:14",
        "award_info": {
          "activity_id": "birthday_bonus",
          "points": 130,
          "points_status": "approved",
          "activity_name": "Birthday Bonus"
        },
        "id": "63faa6ea19c62400133bceae",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "26-Feb-2023 00:25:14",
        "member_id": "2345",
        "created_date": "26-Feb-2023 00:25:14",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "birthday",
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "rejected",
        "transaction_attributes": {
          "reason": "Product Redemption Failed",
          "source_of_redemption": "api",
          "tags": []
        },
        "last_modified_date": "08-Feb-2023 07:53:24",
        "additional_data": {},
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "08-Feb-2023 07:38:24",
        "reward_info": {
          "reward_name": "$5 OFF COUPON",
          "points_status": "redemption_cancelled",
          "coupon_code": "4458FD49",
          "reward_link": null,
          "reward_id": "reward_bc668",
          "points": 750
        },
        "member_id": "5779678689",
        "created_date": "08-Feb-2023 07:38:24",
        "transaction_type": "redeem",
        "id": "63e35170322067000b9bc8fe"
      },
      {
        "status": "approved",
        "points_expiration_date": "22-Mar-2026 00:00:00",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7fe1",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7fe2",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "auto_approval_date": "",
        "last_modified_date": "07-Feb-2023 06:58:07",
        "award_info": {
          "activity_id": "made_a_purchase",
          "points": 1000,
          "points_status": "approved",
          "activity_name": "Purchase on website"
        },
        "id": "63e1f67f0949ed000b3a658f",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "07-Feb-2023 06:58:07",
        "member_id": "5779678689",
        "created_date": "07-Feb-2023 06:58:07",
        "transaction_type": "award",
        "transaction_attributes": {
          "order_total": 1000,
          "products": [
            {
              "product_id": "112",
              "is_excluded": false,
              "product_category": "tshirt",
              "product_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_price": "15",
              "product_points_per_quantity": 15,
              "bonus_multiplier": 0,
              "product_quantity": "1",
              "product_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_title": "Sweatshirt"
            },
            {
              "product_id": "980",
              "is_excluded": false,
              "product_category": "Sales",
              "product_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_price": "10.017",
              "product_points_per_quantity": 10,
              "bonus_multiplier": 0,
              "product_quantity": "2",
              "product_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ece73c1fcf03cf1a006b2dac79097600.png",
              "product_title": "Pant"
            }
          ],
          "coupon_code": "$5OFFVYZ",
          "order_id": "7597659870",
          "booked_location": "US",
          "age": 51,
          "tags": [
            "purchaseactivity",
            "purchasemade"
          ],
          "currency": "$",
          "reason": "purchase",
          "favourite_cuisine": "Continental",
          "gender": "Male",
          "order_subtotal": 1000,
          "coupons": "$5OFFVYZ"
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "18-Jan-2024 00:00:00",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7fe3",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7fe4",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "auto_approval_date": "",
        "last_modified_date": "17-Jan-2023 09:54:34",
        "award_info": {
          "activity_id": "share_on_pinterest",
          "points": 1000,
          "points_status": "approved",
          "activity_name": "Share on Pinterest"
        },
        "id": "63c6705a4b1736000b826a7d",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "17-Jan-2023 09:54:34",
        "member_id": "6508075909287",
        "created_date": "17-Jan-2023 09:54:33",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "testing",
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": "testing",
          "source_of_redemption": "manual",
          "tags": []
        },
        "last_modified_date": "17-Jan-2023 09:53:45",
        "additional_data": {},
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "17-Jan-2023 09:53:45",
        "reward_info": {
          "reward_name": "$5 OFF COUPON",
          "points_status": "redeemed",
          "coupon_code": "8D1A3ED4",
          "reward_link": null,
          "reward_id": "reward_bc668",
          "points": 750
        },
        "member_id": "6508075909287",
        "created_date": "17-Jan-2023 09:53:45",
        "transaction_type": "redeem",
        "id": "63c670294b1736000b826a6a"
      },
      {
        "status": "approved",
        "points_expiration_date": "18-Jan-2024 00:00:00",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7fe6",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7fe7",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "auto_approval_date": "",
        "last_modified_date": "16-Jan-2023 12:05:27",
        "award_info": {
          "activity_id": "share_on_twitter",
          "points": 1000,
          "points_status": "approved",
          "activity_name": "Share on Twitter"
        },
        "id": "63c53d87ddec80000a41b8f7",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "16-Jan-2023 12:05:27",
        "member_id": "6508075909287",
        "created_date": "16-Jan-2023 12:05:27",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "testing",
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "18-Jan-2024 00:00:00",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7fe0",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7f80",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "auto_approval_date": "",
        "last_modified_date": "16-Jan-2023 12:03:53",
        "award_info": {
          "activity_id": "share_on_facebook",
          "points": 1000,
          "points_status": "approved",
          "activity_name": "Share on Facebook"
        },
        "id": "63c53d299841af000ce149e7",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "16-Jan-2023 12:03:53",
        "member_id": "6508075909287",
        "created_date": "16-Jan-2023 12:03:53",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "Testing",
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "18-Jan-2024 00:00:00",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7f20",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7fef",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "auto_approval_date": "",
        "last_modified_date": "04-Jan-2023 15:54:34",
        "award_info": {
          "activity_id": "follow_on_instagram",
          "points": 1000,
          "points_status": "approved",
          "activity_name": "Follow on Instagram"
        },
        "id": "63b5a13a5e46a8000c1aec7b",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "04-Jan-2023 15:54:34",
        "member_id": "6508075909287",
        "created_date": "04-Jan-2023 15:54:34",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "testing",
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": "Transaction reversed",
          "tags": []
        },
        "last_modified_date": "04-Jan-2023 12:17:17",
        "additional_data": {
          "award_transaction_id": "63b56e096de225000974aee2"
        },
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "04-Jan-2023 12:17:17",
        "member_id": "6508075909287",
        "created_date": "04-Jan-2023 12:17:17",
        "transaction_type": "deduct",
        "id": "63b56e4d5e46a800094d18b1",
        "deduct_info": {
          "points": 100,
          "points_status": "deducted"
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "06-Oct-2023 00:00:00",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7f19",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7f34",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "auto_approval_date": "",
        "last_modified_date": "07-Feb-2023 16:36:39",
        "award_info": {
          "activity_id": "upload_photo",
          "points": 5000,
          "points_status": "approved",
          "activity_name": "Upload a Photo"
        },
        "id": "63a3da7d7c04c4000b5b6f68",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "22-Dec-2022 04:18:35",
        "member_id": "rohit@zinrelo.com",
        "created_date": "22-Dec-2022 04:18:05",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "test",
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "07-Nov-2023 00:00:00",
        "redemptions_list": [],
        "auto_approval_date": "",
        "last_modified_date": "15-Dec-2022 14:18:14",
        "award_info": {
          "activity_id": "anniversary_bonus",
          "points": 200,
          "points_status": "exhausted",
          "activity_name": "Anniversary Bonus"
        },
        "id": "638e9beb51ab7a0010b2414c",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "06-Dec-2022 01:33:31",
        "member_id": "76543",
        "created_date": "06-Dec-2022 01:33:31",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": null,
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      }
    ],
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

List all Transactions with Member ID

GET
https://api.zinrelo.com/v2/loyalty/members/{member_id}/transactions

Parameters

member_idstringjohn.doe@gmail.comrequiredpath
idParamstringmember_idrequiredquery

Enter 'member_id' as idParam.

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

approved_datestring{"eq":"01/21/2022"}query

This can be used to filter the list of transactions based on their approved_date in TrueLoyal. Child parameters are:

p>To filter dates 'equal to' a particular date, use operator "eq". Example: approved_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: approved_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: approved_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: approved_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: approved_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: approved_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

created_datestring{"gt":"01/21/2022"}query

This can be used to filter the list of transactions based on their created_date in Trueloyal. Child parameters are

p>To filter dates 'equal to' a particular date, use operator "eq". Example: created_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: created_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: created_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: created_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: created_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: created_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

last_modified_datestring{"gte":"01/21/2022"}query

This can be used to filter the list of transactions based on their last_modified date in Trueloyal. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: last_modified_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: last_modified_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: last_modified_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: last_modified_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: last_modified_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: last_modified_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

points_expiration_datestring{"lte":"01/21/2022"}query

This can be used to filter the list of transactions based on their points_expiration_date in Trueloyal. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: points_expiration_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: points_expiration_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: points_expiration_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: points_expiration_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: points_expiration_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: points_expiration_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

points_statusstringquery

This filter will return the point status.

The value can be passed as:

eq: Accepted values are ‘approved, rejected, pending, redeemed, deducted, expired’. Pass the value of the status to get a list of all transactions with points_status equal to the value passed.

For example- {"eq":"approved"}

in: Pass a single string which may contain one status or multiple statuses separated by comma to get a list of all transactions whose points_status is one of the values passed.

For example- {"in":"approved, rejected"}

statusstringquery

This filter will return transaction status.

eq: Accepted values are Approved/ Rejected/ Pending.

For example- {"eq":"approved"}

in: Pass a single string which may contain one status or multiple statuses separated by comma to get a list of all transactions whose points_status is one of the values passed.

For example- {"in":"approved, rejected"}

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OK

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

List all Transactions with Member ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/members/{member_id}/transactions'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{member_id}/transactions', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/members/{member_id}/transactions')
data = response.json()
{
  "data": {
    "total": 2,
    "next_cursor": 100,
    "transactions": [
      {
        "status": "approved",
        "points_expiration_date": "14-Nov-2023 00:00:00",
        "auto_approval_date": "15-Nov-2022 16:10:00",
        "last_modified_date": "15-Nov-2022 19:51:47",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7f19",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7f34",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "award_info": {
          "activity_id": "made_a_purchase",
          "points": 1200,
          "points_status": "auto_approved",
          "activity_name": "Purchase on website"
        },
        "id": "63720ae0a042a3000badf6a4",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "15-Nov-2022 19:51:47",
        "member_id": "pallavi055",
        "created_date": "14-Nov-2022 09:27:07",
        "transaction_type": "award",
        "transaction_attributes": {
          "order_total": 1100,
          "products": [
            {
              "product_id": "113",
              "is_excluded": false,
              "product_category": "tshirt",
              "product_url": "https://cdn.shopify.com",
              "product_price": "15",
              "product_points_per_quantity": 15,
              "bonus_multiplier": 0,
              "product_quantity": "1",
              "product_image_url": "https://cdn.shopify.com",
              "product_title": "Sweatshirt"
            },
            {
              "product_id": "980",
              "is_excluded": false,
              "product_category": "Sales",
              "product_url": "https://cdn.shopify.com",
              "product_price": "10.017",
              "product_points_per_quantity": 10,
              "bonus_multiplier": 0,
              "product_quantity": "2",
              "product_image_url": "https://cdn.shopify.com",
              "product_title": "Pant"
            }
          ],
          "coupon_code": "BEOYUTO09",
          "order_id": "7509357612",
          "booked_location": "India",
          "age": 34,
          "tags": [
            "purchasemade",
            "purchased"
          ],
          "currency": "$",
          "reason": "purchasing",
          "favourite_cuisine": "Chinese",
          "gender": "Male",
          "favourite_destination": "Paris",
          "order_subtotal": 1200,
          "coupons": "$10Off"
        },
        "additional_data": {
          "activity_multiplier": 1,
          "history": [
            {
              "activity_multiplier": 1,
              "zrl_products": [
                {
                  "category": "tshirt",
                  "product_id": "112",
                  "is_excluded": false,
                  "title": "Sweatshirt",
                  "url": null,
                  "price": "15",
                  "product_points_per_quantity": 15,
                  "bonus_multiplier": 0,
                  "img_url": "",
                  "quantity": "1"
                },
                {
                  "category": "Sales",
                  "product_id": "980",
                  "is_excluded": false,
                  "title": "Pant",
                  "url": null,
                  "price": "10.017",
                  "product_points_per_quantity": 10,
                  "bonus_multiplier": 0,
                  "img_url": "",
                  "quantity": "2"
                }
              ],
              "current_loyalty_level_id": "zrl_silver",
              "custom_attributes": {},
              "points": 1000,
              "created_time": "2022-11-14 09:27:07.807000"
            }
          ]
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "14-Nov-2023 00:00:00",
        "auto_approval_date": "",
        "last_modified_date": "20-Nov-2022 14:58:27",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7f19",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7f34",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "award_info": {
          "activity_id": "created_an_account",
          "points": 10000,
          "points_status": "approved",
          "activity_name": "Account Creation"
        },
        "id": "6336b6bbdfa6b71f57a48f48",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "30-Sep-2022 09:28:27",
        "member_id": "pallavi055",
        "created_date": "30-Sep-2022 09:28:27",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": null,
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      }
    ],
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

List all Transactions with TrueLoyal-generated Member ID

GET
https://api.zinrelo.com/v2/loyalty/members/{id}/transactions

Parameters

idstring62d6439adfa6b74ab18eb1a6requiredpath

Add Trueloyal generated member ID.

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

approved_datestring{"eq":"01/21/2022"}query

This can be used to filter the list of transactions based on their approved_date in Trueloyal. Child parameters are:

p>To filter dates 'equal to' a particular date, use operator "eq". Example: approved_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: approved_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: approved_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: approved_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: approved_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: approved_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

created_datestring{"gt":"01/21/2022"}query

This can be used to filter the list of transactions based on their created_date in Trueloyal. Child parameters are

p>To filter dates 'equal to' a particular date, use operator "eq". Example: created_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: created_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: created_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: created_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: created_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: created_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

last_modified_datestring{"gte":"01/21/2022"}query

This can be used to filter the list of transactions based on their last_modified date in Trueloyal. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: last_modified_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: last_modified_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: last_modified_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: last_modified_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: last_modified_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: last_modified_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

points_expiration_datestring{"lte":"01/21/2022"}query

This can be used to filter the list of transactions based on their points_expiration_date in Trueloyal. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: points_expiration_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: points_expiration_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: points_expiration_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: points_expiration_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: points_expiration_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: points_expiration_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

points_statusstringquery

This filter will return the point status.

The value can be passed as:

eq: Accepted values are ‘approved, rejected, pending, redeemed, deducted, expired’. Pass the value of the status to get a list of all transactions with points_status equal to the value passed.

For example- {"eq":"approved"}

in: Pass a single string which may contain one status or multiple statuses separated by comma to get a list of all transactions whose points_status is one of the values passed.

For example- {"in":"approved, rejected"}

statusstringquery

This filter will return transaction status.

eq: Accepted values are Approved/ Rejected/ Pending.

For example- {"eq":"approved"}

in: Pass a single string which may contain one status or multiple statuses separated by comma to get a list of all transactions whose points_status is one of the values passed.

For example- {"in":"approved, rejected"}

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OK

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

List all Transactions with TrueLoyal-generated Member ID
curl -X GET 'https://api.zinrelo.com/v2/loyalty/members/{id}/transactions'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/members/{id}/transactions', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/members/{id}/transactions')
data = response.json()
{
  "data": {
    "total": 2,
    "next_cursor": 100,
    "transactions": [
      {
        "status": "approved",
        "points_expiration_date": "14-Nov-2023 00:00:00",
        "auto_approval_date": "15-Nov-2022 16:10:00",
        "last_modified_date": "15-Nov-2022 19:51:47",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7f19",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7f34",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "award_info": {
          "activity_id": "made_a_purchase",
          "points": 1200,
          "points_status": "auto_approved",
          "activity_name": "Purchase on website"
        },
        "id": "63720ae0a042a3000badf6a4",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "15-Nov-2022 19:51:47",
        "member_id": "pallavi055",
        "created_date": "14-Nov-2022 09:27:07",
        "transaction_type": "award",
        "transaction_attributes": {
          "order_total": 1100,
          "products": [
            {
              "product_id": "113",
              "is_excluded": false,
              "product_category": "tshirt",
              "product_url": "https://cdn.shopify.com",
              "product_price": "15",
              "product_points_per_quantity": 15,
              "bonus_multiplier": 0,
              "product_quantity": "1",
              "product_image_url": "https://cdn.shopify.com",
              "product_title": "Sweatshirt"
            },
            {
              "product_id": "980",
              "is_excluded": false,
              "product_category": "Sales",
              "product_url": "https://cdn.shopify.com",
              "product_price": "10.017",
              "product_points_per_quantity": 10,
              "bonus_multiplier": 0,
              "product_quantity": "2",
              "product_image_url": "https://cdn.shopify.com",
              "product_title": "Pant"
            }
          ],
          "coupon_code": "BEOYUTO09",
          "order_id": "7509357612",
          "booked_location": "India",
          "age": 34,
          "tags": [
            "purchasemade",
            "purchased"
          ],
          "currency": "$",
          "reason": "purchasing",
          "favourite_cuisine": "Chinese",
          "gender": "Male",
          "favourite_destination": "Paris",
          "order_subtotal": 1200,
          "coupons": "$10Off"
        },
        "additional_data": {
          "activity_multiplier": 1,
          "history": [
            {
              "activity_multiplier": 1,
              "zrl_products": [
                {
                  "category": "tshirt",
                  "product_id": "112",
                  "is_excluded": false,
                  "title": "Sweatshirt",
                  "url": null,
                  "price": "15",
                  "product_points_per_quantity": 15,
                  "bonus_multiplier": 0,
                  "img_url": "",
                  "quantity": "1"
                },
                {
                  "category": "Sales",
                  "product_id": "980",
                  "is_excluded": false,
                  "title": "Pant",
                  "url": null,
                  "price": "10.017",
                  "product_points_per_quantity": 10,
                  "bonus_multiplier": 0,
                  "img_url": "",
                  "quantity": "2"
                }
              ],
              "current_loyalty_level_id": "zrl_silver",
              "custom_attributes": {},
              "points": 1000,
              "created_time": "2022-11-14 09:27:07.807000"
            }
          ]
        }
      },
      {
        "status": "approved",
        "points_expiration_date": "14-Nov-2023 00:00:00",
        "auto_approval_date": "",
        "last_modified_date": "20-Nov-2022 14:58:27",
        "redemptions_list": [
          {
            "redemption_id": "reward_b7f19",
            "redeemed_points": 500,
            "id": "65c1cbbd40aba100353b5c68"
          },
          {
            "redemption_id": "reward_b7f34",
            "redeemed_points": 500,
            "id": "65c1cbbe40aba100353b5c6b"
          }
        ],
        "award_info": {
          "activity_id": "created_an_account",
          "points": 10000,
          "points_status": "approved",
          "activity_name": "Account Creation"
        },
        "id": "6336b6bbdfa6b71f57a48f48",
        "approver_details": {
          "approver_name": "System",
          "approver_id": null
        },
        "approved_date": "30-Sep-2022 09:28:27",
        "member_id": "pallavi055",
        "created_date": "30-Sep-2022 09:28:27",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": null,
          "tags": []
        },
        "additional_data": {
          "activity_multiplier": 1
        }
      }
    ],
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}
Admin API

Tiers

admin_tiers

List all Tiers API

GET
https://api.zinrelo.com/v2/loyalty/tiers

Parameters

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKobject

200

400Bad Requestobject

400

Authorization

api_keyapiKey in header

An API key of your program. Admin API only.

partner_idapiKey in header

Your program's partner ID.

List all Tiers API
curl -X GET 'https://api.zinrelo.com/v2/loyalty/tiers'
const response = await fetch('https://api.zinrelo.com/v2/loyalty/tiers', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty/tiers')
data = response.json()
{
  "data": {
    "tiers": [
      {
        "created_time": "07-May-2021 05:44:16",
        "description": "This is default Tier",
        "hide_tier_from_user": false,
        "id": "6094d3b084d28f07bbda724e",
        "is_active": true,
        "is_default": true,
        "minimum_points": 0,
        "name": "Tier 1",
        "tier_id": "zrl_silver",
        "updated_time": "09-Aug-2023 14:11:51"
      },
      {
        "created_time": "09-Aug-2023 13:17:30",
        "description": "a",
        "hide_tier_from_user": false,
        "id": "64d391eab4dc9f000a122c0d",
        "is_active": false,
        "is_default": false,
        "minimum_points": 5000,
        "name": "a",
        "tier_id": "tier_2af1e",
        "updated_time": "09-Aug-2023 14:24:23"
      },
      {
        "created_time": "07-May-2021 05:44:16",
        "description": "1000 points",
        "hide_tier_from_user": false,
        "id": "6094d3b084d28f07bbda724d",
        "is_active": true,
        "is_default": false,
        "minimum_points": 14000,
        "name": "Gold",
        "tier_id": "zrl_gold",
        "updated_time": "22-Aug-2023 05:36:00"
      },
      {
        "created_time": "07-May-2021 05:44:16",
        "description": "5000 Points",
        "hide_tier_from_user": false,
        "id": "6094d3b084d28f07bbda724c",
        "is_active": true,
        "is_default": false,
        "minimum_points": 15000,
        "name": "Tier 3",
        "tier_id": "zrl_platinum",
        "updated_time": "21-Aug-2023 14:14:28"
      }
    ]
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}

UI API

ui

Designed for the front end. Authenticated with a JSON Web Token (JWT) and your partner ID. Responses include limited data, unlike the Admin API.

List Member's Eligible Activities API

GET
https://api.zinrelo.com/v2/loyalty-storefront/eligible-activities

Parameters

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

sort_bystringquery

The response will contain the activities ordered by the rank configured in the TrueLoyal admin console. You can sort the sequence using the following options: "rank", "-rank", "created_date", "-created_date", "last_modified_date" or "-last_modified_date". Additionally, you can combine sorting options, such as "-rank,created_date", "-rank,-created_date", "-rank,-last_modified_date", "-rank,last_modified_date", "rank,created_date", or "rank,-created_date", "rank,-last_modified_date", or "rank,last_modified_date".

"-" signifies the latest activity first.

Note: If no sorting option is specified, the response will default to the saved rank, which is "rank,-last_modified_date".

In scenarios where the rank of activities is same, sorting will be based on a second parameter. For example, in "rank,last_modified_date," if the ranks are identical, the sorting will then be determined by the last modified date parameter.

Response

200OKui-eligible-activities-activity-object

200

400Bad Requestui-eligible-activities-failure-object

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

List Member's Eligible Activities API
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/eligible-activities'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/eligible-activities', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/eligible-activities')
data = response.json()
{
  "data": {
    "total": 16,
    "activities": [
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "order_subtotal",
          "multiplier": 1
        },
        "activity_id": "made_a_purchase",
        "is_points_expiry_reset_activity": true,
        "enduser_activity_description_html": "Earn 100 points for every advisor you talk to.",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-12-08 16:55:20.470000",
        "metadata": {
          "Category": "Chocolate Cake"
        },
        "enduser_activity_short_description": "Earn points for every dollar you spend in purchases.",
        "created_date": "2021-03-15 12:59:39.818000",
        "activity_name": "Loan Installment Payment",
        "extra_config": {},
        "rank": 1,
        "id": "604f5a3b8152252216f5c19b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -10,
        "activity_id": "tag_on_tiktok",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:51.984000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you tag us on TikTok using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.260000",
        "activity_name": "Tag on TikTok",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Tiktok handle is required for this activity.",
          "activity_start_button_text": "Tag",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your TikTok account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you tag {{TIKTOK_HASHTAGS}} on TikTok using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your TikTok handle",
          "personal_handle_input_text": "Your Tiktok handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Tag on TikTok",
          "enter_handle_placeholder_text": "Enter your Tiktok handle",
          "edit_handle_text": "Edit your Tiktok handle",
          "business_handle_display_text": "Hashtag(s) to be tagged"
        },
        "id": "6756a59120df0f847b212e52",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "rank": -9,
        "activity_id": "enter_tiktok_handle",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:49.157000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you enter your TikTok handle",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/a795d2552d146126bf853454176d1f30.png",
        "created_date": "2024-12-09 08:08:49.232000",
        "activity_name": "Enter TikTok Handle",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "activity_start_button_text": "Submit",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "thank_you_text": "Thank you for entering your Tiktok handle. You will earn {{POINTS}} points (Limit- Once per lifetime)",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Enter TikTok Handle",
          "enter_handle_placeholder_text": "Enter your Tiktok handle"
        },
        "id": "6756a59120df0f847b212e4b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -8,
        "activity_id": "dm_on_instagram",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:46.412000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you DM us on Insta",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/caebf8b59b8ce9f854fef2e908ea7cae.png",
        "created_date": "2024-12-09 08:08:49.204000",
        "activity_name": "DM on Instagram",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "DM",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you DM {{BUSINESS_IG}} on Instagram.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "DM on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e44",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -7,
        "activity_id": "follow_on_instagram_v2",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:43.357000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points by following us and then mentioning or direct messaging us.",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/59f2fb79bcf9f49574a1052177e432de.png",
        "created_date": "2024-12-09 08:08:49.176000",
        "activity_name": "Follow on Instagram",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Follow",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you start following {{BUSINESS_IG}} on Instagram and then either mention or DM {{BUSINESS_IG}}",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Follow on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e3d",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -6,
        "activity_id": "mention_on_instagram_story",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:39.524000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you mention us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.142000",
        "activity_name": "Insta Story Mention",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Mention",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you mention {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Mention on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e36",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -5,
        "activity_id": "tag_on_instagram_reel",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:35.546000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you tag us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.112000",
        "activity_name": "Tag on Insta Reel",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Tag",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you tag {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Tag on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e2f",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -4,
        "activity_id": "mention_on_instagram_reel",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:31.476000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you mention us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.084000",
        "activity_name": "Insta Reel Mention",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Mention",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you mention {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Mention on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e28",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -3,
        "activity_id": "mention_on_instagram_post",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:26.655000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you mention us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.041000",
        "activity_name": "Insta Post Mention",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Mention",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you mention {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Mention on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e21",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -2,
        "activity_id": "tag_on_instagram_post",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:16.762000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you tag us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:48.975000",
        "activity_name": "Tag on Insta Post",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Tag",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you tag {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Tag on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59020df0f847b212e1a",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "rank": -1,
        "activity_id": "enter_instagram_handle",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:12.074000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you enter your Insta handle",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/59f2fb79bcf9f49574a1052177e432de.png",
        "created_date": "2024-12-09 08:08:48.940000",
        "activity_name": "Enter Insta Handle",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "activity_start_button_text": "Submit",
          "failure_text": "There was an error while following on instagram. Please try again. If this problem persists, please contact your site administrator.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "thank_you_text": "Thank you for entering your Instagram handle. You will earn {{POINTS}} points (Limit- Once per lifetime).",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Enter Instagram Handle",
          "enter_handle_placeholder_text": "Enter your Instagram handle"
        },
        "id": "6756a59020df0f847b212e13",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "created_an_account",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-06-14 09:03:33.343000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points when you create your loyalty account.",
        "created_date": "2021-03-15 12:59:39.812000",
        "activity_name": "Account Creation",
        "extra_config": {},
        "rank": 1,
        "id": "604f5a3b8152252216f5c19a",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "multiplier": 1
        },
        "activity_id": "write_a_review",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:13:10.021000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points for writing a review.",
        "created_date": "2021-03-15 12:59:39.824000",
        "activity_name": "Write a Review",
        "extra_config": {},
        "rank": 1,
        "id": "604f5a3b8152252216f5c19c",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 200,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "anniversary_bonus",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:07:02.905000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points on your anniversary.",
        "created_date": "2021-03-15 12:59:39.836000",
        "activity_name": "Anniversary Bonus",
        "extra_config": {},
        "rank": 1,
        "id": "604f5a3b8152252216f5c19e",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "f00ca_custom_activity",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-17 11:21:50.190000",
        "metadata": {},
        "enduser_activity_short_description": "",
        "created_date": "2021-05-05 05:29:46.129000",
        "activity_name": "",
        "extra_config": {},
        "rank": 1,
        "id": "60922d4abed0d56677192dcf",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "referral",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-12 11:10:12.088000",
        "metadata": {},
        "enduser_activity_short_description": "Award points on referral purchase.",
        "created_date": "2021-03-22 08:46:18.898000",
        "activity_name": "Refer a Friend",
        "extra_config": {},
        "rank": 1,
        "id": "6058595abb711d6fa73fcd36",
        "activity_benefit_type": "points_and_coupon_code"
      },
      {
        "points_config": {
          "points": 500,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "684fc_custom_activity",
        "is_points_expiry_reset_activity": true,
        "enduser_activity_description_html": "<div data-paperform-id=\"swldehbf\"></div><script>(function() {var script = document.createElement('script'); script.src = \"https://paperform.co/__embed.min.js\"; document.body.appendChild(script); })()</script>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-04-10 11:47:27.127000",
        "metadata": {},
        "enduser_activity_short_description": "Enter the code on your LD pack and earn points",
        "created_date": "2021-05-05 11:41:57.738000",
        "activity_name": "684fc_custom_activity",
        "extra_config": {},
        "rank": 1,
        "id": "609284851c9396204c8b984b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "a7ee1_custom_activity",
        "is_points_expiry_reset_activity": true,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-03-08 11:01:06.969000",
        "metadata": {},
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "created_date": "2023-01-23 13:52:30.665000",
        "activity_name": "Custom Activity",
        "extra_config": {},
        "rank": 1,
        "id": "63ce911ef380d8000b8d7753",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 130,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "birthday_bonus",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-02-24 07:27:55.290000",
        "metadata": {},
        "enduser_activity_short_description": "Award points on birthday.",
        "created_date": "2021-03-15 12:59:39.830000",
        "activity_name": "Birthday Bonus",
        "extra_config": {},
        "rank": 1,
        "id": "604f5a3b8152252216f5c19d",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "upload_photo",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-10-06 10:26:28.835000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points for uploading a photo.",
        "created_date": "2022-07-28 06:53:03.616000",
        "activity_name": "Upload a Photo",
        "extra_config": {},
        "rank": 1,
        "id": "62e2324f23d74243d1c5af29",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "receipt_order_value",
          "multiplier": 1
        },
        "activity_id": "submit_a_receipt",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-10-06 09:54:55.183000",
        "metadata": {},
        "enduser_activity_short_description": "Reward users for submitting receipts of their purchases.",
        "created_date": "2021-03-22 08:56:14.632000",
        "activity_name": "Submit A Receipt",
        "extra_config": {},
        "rank": 1,
        "id": "60585baef5a67a16e1871b56",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "share_on_pinterest",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-07-14 08:17:19.592000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points when you share us on Pinterest.",
        "created_date": "2021-03-15 12:59:39.873000",
        "activity_name": "Share on Pinterest",
        "extra_config": {
          "pin_post_image": "",
          "pin_post_description": "Awesome products at great prices. You should really check them out.",
          "share_current_page_url": false
        },
        "rank": 1,
        "id": "604f5a3b8152252216f5c1a3",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "share_on_facebook",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-07-14 08:17:00.673000",
        "metadata": {},
        "enduser_activity_short_description": "Reward points to users when they share you on Facebook.",
        "created_date": "2021-03-15 12:59:39.848000",
        "activity_name": "Share on Facebook",
        "extra_config": {
          "share_current_page_url": false
        },
        "rank": 1,
        "id": "604f5a3b8152252216f5c1a0",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "f46f4_custom_activity",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "<iframe id=\"quiz-form\" width=\"100%\" height=\"300px\"  style=\"margin-top:-50px;border:none !important;\"></iframe>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-06-14 11:09:16.199000",
        "metadata": {},
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "created_date": "2022-03-03 05:30:58.331000",
        "activity_name": "Quiz form",
        "extra_config": {},
        "rank": 1,
        "id": "622052924e6d9f1dfd89ed88",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "multiplier": 1
        },
        "activity_id": "code_submission",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-05-19 10:32:40.318000",
        "metadata": {},
        "enduser_activity_short_description": "Get rewarded for your purchases by submitting the code you received with your purchase.",
        "created_date": "2022-05-18 10:05:41.642000",
        "activity_name": "Enter a Code",
        "extra_config": {},
        "rank": 1,
        "id": "6284c4f5dfa6b7425568ba6d",
        "activity_benefit_type": "points"
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "reason": "Member does not exist",
  "error_code": "INVALID_MEMBER",
  "success": false
}
{
  "reason": {
    "language": "Value must be one of: english; french; italian; german; spanish (not u'Hindi')"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "count": "Please enter a number that is 1 or greater"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}

List Member's Eligible Rewards API

GET
https://api.zinrelo.com/v2/loyalty-storefront/eligible-rewards

Parameters

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

ignore_allowed_redeem_pointsbooleanquery

Pass "true" in this parameter if you want ineligible rewards to be visible as well. By default it is "false."

sort_bystringquery

The response will contain the rewards ordered by the rank configured in the TrueLoyal admin console. You can sort the sequence using the following options: "rank", "-rank", "points_to_be_redeemed", or "-points_to_be_redeemed". Additionally, you can combine sorting options, such as "-rank,points_to_be_redeemed", "-rank,-points_to_be_redeemed", "rank,points_to_be_redeemed", or "rank,-points_to_be_redeemed".

"-" signifies the latest reward first.

Note: If no sorting option is specified, the response will default to the saved rank, which is "rank,points_to_be_redeemed".

In scenarios where the rank of rewards is same, sorting will be based on a second parameter. For example, in "rank,points_to_be_redeemed," if the ranks are identical, the sorting will then be determined by the points to be redeemed parameter.

Response

200OKui-eligible-rewards-response-object

200

400Bad Requestui-eligible-rewards-failure-object

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

List Member's Eligible Rewards API
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/eligible-rewards'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/eligible-rewards', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/eligible-rewards')
data = response.json()
{
  "data": {
    "total": 1,
    "rewards": [
      {
        "enable_auto_redemption": false,
        "reward_name": "$10 Gift Certificate Netsuite",
        "enduser_reward_confirmation_html": "<b>{{POINTS}} Points</b> WILL be deducted from your account balance. Do you wish to redeem this reward?",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "reward_value": "5",
        "last_modified_date": "04/30/2024 09:09:10",
        "rank": 1,
        "extra_parameters": {
          "redemption_confirm_button_text": "Confirm",
          "points_deduction_text": "{{POINTS}} points have been deducted.",
          "redeem_button_text": "Redeem",
          "ineligible_rewards_progress_text": "You need <b>{{POINTS_TO_UNLOCK_REWARD}} more points</b> to unlock this reward."
        },
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/15/2021 12:59:39",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 100,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "604f5a3b8152252216f5c1ad",
        "reward_id": "reward_bc668",
        "metadata": {
          "Category": "Limited time",
          "Brand": "Nescafe"
        }
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "reason": "Member does not exist",
  "error_code": "INVALID_MEMBER",
  "success": false
}
{
  "reason": {
    "language": "Value must be one of: english; french; italian; german; spanish (not u'Hindi')"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "count": "Please enter a number that is 1 or greater"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}

Redeem API

POST
https://api.zinrelo.com/v2/loyalty-storefront/redeem

Body

application/json

Unique ID that identifies a reward in TrueLoyal. This is the ID of the reward against which the redemption transaction has to be recorded.

reward_idstringrequired

Unique ID that identifies a reward in TrueLoyal. This is the ID of the reward against which the redemption transaction has to be recorded.

points_to_be_redeemedinteger

REQUIRED: only for flexible redemption. This is the number of points to be redeemed.

statusany

Pass the redemption status—approved or pending. If no entry is passed, the transaction will be redeemed, and its status will be approved. Note: This feature is applicable only for Shopify supported stores.

Parameters

languagestringquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKui-redeem-data-object

200

400Bad Requestui-redeem-failure-object

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

Redeem API
curl -X POST 'https://api.zinrelo.com/v2/loyalty-storefront/redeem' \
  -H 'Content-Type: application/json' \
  -d '{
    "reward_id": "string",
    "points_to_be_redeemed": 0
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/redeem', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "reward_id": "string",
      "points_to_be_redeemed": 0
    }),
});

const data = await response.json();
import requests

payload = {
  "reward_id": "string",
  "points_to_be_redeemed": 0
}

response = requests.post('https://api.zinrelo.com/v2/loyalty-storefront/redeem', json=payload)
data = response.json()
Request Body
{
  "reward_id": "string",
  "points_to_be_redeemed": 0
}
{
  "data": {
    "status": "approved",
    "transaction_attributes": {
      "reason": null
    },
    "last_modified_date": "11-Mar-2025 11:27:03",
    "additional_data": {},
    "approved_date": "11-Mar-2025 11:27:03",
    "reward_info": {
      "reward_name": "$10 Gift Certificate Netsuite",
      "points_status": "redeemed",
      "coupon_code": "41EAE010",
      "reward_link": null,
      "reward_id": "reward_bc668",
      "points": 100
    },
    "member_id": "pallavi+095@zinrelo.com",
    "transaction_type": "redeem",
    "id": "67d01e07adb896d71d81ccdb",
    "created_date": "11-Mar-2025 11:27:03"
  },
  "success": true
}
{
  "reason": "Reward coupons are exhausted.",
  "error_code": "COUPON_EXHAUSTED",
  "success": false
}
{
  "reason": "Member does not exist",
  "error_code": "INVALID_MEMBER",
  "success": false
}
{
  "reason": "This reward is not valid for the user",
  "error_code": "INVALID_REWARD_FOR_USER",
  "success": false
}
{
  "reason": "This reward is inactive and cannot be redeemed",
  "error_code": "INACTIVE_REWARD",
  "success": false
}
{
  "reason": "Invalid JSON format.",
  "error_code": "INVALID_JSON",
  "success": false
}
{
  "reason": {
    "language": "Value must be one of: english; french; italian; german; spanish (not u'Englih')"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}

Retrieve a Loyalty Member Details API

GET
https://api.zinrelo.com/v2/loyalty-storefront/member

Response

200OKui-retrieve-member-member-object

200

400Bad Requestui-retrieve-member-failure-object

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

Retrieve a Loyalty Member Details API
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/member'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/member', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/member')
data = response.json()
{
  "data": {
    "last_name": "Doe",
    "twitter_handle": "www.twitter.com/john",
    "lifetime_points_expired": 893,
    "last_modified_date": "07/14/2023 11:11:04",
    "available_points": 0,
    "lifetime_points_earned": 893,
    "referral_URL": "https://www.zinrelo.com/ref/JOH30AOQ",
    "member_status": "active",
    "referral_code": "JOHL30AOQ",
    "number_of_referral_purchase": 0,
    "number_of_referral_share": 0,
    "email_address": "johndoe@gmail.com",
    "id": "64898298c7f196000b000091",
    "first_name": "John",
    "member_tags": [
      "memberretrieve",
      "retrievedmember"
    ],
    "tier_info": {
      "current_period_start": "04/01/2023",
      "loyalty_tier_name": "Silver",
      "loyalty_tier_id": "zrl_silver",
      "current_period_end": "04/01/2024",
      "qualified_points": 793
    },
    "first_purchase_date": "06/14/2023",
    "lifetime_points_deducted": 0,
    "phone_number": "+1-65070177596",
    "points_expiration_schedule": [
      {
        "expiration_date": "5-Mar-2024  8:45:26",
        "points": 101
      }
    ],
    "instagram_handle": "www.instagram.com/john",
    "address": {
      "city": "Superior",
      "country": "US",
      "line2": "",
      "line1": "1000 S. McCaslin Blvd., Suite 301",
      "state": "CO",
      "postal_code": ""
    },
    "last_purchase_date": "06/29/2023",
    "lifetime_points_redeemed": 0,
    "preferred_language": "english",
    "number_of_purchases": 2,
    "number_of_redemptions": 0,
    "birthdate": "01/31/1900",
    "anniversary_date": "07/07/2021",
    "enrollment_date": "06/14/2023 09:04:24",
    "member_id": "greatMRT040401",
    "email_subscription_status": "subscribed"
  },
  "success": true
}
{
  "reason": "Member does not exist",
  "error_code": "INVALID_MEMBER",
  "success": false
}
{
  "reason": "An invalid value was supplied for {Parameter}.",
  "error_code": "ERROR_INVALID_PARAMETER",
  "success": false
}

Update Loyalty Member API

POST
https://api.zinrelo.com/v2/loyalty-storefront/member

Body

application/json
birthdatestring

Birthdate of the loyalty member. Format : <MM/DD/YYYY> Note: Our API records all date and time fields in UTC time.

anniversary_datestring

Wedding anniversary date of the loyalty member. Format : <MM/DD/YYYY>

Note: Our API records all date and time fields in UTC time.

twitter_handlestring

Twitter username of the loyalty member.

instagram_handlestring

Instagram username of the loyalty member.

email_subscription_statusstring

Values can be ‘subscribed’ or ‘unsubscribed’ . If ‘unsubscribed’, this member will not receive any email notifications triggered by TrueLoyal.

member_statusany

Accepted values in the request are ‘active’ and ‘opted_out’. Default is ‘active’. ‘active’ member is the one accumulating loyalty points and has access to rewards and earning opportunities. ‘opted_out’ member is the one who has chosen to opt out of the loyalty program.

opted_out member can become active by passing member_status as 'active'.

Response

200OKui-update-loyalty-member-response-body

200

400Bad Requestui-update-loyalty-member-failure-object

Bad Request

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

Update Loyalty Member API
curl -X POST 'https://api.zinrelo.com/v2/loyalty-storefront/member' \
  -H 'Content-Type: application/json' \
  -d '{
    "birthdate": "08/26/1979",
    "anniversary_date": "12/06/2020",
    "twitter_handle": "string",
    "instagram_handle": "string",
    "email_subscription_status": "string"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/member', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "birthdate": "08/26/1979",
      "anniversary_date": "12/06/2020",
      "twitter_handle": "string",
      "instagram_handle": "string",
      "email_subscription_status": "string"
    }),
});

const data = await response.json();
import requests

payload = {
  "birthdate": "08/26/1979",
  "anniversary_date": "12/06/2020",
  "twitter_handle": "string",
  "instagram_handle": "string",
  "email_subscription_status": "string"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty-storefront/member', json=payload)
data = response.json()
Request Body
{
  "birthdate": "08/26/1979",
  "anniversary_date": "12/06/2020",
  "twitter_handle": "string",
  "instagram_handle": "string",
  "email_subscription_status": "string"
}
{
  "last_name": "Doe",
  "twitter_handle": "www.twitter.com/john",
  "lifetime_points_expired": 893,
  "last_modified_date": "09/01/2023 05:10:16",
  "available_points": 0,
  "lifetime_points_earned": 893,
  "referral_URL": "https://www.zinrelo.com/ref/JOH30AOQ",
  "member_status": "active",
  "referral_code": "JOH30AOQ",
  "number_of_referral_purchase": 0,
  "number_of_referral_share": 0,
  "email_address": "johndoe@gmail.com",
  "id": "64898298c7f196000b000091",
  "first_name": "John",
  "member_tags": [
    "memberadded",
    "membercreated"
  ],
  "tier_info": {
    "current_period_start": "03/01/2022",
    "loyalty_tier_name": "Silver",
    "loyalty_tier_id": "zrl_silver",
    "current_period_end": "02/28/2023",
    "qualified_points": 1000
  },
  "first_purchase_date": "06/14/2023",
  "lifetime_points_deducted": 0,
  "phone_number": "+1-6507017759",
  "points_expiration_schedule": [
    {
      "expiration_date": "7-Feb-2024  6:0:4",
      "points": 10000
    }
  ],
  "instagram_handle": "www.instagram.com/john",
  "address": {
    "city": "Palo Alto",
    "country": "US",
    "line2": "530 Lytton Ave",
    "line1": "Suite #200",
    "state": "CA",
    "postal_code": "94301"
  },
  "last_purchase_date": "06/29/2023",
  "lifetime_points_redeemed": 0,
  "preferred_language": "english",
  "number_of_purchases": 2,
  "number_of_redemptions": 0,
  "birthdate": "08/26/1900",
  "anniversary_date": "12/06/2020",
  "enrollment_date": "06/14/2023 09:04:24",
  "member_id": "john+11",
  "email_subscription_status": "subscribed"
}
{
  "reason": "Member does not exist",
  "error_code": "INVALID_MEMBER",
  "success": false
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}
{
  "reason": {
    "anniversary_date": "Invalid date format. Expected MM/DD/YYYY."
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": "Invalid JSON format.",
  "error_code": "INVALID_JSON",
  "success": false
}
{
  "reason": {
    "email_subscription_status": "Enter a value from: 'unsubscribed'; 'subscribed'"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "member_status": "Value must be one of: opted_out; active (not u'deleted')"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}

Get Activity Track Codes API

GET
https://api.zinrelo.com/v2/loyalty-storefront/activity-track-code

Parameters

activity_idstringquery

Response

200OKactivity-track-codes-data-object

200

400Bad Requestui-activity-track-codes-failure-object

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

Get Activity Track Codes API
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/activity-track-code'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/activity-track-code', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/activity-track-code')
data = response.json()
{
  "data": {
    "track_code": "qpqlp5igp9zPoqfJzdCrnKOql86irZmkp5mjprHK0tPh0tDdztDh1NfrrJmgpZKcqKebn5KVoKmvn6imnZqhrp6kopo="
  },
  "success": true
}
{
  "reason": {
    "count": "Please enter a number that is 1 or greater"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "error_code": "VALIDATION_ERROR",
  "reason": {
    "activity_id": "Value must be one of: share_on_facebook; share_on_twitter; share_on_pinterest (not 'share_facebook')"
  },
  "success": false
}

List Member's Transaction API

GET
https://api.zinrelo.com/v2/loyalty-storefront/transactions

Parameters

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

approved_datestring{"eq":"01/21/2022"}query

This can be used to filter the list of transactions based on their approved_date in TrueLoyal. Child parameters are:

p>To filter dates 'equal to' a particular date, use operator "eq". Example: approved_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: approved_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: approved_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: approved_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: approved_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: approved_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

created_datestring{"gt":"01/21/2022"}query

This can be used to filter the list of transactions based on their created_date in TrueLoyal. Child parameters are

p>To filter dates 'equal to' a particular date, use operator "eq". Example: created_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: created_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: created_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: created_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: created_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: created_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

last_modified_datestring{"gte":"01/21/2022"}query

This can be used to filter the list of transactions based on their last_modified date in TrueLoyal. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: last_modified_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: last_modified_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: last_modified_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: last_modified_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: last_modified_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: last_modified_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

points_expiration_datestring{"lte":"01/21/2022"}query

This can be used to filter the list of transactions based on their points_expiration_date in TrueLoyal. Child parameters are:

To filter dates 'equal to' a particular date, use operator "eq". Example: points_expiration_date={"eq":"01/21/2022"}

To filter dates 'greater than' a particular date, use operator "gt". Example: points_expiration_date={"gt":"01/21/2022"}

To filter dates 'greater than or equal to' a particular date, use operator "gte". Example: points_expiration_date={"gte":"01/21/2022"}

To filter dates 'lesser than' a particular date, use operator "lt". Example: points_expiration_date={"lt":"01/21/2022"}

To filter dates 'lesser than or equal to' a particular date, use operator "lte". Example: points_expiration_date={"lte":"01/21/2022"}

To filter dates 'between' a particular date, use operator "between". Example: points_expiration_date={"between":"12/01/2021-12/31/2022"}

Note: Our API records all date and time fields in UTC time.

points_statusstringquery

This filter will return the point status.

The value can be passed as:

eq: Accepted values are ‘approved, rejected, pending, redeemed, deducted, expired, redemption_pending, redemption_cancelled, pending_deduction, auto_rejected and auto_approved.' Pass the value of the status to get a list of all transactions with points_status equal to the value passed.

For example- {"eq":"approved"}

in: Pass a single string which may contain one status or multiple statuses separated by comma to get a list of all transactions whose points_status is one of the values passed.

For example- {"in":"approved, rejected"}

statusstringquery

This filter will return transaction status.

eq: Accepted values are Approved/ Rejected/ Pending.

For example- {"eq":"approved"}

in: Pass a single string which may contain one status or multiple statuses separated by comma to get a list of all transactions whose points_status is one of the values passed.

For example- {"in":"approved, rejected"}

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKlist-member-transactions-response-object

200

400Bad Requestui-list-member-transactions-failure-object

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

List Member's Transaction API
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/transactions'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/transactions', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/transactions')
data = response.json()
{
  "data": {
    "total": 10,
    "next_cursor": 100,
    "transactions": [
      {
        "status": "approved",
        "auto_approval_date": "",
        "last_modified_date": "12-Sep-2023 10:11:20",
        "award_info": {
          "activity_id": "winback_bonus",
          "points": 100,
          "points_status": "approved",
          "activity_name": "Winback Bonus"
        },
        "member_id": "johndoe",
        "points_expiration_date": "13-Sep-2023 00:00:00",
        "approved_date": "12-Sep-2023 10:11:20",
        "created_date": "12-Sep-2023 10:11:20",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "cartabondoned"
        },
        "id": "65003948ebeffa000ccc6bb8"
      },
      {
        "status": "approved",
        "auto_approval_date": "15-Nov-20232 16:10:00",
        "last_modified_date": "12-Sep-2023 10:14:18",
        "award_info": {
          "activity_id": "upload_photo",
          "points": 500,
          "points_status": "expired",
          "activity_name": "Upload a Photo"
        },
        "member_id": "johndoe",
        "points_expiration_date": "06-Oct-2019 23:10:55",
        "approved_date": "12-Sep-2023 10:01:36",
        "created_date": "12-Sep-2023 10:01:19",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": "photouploaded"
        },
        "id": "650036efebeffa00099d54ba"
      },
      {
        "status": "approved",
        "auto_approval_date": "",
        "last_modified_date": "12-Sep-2023 10:14:18",
        "award_info": {
          "activity_id": "submit_a_receipt",
          "points": 9,
          "points_status": "expired",
          "activity_name": "Submit a Receipt"
        },
        "member_id": "johndoe",
        "points_expiration_date": "06-Oct-2019 23:10:55",
        "approved_date": "12-Sep-2023 10:00:34",
        "created_date": "12-Sep-2023 10:00:17",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": null,
          "receipt_file_url": [
            "https://zinrelo-receipt-uploads.s3.amazonaws.com/c944754e96693d3cce82bc3ebcda9f9e.jpg"
          ]
        },
        "id": "650036b1c13154000c365f21"
      },
      {
        "status": "approved",
        "auto_approval_date": "",
        "last_modified_date": "12-Sep-2023 10:29:36",
        "award_info": {
          "activity_id": "made_a_purchase",
          "points": 1000,
          "points_status": "approved",
          "activity_name": "Purchase on website"
        },
        "member_id": "johndoe",
        "points_expiration_date": "13-Sep-2023 00:00:00",
        "approved_date": "12-Sep-2023 10:29:36",
        "created_date": "12-Sep-2023 00:00:00",
        "transaction_type": "award",
        "transaction_attributes": {
          "order_id": "7587746",
          "coupon_code": "$5OFFVYZ",
          "reason": "purchase"
        },
        "id": "65003d91e410b900092ef4e4"
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": null
        },
        "last_modified_date": "08-Aug-2023 06:04:37",
        "member_id": "johndoe",
        "approved_date": "08-Aug-2023 06:04:37",
        "reward_info": {
          "reward_name": "$5 OFF COUPON",
          "points_status": "redeemed",
          "coupon_code": "3193E86A",
          "reward_link": null,
          "reward_id": "reward_bc668",
          "points": 500
        },
        "transaction_type": "redeem",
        "id": "64d1daf5339122000c4c3c0a",
        "created_date": "08-Aug-2023 06:04:37"
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": "Testing"
        },
        "last_modified_date": "05-May-2023 10:05:43",
        "transaction_type": "deduct",
        "approved_date": "05-May-2023 10:04:31",
        "member_id": "johndoe",
        "created_date": "05-May-2023 10:04:31",
        "id": "6454d4af3953d5000ccc3c26",
        "deduct_info": {
          "points": 10,
          "points_status": "deducted"
        }
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": "Testing"
        },
        "last_modified_date": "05-May-2023 10:00:09",
        "transaction_type": "deduct",
        "approved_date": "05-May-2023 09:59:28",
        "member_id": "johndoe",
        "created_date": "05-May-2023 09:59:28",
        "id": "6454d38077b86b000d2e555a",
        "deduct_info": {
          "points": 10,
          "points_status": "deducted"
        }
      },
      {
        "status": "approved",
        "transaction_attributes": {
          "reason": "Testing"
        },
        "last_modified_date": "05-May-2023 10:00:09",
        "transaction_type": "deduct",
        "approved_date": "05-May-2023 09:54:10",
        "member_id": "johndoe",
        "created_date": "05-May-2023 09:54:10",
        "id": "6454d2422e7adb000a78f2c5",
        "deduct_info": {
          "points": 10,
          "points_status": "deducted"
        }
      },
      {
        "status": "approved",
        "auto_approval_date": "",
        "last_modified_date": "12-Sep-2023 10:14:18",
        "award_info": {
          "activity_id": "created_an_account",
          "points": 10000,
          "points_status": "expired",
          "activity_name": "Account Creation"
        },
        "member_id": "johndoe",
        "points_expiration_date": "06-Oct-2019 23:10:55",
        "approved_date": "05-May-2023 07:44:43",
        "created_date": "05-May-2023 07:44:43",
        "transaction_type": "award",
        "transaction_attributes": {
          "reason": null
        },
        "id": "6454b3ebe8d4a8000b15cc77"
      },
      {
        "status": "approved",
        "auto_approval_date": "",
        "last_modified_date": "12-Sep-2023 10:14:18",
        "award_info": {
          "activity_id": "made_a_purchase",
          "points": 1000,
          "points_status": "expired",
          "activity_name": "Purchase on website"
        },
        "member_id": "johndoe",
        "points_expiration_date": "06-Oct-2019 23:10:55",
        "approved_date": "12-Sep-2023 10:11:20",
        "created_date": "05-Oct-2019 23:10:55",
        "transaction_type": "award",
        "transaction_attributes": {
          "order_id": "758765",
          "coupon_code": "$5OFFVYZ",
          "reason": "purchase"
        },
        "id": "65003948ebeffa000ccc6bb7"
      }
    ],
    "more": false
  },
  "success": true
}
{
  "reason": "Extra data: line 1 column 2 - line 1 column 11 (char 1 - 10) because of key approved_date",
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": "No JSON object could be decoded because of key points_status",
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "points_status": {
      "eq": "Value must be one of: approved; rejected; pending; redeemed; deducted; expired; redemption_pending; redemption_cancelled; pending_deduction; auto_rejected; auto_approved; exhausted (not u'blocekd')"
    }
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "language": "Value must be one of: english; french; italian; german; spanish (not u'Engligh')"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}

Perform an Activity API

POST
https://api.zinrelo.com/v2/loyalty-storefront/perform-activity

Body

application/json
activity_idstringrequired

Enter activity_id.

transaction_attributesstring<json>

You have to pass different transaction_attributes for different activities:

Share on Facebook/ Twitter/ Pinterest

Activity ID: share_on_facebook/ share_on_twitter/ share_on_pinterest

Transaction attributes:

{

"track_code":""

}

Note: You can obtain the track code of sharing activities using Get Activity Track Codes API.

Submit a receipt activity

Expected data is a list of images/pdfs encoded in base64 format. To convert an image to base64 format, click here.

Activity ID: submit_a_receipt

Transaction attributes:

{

"receipt_files": [""]

}

Code submission activity

Activity ID: code_submission

Transaction attributes:

{

"code": ""

}

Follow on instagram

Activity ID: follow_on_instagram

Transaction attributes:

{}


Upload a photo activity

Expected data is a list of images/pdfs encoded in base64 format. To convert an image to base64 format, click here.

Activity ID: upload_photo

Transaction attributes:

{

"image_file": [""]

}

Refer to a friend

Activity ID: referral

Transaction attributes:

{

"share_network": "mail",

"to_addresses":["user1@zinrelo.com","user2@zinrelo.com"]

}

In share_network, pass the source of referral- mail, twitter or facebook. And in to_addresses, you have to pass email address of the referral. 

It's important to note that passing email addresses is mandatory only when "mail" is selected as the "share_network." For other share networks like "twitter" or "facebook," email addresses are not required.

Response

200OKperform-an-activity-data-object

200

400Bad Requestperform-an-activity-failure

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

Perform an Activity API
curl -X POST 'https://api.zinrelo.com/v2/loyalty-storefront/perform-activity' \
  -H 'Content-Type: application/json' \
  -d '{
    "activity_id": "string",
    "transaction_attributes": "string"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/perform-activity', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "activity_id": "string",
      "transaction_attributes": "string"
    }),
});

const data = await response.json();
import requests

payload = {
  "activity_id": "string",
  "transaction_attributes": "string"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty-storefront/perform-activity', json=payload)
data = response.json()
Request Body
{
  "activity_id": "string",
  "transaction_attributes": "string"
}
{
  "data": {},
  "success": true
}
{
  "reason": "Internal server error.",
  "error_code": "INTERNAL_SERVER_ERROR",
  "success": false
}
{
  "reason": "Invalid JSON format.",
  "error_code": "INVALID_JSON",
  "success": false
}
{
  "reason": {
    "activity_id": "Value must be one of: code_submission; share_on_twitter; share_on_pinterest; share_on_facebook; upload_photo; referral; submit_a_receipt; follow_on_instagram (not u'share')",
    "transaction_attributes": "Missing value"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "transaction_attributes": "Missing value"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "transaction_attributes": "The input field u'receipt_files' was not expected."
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "transaction_attributes": "The input field u'code' was not expected."
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "transaction_attributes": "The input must be dict-like (not a <type 'unicode'>: u'{\\n\\n\"image_file\": [\"\"]\\n\\n}\\n\\nRefer')"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "transaction_attributes": "The input field u'image_file' was not expected."
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "transaction_attributes": "The input field u'to_addresses' was not expected."
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}

Reject a pending redemption

POST
https://api.zinrelo.com/v2/loyalty-storefront/transactions/reject

Body

application/json
reward_idstring

Unique ID that identifies a reward in TrueLoyal. This is the ID of the reward against which the redemption transaction has to be recorded.

coupon_codestring

Pass the coupon code for which you want to reject the pending redemption.

Response

200OKreject-pending-redemption-data-object

200

400Bad Requestreject-pending-redemption-failure-object

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

Reject a pending redemption
curl -X POST 'https://api.zinrelo.com/v2/loyalty-storefront/transactions/reject' \
  -H 'Content-Type: application/json' \
  -d '{
    "reward_id": "reward_bc668",
    "coupon_code": "82E69FBD"
  }'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/transactions/reject', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "reward_id": "reward_bc668",
      "coupon_code": "82E69FBD"
    }),
});

const data = await response.json();
import requests

payload = {
  "reward_id": "reward_bc668",
  "coupon_code": "82E69FBD"
}

response = requests.post('https://api.zinrelo.com/v2/loyalty-storefront/transactions/reject', json=payload)
data = response.json()
Request Body
{
  "reward_id": "reward_bc668",
  "coupon_code": "82E69FBD"
}
{
  "data": {
    "approved_date": "05-Jan-2024 12:50:45",
    "created_date": "05-Jan-2024 12:50:45",
    "id": "6597fb251f1bee000df19dc3",
    "last_modified_date": "05-Jan-2024 12:51:20",
    "member_id": "j.buitenhuis@alumio.com",
    "reward_info": {
      "coupon_code": "82E68FBD",
      "points": 500,
      "points_status": "redemption_cancelled",
      "reward_id": "reward_bc668",
      "reward_name": "$10 Gift Certificate Netsuite"
    },
    "status": "rejected",
    "transaction_attributes": {
      "reason": "Shopify in-cart redemption failed"
    },
    "transaction_type": "redeem"
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}
{
  "error_code": "VALIDATION_ERROR",
  "reason": {
    "coupon_code": "Missing value",
    "reward_id": "Value must be one of: reward_55ad1; reward_62a01; reward_6c806; reward_72869; reward_73e6e; reward_7c6c2; reward_8880b; reward_916d9; reward_9c350; reward_a1e91; reward_bc668; reward_c2b88; reward_cfc23; reward_d8954; reward_de7b4; reward_dea68; reward_efece; reward_f005e (not 'fewgwr')"
  },
  "success": false
}
{
  "error_code": "INVALID_COUPON",
  "reason": "Coupon code does not exist",
  "success": false
}

Get potential points

GET
https://api.zinrelo.com/v2/loyalty-storefront/get-potential-points

Parameters

product_liststring<json>query

To display potential points to members on the checkout page, it is mandatory to include the "product_id" parameter, which specifies the product for which potential points will be presented. Additionally, you have the option to include the optional fields like "price," "quantity," and "category" to provide more context.

The code format is as follows:

[{

"product_id": "product_five",

"price": 20,

"quantity": "1",

"category": "cups"

},

{

"product_id": "product_six",

"price": 20.00,

"quantity": "3",

"category": "butter"

}]

Response

200OKfetch-potential-points-data-object

200

400Bad Requestfetch-potential-points-failure-object

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

partner_idapiKey in header

Your program's partner ID.

Get potential points
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/get-potential-points'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/get-potential-points', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/get-potential-points')
data = response.json()
{
  "data": {
    "potential_points": 160,
    "potential_promotion_points": 135,
    "potential_promotion_points_breakdown": [
      {
        "campaign_id": "campaign_c8fd9",
        "end_date": null,
        "potential_points": 75
      },
      {
        "campaign_id": "campaign_ch7j3",
        "end_date": null,
        "potential_points": 60
      }
    ]
  },
  "success": true
}
{
  "reason": {
    "product_list": "The 'product_list' value must be an array of products."
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "error_code": "INVALID_JSON",
  "reason": "Invalid JSON format.",
  "success": false
}

Guest API

guest

Designed for the front end. Authenticated with your partner ID only, and only returns basic program details.

Get potential points

GET
https://api.zinrelo.com/v2/loyalty-storefront/get-potential-points

Parameters

product_liststring<json>query

To display potential points to members on the checkout page, it is mandatory to include the "product_id" parameter, which specifies the product for which potential points will be presented. Additionally, you have the option to include the optional fields like "price," "quantity," and "category" to provide more context.

The code format is as follows:

[{

"product_id": "product_five",

"price": 20,

"quantity": "1",

"category": "cups"

},

{

"product_id": "product_six",

"price": 20.00,

"quantity": "3",

"category": "butter"

}]

Response

200OKfetch-potential-points-data-object

200

400Bad Requestfetch-potential-points-failure-object

400

Authorization

access_tokenapiKey in header

A JSON Web Token (JWT) signed with an API key, identifying the logged-in member. UI API only.

partner_idapiKey in header

Your program's partner ID.

partner_idapiKey in header

Your program's partner ID.

Get potential points
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/get-potential-points'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/get-potential-points', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/get-potential-points')
data = response.json()
{
  "data": {
    "potential_points": 160,
    "potential_promotion_points": 135,
    "potential_promotion_points_breakdown": [
      {
        "campaign_id": "campaign_c8fd9",
        "end_date": null,
        "potential_points": 75
      },
      {
        "campaign_id": "campaign_ch7j3",
        "end_date": null,
        "potential_points": 60
      }
    ]
  },
  "success": true
}
{
  "reason": {
    "product_list": "The 'product_list' value must be an array of products."
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "error_code": "INVALID_JSON",
  "reason": "Invalid JSON format.",
  "success": false
}

EUD Guest Activities API

GET
https://api.zinrelo.com/v2/loyalty-storefront/activities

This page will help you get started with Guest Member API.

Parameters

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

sort_bystringquery

The response will contain the activities ordered by the rank configured in the TrueLoyal admin console. You can sort the sequence using the following options: "rank", "-rank", "created_date", "-created_date", "last_modified_date" or "-last_modified_date". Additionally, you can combine sorting options, such as "-rank,created_date", "-rank,-created_date", "-rank,-last_modified_date", "-rank,last_modified_date", "rank,created_date", or "rank,-created_date", "rank,-last_modified_date", or "rank,last_modified_date".

"-" signifies the latest activity first.

Note: If no sorting option is specified, the response will default to the saved rank, which is "rank,-last_modified_date".

In scenarios where the rank of activities is same, sorting will be based on a second parameter. For example, in "rank,last_modified_date," if the ranks are identical, the sorting will then be determined by the last modified date parameter.

Response

200OKguest-guest-activities-response-object

200

400Bad Requestguest-guest-activities-failure-object

400

Authorization

partner_idapiKey in header

Your program's partner ID.

EUD Guest Activities API
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/activities'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/activities', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/activities')
data = response.json()
{
  "data": {
    "total": 16,
    "activities": [
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "order_subtotal",
          "multiplier": 1
        },
        "activity_id": "made_a_purchase",
        "is_points_expiry_reset_activity": true,
        "enduser_activity_description_html": "Earn 100 points for every advisor you talk to.",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-12-08 16:55:20.470000",
        "metadata": {
          "Category": "Chocolate Cake"
        },
        "enduser_activity_short_description": "Earn points for every dollar you spend in purchases.",
        "created_date": "2021-03-15 12:59:39.818000",
        "activity_name": "Loan Installment Payment",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -10,
        "activity_id": "tag_on_tiktok",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:51.984000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you tag us on TikTok using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.260000",
        "activity_name": "Tag on TikTok",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Tiktok handle is required for this activity.",
          "activity_start_button_text": "Tag",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your TikTok account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you tag {{TIKTOK_HASHTAGS}} on TikTok using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your TikTok handle",
          "personal_handle_input_text": "Your Tiktok handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Tag on TikTok",
          "enter_handle_placeholder_text": "Enter your Tiktok handle",
          "edit_handle_text": "Edit your Tiktok handle",
          "business_handle_display_text": "Hashtag(s) to be tagged"
        },
        "id": "6756a59120df0f847b212e52",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "rank": -9,
        "activity_id": "enter_tiktok_handle",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:49.157000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you enter your TikTok handle",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/a795d2552d146126bf853454176d1f30.png",
        "created_date": "2024-12-09 08:08:49.232000",
        "activity_name": "Enter TikTok Handle",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "activity_start_button_text": "Submit",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "thank_you_text": "Thank you for entering your Tiktok handle. You will earn {{POINTS}} points (Limit- Once per lifetime)",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Enter TikTok Handle",
          "enter_handle_placeholder_text": "Enter your Tiktok handle"
        },
        "id": "6756a59120df0f847b212e4b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -8,
        "activity_id": "dm_on_instagram",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:46.412000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you DM us on Insta",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/caebf8b59b8ce9f854fef2e908ea7cae.png",
        "created_date": "2024-12-09 08:08:49.204000",
        "activity_name": "DM on Instagram",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "DM",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you DM {{BUSINESS_IG}} on Instagram.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "DM on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e44",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -7,
        "activity_id": "follow_on_instagram_v2",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:43.357000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points by following us and then mentioning or direct messaging us.",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/59f2fb79bcf9f49574a1052177e432de.png",
        "created_date": "2024-12-09 08:08:49.176000",
        "activity_name": "Follow on Instagram",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Follow",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you start following {{BUSINESS_IG}} on Instagram and then either mention or DM {{BUSINESS_IG}}",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Follow on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e3d",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -6,
        "activity_id": "mention_on_instagram_story",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:39.524000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you mention us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.142000",
        "activity_name": "Insta Story Mention",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Mention",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you mention {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Mention on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e36",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -5,
        "activity_id": "tag_on_instagram_reel",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:35.546000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you tag us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.112000",
        "activity_name": "Tag on Insta Reel",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Tag",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you tag {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Tag on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e2f",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -4,
        "activity_id": "mention_on_instagram_reel",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:31.476000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you mention us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.084000",
        "activity_name": "Insta Reel Mention",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Mention",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you mention {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Mention on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e28",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -3,
        "activity_id": "mention_on_instagram_post",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:26.655000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you mention us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:49.041000",
        "activity_name": "Insta Post Mention",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Mention",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you mention {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Mention on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59120df0f847b212e21",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "rank": -2,
        "activity_id": "tag_on_instagram_post",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:16.762000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you tag us on Insta using your public account",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/cdc1aa97b1e7d0388da9778419444317.png",
        "created_date": "2024-12-09 08:08:48.975000",
        "activity_name": "Tag on Insta Post",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "personal_handle_edit_button_text": "Edit",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "personal_handle_submit_button_text": "Submit",
          "handle_required_alert_text": "Your Instagram handle is required for this activity.",
          "activity_start_button_text": "Tag",
          "failure_text": "Error- Please try again. If this problem persists, contact your site administrator.",
          "reward_instruction_text": "Your Instagram account needs to be Public to earn points",
          "thank_you_text": "Thank you. You will earn {{POINTS}} points as soon as you tag {{BUSINESS_IG}} on Instagram using your public account.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "enter_handle_prompt_text": "Enter your Instagram handle",
          "personal_handle_input_text": "Your Instagram handle",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Tag on Instagram",
          "enter_handle_placeholder_text": "Enter your Instagram handle",
          "edit_handle_text": "Edit your Instagram handle",
          "business_handle_display_text": "Our business handle(s)"
        },
        "id": "6756a59020df0f847b212e1a",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "rank": -1,
        "activity_id": "enter_instagram_handle",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-12-09 08:09:12.074000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you enter your Insta handle",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/59f2fb79bcf9f49574a1052177e432de.png",
        "created_date": "2024-12-09 08:08:48.940000",
        "activity_name": "Enter Insta Handle",
        "extra_config": {
          "max_award_frequency_error_text": "",
          "duplicate_handle_error_text": "This handle is already used. Please enter another handle.",
          "activity_start_button_text": "Submit",
          "failure_text": "There was an error while following on instagram. Please try again. If this problem persists, please contact your site administrator.",
          "cancel_button_text": "Cancel",
          "excluded_transaction_error_text": "",
          "thank_you_text": "Thank you for entering your Instagram handle. You will earn {{POINTS}} points (Limit- Once per lifetime).",
          "blocked_handle_error_text": "This handle cannot be used. Please enter another handle.",
          "name_header_text": "Enter Instagram Handle",
          "enter_handle_placeholder_text": "Enter your Instagram handle"
        },
        "id": "6756a59020df0f847b212e13",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "rank": 1,
        "activity_id": "share_on_twitter",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-05-23 12:08:09.653000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points when you share us on Twitter.",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/55ad6cd681d4e73bc752cbdfedac826e.png",
        "created_date": "2021-03-15 12:59:39.857000",
        "activity_name": "Share on Twitter",
        "extra_config": {
          "max_award_frequency_error_text": "Max number of allowed transactions exceeded for this activity. Please try again after a few days",
          "tweet_message": "Loving this site! Check it out",
          "reward_text": "You will be awarded {{POINTS}} points immediately after a friend clicks on the shared link.",
          "excluded_transaction_error_text": "You are prohibited from performing this action. Please contact customer support for more details.",
          "thank_you_text": "Thank you for sharing us! You will earn {{POINTS}} points when any of your friends click on your link.",
          "share_button_text": "Share",
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a1",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "order_subtotal",
          "multiplier": 1
        },
        "rank": 4,
        "activity_id": "made_a_purchase",
        "is_points_expiry_reset_activity": true,
        "enduser_activity_description_html": "Earn 100 points for every advisor you talk to.",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2024-06-27 10:50:48.220000",
        "metadata": {
          "Category": "Chocolate Cake"
        },
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points for every dollar you spend in purchasesyes.",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/ebc58958ab6e0dd44248441cf0dc6dde.png",
        "created_date": "2021-03-15 12:59:39.818000",
        "activity_name": "Purchase",
        "extra_config": {
          "max_award_frequency_error_text": "Max number of allowed transactions exceeded for this activity. Please try again after a few days",
          "excluded_transaction_error_text": "You are prohibited from performing this action. Please contact customer support for more details."
        },
        "id": "604f5a3b8152252216f5c19b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 200,
          "points_computation_type": "fixed_points"
        },
        "rank": 7,
        "activity_id": "anniversary_bonus",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-12-25 06:16:36.670000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Earn points on your anniversary.",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/2819f34c74586cddbc195a17aab639cc.png",
        "created_date": "2021-03-15 12:59:39.836000",
        "activity_name": "Anniversary Bonus",
        "extra_config": {
          "max_award_frequency_error_text": "Max number of allowed transactions exceeded for this activity. Please try again after a few days",
          "save_button_text": "Save",
          "is_year_required": true,
          "reward_text": "<p class=\"zn-birthday-text zn-birthday-padding test\">Enter your anniversary date to earn {{POINTS}} points on your anniversary</p>",
          "excluded_transaction_error_text": "You are prohibited from performing this action. Please contact customer support for more details.",
          "thank_you_text": "<p class=\"zn-xsf\">Thanks for sharing your anniversary! We’ll celebrate you by gifting you {{POINTS}} points on your special day.</p>"
        },
        "id": "604f5a3b8152252216f5c19e",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "rank": 9,
        "activity_id": "share_on_facebook",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": null,
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-07-14 08:17:00.673000",
        "metadata": {},
        "earnpoints_button_label": "Earn {{POINTS}} points",
        "enduser_activity_short_description": "Reward points to users when they share you on Facebook.",
        "icon_image_url": "https://d1qbqkkh49kht1.cloudfront.net/24f391223d888e50111465f593129cc3.png",
        "created_date": "2021-03-15 12:59:39.848000",
        "activity_name": "Share on Facebook",
        "extra_config": {
          "max_award_frequency_error_text": "Max number of allowed transactions exceeded for this activity. Please try again after a few days",
          "reward_text": "You will be awarded {{POINTS}} points immediately after a friend clicks on the shared link.",
          "excluded_transaction_error_text": "You are prohibited from performing this action. Please contact customer support for more details.",
          "thank_you_text": "Thank you for sharing us! You will earn {{POINTS}} points when any of your friends click on your link.",
          "share_button_text": "Share",
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a0",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 1000,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "follow_on_instagram",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-10-30 07:09:02.212000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points when you follow us on Instagram.",
        "created_date": "2021-03-15 12:59:39.886000",
        "activity_name": "Follow on Instagram",
        "extra_config": {
          "business_instagram_username": "pallavi"
        },
        "id": "604f5a3b8152252216f5c1a4",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "created_an_account",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-06-14 09:03:33.343000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points when you create your loyalty account.",
        "created_date": "2021-03-15 12:59:39.812000",
        "activity_name": "Account Creation",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19a",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "multiplier": 1
        },
        "activity_id": "write_a_review",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:13:10.021000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points for writing a review.",
        "created_date": "2021-03-15 12:59:39.824000",
        "activity_name": "Write a Review",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19c",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 200,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "anniversary_bonus",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-22 10:07:02.905000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points on your anniversary.",
        "created_date": "2021-03-15 12:59:39.836000",
        "activity_name": "Anniversary Bonus",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19e",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "f00ca_custom_activity",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-17 11:21:50.190000",
        "metadata": {},
        "enduser_activity_short_description": "",
        "created_date": "2021-05-05 05:29:46.129000",
        "activity_name": "",
        "extra_config": {},
        "id": "60922d4abed0d56677192dcf",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "referral",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-05-12 11:10:12.088000",
        "metadata": {},
        "enduser_activity_short_description": "Award points on referral purchase.",
        "created_date": "2021-03-22 08:46:18.898000",
        "activity_name": "Refer a Friend",
        "extra_config": {},
        "id": "6058595abb711d6fa73fcd36",
        "activity_benefit_type": "points_and_coupon_code"
      },
      {
        "points_config": {
          "points": 500,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "684fc_custom_activity",
        "is_points_expiry_reset_activity": true,
        "enduser_activity_description_html": "<div data-paperform-id=\"swldehbf\"></div><script>(function() {var script = document.createElement('script'); script.src = \"https://paperform.co/__embed.min.js\"; document.body.appendChild(script); })()</script>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-04-10 11:47:27.127000",
        "metadata": {},
        "enduser_activity_short_description": "Enter the code on your LD pack and earn points",
        "created_date": "2021-05-05 11:41:57.738000",
        "activity_name": "684fc_custom_activity",
        "extra_config": {},
        "id": "609284851c9396204c8b984b",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "a7ee1_custom_activity",
        "is_points_expiry_reset_activity": true,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-03-08 11:01:06.969000",
        "metadata": {},
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "created_date": "2023-01-23 13:52:30.665000",
        "activity_name": "Custom Activity",
        "extra_config": {},
        "id": "63ce911ef380d8000b8d7753",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 130,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "birthday_bonus",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2023-02-24 07:27:55.290000",
        "metadata": {},
        "enduser_activity_short_description": "Award points on birthday.",
        "created_date": "2021-03-15 12:59:39.830000",
        "activity_name": "Birthday Bonus",
        "extra_config": {},
        "id": "604f5a3b8152252216f5c19d",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "upload_photo",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-10-06 10:26:28.835000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points for uploading a photo.",
        "created_date": "2022-07-28 06:53:03.616000",
        "activity_name": "Upload a Photo",
        "extra_config": {},
        "id": "62e2324f23d74243d1c5af29",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "attribute_to_multiply": "receipt_order_value",
          "multiplier": 1
        },
        "activity_id": "submit_a_receipt",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-10-06 09:54:55.183000",
        "metadata": {},
        "enduser_activity_short_description": "Reward users for submitting receipts of their purchases.",
        "created_date": "2021-03-22 08:56:14.632000",
        "activity_name": "Submit A Receipt",
        "extra_config": {},
        "id": "60585baef5a67a16e1871b56",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "share_on_pinterest",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-07-14 08:17:19.592000",
        "metadata": {},
        "enduser_activity_short_description": "Earn points when you share us on Pinterest.",
        "created_date": "2021-03-15 12:59:39.873000",
        "activity_name": "Share on Pinterest",
        "extra_config": {
          "pin_post_image": "",
          "pin_post_description": "Awesome products at great prices. You should really check them out.",
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a3",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 50,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "share_on_facebook",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": true,
        "last_modified_date": "2022-07-14 08:17:00.673000",
        "metadata": {},
        "enduser_activity_short_description": "Reward points to users when they share you on Facebook.",
        "created_date": "2021-03-15 12:59:39.848000",
        "activity_name": "Share on Facebook",
        "extra_config": {
          "share_current_page_url": false
        },
        "id": "604f5a3b8152252216f5c1a0",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points": 100,
          "points_computation_type": "fixed_points"
        },
        "activity_id": "f46f4_custom_activity",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "<iframe id=\"quiz-form\" width=\"100%\" height=\"300px\"  style=\"margin-top:-50px;border:none !important;\"></iframe>",
        "activity_card_background_image_url": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-06-14 11:09:16.199000",
        "metadata": {},
        "enduser_activity_short_description": "Reward your users for any activity you want.",
        "created_date": "2022-03-03 05:30:58.331000",
        "activity_name": "Quiz form",
        "extra_config": {},
        "id": "622052924e6d9f1dfd89ed88",
        "activity_benefit_type": "points"
      },
      {
        "points_config": {
          "points_computation_type": "multiplier_based",
          "multiplier": 1
        },
        "activity_id": "code_submission",
        "is_points_expiry_reset_activity": false,
        "enduser_activity_description_html": "",
        "is_qualified_for_tier_upgrade": false,
        "last_modified_date": "2022-05-19 10:32:40.318000",
        "metadata": {},
        "enduser_activity_short_description": "Get rewarded for your purchases by submitting the code you received with your purchase.",
        "created_date": "2022-05-18 10:05:41.642000",
        "activity_name": "Enter a Code",
        "extra_config": {},
        "id": "6284c4f5dfa6b7425568ba6d",
        "activity_benefit_type": "points"
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "error_code": "400",
  "error": "ERROR_INVALID_PARAMETER",
  "message": "An invalid value was supplied for {Parameter}."
}
{
  "reason": {
    "language": "Value must be one of: english; french; italian; german; spanish (not u'Eng')"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}
{
  "reason": {
    "count": "Please enter a number that is 1000 or smaller"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}

EUD Guest Rewards API

GET
https://api.zinrelo.com/v2/loyalty-storefront/rewards

Parameters

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

sort_bystringquery

The response will contain the rewards ordered by the rank configured in the TrueLoyal admin console. You can sort the sequence using the following options: "rank", "-rank", "points_to_be_redeemed", or "-points_to_be_redeemed". Additionally, you can combine sorting options, such as "-rank,points_to_be_redeemed", "-rank,-points_to_be_redeemed", "rank,points_to_be_redeemed", or "rank,-points_to_be_redeemed".

"-" signifies the latest reward first.

Note: If no sorting option is specified, the response will default to the saved rank, which is "rank,points_to_be_redeemed".

In scenarios where the rank of rewards is same, sorting will be based on a second parameter. For example, in "rank,points_to_be_redeemed," if the ranks are identical, the sorting will then be determined by the points to be redeemed parameter.

Response

200OKguest-guest-rewards-response-object

200

400Bad Requestguest-rewards-failure-object

400

Authorization

partner_idapiKey in header

Your program's partner ID.

EUD Guest Rewards API
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/rewards'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/rewards', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/rewards')
data = response.json()
{
  "data": {
    "total": 3,
    "rewards": [
      {
        "enable_auto_redemption": false,
        "reward_name": "$10 Gift Certificate Netsuite",
        "enduser_reward_confirmation_html": "<b>{{POINTS}} Points</b> WILL be deducted from your account balance. Do you wish to redeem this reward?",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "reward_value": "5",
        "last_modified_date": "04/30/2024 09:09:10",
        "rank": 1,
        "extra_parameters": {
          "redemption_confirm_button_text": "Confirm",
          "points_deduction_text": "{{POINTS}} points have been deducted.",
          "redeem_button_text": "Redeem",
          "ineligible_rewards_progress_text": "You need <b>{{POINTS_TO_UNLOCK_REWARD}} more points</b> to unlock this reward."
        },
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/15/2021 12:59:39",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 100,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "604f5a3b8152252216f5c1ad",
        "reward_id": "reward_bc668",
        "metadata": {
          "Category": "Limited time",
          "Brand": "Nescafe"
        }
      },
      {
        "enable_auto_redemption": false,
        "reward_name": "$10 OFF COUPON Miva",
        "enduser_reward_confirmation_html": "<b>{{POINTS}} Points</b> WILL be deducted from your account balance. Do you wish to redeem this reward?",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "reward_value": "10",
        "last_modified_date": "07/07/2023 10:49:43",
        "rank": 1,
        "extra_parameters": {
          "redemption_confirm_button_text": "Confirm",
          "points_deduction_text": "{{POINTS}} points have been deducted.",
          "redeem_button_text": "Redeem",
          "ineligible_rewards_progress_text": "You need <b>{{POINTS_TO_UNLOCK_REWARD}} more points</b> to unlock this reward."
        },
        "reward_sub_type": "Fixed Amount Discount",
        "created_date": "03/15/2021 12:59:41",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1000,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "604f5a3d8152252216f5c1b0",
        "reward_id": "reward_a1e91",
        "metadata": {
          "Category": "Miva",
          "Brand": "Nescafe",
          "Products Eligible": "A,B,C"
        }
      },
      {
        "enable_auto_redemption": false,
        "reward_name": "$15 OFF COUPON",
        "enduser_reward_confirmation_html": "<b>{{POINTS}} Points</b> WILL be deducted from your account balance. Do you wish to redeem this reward?",
        "reward_card_background_image_url": "",
        "implementation_type": "coupon_code",
        "reward_value": "10",
        "last_modified_date": "07/06/2023 05:20:05",
        "rank": 1,
        "extra_parameters": {
          "redemption_confirm_button_text": "Confirm",
          "points_deduction_text": "{{POINTS}} points have been deducted.",
          "redeem_button_text": "Redeem",
          "ineligible_rewards_progress_text": "You need <b>{{POINTS_TO_UNLOCK_REWARD}} more points</b> to unlock this reward."
        },
        "reward_sub_type": "Percentage Discount",
        "created_date": "03/15/2021 12:59:42",
        "enduser_reward_short_description": "For {{POINTS}} points",
        "points_to_be_redeemed": 1400,
        "reward_type": "Coupon Based Rewards",
        "enduser_reward_post_confirmation_html": "Here is your coupon code.",
        "id": "604f5a3e8152252216f5c1b3",
        "reward_id": "reward_9c350",
        "metadata": {}
      }
    ],
    "next_cursor": 100,
    "more": false
  },
  "success": true
}
{
  "error_code": 400,
  "message": "Merchant does not exist.",
  "error": "MERCHANT_DOES_NOT_EXIST"
}
{
  "reason": {
    "language": "Value must be one of: english; french; italian; german; spanish (not u'Engligh')"
  },
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "success": false
}

EUD Guest Tiers API

GET
https://api.zinrelo.com/v2/loyalty-storefront/tiers

Parameters

start_cursorinteger<int32>query

Defaults to 0. This is a cursor for use in pagination. start_index is the index that defines your place in the list. For instance, if you make a list request and receive 1000 objects, your subsequent call can include start_index=1001 in order to fetch the next page of the list.

countinteger<int32>query

Defaults to 100. This is a limit on the number of objects to be returned. Count can range between 1 and 1000, and the default is 100.

languagestringenglishquery

One of the store languages, for example english/ italian/ german, etc.

Response

200OKguest-guest-tiers-tier-object

200

400Bad Requestguest-tiers-failure-object

400

Authorization

partner_idapiKey in header

Your program's partner ID.

EUD Guest Tiers API
curl -X GET 'https://api.zinrelo.com/v2/loyalty-storefront/tiers'
const response = await fetch('https://api.zinrelo.com/v2/loyalty-storefront/tiers', {
  method: 'GET',
});

const data = await response.json();
import requests

response = requests.get('https://api.zinrelo.com/v2/loyalty-storefront/tiers')
data = response.json()
{
  "data": {
    "tiers": [
      {
        "created_time": "07-May-2021 05:44:16",
        "description": "This is default Tier",
        "id": "6094d3b084d28f07bbda724e",
        "is_default": true,
        "minimum_points": 0,
        "name": "Silver",
        "tier_id": "zrl_silver",
        "updated_time": "26-Jul-2023 05:04:04"
      },
      {
        "created_time": "07-May-2021 05:44:16",
        "description": "1000 points",
        "id": "6094d3b084d28f07bbda724d",
        "is_default": false,
        "minimum_points": 14000,
        "name": "Gold",
        "tier_id": "zrl_gold",
        "updated_time": "26-Jul-2023 05:04:15"
      },
      {
        "created_time": "07-May-2021 05:44:16",
        "description": "5000 Points",
        "id": "6094d3b084d28f07bbda724c",
        "is_default": false,
        "minimum_points": 15000,
        "name": "Platinum",
        "tier_id": "zrl_platinum",
        "updated_time": "26-Jul-2023 05:04:31"
      }
    ]
  },
  "success": true
}
{
  "error_code": 400,
  "message": "Merchant does not exist.",
  "error": "MERCHANT_DOES_NOT_EXIST"
}
{
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "reason": "The input field 'start_cursor' was not expected.",
  "success": false
}
{
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "reason": "The input field 'count' was not expected.",
  "success": false
}
{
  "error_code": "INVALID_REQUEST_PARAMETER_VALUES",
  "reason": "language: Value must be one of: english; french; italian; german; spanish (not 'Engligh')",
  "success": false
}