How to enable Webhooks

A webhook is simply an HTTP callback, an HTTP post that occurs when something happens. Simply put, it is a simple event-notification via HTTP POST. Webhooks allow you to build or set up integrations that subscribe to certain events on the Zinrelo Loyalty Platform. When one of those events is triggered, we'll send an HTTP POST payload to the configured URL. Webhooks are aimed at enabling our merchants to extend the functionality provided by Zinrelo’s loyalty program by listening to the events and adding additional functionality like CRM integrations, email notifications, and integrations with wallets or account credits, etc.

Webhook settings can be configured in the Notifications section of the Zinrelo store.

Go to Notifications >> Webhooks.

Sr.NoEvent NameDescription
1.Webhook NameName your webhook.
2.Webhook URLEndpoint where events will be posted.
3.Secret KeyWebhook secret key.
4.Events to send Webhook forEvents for which you want to receive notifications for: Transaction events, Member events, Referral events, System events and Campaign events.
5.Batch size for bulk eventsSelect the batch size of the bulk events you receive.

Receiving a Webhook notification

The body of the request will contain a valid JSON payload. The request body will have a batch payload that will support the delivery of more than one event in a single HTTP request, with member and transaction data for each.

Here is what a complete JSON payload for a batch of events looks like:

   {
   "request_id": "61f11851bdfb9aac526d0c70",
   "total_count": "2",
   "created_date": "12/29/2021 16:47:41",
   "events": [
       {
           "id": "61f1dfbd0c709aac1851b526",
           "event_type": "event_points_earned",
           "data": {
               "member_info": {
                       <The entire member object>
               },
               "transaction_info": { 
                       <The entire Award transaction object>
               } 
           }
       },
       {
           "id": "507f1f77bcf86cd799439011",
           "event_type": "event_points_earned",
           "data": {
               "member_info": {
                       <The entire member object>
               },
               "transaction_info": {  
                       <The entire Award transaction object>
               }
           }
       }
   ]
}

Note: The event data will be different based on different event types.

Based on the event type, the payload will contain a batch of user data or transaction data. In the case of events: such as user enrollment, the payload will contain the batch of user objects. Whereas, in the case of events like points awarded, points redeemed, and points deducted, the payload will contain the batch of loyalty transaction details.

Customize the Batch Size

The batch size defines the number of user or transactional data items that will be propagated when you call out any webhook event.

In the case of bulk events, you can customize the total count of batch payloads from the admin console.

Go to Notifications >> Webhooks

From here, you can select the batch size for bulk events.

Responding to a Webhook

Your endpoint should return a 200 HTTP status code to acknowledge receipt of the event. Any code other than the 200 HTTP status code is considered a failure, and the event will be fired again with 5-minute intervals until the 200 HTTP status code is received or the maximum number of retry attempts has been reached (the default retry attempt limit is 5). Get in touch with your Customer Success Manager to configure the settings.

Best Practices

If your Webhook script performs complex logic, or makes network calls, it is possible that the request would time out before Zinrelo sees the script’s complete execution. For this reason, you may want to have your Webhook endpoint immediately acknowledge receipt by returning a 200 HTTPS status code and then perform the rest of its duties.

Webhook endpoints may occasionally receive the same event more than once. We advise you to guard against duplicated event receipts by logging the events you have processed against the event ID and then not processing already-logged events.

Webhook Security and Authentication

Before you respond to a webhook, you need to verify that the webhook was sent from Zinrelo. Zinrelo supports hash-based message authentication code (or HMAC). It creates the signature based on the SHA512 hash of the request body and nonce.

Each webhook request includes x-zinrelo-signature and nonce in headers. This x-zinrelo-signature is generated using the shared webhook secret key with the data sent in the request along with nonce.

This allows you to verify that the events were sent by Zinrelo, not by a third party.

Compute HMAC

Using data in request body and nonce sent in header you can compute HMAC. Following is a code example in python.

# get signature and nonce sent the request headers
signature = request.headers.get('x-zinrelo-signature')
nonce = request.headers.get('nonce')  

# get request body in regular string 
request_body = str(request.data, 'utf-8')
    
# build message using request body and nonce
message = "{}:{}".format(request_body, nonce)

# generate hexdigest
computed_signature = hmac.new(
                                secret_key,                  # shared webhook secret key
                                message.encode("utf-8"),     # message encoded in utf-8
                                hashlib.sha512               # sha512 algorithm to generate hmac   
                                ).hexdigest()

# compare computed signature 
hmac.compare_digest(computed_signature, signature)

Events

When configuring a webhook, you can choose the events you would like to receive payloads for. Subscribing only to the events that you are going to implement will help limit the HTTP requests to your server. Currently, the Zinrelo Loyalty Program supports the following events:

Sr.No.Event NameDescription
1.User EnrollmentWhen a new user enrolls in the loyalty program.
2.Points AwardedWhen points are awarded (approved) to a user.
3.Points RedeemedWhen a user redeems points.
4.Points DeductedWhen points are deducted from a user’s loyalty points balance.
5.Tier UpgradeWhen a customer upgrades to a higher tier.
6.Tier DowngradeWhen a customer downgrades to a lower tier.
7.Points ExpiredWhen customer's points expire.
8.Friend Incentive RequestWhen a coupon is issued to the referrer for a successful referral.
9.Member UpdatedWhen the member's attributes are changed.
10.Referral link shared event- via email or social channelsWhen the referral link is shared through email or via social channels.
11.Referral successWhen the referred friend clicks on the referral link and makes his first purchase.
12.Points RejectedWhen a user's pending points are rejected in moderation.
13.Member DeletedWhen a user is deleted from the admin console.
14.Winback OfferWhen a user has been inactive for an extended period of time.
15.Available Rewards ReminderWhen a user earns enough points to redeem rewards.
16.Member OTP GenerationWhen a user requests an OTP for user authentication into the Zinrelo loyalty program.
17.Points EarnedWhen a user earns points for any activity.
18.Points Expiration ReminderWhen a user's points are about to expire.
19.Rewards within Reach ReminderWhen a user earns 80% of the required points to redeem the reward.
20.Multiple Events for Points RejectedWhen more than one user's pending points are rejected in moderation.
21.Multiple Events Points EarnedWhen more than one user's pending points are approved in moderation.
22.Multiple Member DeleteWhen more than one user is deleted from the admin console.

Member Enrollment

The User Enrollment event occurs whenever a new user enrolls in the Zinrelo loyalty program. The request body for this event contains the event type and payload in the format shown below:

{
  "request_id": "6332aec45fd7d2000d77b8a2",
  "total_count": 1,
  "events": [
    {
      "id": "6332aec49fe239670bc1bcde",
      "event_type": "event_member_enrol",
      "data": {
        "member_info": {
          "id": "6332aec45fd7d2000d77b89e",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "",
            "postal_code": ""
          },
          "phone_number": "",
          "member_id": "johndoe21",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 0,
          "number_of_redemptions": 0,
          "birthdate": "",
          "enrollment_date": "09/27/2022",
          "last_modified_date": "09/27/2022",
          "first_purchase_date": null,
          "instagram_handle": null,
          "last_purchase_date": null,
          "anniversary_date": "",
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": null,
            "loyalty_tier_name": "",
            "qualifed_points": 0,
            "loyalty_tier_id": null,
            "current_period_end": null
          },
          "lifetime_points_earned": 0,
          "lifetime_points_expired": 0,
          "available_points": 100,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/PAL6FWL5",
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "revenue": 0,
          "aov": null,
          "deleted_date": null
        }
      }
    }
  ],
  "created_date": "27-Sep-2022 08:05:24"
}

Points Awarded

The Points Awarded event occurs when a user is awarded loyalty points. In the case of activities where moderation is required, the event occurs once the points have been approved. The payload is shown below:

{
  "request_id": "633292a438e747000da11293",
  "total_count": 1,
  "events": [
    {
      "id": "633292a5e6316eb8050a97ba",
      "event_type": "event_points_earned",
      "data": {
        "member_info": {
          "id": "632c66dbf4dc13000bed3f3b",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "city",
            "country": "country",
            "line2": "line2",
            "line1": "line1",
            "state": "state",
            "postal_code": 412307
          },
          "phone_number": "+91-9898989898",
          "member_id": "john_doe",
          "member_status": "active",
          "member_tags": [
            "stror1",
            "store2"
          ],
          "number_of_purchases": 4,
          "number_of_redemptions": 0,
          "birthdate": "09/09/1900",
          "enrollment_date": "09/22/2022",
          "last_modified_date": "09/27/2022",
          "first_purchase_date": "09/26/2022",
          "instagram_handle": "instaa",
          "last_purchase_date": "09/27/2022",
          "anniversary_date": "02/11/2020",
          "twitter_handle": "twitt",
          "preferred_language": "english",
          "tier_info": {
            "current_period_start": "null",
            "loyalty_tier_name": "",
            "qualifed_points": 0,
            "loyalty_tier_id": null,
            "current_period_end": null
          },
          "lifetime_points_earned": 0,
          "lifetime_points_expired": 0,
          "available_points": 1060,
          "lifetime_points_deducted": 100,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/JOH81EEI",
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "revenue": 106,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "633292a438e747000da11291",
          "transaction_type": "award",
          "member_id": "john_doe",
          "transaction_attributes": {
            "order_id": 9090111,
            "coupon_code": "",
            "reason": "nc",
            "tags": [],
            "products": []
          },
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "approved_date": "27-Sep-2022 06:05:24",
          "last_modified_date": "27-Sep-2022 06:05:24",
          "created_date": "27-Sep-2022 06:05:24",
          "award_info": {
            "activity_id": "made_a_purchase",
            "activity_name": "Purchase on website",
            "points_status": "approved",
            "points": 150
          },
          "points_expiration_date": "01-Oct-2022 12:18:31",
          "auto_approval_date": ""
        }
      }
    }
  ],
  "created_date": "27-Sep-2022 06:05:24"
}

Points Redeemed

The Points Redeemed event occurs whenever a user redeems his loyalty points. The payload is shown below:

{
  "request_id": "6332b104700381000ae573bd",
  "total_count": 1,
  "events": [
    {
      "id": "6332b106fab4f0e2bf7cef24",
      "event_type": "event_points_redeemed",
      "data": {
        "member_info": {
          "id": "6329aced6d6081000a596007",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "null",
          "address": {
            "city": "city",
            "country": "country",
            "line2": "line2",
            "line1": "line1",
            "state": "state",
            "postal_code": 412307
          },
          "phone_number": "+91-9898989898",
          "member_id": "john_doe",
          "member_status": "active",
          "member_tags": [
            "redemption1",
            "redemption2"
          ],
          "number_of_purchases": 17,
          "number_of_redemptions": 1,
          "birthdate": "09/09/1900",
          "enrollment_date": "09/20/2022",
          "last_modified_date": "09/27/2022",
          "first_purchase_date": "09/20/2022",
          "instagram_handle": "instaa",
          "last_purchase_date": "09/26/2022",
          "anniversary_date": "02/11/2020",
          "twitter_handle": "twitt",
          "preferred_language": "english",
          "tier_info": {
            "current_period_start": null,
            "loyalty_tier_name": "",
            "qualifed_points": "0",
            "loyalty_tier_id": null,
            "current_period_end": null
          },
          "lifetime_points_earned": 0,
          "lifetime_points_expired": 0,
          "available_points": 4752,
          "lifetime_points_deducted": 28,
          "lifetime_points_redeemed": 500,
          "referral_URL": "https://zinrelo.com/ref/JOH350RU",
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "revenue": 500,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "6332b103700381000ae573bb",
          "transaction_type": "redeem",
          "member_id": "john_doe",
          "transaction_attributes": {
            "tags": [],
            "reason": "purchasemade",
            "source_of_redemption": "manual"
          },
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "approved_date": "27-Sep-2022 08:14:59",
          "last_modified_date": "27-Sep-2022 08:14:59",
          "created_date": "27-Sep-2022 08:14:59",
          "reward_info": {
            "reward_id": "reward_5c45d",
            "reward_name": "&#36;5 OFF COUPON",
            "points_status": "redeemed",
            "points": 500,
            "coupon_code": "500DSRM",
            "reward_link": null
          }
        }
      }
    }
  ],
  "created_date": "27-Sep-2022 08:15:00"
}

Points Deducted

The Points Deducted event occurs whenever points are deducted from a user’s loyalty point balance. The points can be deducted from the Zinrelo store or by using API calls. The payload is shown below:

{
  "request_id": "6332b44fa9f094000beae74e",
  "total_count": 1,
  "events": [
    {
      "id": "6332b44f6810fce4d056292c",
      "event_type": "event_points_deducted",
      "data": {
        "member_info": {
          "id": "6332aec45fd7d2000d77b89e",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "",
            "postal_code": ""
          },
          "phone_number": "",
          "member_id": "johndoe21",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 1,
          "number_of_redemptions": 0,
          "birthdate": "",
          "enrollment_date": "09/27/2022",
          "last_modified_date": "09/27/2022",
          "first_purchase_date": "09/27/2022",
          "instagram_handle": null,
          "last_purchase_date": "09/27/2022",
          "anniversary_date": "",
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-01-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 60000,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2022-12-31 23:59:59"
          },
          "lifetime_points_earned": 0,
          "lifetime_points_expired": 0,
          "available_points": 54100,
          "lifetime_points_deducted": 6000,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/JOH6FWL5",
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "revenue": 6000,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "6332b44fa9f094000beae74c",
          "transaction_type": "deduct",
          "member_id": "johndoe21",
          "transaction_attributes": {
            "reason": "return",
            "tags": []
          },
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "approved_date": "27-Sep-2022 08:29:03",
          "last_modified_date": "27-Sep-2022 08:29:03",
          "created_date": "27-Sep-2022 08:29:03",
          "deduct_info": {
            "points_status": "deducted",
            "points": 6000
          }
        }
      }
    }
  ],
  "created_date": "27-Sep-2022 08:29:03"
}

Member Tier Upgraded

The tier upgrade event occurs whenever a customer earns enough points to move up to a higher tier. The tier upgrade is processed immediately, and the webhook is triggered at the time of the upgrade. The payload is shown below:

{
  "request_id": "6332b666700381000d0dc366",
  "total_count": 1,
  "events": [
    {
      "id": "6332b669673e44cc09b78c0c",
      "event_type": "event_member_tierupgrade",
      "data": {
        "member_info": {
          "id": "632c66dbf4dc13000bed3f3b",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "city",
            "country": "country",
            "line2": "line2",
            "line1": "line1",
            "state": "state",
            "postal_code": 412307
          },
          "phone_number": "+91-9898989898",
          "member_id": "john_doe",
          "member_status": "active",
          "member_tags": [
            "ab1",
            "ab2"
          ],
          "number_of_purchases": 4,
          "number_of_redemptions": 0,
          "birthdate": "09/09/1900",
          "enrollment_date": "09/22/2022",
          "last_modified_date": "09/27/2022",
          "first_purchase_date": "09/26/2022",
          "instagram_handle": "instaa",
          "last_purchase_date": "09/27/2022",
          "anniversary_date": "02/11/2020",
          "twitter_handle": "twitt",
          "preferred_language": "english",
          "tier_info": {
            "current_period_start": "2022-01-01 00:00:00",
            "loyalty_tier_name": "Gold",
            "qualifed_points": 0,
            "loyalty_tier_id": "zrl_gold",
            "current_period_end": "2022-12-31 23:59:59"
          },
          "lifetime_points_earned": 0,
          "lifetime_points_expired": 0,
          "available_points": 1060,
          "lifetime_points_deducted": 100,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/JOH81EEI",
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "revenue": 106,
          "aov": null,
          "deleted_date": null
        }
      }
    }
  ],
  "created_date": "27-Sep-2022 08:37:58"
}

