I am currently using the HubSpot API to POST new contacts from our application to HubSpot to empower Marketing. However, we have the Auto-Associate Contacts with Companies feature turned on so after a contact is created, HubSpot works to find or create a company with some basic details based off the contacts email domain or website. After a contact is created, I need to retrieve that company ID to store in our system, ideally within the same request so that I have a correlation between the request and the company.
Is there a way to do this? Currently I have a wait 2 seconds clause in the code to wait for HubSpot to do the link before re-querying companies associated with the new contact.