Hi everyone,
I have been trying to nullify properties of custom objects via batch upsert request. I have tried this with a basic update request and this works as expected. However, when I have tried this with a batch upsert request the property is not successfully updated.
Here is an example of a basic update request succesffully updating the property:
Request:
curl --request PATCH \
--url https://api.hubapi.com/crm/v3/objects/2-31908300/14507441252 \
--header ‘authorization: Bearer YOUR_ACCESS_TOKEN’ \
--header ‘content-type: application/json’ \
--data '{
“properties”: {
"deleted\_at": ""
}
}’
Response:
HTTP 200
{
“id”: “14507441252”,
“properties”: {
"deleted\_at": "",
"hs\_createdate": "2024-08-13T09:47:36.607Z",
"hs\_lastmodifieddate": "2024-08-13T09:50:57.681Z",
"hs\_object\_id": "14507441252",
"hs\_object\_source": "INTEGRATION",
"hs\_object\_source\_id": "3559509",
"hs\_object\_source\_label": "INTEGRATION"
},
“createdAt”: “2024-08-13T09:47:36.607Z”,
“updatedAt”: “2024-08-13T09:50:57.681Z”,
“archived”: false
}
And here is an example of a batch update request unsuccessfully updating the property:
Request:
curl --request POST \
--url https://api.hubapi.com/crm/v3/objects/2-31908300/batch/upsert \
--header ‘authorization: Bearer YOUR_ACCESS_TOKEN’ \
--header ‘content-type: application/json’ \
--data '{
“inputs”: [
{
"idProperty": "uuid",
"id": "b755045b-ae0e-4ccb-a972-8cc5740f2bcc",
"properties": {
"delted\_at": ""
}
}
]
}’
Response:
HTTP 200
{
“status”: “COMPLETE”,
“results”: [
{
"id": "14507441243",
"properties": {
"hs\_createdate": "2024-08-13T09:47:36.607Z",
"hs\_lastmodifieddate": "2024-08-13T09:47:37.347Z",
"hs\_object\_id": "14507441243",
"hs\_object\_source": "INTEGRATION",
"hs\_object\_source\_id": "3559509",
"hs\_object\_source\_label": "INTEGRATION"
},
"createdAt": "2024-08-13T09:47:36.607Z",
"updatedAt": "2024-08-13T09:47:37.347Z",
"archived": false
}
],
“startedAt”: “2024-08-13T09:52:49.284Z”,
“completedAt”: “2024-08-13T09:52:49.412Z”
}
As you can see, this fails to update the property, which I have checked on the website.
How can I nullify blank properties via a batch upsert request?
Thanks