How does offset work for allDeals

Hi,

I am making all deals API call and wanted to understand how the offset works, I understand it has the next page dealid if it has more pages. I has few questions below

- what order is the reponse returned? by create date of the dealid? assuming lower dealid are created first?

- I am getting duplicate dealids in different offset pages, Is dealid not unique?

- is there a way to contol by dates than dealid like since? or from/to dates? That way it is easier to batch teh records than rerun the who thing

- I am setting to stop at hasmore =false|False it goes into infinite loop. I checked by seting hasmore=True it stopped

thanks

Hi,

one update -

I am setting to stop at hasmore =false|False it goes into infinite loop. I checked by seting hasmore=True it stopped

This work with hasmore =False, i had it as false.

Hi @rami123,

I hope all is well with you :grinning_face_with_smiling_eyes:

Let’s walk through the questions one by one:

1

The sorting of the deal response would be from the oldest created date to the newest created deal.

#2

I wouldn’t expect to see a duplicate deal id as deal id are unique. Do you mind sharing with me some examples where you’re seeing duplicate deal id? Also, just to clarify you’re using this endpoint: Get all deals to retrieve deals in your account, is that right?

#3

For now, it is not possible to filter deals based on properties. If you haven’t already done so, I’d suggest for you to do an upvote and comment on this idea page: HubSpot Community - Search contacts, companies and deals by custom pro… - HubSpot Community

#4

I’m not too sure if I’m understanding this, do you mind when you use the condition hasmore = false, the for loop will continue looping? In this case, could you share with me the code that you wrote to loop through the results?

Thanks for quick reply!

#2 & #4 are related. When i had hasmore = False it worked.