APIs & Integrations

gui_santos
Participant

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:

/contacts/v1/contact/email/email@email.de/profile?property=hs_emailconfirmationstatus


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

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Get Contacts By Email endpoint not returning property

SOLVE

Hi, @gui_santos.

 

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 Smiley Wink.

 

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.

 

Thus, you are retrieving the properties of contact 48243101 in account 3881681 when you want to pull the data for contact 12251 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....

Isaac Takushi

Associate Certification Manager

View solution in original post

9 Replies 9
himanshurauthan
Thought Leader | Elite Partner
Thought Leader | Elite Partner

Get Contacts By Email endpoint not returning property

SOLVE

Hello @gui_santos 

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.

Thanks

Digital Marketing & Inbound Expert In Growth Hacking Technology
gui_santos
Participant

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`

 

"properties": {
            "lastmodifieddate": {
                "value": "1562253443224"
            }
        },


And if I check this email's properties in Hubspot dashboard:
Screen Shot 2019-07-05 at 9.51.03 AM.png

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get Contacts By Email endpoint not returning property

SOLVE

Hi, @gui_santos.

 

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.

 

Thanks for your patience.

Isaac Takushi

Associate Certification Manager
IsaacTakushi
HubSpot Employee
HubSpot Employee

Get Contacts By Email endpoint not returning property

SOLVE

Hi, @gui_santos.

 

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!

Isaac Takushi

Associate Certification Manager
0 Upvotes
gui_santos
Participant

Get Contacts By Email endpoint not returning property

SOLVE

Sure! But should I post my API_KEY here? No, right?

Anyway, another example:

https://api.hubapi.com/contacts/v1/contact/email/susann.mosebach@friday.de/profile?hapikey={API_KEY}


the response (only the properties... do you want the whole response?):

"properties": {
        "hs_email_optout_4510926": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_email_optout_5122879": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_email_optout_4634402": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "num_unique_conversion_events": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 0,
                    "selected": false
                }
            ]
        },
        "hs_email_quarantined": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_analytics_revenue": {
            "value": "0.0",
            "versions": [
                {
                    "value": "0.0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_social_num_broadcast_clicks": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "createdate": {
            "value": "1562248657072",
            "versions": [
                {
                    "value": "1562248657072",
                    "source-type": "API",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_email_recipient_fatigue_recovery_time": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_email_optout": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_analytics_last_timestamp": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_analytics_num_visits": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_social_linkedin_clicks": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_analytics_last_visit_timestamp": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_social_last_engagement": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_email_optout_4511177": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_analytics_source": {
            "value": "OFFLINE",
            "versions": [
                {
                    "value": "OFFLINE",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_email_optout_7031960": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_email_domain": {
            "value": "friday.de",
            "versions": [
                {
                    "value": "friday.de",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_analytics_num_page_views": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_analytics_first_touch_converting_campaign": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "email": {
            "value": "susann.mosebach@friday.de",
            "versions": [
                {
                    "value": "susann.mosebach@friday.de",
                    "source-type": "API",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_analytics_first_visit_timestamp": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "lastmodifieddate": {
            "value": "1562248663319",
            "versions": [
                {
                    "value": "1562248663319",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 1562248663319,
                    "selected": false
                }
            ]
        },
        "hs_analytics_first_timestamp": {
            "value": "1562248657072",
            "versions": [
                {
                    "value": "1562248657072",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_social_google_plus_clicks": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_analytics_last_touch_converting_campaign": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_lifecyclestage_subscriber_date": {
            "value": "1562248657072",
            "versions": [
                {
                    "value": "1562248657072",
                    "source-type": "API",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_analytics_average_page_views": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_email_optout_4641780": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_social_facebook_clicks": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_is_contact": {
            "value": "true",
            "versions": [
                {
                    "value": "true",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 0,
                    "selected": false
                }
            ]
        },
        "num_conversion_events": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "CALCULATED",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 0,
                    "selected": false
                }
            ]
        },
        "hs_analytics_num_event_completions": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_social_twitter_clicks": {
            "value": "0",
            "versions": [
                {
                    "value": "0",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_analytics_source_data_2": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "hs_analytics_source_data_1": {
            "value": "API",
            "versions": [
                {
                    "value": "API",
                    "source-type": "ANALYTICS",
                    "source-id": "ContactAnalyticsDetailsUpdateWorker",
                    "source-label": null,
                    "timestamp": 1562248659976,
                    "selected": false
                }
            ]
        },
        "lifecyclestage": {
            "value": "subscriber",
            "versions": [
                {
                    "value": "subscriber",
                    "source-type": "API",
                    "source-id": null,
                    "source-label": null,
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        },
        "hs_email_optout_4587698": {
            "value": "",
            "versions": [
                {
                    "value": "",
                    "source-type": "EMAIL",
                    "source-id": "Updated in response to a contact being created.",
                    "source-label": "susann.mosebach@friday.de",
                    "timestamp": 1562248657072,
                    "selected": false
                }
            ]
        }
    },

and in the UI:
Screen Shot 2019-07-09 at 3.57.04 PM.png

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Get Contacts By Email endpoint not returning property

SOLVE

Hi, @gui_santos.

 

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 Smiley Wink.

 

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.

 

Thus, you are retrieving the properties of contact 48243101 in account 3881681 when you want to pull the data for contact 12251 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....

Isaac Takushi

Associate Certification Manager
gui_santos
Participant

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

Anyway, thanks a lot

IsaacTakushi
HubSpot Employee
HubSpot Employee

Get Contacts By Email endpoint not returning property

SOLVE

I'm glad we could help, @gui_santos!

Isaac Takushi

Associate Certification Manager
0 Upvotes
WeAreELIC
Member

Get Contacts By Email endpoint not returning property

SOLVE

Hey, when will this endpoint—Get a contact by email address—be available for v3?

0 Upvotes