Custom fields list endpoint

(Lukasz Maslej) #1


I would have a question concerning custom fields. I found in xml-rpc api docs enpoints to create/update custom fields. Is there also some way to fetch the list of custom fields for selected resource type like contact/company by xml-rpc api?


(John Borelli) #2

Hi @Lukasz_Maslej,

you can use the Query method on the DataFormField table to query for custom field information. Using the FormId field for query you can segment by what table, the fields for contacts. Table schema can be referenced here:

(Nicholas Trecina) #3

Hi @Lukasz_Maslej, here is an example XML-RPC request that will give you the Id, Name, Label, and DataType fields for all contact custom fields.

<?xml version='1.0' encoding='UTF-8'?>

If you wanted to return company custom fields instead, you would replace the FormId parameter value of -1 with -6. See the Table Schema Documentation for the full list of FormId values under the DataFormField section.

(Venkatesan Rajendiran) #4


I was trying to get the list of custom fields using POST man. For this i have used the below endpoint but it is throwing error. Can you please help on this?

(Nicholas Trecina) #5

Hi @Venkatesan_Rajendira, the request above is for the XML-RPC API which is completely separate from the REST API. In order to get contact custom fields via REST, you would make a call GET You can find more details about the REST endpoint here.

(Venkatesan Rajendiran) #6

Thank you @Nicholas_Trecina it is working fine as expected. Is there any API call to get the standard fields of tables.?

(Nicholas Trecina) #7

We don’t have an endpoint that will return the list of standard properties. You can refer to the API docs to find out what is available.

(John Borelli) #8

There isn’t a list yet for REST (still being developed) but the RPC model references the following:

The REST model uses different naming for its returns but no descriptive list is yet available for those.

(Venkatesan Rajendiran) #9

Thank you @Nicholas_Trecina @John_Borelli for your help.