The members object will contain all the member details and attributes that a member has. This includes the predefined attributes as well as the custom attributes defined in the Zinrelo admin console.

A sample JSON of the members object is shown below.

{
            "id" : "507f1f77bcf86cd799439011", 
            "member_id" : " 7203332525",
            "first_name" : "John",
            "last_name" :"Doe",
             "email_address" : "[email protected]",
             "phone_number" : "+1-7203332525",
             "birthdate" : "04/16/1989",
             "wedding_anniversary_date" : "04/17/2019",
             "twitter_handle" : "johndoe",
             "instagram_handle" : "johnd16",
             "gender" : "male",
             "address" : { 
                         "city" : "Superior",
                         "country": "US",
                         "line1": "1000 S. McCaslin Blvd., Suite 301 ",
                         "line2": "",
                         "postal_code": "80027",
                         "state": "CO"
              }, 

             "available_points" : "1000", 
             "lifetime_points_earned" : "10000",
             "lifetime_points_redeemed" : "9000",
             "lifetime_points_expired" : "0", 
             "lifetime_points_deducted" : "0",
             "number_of_activities" : "4",
             "number_of_redemptions" : "1",
             "points_expiration_schedule" : [
                          {"expiration_date" : "01/20/2022 19:50:40" , "points_to_expire" : 500}
                ], 
                "tier_info" : {
                          "current_tier" : "Gold", 
                          "current_tier_ID" : "zrl_gold",
                          "current_period_start" : "01/01/2021",
                          "current_period_end" : "12/31/2021",
                          "tier_movements" : [
                                  {
                                    "date": "05/21/2021", 
                                    "old_tier_ID" :"zrl_bronze", 
                                    "old_tier" : "Bronze",                    
                                    "new_tier_ID" : "zrl_silver",
                                    "new_tier" : "Silver",
                                  }, 
                                  {
                                    "date": "07/29/2021", 
                                    "old_tier_ID"  :"zrl_silver", 
                                    "old_tier" : "Silver",                    
                                    "new_tier_ID" : "zrl_gold",
                                    "new_tier" : "Gold"
                                  }  
                          ]
              }, 
           
              "referral_code" : "JDO786", 
              "referral_URL" : "https://store.zinrelo.com/raf/JDO786", 
              "number_of_referred_friends" : "3", 
              "referred_friends" : ["50bcf86cd7f1f77799411390", "1f77bcf8507f6cd739011994", 
                                                          "39011507f1f77bcf86cd7994"],
            
               "referrer_ID" : "", 
               "referrer_code" : "", 
               "referrer_name" : "", 

               "enrolment_date" : "07/29/2020 16:47:40", 
               "last_modified_date" : "12/29/2021 16:47:40", 
               "deleted_date" : "",
               "member_status" : "active", 
               "has_opted_out" : "false",
               "email_subscription_status" : "subscribed", 
               "member_tags" : ["Loyal", "RepeatUser",  "HighSpenders"], 

               "aov" : "$64.00", 
               "revenue" : "$1,090.00", 
               "first_purchase_date" : "",
               "last_purchase_date" : "", 
               "number_of_purchases" : "$325.00",
               "custom_attributes" : {.....}  
  }

The members resource will have the following API endpoints:

  • Create a loyalty member: This endpoint will create a loyalty member.
  • Retrieve a loyalty member: This endpoint will retrieve a loyalty member object identified by the :id or :member_id.
  • Update a loyalty member: This endpoint will update the specified member by setting the values of the parameters passed. Any parameters not passed will be left unchanged.
  • Delete a loyalty member: This API endpoint will soft delete the loyalty member.
  • List all members: This API endpoint returns a list of all members. By default, the members are returned sorted by enrollment_date, with the most recent members appearing first.