API: Get Contact Properties for a single Contact

Hi,

I am trying to retrieve analytics on contacts via the API.

My goal is to retrieve the follow data about a contact:

Average page views
First page seen
First referring site
Last page seen
Last referring site
Number of event completions
Number of page views
Number of sessions
Original source
Original source drill-down 1
Original source drill-down 2
Time first seen
Time last seen
Time of first session
Time of last session

I see that this information can be retrieved using the end-point:

/properties/v1/contacts/properites

What are the paramter rules around retrieving this information for a particular contact i.e. How do I indicate in my call that I want a specific contact?

Thanks

Hello @RonWor ,
In order fetch a specific contact either you can call by email or HubSpot Contact ID ( VID ). You can use these 2 API calls:
1) Get a contact record by its vid
for using VID, you must be knowing the contact ID that was created on HubSpot.
2) Search for a contact by email address
email can be easily used in searching for a contact on HubSpot.
Also in the API calls, you can easily specify which properties you want to have in the response from HubSpot.
Thanks

Thank you very much I’ve found what I need.

@himanshurauthanHow we can specify the properties that we need in the API response?

Hey, @Rahul_Sharma :waving_hand: Which endpoint are you using? Are you trying to retrieve contacts individually or in batches?

One tip — you’re more likely to get a response by posting a new question versus commenting on a post from the past.

Best,

Jaycee