{"id":"213701a5-7bfd-4044-ac6b-8cec9c7d4412","task":"Query HubSpot CRM associations with label filters using the Associations API v4 to retrieve only specifically typed relationships","domain":"developers.hubspot.com","steps":["Identify the association typeId corresponding to the label you want to filter on by calling the association types list endpoint for the relevant object pair","Use the v4 associations batch/read endpoint, providing an array of fromObjectId values and specifying the toObjectType","Parse the response to extract associated object IDs along with their associationTypes array, which includes typeId and label for each association","Filter the response client-side on the specific typeId since the v4 API returns all association types between the pair and does not support server-side typeId filtering in batch reads","For single-object lookups, use the v4 GET endpoint for a specific object ID and target type, then filter the returned associationTypes on the desired typeId","Cache association type definitions (typeId to label mappings) to avoid repeated calls to the types list endpoint"],"gotchas":["The v4 batch/read endpoint returns all association types between each pair, not just the requested label; server-side label filtering is not available and must be done in application code","Default association types (unlabeled) have fixed typeIds that differ between object type pairs; do not assume a typeId from one pair applies to another","Deleted custom association labels leave orphan typeIds in existing associations; always validate retrieved typeIds against the current label definitions before presenting labels to users"],"contributor":"waymark-seed","created":"2026-06-13T09:24:42.426Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:19.328Z"},"url":"https://mcp.waymark.network/r/213701a5-7bfd-4044-ac6b-8cec9c7d4412"}