Hello everyone
I am using Hubspot APIs to intergrate it with our internal ERP and I am facing an issue related to product updates. Let me explain
I have a transaction (for instance with id 28730033375)
Using the API
GET https://api.hubapi.com/crm/v4/objects/deals/28730033375/associations/line_items
I am able to get all the line_items associated to my transcation with their respective IDs.
For instance in the result there is
“toObjectId”: 63544129754,
Then, using
GET https://api.hubapi.com/crm/v4/objects/line_items/63544129754?properties=name, description, quantity, price, amount, hs_product_id, lp_id_presta
I have the result like below
{
“id”: “63544129754”,
“properties”: {
“amount”: “5.00”,
“createdate”: “2024-12-20T12:52:46.978Z”,
“description”: “Suivi - CEE”,
“hs_lastmodifieddate”: “2025-01-17T16:13:20.783Z”,
“hs_object_id”: “63544129754”,
“hs_product_id”: “2449969114”,
“lp_id_presta”: “”,
“name”: “CEE IND-UT-137”,
“price”: “1”,
“quantity”: “5”
},
“createdAt”: “2024-12-20T12:52:46.978Z”,
“updatedAt”: “2025-01-17T16:13:20.783Z”,
“archived”: false
}
The point is. The value in “lp_id_presta” which is a custom field of number form, is generated by our ERP and it must flow up to Hupspot.
I tried
PUT https://api.hubapi.com/crm/v4/objects/deals/28730033375/associations/line_items/63544129754
With a body like
{
“properties”: {
“lp_id_presta”: 6
}
}
But I get error 400 Bad Request
“message”: “Invalid input JSON on line 1, column 1: Cannot deserialize value of type `java.util.HashSet<com.hubspot.inbounddb.associations.base.AssociationSpec>` from Object value (token `JsonToken.START_OBJECT`)”,
Can you help me find the correct API and usage of it to update this field (or any other … who knows)?
Thanks in advance.