我正在尝试使用Record Upsert API,但在指定正确的重复检查字段方面遇到了麻烦。
我正在使用cURL,无法确定要在哪里包含duplicate_check_fields
参数
我尝试将其放在URL中:
https://www.zohoapis.com/crm/v2/contacts/upsert?duplicate_check_fields=Contacts-Email,Last_name
在数据中,在数据数组的内部和外部:
{
"data":[
{
"Company":"<COMPANY>",
"Last_Name":"<LAST_NAME>",
"First_Name":"<FIRST_NAME>",
"Phone":"<PHONE NUMBER>"
}
],
"duplicate_check_fields":"Contacts - Email,Last_Name"
}
或
{
"data":[
{
"Company":"CTM",
"Last_Name":"<LAST_NAME>",
"First_Name":"<FIRST_NAME>",
"Phone":"<PHONE NUMBER>",
"duplicate_check_fields":"Contacts - Email,Last_Name"
}
]
}
当我将其放置在JSON中的任何位置时,服务器都会响应:
{"code":"INVALID_DATA","details":{"expected_data_type":"jsonobject"},"message":"body","status":"error"}
我为应该做的一件直截了当的任务而感到困惑。
答案 0 :(得分:0)
请提供正确的数据和字段名称(api)。也许Contacts - Email
不是字段名,应该是Email
或Contacts_-_Email
。您会按getFields
尝试:
{
"data":[
{
"Company":"CTM",
"Last_Name":"<LAST_NAME>",
"First_Name":"<FIRST_NAME>",
"Phone":"<PHONE NUMBER>",
"duplicate_check_fields":"Email,Last_Name"
}
]
}
这是我的代码,对我有用...
{
"data": [{
"Email":"teestemail@gmail.com",
"Last_Name":"Lead Update Upsert",
"Phone":"+884465",
"duplicate_check_fields ":"Email,Last_Name"
}]
}