APIs & Integrations

gmites
Member

Get Recent Contacts Issue

SOLVE

Hello!

I'm testing the service Get Recent Contacts.
https://api.hubapi.com/contacts/v1/lists/all/contacts/recent?hapikey=demo&timeOffset=1558087200
I'm expecting it to return a list of contacts created since a specific time by passing timeOffset=X. However, I'm getting a list of contacts.
I would like to know since what date of creation this service returns the list of contacts?
Which is the criterion to return that list of contacts?
Could you please help me?
Thanks!

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Get Recent Contacts Issue

SOLVE

Hi, @gmites.

 

Happy to clarify!

 

The Get recently created contacts endpoint returns created contacts in reverse chronological order. Per the documentation: "The response is sorted in descending order by Create date; the most recently created contact is returned first."

 

The timeOffset parameter is used with the vidOffset parameter to page back in time through created contacts. It does not serve as a time filter, however, as it must be combined with the vidOffset parameter.

 

For example, if you query /contacts/v1/lists/all/contacts/recent?count=100, you will get the 100 most recently created contacts. If you use the time-offset value at the end of the response without also using the vid-offset value (e.g. /contacts/v1/lists/all/contacts/recent?count=100&timeOffset=1552666574201), you will receive the same list of 100 contacts. To get the next 100 contacts, you must use both parameters: /contacts/v1/lists/all/contacts/recent?count=100&timeOffset=1552666574201&vidOffset=149851.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
1 Reply 1
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

Get Recent Contacts Issue

SOLVE

Hi, @gmites.

 

Happy to clarify!

 

The Get recently created contacts endpoint returns created contacts in reverse chronological order. Per the documentation: "The response is sorted in descending order by Create date; the most recently created contact is returned first."

 

The timeOffset parameter is used with the vidOffset parameter to page back in time through created contacts. It does not serve as a time filter, however, as it must be combined with the vidOffset parameter.

 

For example, if you query /contacts/v1/lists/all/contacts/recent?count=100, you will get the 100 most recently created contacts. If you use the time-offset value at the end of the response without also using the vid-offset value (e.g. /contacts/v1/lists/all/contacts/recent?count=100&timeOffset=1552666574201), you will receive the same list of 100 contacts. To get the next 100 contacts, you must use both parameters: /contacts/v1/lists/all/contacts/recent?count=100&timeOffset=1552666574201&vidOffset=149851.

Isaac Takushi

Associate Certification Manager
0 Upvotes