Tags
February 6, 2014 ยท View on GitHub
The tags API allows you to add, update, and delete tags from parties (people and companies), cases, and deals. In the documentation below, the generic #{subject_type} text must be replaced in practice with either people, companies, kases, or deals, and #{subject_id} should be the id of the subject (person, company, case or deal) that you want to manipulate or query the tags for.
For the full XML representation of tags, check out the data reference.
Get tags
GET /tags.xmlreturn all tags used in the account.GET /#{subject_type}/#{subject_id}/tags.xmlreturns the tags on a person, company, case, or deal.
Response:
<tags type="array">
<tag>
<id type="integer"></id>
<name></name>
</tag>
...
</tags>
Get tagged parties
GET /tags/#{id}.xmlreturn all parties (people and companies) associated with a given tag.
This endpoint will not include deals and cases for that tag.
Response:
<parties type="array">
<party type="Person">
...
</party>
<party type="Company">
...
</parties>
Create tag
POST /#{subject_type}/#{subject_id}/tags.xmladds a tag to a person, company, deal, or case.
Request:
<name>#{name}</name>
Response:
Status: 201 Created
Location: /tags/#{new_id}.xml
<tag>
<id type="integer"></id>
<name></name>
</tag>
Destroy tag
DELETE /#{subject_type}/#{subject_id}/tags/#{id}.xmlremoves a tag from a person, company, deal, or case.
Response:
Status: 200 OK