MENU

Members

Endpoint

https://api.website.world/webapps/api/member

Description

Members aka Customers, Users, Contacts, etc

Essentially any person or organisation that has a name and email address is a "member".

Member records must belong to a status/member level, that indicates how powerful the user is, or how relevant the person is for future conversations. eg they can range from blocked/spammers up to general members, up to opt in members, up to authorised levels who can login and get special pricing. To get full breakdown of the member status use the reference/memberlevel endpoint or refer to our help docs with a full explanation of membership levels

Methods available

GET, POST. 

Member

Parameters

NameDescriptionExampleOptionalData type
data The JSON you would like to POST. This can be POST content also data = 
{
"mbr_name": "name",
"mbr_email": "name@company.com"
}

Yes json object
id Fetch a specific member  (aka mbr_id) id=2334453 Yes int
mbr_email Find a member by their email address mbr_email=example@email.com Yes string
mbr_reference

Find a member by their reference account id

mbr_reference=abc Yes string
mbr_name

Filter results based on member name or mbr_name (first and last name included)

mbr_name=john+smith Yes string
mbr_company

Search by company name instead.

mbr_company=company Yes string
mbr_level

Search member by their member level,
Use matchType parameter along for more control over the data.

mbr_level=100 Yes int
AllowDuplicateEmailAccounts

By default, member records are matched by ID or Email address, to ensure unique email accounts. If you really want duplicate email accounts, then add this parameter to bypass the email lookup, meaning any POST without an ID is treated as an INSERT>

AllowDuplicateEmailAccounts=1 yes bool

Sample Data

See below for a sample output data for members.
data=

{

  "mbr_id": 1111,

  "mbr_addr": "111 Queen Street",

  "mbr_country": "New Zealand",

  "mbr_name": "name",

  "mbr_email": "email@abc.com"...

} 

Add a new member

To add a new member do not provide the member id. The rest of the information will be used to create a new member. It is a good idea to atleast provide the member email, name, phone and address while creating a new member. Member level should not be more than 500. To get a breakdown of member levels refer to Referene Endpoint /reference/memberlevel. You can create a Member to be Opt In member by providing OptIn name with value "yes". Email address is treated as a unique key, to ensure unique email accounts, with an optional override ?AllowDuplicateEmailAccounts=1

Example:

{

  "mbr_name": "name",

  "mbr_email": "abc@xyz.com",

  "optIn": "yes" ...

}

Update an existing member

To update an existing member please provide either an existing member id, or reference, or email address. 

Reference or Email address are assumed to be an alternative unique key when no ID is provided. It remains possible that duplicates may already exist, so our system will only select the first record it finds during a POST update. If reference is provided, then the email lookup is ignored.  

If you provide the form post parameter ?AllowDuplicateEmailAccounts=1  then the email lookup step is ignored, and typically the record will then be inserted. 

Rest of the JSON data will be used to update the member. You can update a Member to be Opt In member by providing OptIn name with value "yes". 

Example:

{

  "id": 1234

  "mbr_name": "name",

  "mbr_email": "abc@xyz.com",

  "optIn": "yes"...

}

Manage Member Group Associations

Members can belong to different groups which can be used for different purposes. To link a member to a group include memberGroups array in your body. You must include a group name or id. If group does not exist we will create a new group.
The below example will create a new member and link it to the Member Groups.

Example using group names:

{

  "mbr_name": "name",

  "mbr_email": "abc@xyz.com",

  "memberGroups": [

         "Auckland",

          "Team 1"

    ]

}

Example using group name or id:

{

  "mbr_name": "name",

  "mbr_email": "abc@xyz.com",

  "memberGroups": [

     {

        "name": "group 2"

     }, 

     {

        "id": 1234

      }

   ]

}


Example Return JSON Member

