v1

latestOpenAPI 3.0.22026-07-2645239950.4 KB

post/members/{member_id}

Request body

member_idstring
<p>Enter the member ID.</p> <p>Tags, email address and custom attributes from the new account will take precedence during the merge.</p> <p>Any transactions associated with the current member will be transferred to the account corresponding to the new Member ID.</p>
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

Email address of the loyalty member.

phone_numberstring

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

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>
preferred_languagestring

Enter your preferred language.

twitter_handlestring

Twitter username of the loyalty member.

instagram_handlestring

Instagram username of the loyalty member.

referral_codestring

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

member_tagsstring[]
<p>List of tags that you&rsquo;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.

member_statusstring
<p>Accepted values in the request are <strong>&lsquo;active&rsquo; , &lsquo;blocked&rsquo;, &lsquo;opted_out&rsquo;.</strong> Default is &lsquo;active&rsquo;. <strong>&lsquo;active&rsquo;</strong> member is the one accumulating loyalty points and has access to rewards and earning opportunities. <strong>&lsquo;blocked&rsquo;</strong> member is prohibited from participating in the program.<strong> &lsquo;opted_out&rsquo;</strong> member is the one who has chosen to opt out of the loyalty program.&nbsp;</p> <p><strong>opted_out</strong> and/or <strong>blocked </strong>members can become active by passing member_status as<strong> 'active'.</strong></p>
current_tier_idstring
<p><span style="font-weight: 400;">The ID of the tier to which the member should be assigned.</span></p> <p><strong>IMPORTANT:&nbsp;</strong></p> <p><span style="font-weight: 400;">If the tier that you want to assign this member to is lower than the member&rsquo;s existing tier (Tier downgrade scenario), the next time the member earns points, Zinrelo will recalculate the qualified points to check whether the member is eligible for a tier upgrade. If the tier that you want to assign this member to, is higher than the member&rsquo;s existing tier (Tier Upgrade scenario), the next time this member is penalized by means of a &lsquo;Deduct&rsquo; transaction, Zinrelo will recalculate the qualified points to check whether the member has enough points to be on the higher tier or else, this member will be downgraded.&nbsp;</span></p> <p><span style="font-weight: 400;">If you have period based tiers, at the end of every interval, Zinrelo will check whether the member has enough qualified points to be on a certain tier. If a member does not have enough qualified points, they will be downgraded.</span></p>
custom_attributesstring json

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

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

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

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_gold"
}

Response

200

lifetime_points_earnedinteger

The total points earned in a member's account since he joined the program.

twitter_handlestring

The twitter handle of the member.

revenueinteger

The total revenue earned by the member.

lifetime_points_expiredinteger

The total points expired from a member's account since he joined the program.

last_modified_datestring

The most recent date on which a member's profile was updated.

available_pointsinteger

The avaliable points of the member.

pending_pointsinteger

The pending points of the member.

last_namestring

The last name of the member.

referral_URLstring

The unique referral url of the member.

member_statusstring

The current status of the member- ‘active’ , ‘blocked’, ‘opted_out’. ‘active’ member is the one accumulating loyalty points and has access to rewards and earning opportunities. ‘blocked’ member is prohibited from participating in the program. ‘opted_out’ member is the one who has chosen to opt out of the loyalty program.

referral_codestring

The unique referral code of the member.

email_addressstring

The email address of the member.

idstring

The internal ID generated by Zinrelo.

first_namestring

The first name of the member.

number_of_activitiesstring

Number of activities performed by a member.

member_tagsstring[]

The tags assocaited with a member.

referrer_codestring

The coupon code assigned to the referee for referring the friend.

{"stackTrail":"components:schemas:update-member-with-member-id-data-object:properties:custom_attributes","oasType":"schema","type":"unknown","description":"By utilizing custom attributes, you can define attributes for both members and transactions. You can leverage these attributes for personalization and reporting purposes. For more details, refer- https://help.zinrelo.com/docs/custom-attributes"}
referrer_IDstring

