Hi!,
I have a property ‘subscription__monthly’ set to have unique values. When from Python I call the function ‘client.crm.contacts.batch_api.update’ with several contacts with that property with value ‘’ (this is the value to set the property to null) I get the error:
{"status":"error","message":"Property values were not valid: [{\"isValid\":false,\"message\":\"Values for property \\\"subscription__monthly___coupon_code2\\\" must be unique. Given 2 updates with value \\\"\\\".\",\"error\":\"CONFLICTING_UNIQUE_VALUE\",\"name\":\"subscription__monthly___coupon_code2\",\"propertyValue\":\"\",\"portalId\":24095220}]","correlationId":"342a577c-60d1-4a08-bb5d-67b83ccb48b6","errors":[{"message":"Values for property \"subscription__monthly___coupon_code2\" must be unique. Given 2 updates with value \"\".","code":"CONFLICTING_UNIQUE_VALUE","context":{"propertyName":["subscription__monthly___coupon_code2"]}}],"category":"VALIDATION_ERROR"}
[
{'id': 1, 'properties': {'company': 'Power!', 'partner': 'true', 'firstname': 'Abrm', 'phone': None, 'subscription__monthly': '', 'subscription__monthly___referral_link': '', 'subscription__non_monthly': 'SNPRO', 'subscription__non_monthly___referral_link': 'https://www.test.com?fpr=dpa&coupon=SNPRO', 'user_country': None, 'website': None}},
{'id': 2, 'properties': {'company': 'rading', 'partner': 'true', 'firstname': 'rading', 'phone': None, 'subscription__monthly': '', 'subscription__monthly___referral_link': '', 'subscription__non_monthly': 'PST', 'subscription__non_monthly___referral_link': 'https://www.test.com?fpr=dpa&coupon=PST', 'user_country': 'ES', 'website': 'https://www.tradingaldia.com'}}
]
The property I am trying to update and having problems with is “subscription__monthly”, which I am sending as
'subscription__monthly': ""
If instead of updating in ‘batch’ I update the contacts sequentially (or with batches of size 1), no errors occur.
Is this a bug in the API or is it expected behaviour?
Thank you!