Obviously, dealId and apiKey are replaced by actual values when making the call, which succeeds.
However, the response only returns the top 10 line items, even though the deal has more than 10 line items (ex: 100). This behavior is not consistent with the API documentation:
If we pass a limit of 10 instead of 100, and try to page instead, the response returns hasMore set to FALSE, indicating that there are no additional records, which is incorrect. If we ignore the hasMore value, and pass the returned offset, the next query returns nothing.
Is there a way to retrieve more than 10 associated records? This seems like a code defect as the API behavior does not match its documentation. I do not see another V2 or later endpoint to retrieve the IDs of associated records. There does not seem to be a way to retrieve more than 10 associated IDs.
I am sorry for the inconvenience. After checking further, the deal I was processing had a number of line items equal to the paging size. I got confused by the fact that an offset was returned when the response was complete. Thank you again and sorry for my mistake here. The API is working as expected.
I am sorry for the inconvenience. After checking further, the deal I was processing had a number of line items equal to the paging size. I got confused by the fact that an offset was returned when the response was complete. Thank you again and sorry for my mistake here. The API is working as expected.
See screenshot of my response for a deal with 13 associated line items
@zaklein , have you experienced an issue like this before?
@dominicp can you test with another deal? Can you set the limit to 1 and see if you get pagination?
HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates. Learn More.