Skip to content

E. Users

Action Method URI
List Users GET /user
Get User GET /user/member/{id}
Create User POST /user
Update User via client_id PUT /user
Update User PUT /user/member/{id}
Delete User via client_id DELETE /user
Reset Password POST /user/reset_password
List User’s Contacts GET /role/contacts
Add Contact POST /role/contacts/{id}
Remove Contact DELETE /role/contacts/{id}

Listing Users

These query parameters are available for listing User objects (these do not apply to the contacts resources).

Parameter Details Default
user_page Page number of records 1
limit Number of records to return 25
terms Optional, search terms

Creating

When creating users, you may receive a 203 response. This means that the user identified by the email address in

user[mapbuzz_auth_attributes][email]

already exists as a Zerista user and was added to the conference; however, the users information was left unchanged.

Updating and Deleting via client_id or Email Address

When updating or deleting users via a client_id, you should include the client_id that you created the user with:

http://example.zerista.com/user?client_id=1122334455&user[sa...

All fields included in an update request will be overridden to the given value. The response for updating a user is the same as creating a user; however, for deleting a user, a successful response will not include a body.

In the event you do not provide a client_id for an update request, the user identified by the email address parameter will be updated.

Contacts

When mimicking a user via a token authentication, you may get and update the user's list of contacts. When adding or removing a contact, use the contact's user ID for the {id} in the URI.

Resetting a User's Password

You may reset a user's password by sending a POST request to

/user/reset_password

With the

user[mapbuzz_auth_attributes][email]

parameter. Authenticating with an API Signature is not necessary (and authenticating with a token is not applicable) for this procedure to complete successfully. If you do authenticate, you will receive back the user’s object as the response. If you do not authenticate, you will receive a simple message in the format you requested.

User’s Parameters

Parameter Example Details
user[salutation] Mr. Optional
user[first_name] Rufus Required, maximum 64 characters
user[last_name] Kanarowski Required, maximum 64 characters
user[membership] speaker Optional. Values: ‘moderator’, ‘speaker’, ‘exhibitor’, ‘press’, ‘rejected’
client_id 1122334455 Optional*

* Providing the client_id is optional; however, you must track the user IDs, or you will not be able to update/delete the user without it if the user changes his/her email address in the system.
User’s Email Address

Parameter Example Details
user[mapbuzz_auth_attributes][email] rufus@zerista.com Required

Employment Information

Setting the employment information will make the user appear in the “Employees” section on the page for the exhibitor with the given company name. This differs from an “exhibitor contact” in that the exhibitor contacts have editing privileges for the exhibitor. Also, setting a company name for a user, does not mean that an exhibitor will be created.

Parameter Example Details
user[employee_attributes][position] CEO Optional
user[employee_attributes][company_attributes][name] Zerista Optional*

* If you specify a position, the company name is required.

Photo

You may include a URI to a photo for a user. The file must be available at the time of the request for Zerista to download and store the image. The photo may be in the following formats: GIF, JPEG, or PNG.

Parameter Example Details
user[photo_uri] http://www.exmple.com/my-exhibitor/logo.gif Optional

Tags

Tags are a comma-separated list of words and phrases that are used when users search for users. Zerista also uses tags to identify sets of users for custom functionality.

ParameterExampleDetails

user[item_attributes][tags_list] social networking, conferences, communities Optional

User’s Address

You may add additional addresses by augmenting the index like so:

user[account_attributes][addresses_attributes][0][street]
user[account_attributes][addresses_attributes][1][street]
Parameter Example Details
user[account_attributes][addresses_attributes][0][street] 1721 Gilpin St. Optional*
user[account_attributes][addresses_attributes][0][street2] Suite 200 Optional*
user[account_attributes][addresses_attributes][0][city] Denver Optional*
user[account_attributes][addresses_attributes][0][postal_code] 80121 Optional*
user[account_attributes][addresses_attributes][0][state] CO Optional*
user[account_attributes][addresses_attributes][0][country_code] US Optional*, 2-char code**

* Partial addresses are not allowed, if you specify any part of an address, the remainder becomes required (except street2).

** see http://www.iso.org/iso/country_codes.htm

 Phone Numbers

Parameter Example Details
user[item_attributes][phones_attributes][0][work_number] 393-333-3333 Optional
user[item_attributes][phones_attributes][0][cell_number] 393-333-3333 Optional
user[item_attributes][phones_attributes][0][fax_number] 393-333-3333 Optional

Bio

Parameter Example Details
user[item_attributes][article_attributes][content] Sandrine is interested in social networking. Optional*
user[item_attributes][remove_article] 1 Optional. Passing a value of 1 will remove the biographical information from the user.

* Biographical information must be well-formed XHTML.

Web Links

Parameter Example Details
user[account_attributes][web_links][blog] http://blog.zerista.com/ Optional
user[account_attributes][web_links][linkedin] http://www.linkedin.com/company/zerista-inc Optional
user[account_attributes][web_links][facebook] http://www.facebook.com/Zerista Optional
user[account_attributes][web_links][website] http://www.zerista.com Optional
user[account_attributes][web_links][twitter] http://www.twitter.com/ZeristaSoftware Optional
user[account_attributes][web_links][myspace] http://www.myspace.com/Zerista Optional
user[account_attributes][web_links]
  • An error has occurred; the feed is probably down. Try again later.
