APIs & Integrations

TimMunro
Contributor

CRM Associations V4 (Beta) Pagination Bug

SOLVE

Trying to use the V4 (beta) associations API, found API responses do not include required pagination details. According to API docs:

https://developers.hubspot.com/docs/api/crm/associations/v4

 

The call to this URL:

GET/crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}

 Should return results & pagination details thus:

{
  "results": [
    {
      "toObjectId": 0,
      "associationTypes": [
        {
          "category": "HUBSPOT_DEFINED",
          "typeId": 0,
          "label": "string"
        }
      ]
    }
  ],
  "paging": {
    "next": {
      "after": "string",
      "link": "string"
    }
  }
}

 

In testing found that the "paging" property is never returned. In the test we created a company (ID=7181446321) that had 600 contacts associated (verified from the HubSpot UI). The GET to crm/v4/objects/COMPANY/7181446321/associations/contact returned this raw response (499 other associations removed for brevity):

{
  "results": [
    {
      "toObjectId": 38351,
      "associationTypes": [
        {
          "label": null,
          "typeId": 280,
          "category": "HUBSPOT_DEFINED"
        },
        {
          "label": null,
          "typeId": 2,
          "category": "HUBSPOT_DEFINED"
        }
      ]
    },
	{"note": "removed 499 other associations for brevity"}
 ]
}

 

You can see there is no "paging" property in the response. Documenting here so this issue can be routed to the HubSpot development team for resolution.

 

Thanks!

 

 

 

 

0 Upvotes
1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

CRM Associations V4 (Beta) Pagination Bug

SOLVE

Fyi, found the issue and it is being worked on. I imagine fix will be pushed early next week

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show

View solution in original post

0 Upvotes
3 Replies 3
dennisedson
HubSpot Product Team
HubSpot Product Team

CRM Associations V4 (Beta) Pagination Bug

SOLVE

@TimMunro ,

Thanks for reporting.  Have sent to the team 👍

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

CRM Associations V4 (Beta) Pagination Bug

SOLVE

Fyi, found the issue and it is being worked on. I imagine fix will be pushed early next week

Thanks,

Dennis




HubSpot Community Developer ShowMake sure to subscribe to our YouTube channel
where you can find the HubSpot Community Developer Show
0 Upvotes
TimMunro
Contributor

CRM Associations V4 (Beta) Pagination Bug

SOLVE

Thanks, have tested and this bug is resolved.

0 Upvotes