Show a Party
Show a specified person or organisation
GET /api/party/:party-id
Response
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<person>
<id>100</id>
<firstName>Eric</firstName>
<lastName>Schmidt</lastName>
<createdOn>2011-09-14T15:22:01Z</createdOn>
<updatedOn>2011-12-14T10:45:46Z</updatedOn>
</person>
List Parties
The collection of Parties on the Capsule account.
GET /api/party
The list of Parties can be filtered by using one of the following options:
-
?q=The search term will be matched against name, telephone number and exact match on searchable custom fields. -
?email=Search by email address -
?lastmodified=Added or updated since the date specified (UTC timezone). The date must be specified in the following format YYYYMMDDTHHMMSS. eg. Midnight June 31, 2009 GMT would be 20090631T000000 -
?tag=Tagged with the selected tag
The results can also be paginated using the following options
-
&start=first record to be returned. The results start with an index of 0. -
&limit=the maximum number of matching records to be returned
Response
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<parties>
<person>
<id>100</id>
<firstName>Eric</firstName>
<lastName>Schmidt</lastName>
<createdOn>2011-09-14T15:22:01Z</createdOn>
<updatedOn>2011-12-14T10:45:46Z</updatedOn>
</person>
<person>
<id>101</id>
<firstName>Larry </firstName>
<lastName>Page</lastName>
<createdOn>2011-09-14T15:22:01Z</createdOn>
<updatedOn>2011-11-15T10:50:48Z</updatedOn>
</person>
<organisation>
<id>50</id>
<name>Google Inc</name>
<createdOn>2011-09-14T15:22:01Z</createdOn>
<updatedOn>2011-12-14T10:45:46Z</updatedOn>
</organisation>
</parties>
List People at an Organisation
List the collection of people associated with a specific organisation.
GET /api/party/:id/people
Response
HTTP/1.1 200 OK
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<parties>
<person>
<id>100</id>
<firstName>Eric</firstName>
<lastName>Schmidt</lastName>
</person>
<person>
<id>101</id>
<firstName>Larry </firstName>
<lastName>Page</lastName>
</person>
</parties>
Add a Person
POST /api/person
Request
-
titleoptional personal title; options includeMr,Master,Mrs,Miss,MsandDr. -
firstNameandlastNameat least one of these is required -
jobTitleoptional the job title for the person -
aboutbackground information about the person -
organisationNameandorganisationIdoptional, links the person to an organisation either searching for the organisation by name (if one is now found a new record is created automatically) or using the organisation party id.
Adding contact details - in the contacts element email, phone, web and physical addresses can be added.
address
-
typeoptional, can be one of the following optionsHome,Office,Postal -
street,city,state,zipandcountryat least one of these is required to create an address -
countryfrom the list options available usingGET /api/countries
email
-
typeoptional, can be one of the following optionsWork,Home -
emailAddressrequired, valid email address
phone
-
typeoptional, can be one of the following optionsHome,Work,Mobile,Fax,Direct -
phoneNumberrequired
website
-
typeoptional, can be one of the following optionsWork,Home -
webServicerequired, can be one of the following optionsURL,SKYPE,TWITTER,FACEBOOK,LINKED_IN,XING,FEED,GOOGLE_PLUS,FLICKR,GITHUB,YOUTUBE -
webAddressrequired, a web URL- for
SKYPEandTWITTERthis should be the username (i.e.capsulecrm) - for
FACEBOOK,LINKED_INandXINGuser the public profile URL for the contact
- for
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<person>
<contacts>
<address>
<type>Office</type>
<street>1600 Amphitheatre Parkway</street>
<city>Mountain View</city>
<state>CA</state>
<zip>94043</zip>
<country>United States</country>
</address>
<email>
<type>Home</type>
<emailAddress>e.schmidt@google.com</emailAddress>
</email>
<phone>
<type>Mobile</type>
<phoneNumber>+1 888 555555</phoneNumber>
</phone>
<website>
<type>work</type>
<webService>URL</webService>
<webAddress>www.google.com</webAddress>
</website>
</contacts>
<title>Mr</title>
<firstName>Eric</firstName>
<lastName>Schmidt</lastName>
<jobTitle>Chairman</jobTitle>
<organisationName>Google Inc</organisationName>
<about>A comment here</about>
</person>
Response
HTTP/1.1 201 Created
Location: https://sample.capsulecrm.com/api/party/100
Add Organisation
POST /api/organisation
Request
-
namerequired, company name -
aboutoptional, background information about the person - contact details are in the same format as adding a person
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<organisation>
<contacts>
<address>
<type>Office</type>
<street>1600 Amphitheatre Parkway</street>
<city>Mountain View</city>
<state>CA</state>
<zip>94043</zip>
<country>United States</country>
</address>
</contacts>
<name>Google Inc</name>
<about>A comment here</about>
</organisation>
Response
HTTP/1.1 201 Created
Location: https://sample.capsulecrm.com/api/party/50
Update a Person
Update a specific person
PUT /api/person/:party-id
Request
Only the details that require updating need to be included in the XML or JSON request. To delete an existing email, phone number, address or web address from a Person include a delete="true" attribute on the element of the contact detail to be deleted i.e. <email delete="true"><id>123</id></email> or <phone delete="true"><id>123</id></phone>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<person>
<firstName>James</firstName>
</person>
Response
HTTP/1.1 200 OK
Update an Organisation
PUT /api/organisation/:party-id
Request
Only the details that require updating need to be included in the XML or JSON request. To delete an existing email, phone number, address or web address from an Organisation include a deleted="true" attribute on the element of the contact detail to be deleted i.e. <email delete="true"><id>123</id></email> or <phone delete="true"><id>123</id></phone>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<organisation>
<name>New Co.</name>
</organisation>
Response
HTTP/1.1 200 OK
Delete Contact from a Party
Remove an email, phone number, address or web address from a Person or Organisation
DELETE /api/party/:party-id/contact/:contact-id
Response
HTTP/1.1 200 OK
Delete a Party
Delete a specific party.
DELETE /api/party/:party-id
Response
HTTP/1.1 200 OK
