@newera - No, it returns all the associations requested. You can then use those object IDs to batch read the data you really want.
For example, I will use this for getting all the line items of a batch of deals. In this example I only sent an array of 3 deal IDs but usually I send 50-100. Then I get back all of the line-item associations for those deals, which I can then gather up to batch read the line item data (100 at a time).
Here is the data I got back from the associations batch read for my 3 deals I requested (input IDs). I will then use that data to gather up the resulting toObjectID values into an array to call the batch read for line items to get the actual line item data.
Hope this makes more sense now.
HTTP 200
{
“status”: “COMPLETE”,
“results”: [
{
“from”: {
“id”: “16174181965”
},
“to”: [
{
“toObjectId”: 8112087555,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 8139460147,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 8139462778,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
}
]
},
{
“from”: {
“id”: “13909957168”
},
“to”: [
{
“toObjectId”: 6236416028,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6236416029,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6236416030,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6236416031,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6236416032,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6236416033,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6236416034,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6236416035,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
}
]
},
{
“from”: {
“id”: “15122393088”
},
“to”: [
{
“toObjectId”: 6826785955,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6827757969,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6852615703,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 6853959255,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 7791156264,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
},
{
“toObjectId”: 7791193741,
“associationTypes”: [
{
“category”: “HUBSPOT_DEFINED”,
“typeId”: 19,
“label”: null
}
]
}
]
}
],
“startedAt”: “2024-02-10T16:46:49.526Z”,
“completedAt”: “2024-02-10T16:46:49.542Z”
}