3.1 批量添加通讯录

简要描述:

  • 批量添加通讯录,此功能为增量导入,一次最大导入量为500
  • 导出增加失败列表,返回失败原因,失败的联系人也添加到数据中
  • 号码唯一,导入的号码如果已经在通讯录中存在,则按照新导入的信息(包括组信息)更新之前的联系人

请求URL:

请求方式:

  • POST

参数:

参数名

类型

必选项

说明

userId

int

用户 userId,目前必须是应用管家的超级管理员

addressList

arrayList

通讯录参会人列表,不能为空,数量最大500

参数:addressList

参数名

类型

必选

说明

depName

String

部门信息,通讯录完整部门,递进用“/”隔开,比如:“全时公司/研发部门/电话会议组”

contactName

String

姓名

contactEmail

String

手机参会人邮箱

contactPhone

String

手机号码

contactCountry

String

国家码,格式如“86”,长度不能超出8位,首位不能为0

contactAreaCode

String

国内区号(手机号码无区号),长度不能超出8位

返回参数说明:

参数名

类型

说明

code

Int

状态值

msg

String

错误描述

requestId String 请求id

data

Json

返回导入的结果

返回data参数说明:

参数名

类型

说明

successNum

int

成功导入的数量

failedNum

int 失败的数量
failedList arrayList 失败列表

参数:failedList

参数名

类型

说明

depName

String

部门信息

contactName

String

姓名

contactEmail

String

手机参会人邮箱

contactPhone

String

手机号码

contactCountry

String

国家码

contactAreaCode

String

国内区号(手机号码无区号)

remarks String

错误信息,导入错误有以下几种:

1、部门未填写

2、姓名未填写

3、电话或者邮箱未填写,二者不能同时为空

4、国家码格式不正确(必须是数字,不能以0开头,长度不能超过8位)

5、区号格式不正确(必须是数字,长度不能超过8位)

6、电话格式不正确(必须是数字)

7、区号未填写(非中国手机号码,区号不能为空)

8、邮箱格式不正确

传参示例

{
    "userId":6135684,
    "addressList": [{
			"depName":"部门",
            "contactName": "张三",
            "contactEmail": "",
            "contactPhone": "13771855601",
            "contactCountry": "86",
            "contactAreaCode": ""
        }
    ]
}

 

返回示例

{
	"code":0,
    "msg":"Address Create Succeeded",
	"requestId" : "7bf63bab-5a00-fd0d-9d23-5cd102932b5a",
	"data":{		
    	"successNum":"10",
    	"failed":"0",
		"failedList":[]
	}
} 

 

3.2 导出通讯录