v1

latestOpenAPI 3.0.22026-07-2645239950.4 KB

Create a Loyalty Member API

post/members

Query parameters

languagestring

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

Request body

member_idstring required

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

first_namestring
<p>First name of the loyalty member.</p> <p><strong>Please Note:</strong> The first name should be less than 100 characters.</p>
last_namestring
<p>Last name of the loyalty member.</p> <p><strong>Please Note:</strong> The last name should be less than 100 characters.</p>
email_addressstring
<p>Email address of the loyalty member. You will not be able to use Zinrelo"s in-built email notifications if this field is not set.</p> <p><strong>Note:</strong> Optional, if this is not marked as a unique field.</p>
phone_numberstring
<p>Phone number of the loyalty member. Format : &lt;+COUNTRY CODE - PHONE NUMBER&gt; E.g : +1-7203332525 COUNTRY CODE defaults to +1</p> <p><strong>Note:</strong> Optional, if this is not marked as a unique field. REQUIRED if marked as unique.</p>
birthdatestring
<p>Birthdate of the loyalty member. Format : &lt;MM/DD/YYYY&gt;</p> <p><strong>Note:</strong> Our API records all date and time fields in UTC time.</p>
anniversary_datestring
<p>Wedding anniversary date of the loyalty member. Format : &lt;MM/DD/YYYY&gt;</p> <p><strong>Note:</strong> Our API records all date and time fields in UTC time.</p>
twitter_handlestring

Twitter username of the loyalty member.

preferred_languagestring

Enter your preferred language.

instagram_handlestring

Instagram username of the loyalty member.

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 Zinrelo identify the friend who referred this member.

member_tagsstring[]
<p>List of tags that you"d want to tag this member with.</p> <p><strong>IMPORTANT:</strong> 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.</p>
email_subscription_statusstring

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

member_statusstring
<p>Accepted values in the request are <strong>"active" , "blocked", "opted_out".</strong> Default is "active". <strong>"active"</strong> member is the one accumulating loyalty points and has access to rewards and earning opportunities. <strong>"blocked"</strong> member is prohibited from participating in the program.<strong> "opted_out"</strong> member is the one who has chosen to opt out of the loyalty program. </p>
current_tier_idstring

The ID of the tier the member should be assigned.

custom_attributesstring json
<p>Apart from the above parameters, you can also pass in custom attributes that you want Zinrelo 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: <br />&ldquo;custom_attributes&rdquo;: {"wishlist" : ["shirt", "t-shirt"], "preferred stores" : ["USA", "France"] }</p>

Example request

{
  "phone_number": "+91-##########",
  "birthdate": "08/26/1979",
  "anniversary_date": "12/06/2020",
  "preferred_language": "english",
  "address": {
    "city": "Superior",
    "country": "US",
    "line2": "",
    "line1": "1000 S. McCaslin Blvd., Suite 301",
    "state": "CO",
    "postal_code": "12345"
  },
  "current_tier_id": "zrl_silver"
}

Response

200

successboolean

Example response

{
  "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": {
      "tier_qualification_units": 100,
      "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  9:24:29",
        "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",
    "churn_status": "low_risk",
    "anniversary_date": "07/07/2021",
    "enrollment_date": "03/10/2023 09:24:28",
    "member_id": "greatMRT01003012",
    "email_subscription_status": "subscribed"
  },
  "success": true
}