People & Organisations (Party)
Party Custom Fields
Party History
Party Tags
Opportunities
Opportunity Additional Parties
Opportunity Custom Fields
Opportunity History
Opportunity Tags
Cases
Case Additional Parties
Case Custom Fields
Case History
Case Tags
When creating a person record contacts are optional, zero or more contacts are allowed in each category (address, email, phone).
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<person>
<id>100</id> <!-- integer -->
<contacts>
<address>
<id>100</id> <!-- integer -->
<type>Office</type> <!-- options: Home | Office | Postal -->
<street>1600 Amphitheatre Parkway</street> <!-- required -->
<city>Mountain View</city>
<state>CA</state>
<zip>94043</zip>
<country>United States</country>
<!-- ISO Country name, see /api/config/country for options -->
</address>
<email>
<id>101</id> <!-- integer -->
<type>Work</type> <!-- options: Home | Work -->
<emailAddress>e.smit@google.com</emailAddress>
<!-- required, valid email address -->
</email>
<phone>
<id>102</id> <!-- integer -->
<type>Work</type> <!-- options: Home | Work | Mobile | Fax -->
<phoneNumber>+1 888 555555</phoneNumber> <!-- required -->
</phone>
</contacts>
<title>Mr</title> <!-- options: Mr | Master | Mrs | Miss | Ms | Dr -->
<firstName>Eric</firstName>
<lastName>Schmidt</lastName> <!-- required -->
<jobTitle>Chairman</jobTitle>
<organisationId>50</organisationId> <!-- integer -->
<organisationName>Google Inc</organisationName>
<about>Comment hehe</about>
</person>
When creating a person record contacts are optional, zero or more contacts are allowed in each category (address, email, phone).
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<organisation>
<id>50</id> <!-- integer -->
<contacts>
<address>
<id>55</id> <!-- integer -->
<type>Office</type> <!-- options: Home | Office | Postal -->
<street>1600 Amphitheatre Parkway</street> <!-- required -->
<city>Mountain View</city>
<state>CA</state>
<zip>94043</zip>
<country>United States</country> <!-- ISO Country name, see /api/config/country for options -->
</address>
<email>
<id>60</id> <!-- integer -->
<type>Work</type> <!-- options: Home | Work -->
<emailAddress>info@google.com</emailAddress> <!-- required, valid email address -->
</email>
<phone>
<id>61</id> <!-- integer -->
<type>Work</type> <!-- options: Home | Work | Mobile | Fax -->
<phoneNumber>+1 888 555555</phoneNumber> <!-- required -->
</phone>
</contacts>
<name>Google Inc</name> <!-- required -->
<about>Comment here</about>
</organisation>
Get details of a single person or organisation by party id.
Return all people & organisations visible to the authenticated user. Optionally the results can be limited or paged using the parameters &amo;limit and &start.
Example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<parties size="2">
<organisation>
…
</organisation>
<person>
…
</person>
</parties>
Return all people & organisations which match the search term. The search term will be matched against name, telephone number and exact match on searchable custom fields. Optionally the results can be limited or paged using the parameters &amo;limit and &start.
Example response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<parties size="2">
<organisation>
<name>Albert Smith Limited</name>
…
</organisation>
<person>
<firstName>Jane</firstName>
<lastName>Smith</lastName>
…
</person>
</parties>
Return person & organisation records that have been updated or created since the modified since date supplied. The modified since date should be in the format YYYYMMDDTHHMMSS, eg. Midnight June 31, 2009 GMT would be 20090631T000000. Optionally the results can be limited or paged using the parameters &amo;limit and &start.
Return all people & organisations with matching email address. Optionally the results can be limited or paged using the parameters &amo;limit and &start.
Return all people & organisations with tagged with matching tag. Note that the tag will need to be URL encoded. Optionally the results can be limited or paged using the parameters &amo;limit and &start.
Returns all the people at the selected organisation.
List of country names that can be supplied in the <country /> element of addresses. Alternatively ISO 3166-1 alpha-2 or alpha-3 codes can be used.
Example Response:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<countries>
<country>Afghanistan</country>
<country>Åland Islands</country>
<country>Albania</country>
<country>Algeria</country>
<country>American Samoa</country>
<country>Andorra</country>
...
</countries>
Create a new person and optionally attach to an organisation. You can specify an organisation id or organisation name. If an organisation name is used an it is not already present on the account a new organisation will be created.
When adding addresses make the <country /> element if used should be populated with a country returned from the resource GET /api/resource/country or a ISO 3166-1 alternative.
If adding this person will exceed the accounts contact limit a 507 Insufficient Storage response will be returned.
Example request:
<?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>Work</type>
<emailAddress>e.smit@google.com</emailAddress>
</email>
<phone>
<type>Work</type>
<phoneNumber>+1 888 555555</phoneNumber>
</phone>
</contacts>
<title>Mr</title>
<firstName>Eric</firstName>
<lastName>Schmidt</lastName>
<jobTitle>Chairman</jobTitle>
<organisationName>Google Inc</organisationName>
</person>
Example response:
HTTP/1.1 201 Created Location: https://sample.capsulecrm.com/api/party/2
If adding this organisation will exceed the accounts contact limit a 507 Insufficient Storage response will be returned.
Example request:
<?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>
<email>
<type>Work</type>
<emailAddress>info@google.com</emailAddress>
</email>
<phone>
<type>Work</type>
<phoneNumber>+1 888 555555</phoneNumber>
</phone>
</contacts>
<name>Google Inc</name>
</organisation>
Update an existing person record, only attributes that are to be changed need to be supplied in the XML document. Where a value is not supplied it will remain with its current value. To null a field include a empty XML element for the field in the document.
Contact records (email, phone or address) can be updated where an id is provided, where an id for a contact is not provided it is assumed to be null and will be added to the person.
Example request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<person>
<jobTilte>Chairman & CEO</jobTitle>
<contacts>
<phone><phoneNumber>0800 555 555</phoneNumber></phone>
</contacts>
</person>
Update an existing organisation record, only attributes that are to be changed need to be supplied in the XML document. Where a value is not supplied it will remain with its current value. To null a field include a empty XML element for the field in the document.
Contact records (email, phone or address) can be updated where an id is provided, where an id for a contact is not provided it is assumed to be null and will be added to the person.
Example request:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<organisation>
<name>Google Inc.</name>
<contacts>
<phone><phoneNumber>0800 555 555</phoneNumber></phone>
</contacts>
</organisation>
Deletes the selected person or organisation from Capsule. Operation cannot be performed on the Person record for a user.