# Using line\_items batch read Does not accept multiple ids \[SOLVED\]

**URL:** <https://community.hubspot.com/t/using-line-items-batch-read-does-not-accept-multiple-ids-solved/91608>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [October 11, 2023, 6:55pm UTC](https://community.hubspot.com/t/using-line-items-batch-read-does-not-accept-multiple-ids-solved/91608 "2023-10-11T18:55:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MMoellering](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@MMoellering](https://community.hubspot.com/u/MMoellering)\
**Post date:** [October 11, 2023, 6:55pm UTC](https://community.hubspot.com/t/using-line-items-batch-read-does-not-accept-multiple-ids-solved/91608/1 "2023-10-11T18:55:28Z")

</div>

I am trying to send an array of line-item ids (taken from the Deal associations), to get the product ids for each line item. The API call returns data but Only on the last id in the array.  
I was hoping someone could tell me what I am doing wrong / what I need to change to get info on all of the line-item ids.  
Thanks in advance

-- Mark

Here is my POST data:  
{“inputs”: [{“id”: “4675197558,”, “id”:“4675197559”, “id”:“4675197560”}]}

Here is my API Curl call info:

array (  
‘url’ =\> ‘[https://api.hubapi.com/crm/v3/objects/line\_items/batch/read](https://api.hubapi.com/crm/v3/objects/line_items/batch/read)’,  
‘content\_type’ =\> ‘application/json;charset=utf-8’,  
‘http\_code’ =\> 200,  
‘header\_size’ =\> 1401,  
‘request\_size’ =\> 221,  
‘filetime’ =\> -1,  
‘ssl\_verify\_result’ =\> 0,  
‘redirect\_count’ =\> 0,  
‘total\_time’ =\> 0.427823,  
‘namelookup\_time’ =\> 0.026375,  
‘connect\_time’ =\> 0.040727,  
‘pretransfer\_time’ =\> 0.067668,  
‘size\_upload’ =\> 73.0,  
‘size\_download’ =\> 424.0,  
‘speed\_download’ =\> 992.0,  
‘speed\_upload’ =\> 170.0,  
‘download\_content\_length’ =\> -1.0,  
‘upload\_content\_length’ =\> 73.0,  
‘starttransfer\_time’ =\> 0.06767,  
‘redirect\_time’ =\> 0.0,  
‘redirect\_url’ =\> ‘’,  
‘primary\_ip’ =\> ‘104.17.202.204’,  
‘certinfo’ =\>  
array (  
),  
‘primary\_port’ =\> 443,  
‘local\_ip’ =\> ‘192.168.100.212’,  
‘local\_port’ =\> 47204,  
‘http\_version’ =\> 3,  
‘protocol’ =\> 2,  
‘ssl\_verifyresult’ =\> 0,  
‘scheme’ =\> ‘HTTPS’,  
‘appconnect\_time\_us’ =\> 67617,  
‘connect\_time\_us’ =\> 40727,  
‘namelookup\_time\_us’ =\> 26375,  
‘pretransfer\_time\_us’ =\> 67668,  
‘redirect\_time\_us’ =\> 0,  
‘starttransfer\_time\_us’ =\> 67670,  
‘total\_time\_us’ =\> 427823,  
‘request\_header’ =\> 'POST /crm/v3/objects/line\_items/batch/read HTTP/2  
Host: [api.hubapi.com](http://api.hubapi.com)  
accept: application/json  
authorization: Bearer {key}  
content-type: application/json  
content-length: 73  
)

Here is the Response:  
array (  
‘status’ =\> ‘COMPLETE’,  
‘results’ =\>  
array (  
0 =\>  
array (  
‘id’ =\> ‘4675197560’,  
‘properties’ =\>  
array (  
‘amount’ =\> ‘20930.000’,  
‘createdate’ =\> ‘2023-02-07T15:47:24.384Z’,  
‘hs\_lastmodifieddate’ =\> ‘2023-02-07T15:47:24.384Z’,  
‘hs\_object\_id’ =\> ‘4675197560’,  
‘hs\_product\_id’ =\> ‘788191644’,  
‘quantity’ =\> ‘1’,  
),  
‘createdAt’ =\> ‘2023-02-07T15:47:24.384Z’,  
‘updatedAt’ =\> ‘2023-02-07T15:47:24.384Z’,  
‘archived’ =\> false,  
),  
),  
‘startedAt’ =\> ‘2023-10-11T18:52:40.652Z’,  
‘completedAt’ =\> ‘2023-10-11T18:52:40.669Z’,  
)

---

<div class="post-metadata">

**Author:** ![MiaSrebrnjak](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miasrebrnjak/32/10_2.png) [@MiaSrebrnjak](https://community.hubspot.com/u/MiaSrebrnjak)\
**Post date:** [October 12, 2023, 4:53pm UTC](https://community.hubspot.com/t/using-line-items-batch-read-does-not-accept-multiple-ids-solved/91608/2 "2023-10-12T16:53:02Z")

</div>

Hi @MMoellering,

Thank you for reaching out to the Community!

I wanted to ask a couple of HubSpot experts for help:

Hi @himanshurauthan, @derekcavaliero, @Bryantworks, do you have any tips for @MMoellering? Thank you!!

Cheers  
Mia, Community Team

---

<div class="post-metadata">

**Author:** ![MMoellering](https://avatars.discourse-cdn.com/v4/letter/m/a5b964/32.png) [@MMoellering](https://community.hubspot.com/u/MMoellering)\
**Post date:** [October 12, 2023, 5:57pm UTC](https://community.hubspot.com/t/using-line-items-batch-read-does-not-accept-multiple-ids-solved/91608/3 "2023-10-12T17:57:44Z")

</div>

SOLVED!!!  
The issue was that to send an array of ids, you need to set the idProperty = “hs\_object\_id”  
That fixed it. Hopefully this helps someone else.

---

<div class="post-metadata">

**Author:** ![MiaSrebrnjak](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miasrebrnjak/32/10_2.png) [@MiaSrebrnjak](https://community.hubspot.com/u/MiaSrebrnjak)\
**Post date:** [October 13, 2023, 4:51pm UTC](https://community.hubspot.com/t/using-line-items-batch-read-does-not-accept-multiple-ids-solved/91608/4 "2023-10-13T16:51:38Z")

</div>

You’re the best, thank you for returning to the Community and updating this thread! ⭐

Here’s an accepted solution for you, you’ve deserved it! 🙂

Cheers  
Mia, Community Team
