I'm using the hubspot-api-client package for python to do the batch read with the following code. I always get an empty list in the response which never contains an error (not even "Not Found" type error). However, the package may be hiding the error.
from hubspot import HubSpot
from hubspot.crm.tickets import SimplePublicObjectId, BatchReadInputSimplePublicObjectId
hubspot_api_client = HubSpot(<api key>)
id_list = [<ticket id 1>, <ticket id 2>, <ticket id 3>, <ticket id 4>]
inputs = [SimplePublicObjectId(id) for id in id_list]
batch_input = BatchReadInputSimplePublicObjectId(inputs=inputs, id_property='id', properties=['City', 'content', 'subject'])
hubspot_tickets = hubspot_api_client.crm.tickets.batch_api.read(batch_input)
I can use the same client object to retrieve each ticket successfully with get_by_id, but the batch always returns an empty list.
Permutations I've tried:
inputs = [{'id': SimplePublicObjectId(id)} for id in id_list]
inputs = [{'id': id} for id in id_list]
inputs = id_list
id_property = 'ticket_id'
id_property = 'ticketId'
id_property = 'hs_object_id' # Name from get_by_id response properties
The response object i get in code is always as follows