Oct 27, 202010:16 AM - edited Oct 27, 202011:44 AM
Participant
Create Contact and associate to Company in one call
Prior to this week I was able to create a Contact and associate it to a Company through the "associatedcompanyid" property in a single HTTP POST request to the URL, https://api.hubapi.com/crm/v3/objects/contacts.
I'd like to avoid having to make 2 API calls to create the Contact and associate it to the Company. Is there another way to acheive this?
What's happening now, is that we are receiving a successful response from the Contact create call, with the associatedcompanyid property set, however, the Contact is not associated with the Company.
Create Contact and associate to Company in one call
@dmcewenOn my side with the sdk for the api V3 it works well, so there is no reason it don't work when querying directly the api endpoint. Can you try to add the field associatedcompanyid as integer and not as string ? And verify that the id you use really exist in your company list
Create Contact and associate to Company in one call
Thanks @quentin_lamamy . I will add that the Contact creates successfully, it's just not associated to the Company. This same request has worked for the past several months, but within the past week it doesn't associate the Contact to the Company.
i just run a test on associating contact and company with this field, it will need a times to process, while waiting can you provide us the request and the answer in the call-log of your api key ? You can get it in settings > integrations > apikey. It will help us to understand what is going wrong.
I was originally using OAuth to connect to the HubSpot instance. I tested it with the API key and had the same result. In the call log you can see from the screenshot below that both the Request and Response tabs do not have any data in them.