# /crm/v3/objects/deals/batch/update does not seem to work - Cannot deserialize instance of \`java.util

**URL:** <https://community.hubspot.com/t/crm-v3-objects-deals-batch-update-does-not-seem-to-work-cannot-deserialize-instance-of-java-util/44334>\
**Category:** APIs & Integrations\
**Tags:** python, object\
**Created:** [September 24, 2021, 1:45pm UTC](https://community.hubspot.com/t/crm-v3-objects-deals-batch-update-does-not-seem-to-work-cannot-deserialize-instance-of-java-util/44334 "2021-09-24T13:45:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![WSuren](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wsuren/32/64675_2.png) [@WSuren](https://community.hubspot.com/u/WSuren)\
**Post date:** [September 24, 2021, 1:45pm UTC](https://community.hubspot.com/t/crm-v3-objects-deals-batch-update-does-not-seem-to-work-cannot-deserialize-instance-of-java-util/44334/1 "2021-09-24T13:45:18Z")

</div>

Hello,

On the V3 API itself, [this page](https://developers.hubspot.com/docs/api/crm/deals), I try out the **Update a batch of deals** function for python and it works on the page with the given input data, giving a 200 return code. But when I copy paste _ **exactly** _ that code as python to my local machine it gives an error.

What am I doing wrong?

**code**

import hubspot

from hubspot.crm.deals import BatchInputSimplePublicObjectBatchInput, ApiException

client = hubspot.Client.create(api\_key=“xxxxxxxx”)

batch\_input\_simple\_public\_object\_batch\_input = BatchInputSimplePublicObjectBatchInput(

inputs={“properties”:{“test\_wouter\_data\_import”:“1”},“id”:“2015419691”})

api\_response = client.crm.deals.batch\_api.update(

batch\_input\_simple\_public\_object\_batch\_input=batch\_input\_simple\_public\_object\_batch\_input)

**400 code response on local machine**

`Invalid input JSON on line 1, column 12: Cannot deserialize instance of `java.util.ArrayList` out of START_OBJECT token"`

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [September 24, 2021, 6:22pm UTC](https://community.hubspot.com/t/crm-v3-objects-deals-batch-update-does-not-seem-to-work-cannot-deserialize-instance-of-java-util/44334/2 "2021-09-24T18:22:11Z")

</div>

@taran42 , eventually I will have a tshirt with your name and python on it. It won’t be weird 😜

Until then, could you help out here?

---

<div class="post-metadata">

**Author:** ![WSuren](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wsuren/32/64675_2.png) [@WSuren](https://community.hubspot.com/u/WSuren)\
**Post date:** [September 27, 2021, 7:27am UTC](https://community.hubspot.com/t/crm-v3-objects-deals-batch-update-does-not-seem-to-work-cannot-deserialize-instance-of-java-util/44334/3 "2021-09-27T07:27:29Z")

</div>

I found what’s wrong: the code on the [API page](https://developers.hubspot.com/docs/api/crm/deals) is not correct when you test with one ID, since it forgets to add the square brackets

replacing this code:

inputs={“properties”:{“test\_wouter\_data\_import”:“1”},“id”:“2015419691”})

with this:

inputs=[{“properties”:{“test\_wouter\_data\_import”:“1”},“id”:“2015419691”})]

fixed it for me.
