APIs & Integrations

HDolev
Participant

Update endpoint through Hubspot Node client

I am reaching an issue with the Update function of clients in Hubspot client.

I have tested many times and from many different directions, the error I'm recieveing is as if I send no properties to update - even though I do send. The value I want to update is a custom property of multiline text.

{
"statusCode": 400,
"body": {
"status": "error",
"message": "No properties found to update, please provide at least one.",
"correlationId": "1b81592e-3c5b-4bac-9fa9-53d5f4a00163",
"context": {
"properties": [
"{}"
]
},
"category": "VALIDATION_ERROR"
},

0 Upvotes
2 Replies 2
HDolev
Participant

Update endpoint through Hubspot Node client

I used this option 

apiResponse = await hubspotClient.crm.contacts.basicApi.update(msg)
and it didn't work as expected.
I've made a workaround that works (with the same data) in the follwoing manner:
apiResponse = await hubspotClient.apiRequest({
headers: { 'Content-Type': 'application/json' },
method: 'PATCH',
path: `/crm/v3/objects/contacts/${options.contactId}?idProperty=${options.idProperty}`,
body: msg,
json: true,
});
dennisedson
HubSpot Product Team
HubSpot Product Team

Update endpoint through Hubspot Node client

@HDolev 

Can you provide the code you are executing?

0 Upvotes