The unique transaction ID associated with the referee.

first_purchase_datestring

The first purchase date of the member.

lifetime_points_deductedinteger

The total points deducted from a member's account since he joined the program.

phone_numberstring

The phone number of the member.

instagram_handlestring

The instagram handle of the member.

referrer_namestring

The name of the person who referred.

aovinteger

The Average Order Value (AOV) is a metric used in business to determine the average total amount spent by customers in a single transaction or purchase. It's calculated by dividing the total revenue generated from sales by the total number of purchases made during a specific period.

deleted_datestring

The date on which a member is deleted. In this case, the value will be null because it is a member creation API.

last_purchase_datestring

The last purchase date of the member.

lifetime_points_redeemedinteger

The total points redeemed from a member's account since he joined the program.

preferred_languagestring

The preferred language of the member.

number_of_purchasesinteger

The number of purchases made by a member.

number_of_redemptionsinteger

The number of redemptions made by a member.

birthdatestring

Birthdate of the loyalty member. Expected date format: MM/DD/YYYY or MM/DD Irrespective of the year passed, 1904 will be set as a default value.

anniversary_datestring

The anniversary date of the member. Expected date format: MM/DD/YYYY or MM/DD In case, where a year has not been passed the default year will be set as 1904.

enrollment_datestring

The date on which the member joined the loyalty program.

member_idstring

The unique identifier of the member defined by an Admin.

email_subscription_statusstring

The subscription status of the email. If ‘unsubscribed’, the member will not receive any email notifications triggered by Zinrelo. Default value is ‘subscribed’.

Example response

{
  "lifetime_points_earned": 10000,
  "twitter_handle": "www.twitter.com/john",
  "revenue": 0,
  "lifetime_points_expired": 0,
  "last_modified_date": "02/07/2023 06:00:05",
  "available_points": 10000,
  "last_name": "Doe",
  "referral_URL": "https://zinrelo.com/ref/JOH4N54C",
  "member_status": "active",
  "referral_code": "JOH4N54C",
  "email_address": "johndoe@gmail.com",
  "id": "63e1e8e47d5790000dc0c81b",
  "first_name": "John",
  "number_of_activities": "",
  "member_tags": [
    "memberadded",
    "membercreated"
  ],
  "referrer_code": "ANA855D6",
  "tier_info": {
    "tier_qualification_units": 0,
    "current_period_start": "03/01/2022",
    "loyalty_tier_name": "Silver",
    "loyalty_tier_id": "zrl_silver",
    "current_period_end": "02/28/2023",
    "qualified_points": 1000
  },
  "custom_attributes": {
    "City_Name": "Paris",
    "Marital_Status": "Married",
    "Income_Source": "Service",
    "Age_In_Years": "37",
    "Gender_Identity": "Male",
    "Graduation_Date": "15/12/1989 00:00:00"
  },
  "referrer_ID": "63dce02f1c31f902817d0118",
  "first_purchase_date": "09/30/2022",
  "lifetime_points_deducted": 0,
  "phone_number": "+1-6507017759",
  "points_expiration_schedule": [
    {
      "expiration_date": "7-Feb-2024  6:0:4",
      "points": 10000
    }
  ],
  "instagram_handle": "www.instagram.com/john",
  "referrer_name": "Anna Scott",
  "aov": 0,
  "address": {
    "city": "Palo Alto",
    "country": "US",
    "line2": "530 Lytton Ave",
    "line1": "Suite #200",
    "state": "CA",
    "postal_code": "94301"
  },
  "last_purchase_date": "12/18/2022",
  "lifetime_points_redeemed": 0,
  "preferred_language": "english",
  "number_of_purchases": 0,
  "number_of_redemptions": 0,
  "birthdate": "08/26/1900",
  "churn_status": "low_risk",
  "anniversary_date": "10/17/2022",
  "enrollment_date": "10/17/2022 09:59:03",
  "member_id": "76543",
  "email_subscription_status": "subscribed"
}