REST v2 - Questions regarding Company Field of Contact

From previous forum posts I can gather that the text company field we update in xmlrpc is deprecated. When creating or updating a contact to enter company information, the REST v2 API requests an object of the form [ id => (string), company_name => (string) ].

I do have some questions regarding this new Company object entity for the Contact.

Context: Company name is a required field for our program. So as a result of this change it seems that instead of one API call to complete a registration we would now have to do an extra call?

For example: 1. Create company. 2. Create contact and pass in the id from that created company

I just wanted to clarify to make sure there isn’t a way that we are missing here in order to do it in one call?


Side note and potential bug? My developer was able to create the Contact with a Company of id = NULL but with Company name of that obj filled in. Of course when viewing it on the Sandbox it will not appear. But I assume this should have thrown an error when he attempted creation?

Hi @CG_Dev

Yes, that’s correct and it’s by design. Since Companies are now a separate entity, the expected flow is:

  1. Create the Company.
  2. Create (or update) the Contact and pass the Company ID in the company object.

At the moment, there isn’t a way to create both the Company and the Contact in a single API call.

Regarding the potential bug you mentioned, thanks for pointing that out. We’ll take a look into the behavior where a Contact can be created with a company object containing a null ID but a populated company_name. If that’s not the intended behavior, we’ll investigate and address it.

@CG_Dev
I dropped a feature from. Keap integration for precisely this reason. The only(?) workaround, if you’re working with a Human At The Keyboard is to do much of this work as a background task.
Of course, you might not be able to report certain errors, but that’s the price of progress.