How to handle, status of PENDING on contact upsert
SOLVE
I've never seen pending, doesn't mean it doesn't get returned though. I see the examples showing it in there.
So if I were trying to figure this out, I would get the results I do have, sending in an objectWriteTraceId, and then I see all the records that are created (matching on the email address)
Any of the ones you don't have complete, you could extend your promise, add a delay, whatever you need to do in your code, then get the contacts by their email address and see if they are created, returning the IDs from that.
Does this make sense? Use the data you are sending, or generate an array of objects like [{"email": "email1@domain.com", "hs_object_id": "1234"},...] from the data you do have IDs for, and then delay your code, find the ones that you don't have IDs for look them up after a delay, and do that recursivly until you have all of them set up.
How to handle, status of PENDING on contact upsert
SOLVE
I've never seen pending, doesn't mean it doesn't get returned though. I see the examples showing it in there.
So if I were trying to figure this out, I would get the results I do have, sending in an objectWriteTraceId, and then I see all the records that are created (matching on the email address)
Any of the ones you don't have complete, you could extend your promise, add a delay, whatever you need to do in your code, then get the contacts by their email address and see if they are created, returning the IDs from that.
Does this make sense? Use the data you are sending, or generate an array of objects like [{"email": "email1@domain.com", "hs_object_id": "1234"},...] from the data you do have IDs for, and then delay your code, find the ones that you don't have IDs for look them up after a delay, and do that recursivly until you have all of them set up.