Member Tier Downgraded

The tier downgrade event occurs whenever a customer is downgraded to a lower tier for not having enough points to stay on the current tier. The tier downgrade criteria are evaluated at the end of a "Tier Evaluation Period" and also when points are deducted. The payload is shown below:

{
  "request_id": "63340d3ab63c5d000b65ab31",
  "total_count": 1,
  "events": [
    {
      "id": "63340d3b561d49af9f5ce4c0",
      "event_type": "event_member_tierdowngrade",
      "data": {
        "member_info": {
          "id": "6333fba90ae9d6000b38e518",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "pune",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "maharashtra",
            "postal_code": 422111
          },
          "phone_number": 9876543321,
          "member_id": "john_doe",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 7,
          "number_of_redemptions": 0,
          "birthdate": null,
          "enrollment_date": "09/28/2022",
          "last_modified_date": "09/28/2022",
          "first_purchase_date": "09/28/2022",
          "instagram_handle": null,
          "last_purchase_date": "09/28/2022",
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-09-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 0,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2022-09-30 23:59:59"
          },
          "lifetime_points_earned": 900,
          "lifetime_points_expired": 0,
          "available_points": 900,
          "lifetime_points_deducted": 6200,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/JOH1L48L",
          "custom_attributes": {},
          "revenue": 700,
          "aov": null,
          "deleted_date": null
        }
      }
    }
  ],
  "created_date": "28-Sep-2022 09:00:42"
}

Points Expired

The Points Expired event occurs whenever loyalty points in a customer's loyalty account balance expire. This event is triggered as soon as the status of the points is marked as expired. The payload is shown below:

{
  "request_id": "63341215563aef00174f73a7",
  "total_count": 1,
  "events": [
    {
      "id": "6334121b4f113d58b2ed3ef5",
      "event_type": "event_points_expired",
      "data": {
        "member_info": {
          "id": "6329aeaddee54a000cbce5ec",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "pune",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "maharashtra",
            "postal_code": 422111
          },
          "phone_number": 9876543321,
          "member_id": "john_doe",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 10,
          "number_of_redemptions": 0,
          "birthdate": "09/21/1900",
          "enrollment_date": "09/20/2022",
          "last_modified_date": "09/28/2022",
          "first_purchase_date": "09/20/2022",
          "instagram_handle": null,
          "last_purchase_date": "09/21/2022",
          "anniversary_date": "09/21/1900",
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-09-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 10390,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2022-09-30 23:59:59"
          },
          "lifetime_points_earned": 11034,
          "lifetime_points_expired": 11034,
          "available_points": 0,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/JOH7EI9V",
          "custom_attributes": {
            "test_string_1": null,
            "number_number_1": null,
            "multiselect_list_1": null,
            "datepicker_date_1": null
          },
          "revenue": 1000,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "632acf6cdee54a000b092934",
          "transaction_type": "award",
          "member_id": "john_doe",
          "expiry_info": {
            "points_status": "expired",
            "points": 1000
          },
          "approved_date": "21-Sep-2022 08:46:36",
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "last_modified_date": "28-Sep-2022 09:10:17",
          "created_date": "21-Sep-2022 08:46:35"
        }
      }
    }
  ],
  "created_date": "28-Sep-2022 09:21:240009fde48c"
} 

Friend Incentive Request

This event occurs when a friend clicks on the referral link shared by a user and enters their email to claim a reward. This event is related to the "Refer a Friend" activity. This event is triggered as soon as the coupon is dispatched to the friend's email address. The payload is shown below:

 {
  "request_id": "6333fb9e1ddab5000ba5e74a",
  "total_count": 1,
  "events": [
    {
      "id": "6333fba0fa6dbb793c3ecb73",
      "event_type": "event_friend_incentive_request",
      "data": {
        "friend_info": {
          "email_address": "[email protected]"
        },
        "incentive_info": {
          "coupon": "FRIEND10",
          "referrer_info": {
            "referral_link": "https://zinrelo.com/ref/WEB7AMEU",
            "member_id": "john_doe"
          }
        }
      }
    }
  ],
  "created_date": "28-Sep-2022 07:45:34"
}

When a friend is already enrolled in the program, he will see the following payload when he clicks the referral link:

{
  "request_id": "6336e12cca5ac5000af2805e",
  "total_count": 1,
  "events": [
    {
      "id": "6336e12eeecc0c196e9e50d7",
      "event_type": "event_friend_incentive_request",
      "data": {
        "friend_info": {
          "id": "633689b8fe0c0000093bc10a",
          "first_name": "john",
          "last_name": "doe",
          "email_address": "[email protected]",
          "address": {
            "city": "pune",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "maharashtra",
            "postal_code": 422111
          },
          "phone_number": "",
          "member_id": "johndoe55",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 1,
          "number_of_redemptions": 0,
          "birthdate": null,
          "enrollment_date": "09/30/2022",
          "last_modified_date": "09/30/2022",
          "first_purchase_date": "09/30/2022",
          "instagram_handle": null,
          "last_purchase_date": "09/30/2022",
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-09-01 00:00:00",
            "loyalty_tier_name": "Gold",
            "qualifed_points": 1000,
            "loyalty_tier_id": "zrl_gold",
            "current_period_end": "2022-09-30 23:59:59"
          },
          "lifetime_points_earned": 1100,
          "lifetime_points_expired": 0,
          "available_points": 1100,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "zinrelo.com/ref/JOH1HQK8",
          "custom_attributes": {
            "test_string_1": null,
            "number_number_1": null,
            "multiselect_list_1": null,
            "datepicker_date_1": null
          },
          "revenue": 100,
          "aov": null,
          "deleted_date": null
        }
      }
    }
  ],
  "created_date": "30-Sep-2022 12:29:32"
}

Member Updated

This event will occur when the member's attributes are changed. The payload is shown below:

{
  "request_id": "6332b7ea700381000c191cd6",
  "total_count": 1,
  "events": [
    {
      "id": "6332b7eb673e44cc09b78c0e",
      "event_type": "event_member_update",
      "data": {
        "member_info": {
          "id": "632c66dbf4dc13000bed3f3b",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "city",
            "country": "country",
            "line2": "line2",
            "line1": "line1",
            "state": "state",
            "postal_code": "412307"
          },
          "phone_number": "+91-9898989898",
          "member_id": "jd",
          "member_status": "active",
          "member_tags": [
            "ab1",
            "ab2"
          ],
          "number_of_purchases": 4,
          "number_of_redemptions": 0,
          "birthdate": "09/09/1900",
          "enrollment_date": "09/22/2022",
          "last_modified_date": "09/27/2022",
          "first_purchase_date": "09/26/2022",
          "instagram_handle": "instaa",
          "last_purchase_date": "09/27/2022",
          "anniversary_date": "02/11/2020",
          "twitter_handle": "twitt",
          "preferred_language": "english",
          "tier_info": {
            "current_period_start": "2022-01-01 00:00:00",
            "loyalty_tier_name": "Gold",
            "qualifed_points": 0,
            "loyalty_tier_id": "zrl_gold",
            "current_period_end": "2022-12-31 23:59:59"
          },
          "lifetime_points_earned": 0,
          "lifetime_points_expired": 0,
          "available_points": 1060,
          "lifetime_points_deducted": 100,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/JOH81EEI",
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "revenue": 106,
          "aov": null,
          "deleted_date": null
        }
      }
    }
  ],
  "created_date": "27-Sep-2022 08:44:26"
}

