Added by admin, last edited by admin on Jan 27, 2012

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.

BookingBug REST API: members

Purpose

Members are people who make bookings. This API can be used to view and update contact details about members.

URL

http://uk.bookingbug.com/api/members.xml
http://www.bookingbug.com/api/members.xml

Formats

xml

Authentication

Basic HTTP Authentication is used to verify that user is authorised to access data requested.

Parameters
param type description required?

member_type

value description
1 a member of a business
2 a contact

List Members

Request
curl --url http://uk.bookingbug.com/api/members.xml -u<username>:<password>

<username> and <password> are the login details to access data for a particular company.

Response
<members>
  <member id="123">
    <name>John Smith</name>
    <type>1</type>
  </member>
  <member id="124">
    <name>John Smith</name>
    <type>2</type>
  </member>
</members>

Show Member

Request
curl --url http://uk.bookingbug.com/api/members/<id>.xml -u<username>:<password>

<username> and <password> are the login details to access data for a particular company
<id> is the session id that is to be requested.

Response
<member id="123">
  <first_name>John</first_name>
  <last_name>Smith</last_name>
  <email>john@email.com</email>
  <type>1</type>
  <address>
    <address1>My Street</address1>
    <address2></address2>
    <address3>My Town</address3>
    <address4></address4>
    <postcode></postcode>
    <country>UK</country>
  </address>
</member>

Create New Member

Request

This is a request to create a new member.

curl --url http://uk.bookingbug.com/api/members.xml -u<username>:<password> -H Content-Type:text/xml -X POST -d "<xml>"

<username> and <password> are the login details to access data for a particular company
<xml> is the xml markup for the event to be created

<member>
  <name>John Smith</name>
  <type>1</type>
</member>
Response

201 CREATED

Update member

Request
curl --url http://uk.bookingbug.com/api/members/<id>.xml -u<username>:<password> -H Content-Type:text/xml -X PUT -d "<xml>"

<username> and <password> are the login details to access data for a particular company
<id> is the id of the member to be updated.
<xml> is the xml markup for the session attributes to be changed

<member>
  <first_name>My New First Name</first_name>
</member>
Response

200 OK