Party & Deal Custom Fields
March 8, 2016 ยท View on GitHub
Use the custom fields API to define, rename, and delete party and deal custom fields on an account.
For the full XML representation of custom fields, check out the data reference.
Get party custom fields
GET /subject_fields.xml?type=partyreturn all fields used in the account.
Response:
<subject-fields type="array">
<subject-field>
<id type="integer"></id>
<label></label>
<type>party</type>
</subject-field>
...
</subject-fields>
Create party custom field
POST /subject_fields.xmldefines a new custom field on the account.
Request:
<subject-field><label>#{label}</label></subject-field>
Response:
Status: 201 Created
Location: /subject_fields/#{new_id}.xml
<subject-field>
<id type="integer"></id>
<label></label>
<type>party</type>
</subject-field>
Update party custom field
PUT /subject_fields/#{id}.xmlrenames a field on this account.
Request:
<subject-field><id>#{id}</id><label>#{label}</label><type>party</type></subject-field>
Response:
Status: 200 OK
Destroy party custom field
DELETE /subject_fields/#{id}.xmlremoves a party custom field from the account.
Response:
Status: 200 OK
Get deal custom fields
GET /subject_fields.xml?type=dealreturn all deal fields used in the account.
Response:
<subject-fields type="array">
<subject-field>
<id type="integer"></id>
<label>Close Date</label>
<type>deal</type>
</subject-field>
...
</subject-fields>
GET /subject_fields.xml?type=deal
Create deal custom field
At the moment, you cannot create deal custom fields via the API. Only retrieve, update, and destroy.
Update deal custom field
PUT /subject_fields/#{id}.xmlrenames a field on this account.
Request:
<subject-field><id>#{id}</id><label>#{label}</label></subject-field>
Response:
Status: 200 OK
Destroy deal custom field
DELETE /subject_fields/#{id}.xmlremoves a deal custom field from the account.
Response:
Status: 200 OK
Get all custom fields
GET /subject_fields.xml?type=allreturn all deal fields used in the account.
Response:
<subject-fields type="array">
<subject-field>
<id type="integer"></id>
<label></label>
<type>party or deal</type>
</subject-field>
...
</subject-fields>