Referral link shared event- via email or social channels

This event will occur when the referral link is shared through email or via social channels. Only the shared_event will change to email or Twitter; the rest of the payload will be the same. The payload is shown below:

{
  "request_id": "635f612657041f0011f38144",
  "total_count": 1,
  "events": [
    {
      "data": {
        "member_info": {
          "last_name": "Scott",
          "twitter_handle": "null",
          "revenue": 0,
          "lifetime_points_expired": 0,
          "last_modified_date": "10/17/2022",
          "available_points": 3400,
          "lifetime_points_earned": 3400,
          "referral_URL": "https://zinrelo.com/ref/ANNA2Q49X",
          "member_status": "active",
          "email_address": "[email protected]",
          "id": "632c664bf860bf0516e2d26f",
          "first_name": "Anna",
          "member_tags": [
            "referralshared",
            "referralapproved"
          ],
          "tier_info": {
            "current_period_start": null,
            "loyalty_tier_name": "Silver",
            "qualifed_points": 0,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": null
          },
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "first_purchase_date": null,
          "lifetime_points_deducted": 0,
          "phone_number": "",
          "instagram_handle": null,
          "aov": null,
          "address": {
            "city": "",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "",
            "postal_code": ""
          },
          "deleted_date": null,
          "last_purchase_date": null,
          "lifetime_points_redeemed": 0,
          "preferred_language": null,
          "number_of_purchases": 0,
          "number_of_redemptions": 0,
          "birthdate": null,
          "anniversary_date": null,
          "enrollment_date": "09/22/2022",
          "member_id": "anna.scott234"
        },
        "share_info": {
          "channel_shared": "email"
        },
        "email_share_info": {
          "friends_email": [
            "[email protected]",
            "[email protected]",
            "[email protected]"
          ]
        }
      },
      "event_type": "event_referral_link_share",
      "id": "634d3789f21e109d10119c57"
    }
  ],
  "created_date": "31-Oct-2022 05:46:14"
}

Note: When the referral is shared through social channels, the email_share_info will not be in the payload.

The payload will look like this:

{
  "request_id": "635f612657041f0011f38144",
  "total_count": 1,
  "events": [
    {
      "data": {
        "member_info": {
          "last_name": "Scott",
          "twitter_handle": "null",
          "revenue": 0,
          "lifetime_points_expired": 0,
          "last_modified_date": "10/17/2022",
          "available_points": 3400,
          "lifetime_points_earned": 3400,
          "referral_URL": "https://zinrelo.com/ref/ANNA2Q49X",
          "member_status": "active",
          "email_address": "[email protected]",
          "id": "632c664bf860bf0516e2d26f",
          "first_name": "Anna",
          "member_tags": [
            "referralshared",
            "referralapproved"
          ],
          "tier_info": {
            "current_period_start": null,
            "loyalty_tier_name": "Silver",
            "qualifed_points": 0,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": null
          },
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "first_purchase_date": null,
          "lifetime_points_deducted": 0,
          "phone_number": "",
          "instagram_handle": null,
          "aov": null,
          "address": {
            "city": "",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "",
            "postal_code": ""
          },
          "deleted_date": null,
          "last_purchase_date": null,
          "lifetime_points_redeemed": 0,
          "preferred_language": null,
          "number_of_purchases": 0,
          "number_of_redemptions": 0,
          "birthdate": null,
          "anniversary_date": null,
          "enrollment_date": "09/22/2022",
          "member_id": "anna.scott234"
        },
        "share_info": {
          "channel_shared": "twitter"
        }
      },
      "event_type": "event_referral_link_share",
      "id": "634d3789f21e109d10119c57"
    }
  ],
  "created_date": "31-Oct-2022 05:46:14"
}

Referral Success

This event will occur when the referred friend clicks on the referral link and makes his first purchase. The payload is shown below:

{
  "request_id": "635f612657041f0011f38144",
  "total_count": 1,
  "events": [
    {
      "id": "635f6170e0f1e71e69149016",
      "event_type": "event_referral_success",
      "data": {
        "friend_info": {
          "id": "634013e1353305617ee36e7f",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "",
            "postal_code": ""
          },
          "phone_number": "",
          "member_id": "jonhdoe567",
          "member_status": "active",
          "member_tags": [
            "firstpurchasemade",
            "referralclicked",
            ],
          "number_of_purchases": 27,
          "number_of_redemptions": 0,
          "birthdate": "02/04/2020",
          "enrollment_date": "10/07/2022",
          "last_modified_date": "10/31/2022",
          "first_purchase_date": "10/07/2022",
          "instagram_handle": null,
          "last_purchase_date": "10/31/2022",
          "anniversary_date": "05/03/2021",
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": null,
            "loyalty_tier_name": "Platinum",
            "qualifed_points": 10701,
            "loyalty_tier_id": "zrl_platinum",
            "current_period_end": null
          },
          "lifetime_points_earned": 10801,
          "lifetime_points_expired": 0,
          "available_points": 10801,
          "lifetime_points_deducted": 990,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/JOH7KX22",
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "revenue": 836,
          "aov": null,
          "deleted_date": null
        },
        "referrer_info": {
          "id": "632c664bf860bf0516e2d26f",
          "first_name": "Anna",
          "last_name": "Scott",
          "email_address": "[email protected]",
          "address": {
            "city": "",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "",
            "postal_code": ""
          },
          "phone_number": "",
          "member_id": "anna598",
          "member_status": "active",
          "member_tags": [
            "referralshared",
            "purchasemade",
            ],
          "number_of_purchases": 0,
          "number_of_redemptions": 0,
          "birthdate": null,
          "enrollment_date": "09/22/2022",
          "last_modified_date": "10/31/2022",
          "first_purchase_date": null,
          "instagram_handle": null,
          "last_purchase_date": null,
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": null,
            "loyalty_tier_name": "Gold",
            "qualifed_points": 0,
            "loyalty_tier_id": "zrl_gold",
            "current_period_end": null
          },
          "lifetime_points_earned": 3700,
          "lifetime_points_expired": 0,
          "available_points": 3700,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/JOHN2Q49X",
          "custom_attributes": {
            "STR_ATR_1": null
          },
          "revenue": 0,
          "aov": null,
          "deleted_date": null
        },
          "referral_success_activity_info": {
          "activity_id": "made_a_purchase",
          "activity_name": "Purchase on website",
          "order_info": {
            "order_total": 45,
            "tags": [
              "purchasemade"
            ],
            "order_id": "0_10_1669023177143",
            "approval_date": null,
            "pos_transaction_date": "2022-11-21 09:32:57.197000",
            "currency": "$",
            "order_subtotal": 150,
            "coupons": "6877BVD"
          }
        },
          "approval_date": null,
          "pos_transaction_date": "2022-10-31 05:46:12.977000",
          "currency": "$",
          "order_total": 45,
          "order_subtotal": 30.99
        },
       }
        ]
      }
    }
  ],
  "created_date": "31-Oct-2022 05:46:14"
}

Note: The order_info field will be null for all activities other than purchase activities.

Points Rejected

This event will occur whenever a user's pending points are rejected in moderation. The payload is shown below:

