Cannot Get More Than 10 Associations

We’re using this query to retrieve up to 100 line items associated with a specific deal ID:

https://api.hubapi.com/crm-associations/v1/associations/{dealId}/HUBSPOT_DEFINED/19?hapikey={apiKey}&limit=100

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.

Thank you.

@dominicp ,

I am unable to replicate your issue :thinking:

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?

Hi Dennis,

Thank you for the fast response!

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.

BTW, the GraphQL api also defaults to a limit of 10. You can add something like this:

p_education_collection__education_to_contact (limit: 100) {
items {
school_name

}