Get Contacts By Email endpoint not returning property
SOLVE
Hi,
I need to check if a contact confirmed their subscription to our newsletter.
To do that, we created a property called `hs_emailconfirmationstatus`. And now I created a request to get contact by email passing an email and this property like this:
For some emails, I'm getting the property in the response and for others, I'm not. If I check these emails in my contact list (in Hubspot) everything is perfect. The email is there and the property is also there with the right value
Thank you for this example! Yes, please do not share your hapikey on this forum. Please also tag me with @IsaacTakushi in future responses so I am notified .
From the example you provided my support colleague Kim, I see that you are using the hapikey from your production account, 3881681, instead of your sandbox account, 4564856.
You have contacts with the email susann.mosebach@fr... in both accounts, but the one with a value for hs_emailconfirmationstatus lives in account 4564856.
If you use the hapikey generated from this page in account 4564856, you should see hs_emailconfirmationstatus returned for the emailsusann.mosebach@fr....
In GET API call for a contact, be default it returns all those properties in response for which the contact profile has values. And on specifying the property, the response will only contain that property data. It can be the case that your contact has got modified.
Get Contacts By Email endpoint not returning property
SOLVE
Yes! So to test that I removed the property definition and then checked the response. And for some emails in the response I'm only getting `lastmodifieddate`
I see that you've connected with my support colleague, Kim.
I'm able to reproduce this behavior with the Get a contact by email endpoint. I'll investigate why the hs_emailconfirmationstatus property is excluded from the endpoint's responses on my end.
In the meantime, the Get a contact by vid endpoint seems to successfully return this property.
In my test, I mixed up two contact records with very similar email and vid values (in fact, they belonged to the same colleague).
As such, I actually cannot reproduce this behavior. The Get a contact by email and Get a contact by vid endpoints both return the hs_emailconfirmationstatus property's value when one exists for a contact. Sincere apologies for the confusion.
I believe Kim has already reached out, but can you share any other instances where a contact that has a known Marketing email confirmation status does not return hs_emailconfirmationstatusvia the API? If you provide the request URL and response, that will help us investigate further!
Thank you for this example! Yes, please do not share your hapikey on this forum. Please also tag me with @IsaacTakushi in future responses so I am notified .
From the example you provided my support colleague Kim, I see that you are using the hapikey from your production account, 3881681, instead of your sandbox account, 4564856.
You have contacts with the email susann.mosebach@fr... in both accounts, but the one with a value for hs_emailconfirmationstatus lives in account 4564856.
If you use the hapikey generated from this page in account 4564856, you should see hs_emailconfirmationstatus returned for the emailsusann.mosebach@fr....
Get Contacts By Email endpoint not returning property
SOLVE
YES!!! you are 100% correct
Just tested with the right key. Fun fact for you, we are using kubernetes and the key that I sent Kim is the key configured in our sandbox... so I need to fix my infrastructure too hahahaha