Skip to content

Instantly share code, notes, and snippets.

@piersadrian
Forked from enajski/base_cf_docs.md
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save piersadrian/1130c7b19f7e835e4406 to your computer and use it in GitHub Desktop.
Save piersadrian/1130c7b19f7e835e4406 to your computer and use it in GitHub Desktop.

Custom fields


Custom fields can be created by posting to one of the 3 endpoints:

To update PUT and to delete DELETE to:

Filterable:

some custom fields can be used as additional filtering options in the web app, to enable this pass "filterable":"true" as a parameter to the "custom_field"

Contacts custom fields have an additional required parameter:

  • Visible on both Person and Company pages: "custom_scope":{"people":"1","company":"2"}
  • Person pages only: "custom_scope":{"people":"1"}
  • Company pages only: "custom_scope":{"company":"2"}

Custom field types:

Single Line Text

{"custom_field":{"name":"word","field_type":"string","settings":null}}

Filterable

Paragraph Text

{"custom_field":{"name":"paragraph","field_type":"text","settings":null}}

Not filterable

Number

{"custom_field":{"name":"number","field_type":"number","settings":null,}}

Filterable

Non-numeric values are cut out.

Checkbox

{"custom_field":{"name":"bool","field_type":"bool","settings":null}}

Not filterable

Dropdown

{"custom_field":{"name":"Choice","field_type":"list","settings":"0;first choice,1;second choice"}}

Filterable

Date

Date only:

{"custom_field":{"name":"date only","field_type":"date","settings":"%Y/%m/%d"}}

Date and Time:

{"custom_field":{"name":"date and time","field_type":"date","settings":"%Y/%m/%d %H:%M"}}

Filterable

Email

{"custom_field":{"name":"email address","field_type":"email","settings":null}}

Not filterable

Phone

{"custom_field":{"name":"phone number","field_type":"phone","settings":null}}

Not filterable

Address

{"custom_field":{"name":"address","field_type":"address","settings":null}}

Not filterable

URL

{"custom_field":{"name":"website","field_type":"url","settings":null}}

Not filterable

Custom field values:

Since custom field names are unique within their scope (Leads, Contacts, Deals) you can pass them as parameters when creating or updating an object. The representation has the name of the custom field as the key and values as the value:

Leads

"custom_field_values":{"Revenue type":"text entered here"}

Contacts and Deals

"custom_fields":{"Revenue type":"text entered here"}


Single line text:

"name": value

Paragraph Text

"name": "value

Number

"name": value

Checkbox

"name": value (0 or 1)

Dropdown

"name": choice id

Date

"name": value (eg. "1/31/2014" or "1/31/2014 3:02")

Email

"name": value

Address

"name": {"street": value, "city": value, "region": value, "zip": value, "country": value}

Phone

"name": value

URL

"name": value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment