I'm doing a search for newly created contacts in Hubspot and have that part working fine. However, as the title says, I'm having an issue returning the company name and or id in those results. Looking at the documentation for /crm/v3/objects/contacts/search the example return data has:
Unfortunately I don't think we can do a join statement like that via the API. The closest I can think of is to do 2 calls, then do a function to merge both JSON responses by their ID.
Question though: aside from performance, is there other considerations as to why you need the data returned in one API call?
Thank you for the reply. Unfortunately, this is not quite what I'm trying to do. Yes, my end result (that I'm hoping for) is to return the company with the newly created contact, but I was hoping to do it in one call. For example, if I was to pull this info from a database, my query would look someting like this:
SELECT a.contact, b.company FROM contacts a LEFT JOIN companies b ON a.id = b.id WHERE a.createdate > timeOfMyChoosing
Unfortunately I don't think we can do a join statement like that via the API. The closest I can think of is to do 2 calls, then do a function to merge both JSON responses by their ID.
Question though: aside from performance, is there other considerations as to why you need the data returned in one API call?
Yeah, I've come to that conclusion that I'll have to make at least two calls for each contact. I was hoping to do it in one call, not only for performance, but it would be cleaner/less code.