{
  "request_id": "638703763541f8001330bd45",
  "total_count": 1,
  "events": [
    {
      "id": "638703770abdeb4789f3f122",
      "event_type": "event_points_rejected",
      "data": {
        "member_info": {
          "id": "6387021a41e1880009742bf3",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "Pune",
            "country": "India",
            "line2": "Washington",
            "line1": "White house",
            "state": "maha",
            "postal_code": "411019"
          },
          "phone_number": "91-9876543211",
          "member_id": "john.doe23",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 0,
          "number_of_redemptions": 0,
          "birthdate": null,
          "enrollment_date": "11/30/2022",
          "last_modified_date": "11/30/2022",
          "first_purchase_date": null,
          "instagram_handle": null,
          "last_purchase_date": null,
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-03-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 0,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2023-02-28 23:59:59"
          },
          "referral_code": "SAM17GKN",
          "lifetime_points_earned": 10,
          "lifetime_points_expired": 0,
          "available_points": 10,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/JOH17GKN",
          "custom_attributes": {
            "City_Name": null,
            "Marital_Status": null,
            "Income_Source": null,
            "Age_In_Years": null,
            "Gender_Identity": null,
            "Graduation_Date": null,
            "User_Short_Biography": null
          },
          "revenue": 0,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "6387021cf9e076000d6c617d",
          "transaction_type": "award",
          "member_id": "john.doe23",
          "transaction_attributes": {
            "order_id": "order19510976",
            "coupon_code": "3199",
            "reason": null,
            "tags": [],
            "pow_01": null,
            "products": [
              {
                "product_id": "prod21",
                "product_price": "10",
                "product_title": "Shoes",
                "product_category": "Puma,shkoes,[email protected]#",
                "product_quantity": "1",
                "product_url": "http://www.website.com/product1.html",
                "product_image_url": "https://nyoobserver.files.wordpress.com/2014/03/walking-stick.jpg"
              },
              {
                "product_id": "prod1m",
                "product_price": "10",
                "product_title": "Stick",
                "product_category": "mugs,cups,sale",
                "product_quantity": "1",
                "product_url": "http://www.website.com/product1.html",
                "product_image_url": "https://nyoobserver.files.wordpress.com/2014/03/walking-stick.jpg"
              },
              {
                "product_id": "prod2m",
                "product_price": "10",
                "product_title": "Stick",
                "product_category": "mugs,cups,sale, floor, refresh",
                "product_quantity": "1",
                "product_url": "http://www.website.com/product1.html",
                "product_image_url": "https://nyoobserver.files.wordpress.com/2014/03/walking-stick.jpg"
              }
            ]
          },
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "approved_date": "",
          "last_modified_date": "30-Nov-2022 07:17:10",
          "created_date": "30-Nov-2022 07:11:24",
          "award_info": {
            "activity_id": "made_a_purchase",
            "activity_name": "Purchase on website",
            "points_status": "rejected",
            "points": 1
          },
          "points_expiration_date": "10-Dec-2022 07:11:24",
          "auto_approval_date": ""
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 07:17:10"
}

Winback Offer

The winback offer occurs when a user has been inactive for an extended period of time. The payload is shown below:

{
  "request_id": "638729c94f8f0345970b6d96",
  "total_count": 1,
  "events": [
    {
      "id": "63872a654f8f0345970b6d99",
      "event_type": "event_winback_offer",
      "data": {
        "member_info": {
          "id": null,
          "first_name": John,
          "last_name": Doe,
          "email_address": [email protected],
          "address": {
            "city": Pune,
            "country": India,
            "line2": Hadapsar,
            "line1": null,
            "state": Maharashtra,
            "postal_code": 412307
          },
          "phone_number": null,
          "member_id": john.doe23,
          "member_status": "active",
          "member_tags": null,
          "number_of_purchases": null,
          "number_of_redemptions": null,
          "birthdate": null,
          "enrollment_date": null,
          "last_modified_date": null,
          "first_purchase_date": null,
          "instagram_handle": null,
          "last_purchase_date": null,
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": null,
            "loyalty_tier_name": "",
            "qualifed_points": 0,
            "loyalty_tier_id": "",
            "current_period_end": null
          },
          "referral_code": null,
          "lifetime_points_earned": 0,
          "lifetime_points_expired": 0,
          "available_points": 0,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": null,
          "custom_attributes": {
            "STR_ATR_1": null,
            "Subscription Plan": null,
            "Active Camera": null
          },
          "revenue": null,
          "aov": null,
          "deleted_date": null
        },
        "offer_info": {
          "offer_valid_till": "11/30/2022, 15:30:41",
          "bonus_points": 100,
          "activity_to_complete": {
            "id": "63206d4d19da5f27de385ead",
            "activity_id": "made_a_purchase",
            "activity_name": "Purchase on website",
            "is_active": true,
            "approval_method": "immediate",
            "show_on_guest_dashboard": true,
            "activity_card_background_image_url": "",
            "enduser_activity_short_description": "Earn points for every dollar you spend in purchases.",
            "enduser_activity_description_html": "",
            "last_modified_date": "2022-11-23 10:29:40.340000",
            "created_date": "2022-09-13 11:45:17.584000",
            "is_qualified_for_tier_upgrade": true,
            "rules_config": [
              {
                "rule_type": "Fixed Points",
                "rule_value": 123,
                "is_active": false,
                "conditions_matching_policy": "match_all",
                "conditions": [
                  {
                    "operator": "Contain any of",
                    "attribute": "Transaction Tags",
                    "value": [
                      "winback",
                      "sendoffer"
                    ]
                  }
                ]
              }
            ],
            "activity_benefit_type": "points",
            "points_config": {
              "points_computation_type": "multiplier_based",
              "attribute_to_multiply": "order_subtotal",
              "multiplier": 1
            }
          }
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 10:00:41"
}

Available Rewards Reminder

The available rewards reminder event occurs when the user earns enough points to redeem rewards. The payload is shown below:

{
  "request_id": "638715523541f8001030bd4d",
  "total_count": 1,
  "events": [
    {
      "id": "638715525efcad6bb4286b21",
      "event_type": "event_available_rewards_reminder",
      "data": {
        "member_info": {
          "id": "63871549f9e07600094f2310",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "pune",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "mah",
            "postal_code": "422"
          },
          "phone_number": "9876543321",
          "member_id": "john.doe23",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 2,
          "number_of_redemptions": 0,
          "birthdate": null,
          "enrollment_date": "11/30/2022",
          "last_modified_date": "11/30/2022",
          "first_purchase_date": "11/30/2022",
          "instagram_handle": null,
          "last_purchase_date": "11/30/2022",
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-11-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 700,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2022-11-30 23:59:59"
          },
          "referral_code": "RES3FQN9",
          "lifetime_points_earned": 700,
          "lifetime_points_expired": 0,
          "available_points": 700,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/RES3FQN9",
          "custom_attributes": {
            "test_string_1": null,
            "number_number_1": null,
            "multiselect_list_1": null,
            "datepicker_date_1": null
          },
          "revenue": 200,
          "aov": null,
          "deleted_date": null
        },
        "reward_info": {
          "count": 1,
          "rewards": [
            {
              "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",
              "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",
              "show_on_guest_dashboard": false,
              "last_modified_date": "11/17/2022 11:40:31",
              "is_active": true,
              "product_url": "https://john-mystore.myshopify.com/products/battlefield",
              "reward_sub_type": "Product Redemption",
              "eligible_tiers_list": [
                "zrl_platinum",
                "zrl_gold",
                "zrl_silver"
              ],
              "created_date": "09/13/2022 11:06:54",
              "enduser_reward_short_description": "For {{POINTS}} points",
              "points_to_be_redeemed": 500,
              "reward_type": "Coupon Based Rewards",
              "redemption_eligibility_criteria": "Tier Based",
              "id": "6320644e3ef462000ccca295",
              "reward_id": "reward_e562f",
              "product_id": "prod-01"
            }
          ]
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 08:33:22"
}

Member OTP Generation

The member_otp_generation event occurs whenever a user requests an OTP for user authentication into the Zinrelo loyalty program. The payload is shown below:

{
  "request_id": "638706a8f9e076000d6c61f5",
  "total_count": 1,
  "events": [
    {
      "id": "638706a987c5ca4b159b837b",
      "event_type": "event_member_otp_generation",
      "data": {
        "member_info": {
          "id": "63805bc5d34967000d6a2c7f",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected],
          "address": {
            "city": "Pune",
            "country": "India",
            "line2": "Washington",
            "line1": "White house",
            "state": "maha",
            "postal_code": "411019"
          },
          "phone_number": "91-9876543211",
          "member_id": "john.doe23",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 13,
          "number_of_redemptions": 4,
          "birthdate": null,
          "enrollment_date": "11/25/2022",
          "last_modified_date": "11/30/2022",
          "first_purchase_date": "11/25/2022",
          "instagram_handle": null,
          "last_purchase_date": "11/30/2022",
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-03-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 13,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2023-02-28 23:59:59"
          },
          "referral_code": "TES7GQL4",
          "lifetime_points_earned": 514116,
          "lifetime_points_expired": 0,
          "available_points": 485762,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 28354,
          "referral_URL": "https://zinrelo.com/ref/TES7GQL4",
          "custom_attributes": {
            "City_Name": null,
            "Marital_Status": null,
            "Income_Source": null,
            "Age_In_Years": null,
            "Gender_Identity": null,
            "Graduation_Date": null,
            "User_Short_Biography": null
          },
          "revenue": 13,
          "aov": null,
          "deleted_date": null
        },
        "otp_info": {
          "otp": "470393",
          "minutes_valid": 5,
          "valid_till": "11/30/2022, 07:35:48"
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 07:30:48"
}

Points Earned

The points earned event occurs when the user earns points for any activity. The payload is shown below:

{
  "request_id": "63871551f9e076000d6c626a",
  "total_count": 1,
  "events": [
    {
      "id": "6387155202d249911cff91bd",
      "event_type": "event_points_earned",
      "data": {
        "member_info": {
          "id": "63871549f9e07600094f2310",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "pune",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "mah",
            "postal_code": "422"
          },
          "phone_number": "9876543321",
          "member_id": "john.doe23",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 2,
          "number_of_redemptions": 0,
          "birthdate": null,
          "enrollment_date": "11/30/2022",
          "last_modified_date": "11/30/2022",
          "first_purchase_date": "11/30/2022",
          "instagram_handle": null,
          "last_purchase_date": "11/30/2022",
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-11-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 700,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2022-11-30 23:59:59"
          },
          "referral_code": "RES3FQN9",
          "lifetime_points_earned": 700,
          "lifetime_points_expired": 0,
          "available_points": 700,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/RES3FQN9",
          "custom_attributes": {
            "test_string_1": null,
            "number_number_1": null,
            "multiselect_list_1": null,
            "datepicker_date_1": null
          },
          "revenue": 200,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "63871551f9e076000d6c6266",
          "transaction_type": "award",
          "member_id": "john.doe23",
          "transaction_attributes": {
            "order_id": "order7675620",
            "coupon_code": "",
            "reason": null,
            "tags": [],
            "web_string_1": null,
            "web_date_1": null,
            "web_number_1": null,
            "web_list_1": null,
            "products": [
              {
                "product_id": "prod-01",
                "product_price": "10",
                "product_title": "mugs ball",
                "product_category": "mugs, ball",
                "product_quantity": "1",
                "product_url": "http://www.website.com/product1.html",
                "product_image_url": "http://www.neilbrothers.co.uk/images/mugs/durham-dark-blue.png"
              },
              {
                "product_id": "prod-02",
                "product_price": "20",
                "product_title": "sticks",
                "product_category": "sticks",
                "product_quantity": "1",
                "product_url": "http://www.website.com/product1.html",
                "product_image_url": "https://nyoobserver.files.wordpress.com/2014/03/walking-stick.jpg"
              },
              {
                "product_id": "prod-03",
                "product_price": "35",
                "product_title": "bucket",
                "product_category": "bucket",
                "product_quantity": "2",
                "product_url": "http://www.website.com/product1.html",
                "product_image_url": "https://nyoobserver.files.wordpress.com/2014/03/walking-stick.jpg"
              }
            ]
          },
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "approved_date": "30-Nov-2022 08:33:21",
          "last_modified_date": "30-Nov-2022 08:33:21",
          "created_date": "30-Nov-2022 08:33:21",
          "award_info": {
            "activity_id": "made_a_purchase",
            "activity_name": "Purchase on website",
            "points_status": "approved",
            "points": 300
          },
          "points_expiration_date": "01-Dec-2022 08:33:21",
          "auto_approval_date": ""
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 08:33:21"
}

Note: In the case of "submit_a_receipt" activity, the response will show "receipt_uid" in the "additional_data" field.

Points Expiration Reminder

The points expiration reminder occurs whenever a user's points are about to expire. The payload is shown below:

{
  "request_id": "637cc4a7e332e9d94de7fd95",
  "total_count": 1,
  "events": [
    {
      "id": "637cc4a8f674a0b9d34dcaed",
      "event_type": "event_points_expiration_reminder",
      "data": {
        "member_info": {
          "id": "637bb8ca6191c1000df60a78",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "pune",
            "country": "",
            "line2": "",
            "line1": "",
            "state": "mah",
            "postal_code": "422"
          },
          "phone_number": "9876543321",
          "member_id": "john.doe23",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 3,
          "number_of_redemptions": 0,
          "birthdate": null,
          "enrollment_date": "11/21/2022",
          "last_modified_date": "11/22/2022",
          "first_purchase_date": "11/21/2022",
          "instagram_handle": null,
          "last_purchase_date": "11/22/2022",
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-11-01 00:00:00",
            "loyalty_tier_name": "Gold",
            "qualifed_points": 1600,
            "loyalty_tier_id": "zrl_gold",
            "current_period_end": "2022-11-30 23:59:59"
          },
          "lifetime_points_earned": 3100,
          "lifetime_points_expired": 0,
          "available_points": 3100,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/UPD0ZJGL",
          "custom_attributes": {
            "test_string_1": null,
            "number_number_1": null,
            "multiselect_list_1": null,
            "datepicker_date_1": null
          },
          "revenue": 300,
          "aov": null,
          "deleted_date": null
        },
        "expiry_info": {
          "expiration_date": "November 24, 2022",
          "points": 3100,
          "days_to_expire": 2
        }
      }
    }
  ],
  "created_date": "22-Nov-2022 12:46:31"
}

Rewards within Reach Reminder

The rewards within reach reminder event occurs whenever a user earns 80% of the required points to redeem the reward. The payload is shown below:

{
  "request_id": "63870b381f4a31001325c48b",
  "total_count": 1,
  "events": [
    {
      "id": "63870b3918f3ba1e30ef2076",
      "event_type": "event_rewards_within_reach_reminder",
      "data": {
        "member_info": {
          "id": "63870ad3f9e076000b1ab907",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "Pune",
            "country": "India",
            "line2": "Washington",
            "line1": "White house",
            "state": "maha",
            "postal_code": "411019"
          },
          "phone_number": "91-9876543211",
          "member_id": "john.doe23",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 1,
          "number_of_redemptions": 0,
          "birthdate": null,
          "enrollment_date": "11/30/2022",
          "last_modified_date": "11/30/2022",
          "first_purchase_date": "11/30/2022",
          "instagram_handle": null,
          "last_purchase_date": "11/30/2022",
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-03-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 1190,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2023-02-28 23:59:59"
          },
          "referral_code": "SAM02XIU",
          "lifetime_points_earned": 1200,
          "lifetime_points_expired": 0,
          "available_points": 1200,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/SAM02XIU",
          "custom_attributes": {
            "City_Name": null,
            "Marital_Status": null,
            "Income_Source": null,
            "Age_In_Years": null,
            "Gender_Identity": null,
            "Graduation_Date": null,
            "User_Short_Biography": null
          },
          "revenue": 1190,
          "aov": null,
          "deleted_date": null
        },
        "reward_info": {
          "count": 1,
          "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",
              "earning_period_operator": "Lifetime",
              "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": "https://d1qbqkkh49kht1.cloudfront.net/86d0f83a4a99cc52c5cb04c4a4509bc2.jpeg",
              "implementation_type": "coupon_code",
              "is_active": true,
              "show_on_guest_dashboard": false,
              "last_modified_date": "11/29/2022 08:36:05",
              "points_earned": 1,
              "reward_name": "₹5 OFF COUPON",
              "id": "62e90f019396a278eb9baf66",
              "reward_sub_type": "Fixed Amount Discount",
              "created_date": "08/02/2022 11:48:17",
              "enduser_reward_short_description": "For {{POINTS}} points",
              "points_to_be_redeemed": 1500,
              "reward_type": "Coupon Based Rewards",
              "redemption_eligibility_criteria": "Points Based",
              "points_earned_operator": "Greater Than",
              "reward_id": "reward_c852d",
              "reward_value": "5"
            }
          ]
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 07:50:16"
}

Member Deleted

The member delete event occurs whenever a single user is deleted from the admin console. The payload is shown below:

{
  "request_id": "638709f51f4a31000f25c480",
  "total_count": 1,
  "events": [
    {
      "id": "638709f76a5ef7c29cdca273",
      "event_type": "event_member_delete",
      "data": {
        "member_info": {
          "member_id": "[email protected]"
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 07:44:53"
}

Multiple Events for Points Rejected

The multiple points rejected event occurs whenever more than one user's pending points are rejected in moderation. The payload is shown below:

{
  "request_id": "638705ba3541f8000e30bd4d",
  "total_count": 2,
  "events": [
    {
      "id": "638705bb87c5ca4b159b8373",
      "event_type": "event_points_rejected",
      "data": {
        "member_info": {
          "id": "63805f96d34967000b5111ed",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "Superior",
            "country": "US",
            "line2": "",
            "line1": "1000 S. McCaslin Blvd., Suite 301",
            "state": "CO",
            "postal_code": ""
          },
          "phone_number": "+82-1234567890",
          "member_id": "john.doe23",
          "member_status": "active",
          "member_tags": [
            "rejected",
            "pushedback",
            "purchaserejected"
                      ],
          "number_of_purchases": 0,
          "number_of_redemptions": 0,
          "birthdate": "01/31/1900",
          "enrollment_date": "11/25/2022",
          "last_modified_date": "11/25/2022",
          "first_purchase_date": null,
          "instagram_handle": "anything",
          "last_purchase_date": null,
          "anniversary_date": "11/25/2022",
          "twitter_handle": "iuytry*&^%$漢字ës",
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-03-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 0,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2023-02-28 23:59:59"
          },
          "referral_code": "K1718C2A",
          "lifetime_points_earned": 100,
          "lifetime_points_expired": 0,
          "available_points": 100,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/K1718C2A",
          "custom_attributes": {
            "City_Name": null,
            "Marital_Status": null,
            "Income_Source": null,
            "Age_In_Years": null,
            "Gender_Identity": null,
            "Graduation_Date": null,
            "User_Short_Biography": null
          },
          "revenue": 0,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "63806091d34967000a27a8c0",
          "transaction_type": "award",
          "member_id": "john.doe23",
          "transaction_attributes": {
            "order_id": "N17987314111q1ewy28971",
            "coupon_code": "a",
            "reason": "THird",
            "tags": [
              "purchasereturned",
              "rejected"
            ],
            "pow_01": null,
            "products": [
              {
                "product_id": "9801198",
                "product_price": "50",
                "product_title": "RelaxedFitSweatshirt-Mintgreen",
                "product_category": "Essentials",
                "product_quantity": "1",
                "product_url": null,
                "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/[email protected]?v=1528970252"
              },
              {
                "product_id": "98012",
                "product_price": "25",
                "product_title": "Sweatshirt",
                "product_category": "Sale",
                "product_quantity": "2",
                "product_url": null,
                "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/[email protected]?v=1528970252"
              }
            ],
            "order_subtotal": 1,
            "order_total": 110,
            "coupons": "a",
            "currency": "$"
          },
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "approved_date": "",
          "last_modified_date": "30-Nov-2022 07:26:50",
          "created_date": "25-Nov-2022 06:28:32",
          "award_info": {
            "activity_id": "made_a_purchase",
            "activity_name": "Purchase on website",
            "points_status": "rejected",
            "points": 1
          },
          "points_expiration_date": "05-Dec-2022 06:28:32",
          "auto_approval_date": ""
        }
      }
    },
    {
      "id": "638705bb87c5ca4b159b8374",
      "event_type": "event_points_rejected",
      "data": {
        "member_info": {
          "id": "63805f2ad34967000b5111e2",
          "first_name": "Anna",
          "last_name": "Scott",
          "email_address": "[email protected]",
          "address": {
            "city": "Superior",
            "country": "US",
            "line2": "",
            "line1": "1000 S. McCaslin Blvd., Suite 301",
            "state": "CO",
            "postal_code": ""
          },
          "phone_number": "+82-1234567890",
          "member_id": "[email protected]",
          "member_status": "active",
          "member_tags": [
            "maderejected",
            "rejected"
          ],
          "number_of_purchases": 0,
          "number_of_redemptions": 0,
          "birthdate": "01/31/1900",
          "enrollment_date": "11/25/2022",
          "last_modified_date": "11/25/2022",
          "first_purchase_date": null,
          "instagram_handle": "instagram.com/Anna",
          "last_purchase_date": null,
          "anniversary_date": "11/25/2022",
          "twitter_handle": "iuytry*&^%$漢字ës",
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-03-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 0,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2023-02-28 23:59:59"
          },
          "referral_code": "K171XD9M",
          "lifetime_points_earned": 100,
          "lifetime_points_expired": 0,
          "available_points": 100,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 0,
          "referral_URL": "https://zinrelo.com/ref/K171XD9M",
          "custom_attributes": {
            "City_Name": null,
            "Marital_Status": null,
            "Income_Source": null,
            "Age_In_Years": null,
            "Gender_Identity": null,
            "Graduation_Date": null,
            "User_Short_Biography": null
          },
          "revenue": 0,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "638060e7d34967000a27a8d9",
          "transaction_type": "award",
          "member_id": "[email protected]",
          "transaction_attributes": {
            "order_id": "N17987314111q1eswy28971",
            "coupon_code": "a",
            "reason": "THird",
            "tags": [
              "reject",
              "rejectionmade"
            ],
            "pow_01": null,
            "products": [
              {
                "product_id": "9801198",
                "product_price": "50",
                "product_title": "RelaxedFitSweatshirt-Mintgreen",
                "product_category": "Essentials",
                "product_quantity": "1",
                "product_url": null,
                "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/[email protected]?v=1528970252"
              },
              {
                "product_id": "98012",
                "product_price": "25",
                "product_title": "Sweatshirt",
                "product_category": "Sale",
                "product_quantity": "2",
                "product_url": null,
                "product_image_url": "https://cdn.shopify.com/s/files/1/1617/6377/products/[email protected]?v=1528970252"
              }
            ],
            "order_subtotal": 1,
            "order_total": 110,
            "coupons": "a",
            "currency": "$"
          },
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "approved_date": "",
          "last_modified_date": "30-Nov-2022 07:26:50",
          "created_date": "25-Nov-2022 06:29:59",
          "award_info": {
            "activity_id": "made_a_purchase",
            "activity_name": "Purchase on website",
            "points_status": "rejected",
            "points": 1
          },
          "points_expiration_date": "05-Dec-2022 06:29:59",
          "auto_approval_date": ""
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 07:26:50"
}

Multiple Events Points Earned

The multiple points earned event occurs whenever more than one user's pending points are approved in moderation. The payload is shown below:

{
  "request_id": "638706181f4a31001225c480",
  "total_count": 2,
  "events": [
    {
      "id": "6387061987c5ca4b159b8377",
      "event_type": "event_points_earned",
      "data": {
        "member_info": {
          "id": "63805bc5d34967000d6a2c7f",
          "first_name": "Anna",
          "last_name": "Scott",
          "email_address": "[email protected]",
          "address": {
            "city": "Pune",
            "country": "India",
            "line2": "Washington",
            "line1": "White house",
            "state": "maha",
            "postal_code": "411019"
          },
          "phone_number": "91-9876543211",
          "member_id": "annascott46778",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 13,
          "number_of_redemptions": 4,
          "birthdate": null,
          "enrollment_date": "11/25/2022",
          "last_modified_date": "11/30/2022",
          "first_purchase_date": "11/25/2022",
          "instagram_handle": null,
          "last_purchase_date": "11/30/2022",
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-03-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 13,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2023-02-28 23:59:59"
          },
          "referral_code": "TES7GQL4",
          "lifetime_points_earned": 514116,
          "lifetime_points_expired": 0,
          "available_points": 485762,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 28354,
          "referral_URL": "https://zinrelo.com/ref/TES7GQL4",
          "custom_attributes": {
            "City_Name": null,
            "Marital_Status": null,
            "Income_Source": null,
            "Age_In_Years": null,
            "Gender_Identity": null,
            "Graduation_Date": null,
            "User_Short_Biography": null
          },
          "revenue": 13,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "63805bc7d34967000c755c8d",
          "transaction_type": "award",
          "member_id": "annascott46778",
          "transaction_attributes": {
            "order_id": "order11990845",
            "coupon_code": "3199",
            "reason": null,
            "tags": [],
            "pow_01": null,
            "products": [
              {
                "product_id": "prod21",
                "product_price": "10",
                "product_title": "Shoes",
                "product_category": "Puma,shkoes,[email protected]#",
                "product_quantity": "1",
                "product_url": "http://www.website.com/product1.html",
                "product_image_url": "https://nyoobserver.files.wordpress.com/2014/03/walking-stick.jpg"
              },
              {
                "product_id": "prod1m",
                "product_price": "10",
                "product_title": "Stick",
                "product_category": "mugs,cups,sale",
                "product_quantity": "1",
                "product_url": "http://www.website.com/product1.html",
                "product_image_url": "https://nyoobserver.files.wordpress.com/2014/03/walking-stick.jpg"
              },
              {
                "product_id": "prod2m",
                "product_price": "10",
                "product_title": "Stick",
                "product_category": "mugs,cups,sale, floor, refresh",
                "product_quantity": "1",
                "product_url": "http://www.website.com/product1.html",
                "product_image_url": "https://nyoobserver.files.wordpress.com/2014/03/walking-stick.jpg"
              }
            ]
          },
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "approved_date": "30-Nov-2022 07:28:23",
          "last_modified_date": "30-Nov-2022 07:28:23",
          "created_date": "25-Nov-2022 06:08:07",
          "award_info": {
            "activity_id": "made_a_purchase",
            "activity_name": "Purchase on website",
            "points_status": "approved",
            "points": 1
          },
          "points_expiration_date": "07-Dec-2022 14:54:58",
          "auto_approval_date": ""
        }
      }
    },
    {
      "id": "6387061987c5ca4b159b8378",
      "event_type": "event_points_earned",
      "data": {
        "member_info": {
          "id": "63805bc5d34967000d6a2c7f",
          "first_name": "John",
          "last_name": "Doe",
          "email_address": "[email protected]",
          "address": {
            "city": "Pune",
            "country": "India",
            "line2": "Washington",
            "line1": "White house",
            "state": "maha",
            "postal_code": "411019"
          },
          "phone_number": "91-9876543211",
          "member_id": "john.doe23",
          "member_status": "active",
          "member_tags": [],
          "number_of_purchases": 13,
          "number_of_redemptions": 4,
          "birthdate": null,
          "enrollment_date": "11/25/2022",
          "last_modified_date": "11/30/2022",
          "first_purchase_date": "11/25/2022",
          "instagram_handle": null,
          "last_purchase_date": "11/30/2022",
          "anniversary_date": null,
          "twitter_handle": null,
          "preferred_language": null,
          "tier_info": {
            "current_period_start": "2022-03-01 00:00:00",
            "loyalty_tier_name": "Silver",
            "qualifed_points": 13,
            "loyalty_tier_id": "zrl_silver",
            "current_period_end": "2023-02-28 23:59:59"
          },
          "referral_code": "TES7GQL4",
          "lifetime_points_earned": 514116,
          "lifetime_points_expired": 0,
          "available_points": 485762,
          "lifetime_points_deducted": 0,
          "lifetime_points_redeemed": 28354,
          "referral_URL": "https://zinrelo.com/ref/TES7GQL4",
          "custom_attributes": {
            "City_Name": null,
            "Marital_Status": null,
            "Income_Source": null,
            "Age_In_Years": null,
            "Gender_Identity": null,
            "Graduation_Date": null,
            "User_Short_Biography": null
          },
          "revenue": 13,
          "aov": null,
          "deleted_date": null
        },
        "transaction_info": {
          "id": "63805f2b04d91e0012341d8f",
          "transaction_type": "award",
          "member_id": "john.doe23",
          "transaction_attributes": {
            "reason": "pointearned",
            "tags": []
          },
          "approver_details": {
            "approver_id": null,
            "approver_name": "System"
          },
          "approved_date": "30-Nov-2022 07:28:23",
          "last_modified_date": "30-Nov-2022 07:28:23",
          "created_date": "25-Nov-2022 06:22:35",
          "award_info": {
            "activity_id": "referral",
            "activity_name": "Refer a Friend",
            "points_status": "approved",
            "points": 9999
          },
          "points_expiration_date": "07-Dec-2022 14:54:58",
          "auto_approval_date": ""
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 07:28:24"
}

Multiple Member Delete

The multiple member delete event occurs whenever more than one user is deleted from the admin console. The payload is shown below:

{
  "request_id": "63870a9c3541f8001430bd45",
  "total_count": 8,
  "events": [
    {
      "id": "63870a9d18f3ba1e30ef2069",
      "event_type": "event_member_delete",
      "data": {
        "member_info": {
          "member_id": "anna.scott46778"
        }
      }
    },
    {
      "id": "63870a9d18f3ba1e30ef206a",
      "event_type": "event_member_delete",
      "data": {
        "member_info": {
          "member_id": "john.doe23"
        }
      }
    },
    {
      "id": "63870a9d18f3ba1e30ef206b",
      "event_type": "event_member_delete",
      "data": {
        "member_info": {
          "member_id": "john4598"
        }
      }
    },
    {
      "id": "63870a9d18f3ba1e30ef206c",
      "event_type": "event_member_delete",
      "data": {
        "member_info": {
          "member_id": "scott25792"
        }
      }
    },
    {
      "id": "63870a9d18f3ba1e30ef206d",
      "event_type": "event_member_delete",
      "data": {
        "member_info": {
          "member_id": "anna.scott489709"
        }
      }
    },
    {
      "id": "63870a9d18f3ba1e30ef206e",
      "event_type": "event_member_delete",
      "data": {
        "member_info": {
          "member_id": "johndoe34957"
        }
      }
    },
    {
      "id": "63870a9d18f3ba1e30ef206f",
      "event_type": "event_member_delete",
      "data": {
        "member_info": {
          "member_id": "anna136989"
        }
      }
    },
    {
      "id": "63870a9d18f3ba1e30ef2070",
      "event_type": "event_member_delete",
      "data": {
        "member_info": {
          "member_id": "john76455"
        }
      }
    }
  ],
  "created_date": "30-Nov-2022 07:47:40"
}