GET member {#get}
Get data of one member object.
Parameters
Parameters | Detail
----------------------- | -------------
with
optional |Returns sub-object or count of sub-objects relating to the member. If sub-object is requested, response will return the first 20 records
Accepted value: "groups", "group_count"
format
optional|Specifies returned data format
Accepted value: "json", "xml"
Resource Information
Authentication
: See Access Permission for GET member
HTTP Methods
: GET
Request URL Format
:
- https://{api_domain}/api3/member/{id}
- https://{api_domain}/api3/member/me
Access Permission {#getPermission}
Access to member data varies base on environment setting and requester roles. See Authentication for detail on authentication.
Private WebStorms: If the member Affiliate is running all Private WebStorms, requester must authenticate to get any member data.
Public WebStorms: If the member Affiliate is running any Public WebStorms.
- Unauthenticated request: Response will contain only members who have accessed the current Public WebStorms. Other members will not return
- Authenticated request: Response will contain all members
See Authentication for detail on authentication.
Requster Role: Some response attributes are accessible base on the requester's role.
email
: Returns for Admin and Regular requester's own member objectexternal_user_id
: Returns for Admin onlyactive
: Returns for Admin onlygroup_count
: Returns for Admin Onlygroups
: Returns for Admin Only
Errors
- Invalid object ID or you don't have access to this object
Example Request
- Method: GET
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
URL:
https://example.brightidea.com/api3/member/8FA49B96-3693-4282-8919-014618D7B3B8?with=groups&group_count
~~~ { "member": { "id": "8FA49B96-3693-4282-8919-014618D7B3B8", "email": "mpower@example.com", "screenname": "Max Power", "firstname": "Max", "lastname": "Power", "jobtitle": "Safety Inspector", "address": "742 Evergreen Terrace, Springfield, IL", "phone": "(123)456-7890", "mobilephone": "(987)654-3210", "externaluserid": "0072", "skills": "Boxer, Mascot, Astronaut, Baby proofer, Truck driver, Hippie, Plow Driver, Food Critic", "workhistory": "Conceptual Artist, Mayor, Country Western Manager, Garbage Commissioner, Mountain Climber", "photourl": "https://example.brightideatest.com/api3/file/CCBCC6A7-98C9-48E1-92F3-0C05AAC78863?format=binary&thumbsize=100", "datecreated": "2013-03-07 17:10:13.627", "datemodified": "2013-03-29 15:25:51.207", "active": true, "photofileid": "CCBCC6A7-98C9-48E1-92F3-0C05AAC78863", "department": "Human Resources", "groups": [ { "groupid": "91D82575-41D6-4D6F-AC9B-1EC2BF388725", "groupname": "Stonecutters", "datecreated": "2013-03-11 14:51:35.807" }, { "groupid": "48384157-0990-4B36-94CE-9D607AA6C995", "groupname": "The Atoms", "datecreated": "2013-02-13 15:31:05.063" }, { "groupid": "5693B37A-711B-4756-B7BB-A5E75B9969B8", "groupname": "BE Sharps", "datecreated": "2013-01-01 15:29:03.520" } ], "groupcount": 3 } } ~~~
LIST member {#list}
Get data on a list of member objects. Return bjects are ordered by member screen name by default.
On retrieving large set of data, requester should use pagination parameters such as page
and page_size
to manage multiple requests.
Parameters
Parameters | Detail
----------------------------------- | -----------------------------------
id
optional |Filter return by member ID
Sample value: "11111111-1111-1111-1111-111111111111"
email
optional |Filter return by member email address. Parameter is available to Admin requester only
Sample value: "mpower@example.com"
screen_name
optional |Filter return by member screen name
Sample value: "Max Power"
last_name
optional |Filter return by member last name
Sample value: "Power"
first_name
optional |Filter return by member first name
Sample value: "Max"
job_title
optional |Filter return by member job title
Sample value: "Safety Inspector"
address
optional |Filter return by member address
Sample value: "742 Evergreen Terrace, Springfield, IL"
phone
optional |Filter return by member phone info
Sample value: "(123)456-7890"
mobile_phone
optional |Filter return by member mobile phone info
Sample value: "(987)654-3210"
externaluserid
optional |Filter return by member employee ID info. Parameter is available to Admin requester
Sample value: "0072"
date_created
optional |Filter return by member created date. Response contains all members created within the 24 hours of the specified date
Sample value: "12/06/2009"
date_modified
optional |Filter return by member last modified date. Response contains all members modified within the 24 hours of the specified date
Sample value: "12/06/2009"
active
optional |Filter return by member active/inactive state. Parameter is available to Admin requester only
Accepted Value: 1: For active member, 0: For inactive member
group_id
optional |Filter return by the ID of a group member are assigned to. Parameter is available to Admin requester
Sample value: "11111111-1111-1111-1111-111111111111"
have_visited
optional |Filter return by the ID of a campaign members are visited
Sample value: "11111111-1111-1111-1111-111111111111"
have_access
optional |Filter return by the ID of a campaign members have access to
Sample value: "11111111-1111-1111-1111-111111111111"
page_size
optional |Specifies number of records returns per page. Default: 20. Minimum: 1. Maximum: 100
Sample value: 50
page
optional |Specifies which page of records to return. Default: 1. Minimum: 1. Maximum: {pagecount}
Sample value: 5
order
optional |A SQL style string that specifies the order the records should return in.
Sample value: "datecreated ASC, screenname DESC".
Accepted attributes: "id", "email", "screenname", "firstname", "lastname", "jobtitle", "address", "phone", "mobilephone", "externaluserid", "datecreated", "datemodified", "active"
with
optional |Returns sub-object or count of sub-objects relating to the member. If sub-object is requested, response will return the first 20 records
Accepted value: "group_count"
format
optional |Specifies returned data format
Accepted value: "json", "xml"
Resource Information
Authentication
: See Access Permission for LIST member
HTTP Methods
: GET
Request URL Format
: https://{api_domain}/api3/member
Access Permission {#listPermission}
Access to member data varies base on environment setting and requester roles. See Authentication for detail on authentication.
Private WebStorms: If the member Affiliate is running all Private WebStorms, requester must authenticate to get any member data.
Public WebStorms: If the member Affiliate is running any Public WebStorms.
- Unauthenticated request: Response will contain only members who have accessed the current Public WebStorms. Other members will not return
- Authenticated request: Response will contain all members
Requster Role: Some response attributes are accessible base on the requester's role.
email
: Returns for Admin and Regular requester's own member objectexternal_user_id
: Returns for Admin onlyactive
: Returns for Admin onlygroup_count
: Returns for Admin Only
Errors
- Invalid object ID or you don't have access to this object
- {parameter} must be one of these values {value_list}
- Cannot order by {parameter_value}
- Invalid Query
Example Request
- Method: GET
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
URL:
https://example.brightidea.com/api3/member?page_size=3&page=3&order=date_created&with=group_count
~~~ { "memberlist": [ { "id": "866144B1-E302-42EF-AF80-75DE988885AE", "email": "jdoe@example.com", "screenname": "John Doe", "firstname": "John", "lastname": "Doe", "active": true, "photourl": "https://example.brightideatest.com/api3/file/02F11D0E-BA74-4A7D-B1BE-4F7F651B2507?format=binary&thumbsize=100", "photofileid": "02F11D0E-BA74-4A7D-B1BE-4F7F651B2507", "jobtitle": "Sales", "skills": "Selling Software", "workhistory": "Worked at sales.com", "phone": "123 456-789", "mobilephone": "987 654-3210", "address": "123 fake street", "externaluserid": "04567", "datecreated": "2013-03-07 19:09:54.563", "datemodified": "2013-04-18 13:14:21.067", "groupcount": 5 }, { "id": "8FA49B96-3693-4282-8919-014618D7B3B8", "email": "lsmith@example.com", "screenname": "Lillian Smith", "firstname": "Lillian", "lastname": "Smith", "photourl": "", "jobtitle": "", "skills": "", "workhistory": "", "phone": "", "mobilephone": "", "address": "", "datecreated": "2013-03-07 17:10:13.627", "datemodified": "2013-04-16 15:42:16.430", "groupcount": 3 }, { "id": "8FA49B96-3693-4282-8919-014618D7B3B8", "email": "max.power@example.com", "screenname": "Max Power", "firstname": "Max", "lastname": "Power", "jobtitle": "Safety Inspector", "address": "742 Evergreen Terrace, Springfield, IL", "phone": "(123)456-7890", "mobilephone": "(987)654-3210", "externaluserid": "0072", "skills": "Boxer, Mascot, Astronaut, Baby proofer, Truck driver, Hippie, Plow Driver, Food Critic", "workhistory": "Conceptual Artist, Mayor, Country Western Manager, Garbage Commissioner, Mountain Climber", "photourl": "https://example.brightideatest.com/api3/file/CCBCC6A7-98C9-48E1-92F3-0C05AAC78863?format=binary&thumbsize=100", "datecreated": "2013-03-07 17:10:13.627", "datemodified": 2013-03-29 15:25:51.207, "active": true, "groupcount": 3 } ], "stats": { "total": "300", "pagecount": 60, "current_page": 3 } } ~~~
CREATE member {#create}
Create a member object.
Requester must be Admin of the Affiliate to create member.
Parameters
Parameters | Detail
----------------------------------- | -----------------------------------
email
required |This is the email address of the member. Value must be in valid email format and unique to the member in the affiliate
Sample value: "mpower@example.com"
screen_name
required |This is the screen name of the member. Minimum 3 characters, maximum 50 characters, string will be truncated if length exceeds maximum. Value should be unique to the member in the affiliate. If not unique, 5 digit random character will be appended to the string
Sample value: "Max Power"
last_name
optional |This is the last name of the member. Maximum 50 characters, string will be truncated if length excees maximum
Sample value: "Power"
first_name
optional |This is the first name of the member. Maximum 50 characters, string will be truncated if length exceeds maximum
Sample value: "Max"
job_title
optional |This is the job title of the member. Maximum 100 characters, string will be truncated if length exceeds maximum
Sample value: "Safety Inspector"
address
optional |This is the address of the member. Maximum 100 characters, string will be truncated if length exceeds maximum
Sample value: "742 Evergreen Terrace, Springfield, IL"
phone
optional |This is the phone info of the member. Maximum 50 characters, string will be truncated if length exceeds maximum
Sample value: "(123)456-7890"
mobile_phone
optional |This is the mobile phone info of the member. Maximum 50 characters, string will be truncated if length exceeds maximum
Sample value: "(987)654-3210"
externaluserid
optional |This is the employee ID info of the member.
Sample value: "0072"
skill
optional |This is the skill info of the member. It's a long text field.
Sample value: "Boxer, Mascot, Astronaut, Baby proofer, Truck driver, Hippie, Plow Driver, Food Critic"
work_history
optional |This is the work history info of the member. It's a long text field.
Sample value: "Conceptual Artist, Mayor, Country Western Manager, Garbage Commissioner, Mountain Climber"
photo
optional |This is the profile picture of the member. Value must be file object. Maximum 1MB, request accepts file in JPEG, PNG and GIF format. Square dimensions is recommended
format
optional |Specifies returned data format
Accepted value: "json", "xml"
Resource Information
Authentication
: Required. See Authentication for detail on authentication.
HTTP Methods
: POST
Request URL Format
: https://{api_domain}/api3/member
Access Permission
Requester must be an Affiliate Admin to create member. See Authentication for detail on authentication.
Errors
- A member with this email already exist
- {parameter} must be more than {minimum_length} characters
- {parameter} must be less than {maximum_length} characters
- Invalid {parameter} received
Example Request
- Method: POST
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
- URL:
https://example.brightidea.com/api3/member
Form data:
- fields[screen_name]=Jimmy Allen
- fields[email]=jallen@example.com
- fields[last_name]=Allen
- fields[first_name]=Jimmy
- fields[11111111-1111-1111-1111-111111111111]=Sales
~~~ { "member": { "id": "AF7C07AC-0D23-4673-918C-2AD13B7747D5", "email": "jallen@example.com", "screenname": "Jimmy Allen", "firstname": "Jimmy", "lastname": "Allen", "jobtitle": "Sales", "address": "", "phone": "", "mobilephone": "", "externaluserid": "", "skills": "", "workhistory": "", "photourl": null, "datecreated": "2013-04-08 19:35:21.530", "date_modified": null, "active": true } } ~~~
UPDATE member {#update}
Update a member object.
Function updates only value of parameters passed through request. To empty out an attribute, pass parameter with blank value.
Parameters
Parameters | Detail
----------------------------------- | -----------------------------------
password
optional |This is the password of the member. Requester can only update password for their own member object. Value must honor Affiliate password rule
Sample value: "xfoiew3FFS"
screen_name
optional |This is the screen name of the member. Minimum 3 characters, maximum 50 characters, string will be truncated if length exceeds maximum. Value should be unique to the member in the affiliate. If not unique, 5 digit random character will be appended to the string
Sample value: "Max Power"
last_name
optional |This is the last name of the member. Maximum 50 characters, string will be truncated if length excees maximum
Sample value: "Power"
first_name
optional |This is the first name of the member. Maximum 50 characters, string will be truncated if length exceeds maximum
Sample value: "Max"
job_title
optional |This is the job title of the member. Maximum 100 characters, string will be truncated if length exceeds maximum
Sample value: "Safety Inspector"
address
optional |This is the address of the member. Maximum 100 characters, string will be truncated if length exceeds maximum
Sample value: "742 Evergreen Terrace, Springfield, IL"
phone
optional |This is the phone info of the member. Maximum 50 characters, string will be truncated if length exceeds maximum
Sample value: "(123)456-7890"
mobile_phone
optional |This is the mobile phone info of the member. Maximum 50 characters, string will be truncated if length exceeds maximum
Sample value: "(987)654-3210"
externaluserid
optional |This is the employee ID info of the member.
Sample value: "0072"
skill
optional |This is the skill info of the member. It's a long text field.
Sample value: "Boxer, Mascot, Astronaut, Baby proofer, Truck driver, Hippie, Plow Driver, Food Critic"
work_history
optional |This is the work history info of the member. It's a long text field.
Sample value: "Conceptual Artist, Mayor, Country Western Manager, Garbage Commissioner, Mountain Climber"
active
optional |This is active/inactive state of the member. Parameter is available for Admin requester only
Sample value: 1: For active, 0: For inactive
format
optional |Specifies returned data format
Accepted value: "json", "xml"
Resource Information
Authentication
: Required. See Authentication for detail on authentication.
HTTP Methods
: PUT
Request URL Format
:
- https://{api_domain}/api3/member/{id}
- https://{api_domain}/api3/member/me
For users who are using profile 2.0
: Please see the example for profile 2.0 below, screen name and email will use format--fields[parameter] in form data, and others will use format--fields[field_id].
Access Permission
Authentication is required for UPDATE memeber request. See Authentication for detail on authentication.
Affiliate Admin can make update for all members. Regular requester can only update their own.
Errors
- You can only update your own profile
- You cannot update other member's password
- {parameter} must be more than {minimum_length} characters
- {parameter} must be less than {maximum_length} characters
- Invalid {parameter} received
- Member doesn't exist
- Password doesn't satisfy requirement
- Failed to update member active flag
- Failed to update member
Example Request
- Method: PUT
- Header: Authorization=Bearer 85f7b2462570acdde9a458ba6495b8763dcd040c
- URL:
https://example.brightidea.com/api3/member/AF7C07AC-0D23-4673-918C-2AD13B7747D5
Form data:
- job_title=Sales Director
- phone=(253)745-8532
- skills=Developing New Clients, Managing Multiple-State Territory
~~~ { "member": { "id": "AF7C07AC-0D23-4673-918C-2AD13B7747D5", "email": "jallen@example.com", "screenname": "Jimmy Allen", "firstname": "Jimmy", "lastname": "Allen", "jobtitle": "Sales20Director", "address": "", "phone": "(253)745-8532", "mobilephone": "", "externaluserid": "", "skills": "Developing New Clients, Managing Multiple-State Territory", "workhistory": "", "photourl": null, "datecreated": "2013-04-08 19:35:21.530", "date_modified": "2013-04-09 15:48:03.450", "active": true } } ~~~
Form data for profile 2.0:
- fields[screen_name]=JAllen
- fields[email]=jimmyallen@example.com
- fields[11111111-1111-1111-1111-111111111111]=developer ~~~ { "member": { "id": "AF7C07AC-0D23-4673-918C-2AD13B7747D5", "email": "jallen@example.com", "screenname": "JAllen", "firstname": "Jimmy", "lastname": "Allen", "jobtitle": "developer", "address": "", "phone": "(253)745-8532", "mobilephone": "", "externaluserid": "", "skills": "Developing New Clients, Managing Multiple-State Territory", "workhistory": "", "photourl": null, "datecreated": "2013-04-08 19:35:21.530", "date_modified": "2013-04-09 15:48:03.450", "active": true } } ~~~
FAQ {#faq}
Question: I understand passing the "with=groups" parameter on GET member request can get me the first 20 groups the member is in. But what if the member belongs in 30 groups? How do I get the other 10?
Answer: Make request to the LIST group function filter by member_id
will give you list of groups the member is in. Refine result by passing page_size
, page
, order_by
parameters.
Question: LIST member only return 100 objects maximum per request. How do I retrieve more results?
Answer: LIST member response is automatically paginated. If you requested for 100 member objects in the initial request, pass "page_size=100&page=2" to get the next 100. page_count
is returned with every LIST request so your application can figure out when it hits the last page.
Question: How to update a member profile picture?
Answer: See profileImage functions on creating and deleting member profile image.
Question: How do I delete a member from an Affiliate?
Answer: DELETE member is not currently an available functionality. However, if the goal is to block a member from accessing the Affiliate, the recommended approach is to make request to the UPDATE member function passing "active=0". This will deactive the member and take away his ability to login.