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 /subject_fields.xml?type=party
return 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>
POST /subject_fields.xml
defines 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>
PUT /subject_fields/#{id}.xml
renames a field on this account.
Request:
<subject-field><id>#{id}</id><label>#{label}</label><type>party</type></subject-field>
Response:
Status: 200 OK
DELETE /subject_fields/#{id}.xml
removes a party custom field from the account.
Response:
Status: 200 OK
GET /subject_fields.xml?type=deal
return 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
At the moment, you cannot create deal custom fields via the API. Only retrieve, update, and destroy.
PUT /subject_fields/#{id}.xml
renames a field on this account.
Request:
<subject-field><id>#{id}</id><label>#{label}</label></subject-field>
Response:
Status: 200 OK
DELETE /subject_fields/#{id}.xml
removes a deal custom field from the account.
Response:
Status: 200 OK
GET /subject_fields.xml?type=all
return 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>