# 批量新增企业用户

# 简介

本接口用于批量新增/更新企业用户(接口限量500条,返回成功表示已经接收成功,最终处理结果将通过回调接口返回)

# 服务提供方

享道

# 接口URL

/openapi/ent/users/add

# 请求方式

POST

# 请求频次

单次

# 请求参数

参数名称 类型 必选 说明
timestamp long 请求时间,Unix Timestamp单位毫秒
enterprise_id String 企业唯一标识
users list 用户列表
users[].costcenter_id string 成本中心id
users[].user_name string 用户姓名
users[].user_unique_id string 用户唯一标识
users[].user_mobile_prefix string 手机号前缀
users[].user_mobile string 手机号
users[].user_email string 邮箱
users[].user_dept string 部门信息
batch_no string 批次号

# 响应参数

参数名称 类型 必有 说明
retCode int 服务响应状态,参见附录5
retMsg string 服务响应状态说明,参见附录5
content object
content.success_count int 成功条数
content.failure_count int 失败条数
content.batch_no string 批次号

# 请求事例

请求

curl --location --request POST 'https://open-sit.saicmobility.com/merchant/v1/openapi/ent/users/add' \
--header 'X-Sign: 5e9745dea27fc8b7b4b90aa2565868c0ebf847fd' \
--header 'X-SignAlgorithm: 1' \
--header 'X-Timestamp: 20201020164300' \
--header 'X-MerchantId: open_xxx' \
--header 'Content-Type: application/json' \
--data-raw '{"enterprise_id":1,"batch_no":"1784535555","users":[{"costcenter_id":1,"user_mobile_prefix":"+86","user_unique_id":"1","user_email":"1667@163.com","user_name":"袁小小","user_mobile":13764389920,"user_dept":"IT"}],"timestamp":20201020164300}'

响应

{
    "retCode": 10000,
    "retMsg": "successful",
    "content": {
      "batch_no": "123"
    }
}