Need assistance on API related queries

As indicated in API document we used the contact API to store and share the data with Infusion soft. while doing the same, looking into detail page of any contact you will find multiple tabs related to that user, here I am sharing the screenshot to get a better understanding of the same.

Content_API

So trying to understand how can we get data for all these above tabs.

Hi @Jatin_Nahar, if there are specific fields you’re curious about it would be helpful for you to post those here. It looks like there are two custom field tabs (Property Owners and Custom Fields) so those would be accessed a little differently from base fields. Are you using REST or XML-RPC?

@Jatin_Nahar,

You’ll want to be looking at the DataFormTab, DataFormField and DataFormGroup tables. The field table is for the actual field names but you must use an underscore at the beginning of the name and it must be the database name, which does not necessarily match the natural name.

These tables can be read and used for updates but to actually create a custom field you will need to use the Data object’s addCustomField method.

Hello @Nicholas_Trecina, Actually we have directed to use the Contact Tag to get the data inserted into Infusionsoft system, and post using that Tag we got to know that along with Contact there is various tab as well i.e. Address, Additional info, person Notes, etc.

So we just want to know that how we can get data for (Property Owners and Custom Fields) as well. Like do we need to use another tag or is there any other option to resolve the same?

While using below parameter we are getting the basic information,
https://developer.infusionsoft.com/docs/rest/#!/Contact/createContactUsingPOST

And we are using the Create Contact API with these parameters:

{
“addresses”: [
{
“country_code”: “string”,
“field”: “BILLING”,
“line1”: “string”,
“line2”: “string”,
“locality”: “string”,
“postal_code”: “string”,
“region”: “string”
}
],
“birthday”: “2017-11-09T11:54:34.092Z”,
“company”: {
“company_name”: “string”,
“id”: 0
},
“contact_type”: “string”,
“custom_fields”: [
{
“content”: {},
“id”: 0
}
],
“date_created”: “2017-11-09T11:54:34.092Z”,
“email_addresses”: [
{
“email”: “string”,
“field”: “EMAIL1”
}
],
“family_name”: “string”,
“fax_numbers”: [
{
“field”: “FAX1”,
“number”: “string”,
“type”: “string”
}
],
“given_name”: “string”,
“job_title”: “string”,
“last_updated”: “2017-11-09T11:54:34.092Z”,
“lead_source_id”: 0,
“middle_name”: “string”,
“notes”: “string”,
“opt_in_reason”: “string”,
“owner_id”: 0,
“phone_numbers”: [
{
“extension”: “string”,
“field”: “PHONE1”,
“number”: “string”,
“type”: “string”
}
],
“preferred_locale”: “en_US”,
“preferred_name”: “string”,
“prefix”: “string”,
“relationships”: [
{
“id”: 0,
“linked_contact_id”: 0,
“relationship_type_id”: 0
}
],
“source_type”: “WEBFORM”,
“suffix”: “string”,
“tag_ids”: [
0
],
“time_zone”: “string”,
“website”: “string”
}

We are using REST API: https://developer.infusionsoft.com/docs/rest

@Jatin_Nahar,

If you wish to address custom fields and tags and searches (especially for creating the contact itself) you will need to focus on more than just the contact end point…as I was attempting to point out earlier and probably wasn’t clearly describing.

@Jatin_Nahar Custom fields are an optional property and are not included in the response by default. Here is an example request that will get you a contact including its custom fields.

GET https://api.infusionsoft.com/crm/rest/v1/contacts/{contactId}?optional_properties=custom_fields

Hello @Nicholas_Trecina, We have checked the provided API and found below response:

{“email_opted_in”:true,“email_addresses”:[{“email”:“Jake@sfp.email”,“field”:“EMAIL1”}],“tag_ids”:[116,118,120],“addresses”:[],“last_updated”:“2017-10-20T19:28:30.000+0000”,“owner_id”:null,“date_created”:“2017-10-20T19:27:11.000+0000”,“middle_name”:null,“given_name”:“Jake”,“email_status”:“SingleOptIn”,“phone_numbers”:[],“company”:null,“id”:26,“family_name”:"",“custom_fields”:[{“id”:174,“content”:null},{“id”:176,“content”:“Jenee@sfp.email”},{“id”:178,“content”:null},{“id”:180,“content”:null},{“id”:182,“content”:null},{“id”:184,“content”:null},{“id”:186,“content”:null},{“id”:316,“content”:null},{“id”:188,“content”:null},{“id”:190,“content”:null},{“id”:318,“content”:null},{“id”:192,“content”:null},{“id”:320,“content”:null},{“id”:194,“content”:null},{“id”:322,“content”:null},{“id”:196,“content”:null},{“id”:324,“content”:null},{“id”:198,“content”:null},{“id”:326,“content”:null},{“id”:200,“content”:null},{“id”:328,“content”:null},{“id”:202,“content”:null},{“id”:330,“content”:null},{“id”:204,“content”:null},{“id”:332,“content”:null},{“id”:206,“content”:null},{“id”:334,“content”:null},{“id”:208,“content”:null},{“id”:336,“content”:null},{“id”:210,“content”:null},{“id”:338,“content”:null},{“id”:212,“content”:null},{“id”:340,“content”:null},{“id”:214,“content”:null},{“id”:342,“content”:null},{“id”:216,“content”:null},{“id”:344,“content”:null},{“id”:218,“content”:null},{“id”:346,“content”:null},{“id”:220,“content”:null},{“id”:348,“content”:null},{“id”:222,“content”:null},{“id”:350,“content”:null},{“id”:224,“content”:null},{“id”:352,“content”:null},{“id”:226,“content”:null},{“id”:354,“content”:null},{“id”:228,“content”:null},{“id”:356,“content”:null},{“id”:230,“content”:null},{“id”:358,“content”:null},{“id”:360,“content”:null},{“id”:362,“content”:null},{“id”:364,“content”:null},{“id”:366,“content”:null},{“id”:368,“content”:null},{“id”:370,“content”:null},{“id”:372,“content”:null},{“id”:374,“content”:null}]}

So we just want to understand that from where this ID’s are getting generated, and where we have to use these ID’s, also unable to understand the response of particular ID, like each ID, denote to whom?

@Jatin_Nahar You can look up the contact custom fields using this REST endpoint.

Is there sample JSON available with some of these optional properties? Specifically JSON to add property owners?

The “Property Owners” fields that you’re referring to are custom fields specific to your application. You can use the REST endpoint I mentioned above to find the custom field id that corresponds with the field(s) you are looking for.

Hello @Nicholas_Trecina, Thank you very much for your support, we got the solution we wanted. In case of any concern will connect again.

You’re welcome, glad I could help!