How to get Associated Deal Line Items in Search API

Hi,

I could not get deal line items association throush search API

https://api.hubapi.com/crm/v3/objects/deals/search?

Request Body with filter

{
“filterGroups”: [
{
“filters”: [
{
“value”: “true”,
“propertyName”: “hs_is_closed”,
“operator”: “EQ”
}
]
}
],
“properties”:[
“dealname,createdate,hubspot_owner_id,closedate,dealstage,amount”
],
“associations”:[
“line_item”
]
}

Where I could get line items through GET request when append “associations=line_item” in URL as string

https://api.hubapi.com/crm/v3/objects/deals?properties=dealname&associations=line_item

please let me know how to get line item association through search API.

Thanks

Paul

Hello @bibipaulp ,

Welcome to the Community and thanks for the question

Want to tag in @quentin_lamamy to see if he can provide some advice here :blush:

Please reply if anyone knows answer to above question, if this feature available in search API we can reduce no of API calls to retrieve line items assoicated to deal.

Thanks

Paul

@MichaelC , could you help out here?

@dennisedson @bibipaulp

I tried replying several times but there is some kind of bug in the post so I just took screenshots of my message and will place them here.

this is not a aceptable solution, because I have 70000 deals, and to call 70000 request to get the data is a very bad practice. If you publish a search API to SEARCH items, the return excpected is the full item with all their associations, because is like the hubspot model works, you invented that, not me. Please, dont accept this solution, is a very bad way to make something that could do it on a very simple-easy-good way.

Please, can tell us when the problem is solved? I have the same issue.