{

   "endPoint": "member",

   "resultCount": 1,

   "data": {

       "mbr_addr": "Suite 14, 386 Richmond Road",

       "mbr_id": 3936780,

       "mbr_lang": "en-GB",

       "mbr_country": "New Zealand",

       "mbr_order_last": "2021-07-13 17:20:38.026492",

       "mbr_password": "abklflw2435nnk",

       "mbr_loginfails": 0,

       "mbr_order_count": 2,

       "mbr_order_total": "62.50",

       "mbr_balance": "0.00",

       "mbr_balance60days": "0.00",

       "mbr_jobtitle": "Software Developer",

       "mbr_company": "Web Widgets Ltd",

       "mbr_grp": "Shopping",

       "mbr_balance90days": "0.00",

       "mbr_uiver": "1",

       "mbr_level": 150,

       "mbr_city": "Auckland",

       "id": 3936780,

       "mbr_email_format": "H",

       "memberGroups": [

           {

               "name": "Enquiry Form",

               "id": 28303

           }

       ],

       "mbr_mobile": "0274280098",

       "mbr_points_balance": "0.00",

       "mbr_postcode": "1021",

       "mbr_email": "abc@xyz.com",

       "mbr_groups_summary": "[Enquiry Form]",

       "mbr_source": "Shopping",

       "mbr_settings_json": {},

       "digestregularity": 0,

       "mbr_ipaddr": "172.31.25.20",

       "mbr_logins": 1,

       "mbr_suburb": "Grey Lynn",

       "mbr_sechash": "abcd435j",

       "mbr_last_activity": "2021-10-06 12:39:15.232054",

       "mbr_balance30days": "0.00",

       "mbr_aff_hits": 0,

       "mbr_gender": "M",

       "mbr_last_siteid": 0,

       "mbr_created": "2021-07-13 17:06:47.524542",

       "mbr_name": "Test Name",

       "mbr_updated": "2021-10-06 12:39:15.232054",

       "mbr_last_login": "2021-08-05 14:28:48.806696",

       "mbr_phone": "12345678",

       "mbr_birthdate": "yyyy-mm-dd",

       "mbr_referredby": 0,

       "cid": 1111

   },

   "success": true

}

Data Dictionary

NameDescriptionValidationData type
mbr_id Member ID, aka ID. System generated serial.
Read only
Integer
mbr_name Name (Both first name and surname) Required Text
mbr_email Email Email, required Text
mbr_email_accounts An additional email address for the accounts department Email Text
mbr_reference

External account number / reference, for reconciling with external accounting or CRM systems 

Optional Text
mbr_company Company or surname Text
mbr_jobtitle Job Title eg "Software developer" Text
mbr_level
Member Security Level,
Default = 100, Authorised = 200
Limited choices between 0 and 700 Integer
mbr_expiry Date when authorised level will expire. If setup, a member will receive an email offering to purchase a renewal. Timestamp
mbr_phone
Phone
Text
mbr_mobile Mobile Phone Text
mbr_addr Text
mbr_suburb Text
mbr_city Text
mbr_state Text
mbr_country Text
mbr_postcode Text
mbr_discount Discounting percentage (down from retail) Decimal
mbr_commission Decimal
mbr_order_total Total value of orders placed  readonly Decimal
mbr_order_count Total count of orders placed readonly Integer
mbr_order_last Datetime of the last order placed readonly Timestamp
mbr_points_balance Balance of loyalty points earned  readonly Decimal
mbr_updated The last time this data was updated by a customer, or within our CMS, or via API readonly Timestamp
mbr_created When this record was first created readonly Timestamp
mbr_last_activity The last time this customer did something like click a link, login, read an email, or the last time we actioned an update on their account readonly Timestamp
mbr_last_login When this customer last login successfully if ever readonly Timestamp
mbr_birthdate The birthdate of this customer Date
mbr_groups_summary A human readible comma seperated list of groups this customer is in readonly Text
mbr_grp Used to import members into a group when uploading CSV data, otherwise ignored temporary Text
mbr_password Password encrypted not visible Text
mbr_lang Language code from browser  Text
mbr_ipaddr Last known IP address Text
mbr_logins Count of successful logins readonly Integer
mbr_referredby ID of customer who referred this customer Fkey to mbr_id Integer
mbr_source How the record was first created readonly Text
mbr_followup A target date to followup with this customer, in a CRM approach. Reminder due date sort of thing. Manually actioned. Timestamp
mbr_notes Primary note attached to customer record. There is also a notes table/end point where a history of notes can be found.  Text
mbr_referred Referred by, or heard from, free text Text
mbr_email_fail_reason System debug message as to reason for email failure readonly Text
mbr_email_fail_time When the email was detected as a failed send by our system mail logs readonly Timestamp
digestnextemaildate Feature where member gets an automatic digest of new website content, like news, forums etc, and this is when it's next due. Timestamp
digestregularity Regularity interval for the difest email. Make null for no diggest. Interval
mbr_terms_agreed T&C were agreed on signup Boolean
mbr_delivery_name Default delivery details saved Text
mbr_delivery_company Default delivery details saved Text
mbr_delivery_address Default delivery details saved Text
mbr_delivery_suburb Default delivery details saved Text
mbr_delivery_city Default delivery details saved Text
mbr_delivery_state Default delivery details saved Text
mbr_delivery_postcode Default delivery details saved Text
mbr_delivery_phone Default delivery details saved Text
mbr_delivery_email Default delivery details saved Text
mbr_balance Not available for use Readonly
mbr_balance30days Not available for use Readonly
mbr_balance60days Not available for use Readonly
mbr_balance90days Not available for use Readonly
mbr_email_format Not available for use Readonly
mbr_uiver Not available for use Readonly
mbr_aff_hits Not available for use Readonly
mbr_last_siteid Not available for use Readonly
cid Website ID Readonly