http://blog.zerista.com/feed Optional

User Activation (User-Mimicking Only)

When using a token-authentication and user-mimicking, you may activate a user by executing a PUT request to

/user/member

with the following parameters:

user[last_name]KanarowskiRequired

Parameter Example Details
user[first_name] Rufus Required
user[mapbuzz_auth_attributes][email] rufus@zerista.com Required
user[mapbuzz_auth_attributes][password] mySecretPassword Required, 6 or more characters, not the user’s name, account name, or email address

Atom Response Example

<?xml version="1.0" encoding="utf-8" ?>
<entry xmlns="http://www.w3.org/2005/Atom"
       xmlns:atom="http://www.w3.org/2005/Atom">
  <id>http://example.zerista.com/user/122</id>
  <link rel="self" type="application/atom+xml"
        href="http://example.zerista.com/profile/member?account_id=213" />
  <link rel="alternate" type="text/html"
        href="http://example.zerista.com/profile/member?account_id=213" />
  <title>Sandrine</title>
  <updated>2009-07-28T11:10:54-06:00</updated>
  <content type="application/xml">
    <person xmlns="http://ns.opensocial.org/2008/opensocial">
      <id>http://example.zerista.com/user/122</id>
      <displayName>Sandrine</displayName>
    </person>
  </content>
</entry>

JSON Response Example

{
  "id":3,
  "first_name":"Charlie",
  "last_name":"Savage",
  "display_name":"Charlie",
  "account":{
    "id":3,
    "account_name":"cfis",
    "web_links":{
      "twitter":"http://twitter.com/cfis"
    },
    "addresses":[

    ]
  },
  "item":{
    "id":3,
    "display_value":"Charlie Savage",
    "created_on":{
      "n":0,
      "json_class":"Time",
      "s":1311183306
    },
    "updated_on":{
      "n":0,
      "json_class":"Time",
      "s":1311183306
    },
    "tags":[
      "Beer",
      "Maps"
    ],
    "icon":{
      "id":1082,
      "content_type":"image/png",
      "versions":{
        "small_hover-32":"icon_1082_32_hover.png",
        "photo-640":"icon_1082_640.png",
        "medium-64":"icon_1082_64.png",
        "extra_large-150":"icon_1082_150.png",
        "small-32":"icon_1082_32.png",
        "logo-200":"icon_1082_200.png",
        "large-100":"icon_1082_100.png"
      }
    },
    "article":{
      "id":105283866,
      "item_id":3,
      "content":"<p>a list</p><p></p><p>of</p><p>several</p><p>things</p>"
    },
    "phones":[
      {
        "work_number":"123-456-7890",
        "fax_number":null,
        "cell_number":"098-765-4321"
      }
    ]
  },
  "employee":{
    "position":"CEO",
    "company_name":"Zerista, Inc."
  }
}

XML Response Example

<?xml version="1.0" encoding="UTF-8"?>
<user>
  <id type="integer">3</id>
  <first-name>Charlie</first-name>
  <last-name>Savage</last-name>
  <display-name>Charlie</display-name>
  <account>
    <id type="integer">3</id>
    <account-name>cfis</account-name>
    <web-links>
      <twitter>http://twitter.com/cfis</twitter>
    </web-links>
    <addresses type="array"/>
  </account>
  <item>
    <id type="integer">3</id>
    <display-value>Charlie Savage</display-value>
    <created-on type="datetime">2011-07-20T17:35:06Z</created-on>
    <updated-on type="datetime">2011-07-20T17:35:06Z</updated-on>
    <tags type="array">
      <tag>Beer</tag>
      <tag>Maps</tag>
    </tags>
    <icon>
      <id type="integer">1082</id>
      <content-type>image/png</content-type>
      <versions>
        <small-hover-32>icon_1082_32_hover.png</small-hover-32>
        <photo-640>icon_1082_640.png</photo-640>
        <extra-large-150>icon_1082_150.png</extra-large-150>
        <medium-64>icon_1082_64.png</medium-64>
        <small-32>icon_1082_32.png</small-32>
        <logo-200>icon_1082_200.png</logo-200>
        <large-100>icon_1082_100.png</large-100>
      </versions>
    </icon>
    <article>
      <id type="integer">105283866</id>
      <item-id type="integer">3</item-id>
      <content>&lt;p&gt;a list&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;of&lt;/p&gt;&lt;p&gt;several
               &lt;/p&gt;&lt;p&gt;things&lt;/p&gt;</content>
    </article>
    <phones type="array">
      <phone>
        <work-number>123-456-7890</work-number>
        <fax-number nil="true"></fax-number>
        <cell-number>098-765-4321</cell-number>
      </phone>
    </phones>
  </item>
  <employee>
    <position>CEO</position>
    <company-name>Zerista, Inc.</company-name>
  </employee>
</user>
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.