APIs & Integrations

Not applicable

Deal API not returning all values within since range

I am trying to get 100 after a certain date.
However, it always only returns the most recent for this month and none of the others.

Here is the GET request.

https://api.hubapi.com/deals/v1/deal/recent/created?count=100&offset=0&access_token=XXXXXX&since=143...

Why is this happening?

0 Upvotes
8 Replies 8
Not applicable

Deal API not returning all values within since range

Is there a way to return them in desc order? Most recent first?

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Deal API not returning all values within since range

@Wyatt_Benno I have one started out for you. Essentially you can append on the properties to the call you would want.

https://api.hubapi.com/deals/v1/deal/paged?hapikey=xxxxx&properties=pipeline&properties=dealname&pro...

If you need the most recent ones you can filter out the results afterwards in your code based on the createDate etc.

0 Upvotes
Not applicable

Deal API not returning all values within since range

@pmanca Thank you very much. I see what to do now! :relaxed:

0 Upvotes
Not applicable

Deal API not returning all values within since range

@pmanca Yes. This is what I am looking for. I have tried to use the properties parameter to return the exact same results as the “most recent api” without luck. Could you provide an example of using this to return the same values/properties.

0 Upvotes
Not applicable

Deal API not returning all values within since range

@pmanca Thank you. I realize the other endpoint exists. I want to get the most recent 500 extended further back then the first month. When I use the “all” endpoint it gives different return values. How do I get the same values as the “recent” api endpoint using the “Get all deals” endpoint?

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Deal API not returning all values within since range

@Wyatt_Benno If by return values you mean that you are looking for specific properties then you could use the properties parameter,

Properties …&properties=x&properties=y…

0 Upvotes
Not applicable

Deal API not returning all values within since range

It only can return the most recent month? What is the point in having since then?

0 Upvotes
3PETE
HubSpot Employee
HubSpot Employee

Deal API not returning all values within since range

@Wyatt_Benno Yes here is the note in the documentation.

Note: This endpoint will only return records created in the last 30 days, or the 10k most recently created records. If you need to get all of your deals, please use this endpoint.

The endpoint it is referring to is:

You can page through all your deals and filter it by create date to get deals that span more than 30 days.

0 Upvotes