Using line_items batch read Does not accept multiple ids [SOLVED]

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’,
‘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
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’,
)

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

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.

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

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

Cheers
Mia, Community Team