{
"status": "error",
"message": "Updates in a single batch must specify its unique property.",
"correlationId": "d6594c05-a699-4014-a51d-6693c172f179",
"category": "VALIDATION_ERROR"
}
What am I doing wrong? The documentation says that when providing a not existing id it will create the contact but it does not work
I faced the same issue and after investigating a bit I found out that the hs_object_id is not set as unique id in property settings (although it is unique). Funny enough!
So besically it is not possible to use hs_object_id for butch upsert endpoint. A workaround would be to create a nea property and make it unique after what to create a workflow which will copy the original IDs to the newly created unique property. Then use that prop in the req body 😄
@LCM4 - my reading of the descrption here suggests thst you need to provide the idProperty selection along with the id value. Using an email address as the idProperty that would look like:
But there is a rather strange warning that "email upserts are not supported" - which maybe practically limits what you can use the API for. Unless this format works of course:
{
"status": "error",
"message": "Duplicate IDs found in batch input: []. IDs must be unique",
"correlationId": "218c3962-47cc-4248-87ea-0064604ff943",
"context": {
"ids": [
""
]
},
"category": "VALIDATION_ERROR"
}
But there is a rather strange warning that "email upserts are not supported" - which maybe practically limits what you can use the API for.
Might be that since email is not supported here, or documentation is wrongly written on how pass the data correctly (seen that before). Tried the V1 API where a similar endpoint exist and works just right, but yeah, this one does not 😞
And a note hehe
I've tried deleting the id, idProperty, both at the same time, leave the id for the one that exist and none of those are working
ago 27, 20249:18 AM - editado ago 27, 20249:21 AM
Colaborador(a)
Contact batch upsert endpoint
resolver
So should we consider documentation is wrong and we can't batch update/insert contacts? I tried to get this working according to guidelines without any success, it returns error 400 if using `email` as `idProperty` value Response is : `Unable to perform update/upsert by non-unique 0-1 property email in portal ID XXX`.