API to Create Custom Fields


(Trevor Delamorandiere) #1

Hi,

I am looking for documentation as to creating custom fields. I have a form with many additional fields that are custom fields and would like to send this over the API and save it for a contact. Can anyone shed some guidance on this?

Thanks!


(John Borelli) #2

Trevor,

What version of the api are you using or wanting to use? (sdk, api, REST)?


(Trevor Delamorandiere) #3

Hi John,

Thanks for the reply. I am using version 1.0 and using REST


(John Borelli) #4

The REST documentation for updating contacts (what you will use for custom fields) can be found here:
https://developer.infusionsoft.com/docs/rest/#!/Contact/updateContactUsingPATCH

The example of the json submit to the right illustrates adding/editing custom fields:


(Trevor Delamorandiere) #5

Ah I see, thanks! Whats partialContactDTO? I see it as a required field. I have not seen this field before.


(John Borelli) #6

All DTO’s are structures so not so much a field as a set or specifically a data object. I don’t know of anything that is called ‘partial’ so not sure about that part.

I see…you mean from the parameter list…they’re just saying that not every field is required.


(Trevor Delamorandiere) #7

gotcha, thanks John!

Trevor


(Delgesh_Shahab) #9

This can be easily done with PHP.

example
$customField = $infusionsoft->contact( ‘update’,$yourContactId, array(’_yourcustomfield’ => $yourVaraible ) );


(John Borelli) #10

tdelam,

To avoid confusion and since I know you have asked specifically for answers with REST:

Del’s example is an api solution. You can use it but you would have to also install the support files on your server using composer. I thought I’d make sure that was clear since you didn’t ask about the api implementation.