选择应用类型
第三方企业应用开发

创建个人或企业客户数据

更新于 2023-01-18调用本接口,添加CRM个人客户或企业客户,添加成功后,返回个人客户或企业客户的数据ID。

例如,调用本接口,在企业的客户管理应用中创建新客户,接口调用效果如下图所示。

创建成功后,在企业的客户管理应用中可查看该客户。

权限

要调用此API,需要以下权限之一。

应用类型

是否支持

权限

API Explorer调试

企业内部应用支持维护CRM主数据的接口写入权限API Explorer
第三方企业应用支持维护CRM主数据的接口写入权限API Explorer
第三方个人应用暂不支持维护CRM主数据的接口写入权限暂不支持

请求方法

Loading...

Header参数

名称

类型

是否必填

描述

x-acs-dingtalk-access-token

String

调用该接口的访问凭证。

Body参数

名称

类型

是否必填

描述

creatorUserId

String

记录创建人的用户userId。

creatorNick

String

记录创建人的昵称。

data

Map

客户数据内容,JSON格式字符串。

extendData

Map

扩展数据内容。

permission

Object

权限。

ownerStaffIds

Array of String

负责人的用户userId。

participantStaffIds

Array of String

协同人的用户userId。

relationType

String

关系类型。

  • crm_customer:企业客户

  • crm_customer_personal:个人客户

skipDuplicateCheck

Boolean

是否跳过查重字段。

  • true:是
  • false:否
说明

企业可在查重设置中设置查重字段,如下图所示。

action

String

取值。

  • publicDraw:公海领取客户
  • publicAssign:公海分配客户
  • 其余场景:不用传

返回参数

名称

类型

描述

instanceId

String

客户数据ID。

示例

请求示例

Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...

返回示例

Loading...

错误码

HttpCode

错误码

错误信息

说明

400

request.too.frequent

request too frequent

请求过于频繁

400

relationType.not.exists

relationType not exists

relationType不存在

400

data.format.error

%s

表单数据格式错误

400

noPermission.to.setField

%s

没有设置字段的权限

400

count.exceeds.limit

count exceeds limit

数量达到上限

400

same.data.exists

same data exists

已存在相同数据

400

invalid.uk.parameter

invalid uk parameter

查重字段为空

400

customerCountUnderPrincipal.exceeds.limit

customer count under principal exceeds limit

负责人名下客户数量达到上限

400

sameMobileCount.exceeds.limit

same mobile count exceeds limit

同一个手机号不能被添加超过10次

400

duplicate.operation

duplicate operation

重复操作

400

non.open.customer

draw or assign is not allowed for non-open-customer

该实例非公海客户,不允许操作

400

systemError.appNotExists

%s

应用不存在

400

systemError.notPermittedAccess

%s

无权限操作

400

businessError

businessError, %s

业务错误

400

creatorUserId.not.exists

creatorUserId not exists

creatorUserId不是企业员工

500

systemError

system error %s %s

系统错误

500

systemError

system error, %s %s

系统错误

点击纠错