j9九游会登录/ 云商店/ / / / / / / 租户应用授权信息同步接口
更新时间:2024-01-19 gmt 08:00

租户应用授权信息同步接口-j9九游会登录

接口说明

  • 管理员被授权管理某企业后,在买家中心登录,对企业内用户授权该企业已绑定的应用,云商店异步调用该接口请求商家同步该企业应用的用户授权信息,商家接口需要执行授权信息同步,保存用户授权信息,并返回通知云商店。
  • 针对租户应用授权信息同步场景接口调用失败的情况,由企业管理员选择是否要继续进行同步。并用短信或邮件的形式通知isv商家接口调用失败。
  • 商家的服务器在处理接口请求时,需要做好幂等性处理。

    对于同一个实例,相同的租户,相同的应用,相同的username,要支持多次请求新增,或者删除,多次新增不应产生新的数据,且需要返回成功,如果是删除,多次删除也需要返回成功,不能因已删除返回失败,删除时不需要校验(新购商品)接口产生的实例是否存在。

租户同步流程如下图所示:

请求方法:post

接口url:生产地址 固定子路径,其中固定子路径为/produceapi/authsync;

接口示例:生产地址为https://example.isv.com,则接口url为https://example.isv.com/produceapi/authsync

headers请参数

参数

必选

参数类型

描述

authtoken

m

string(255)

签名信息,请参考auth token取值说明

body请求参数

参数

必选

参数类型

描述

instanceid

m

string(64)

说明:

卖家申请应用凭证的时候传空,买家必传。

tenantid

m

string(64)

租户id,与租户同步的接口租户id保持一致,这个id是买家

appid

m

string(64)

应用id,与应用同步的应用id保持一致的

userlist

m

string

授权用户信息,包含username:账号名(m)、name:姓名(m)、position:职位(o)、orgcode:部门(m)、role:角色(user-普通用户,admin-管理员)(m)、enable:账号状态(true-启用,false-禁用)(m)、employeecode:工号(o)、employeetype:人员类型(1:正式 2:实习 3:劳务派遣 4:劳务外包)(o)、mobile:手机号(o)、email:邮箱(o)、workplace:工作所在地(o)、entrydate:入职时间(yyyy-mm-d)(o)

json串,例:

[{\"username\":\"zhangsan01\",\"name\":\"张三\",\"position\":\"系统管理员\",\"orgcode\":\"123456789\",\"role\":\"admin\",\"enable\":\"true\",\"employeecode\":\"\",\"mobile\":\"\",\"email\":\"\",\"extension\":{\"entrydate\":\"2022-11-9\",\"employeetype\":\"4\",\"workplace\":\"南京\"}},{\"username\":\"lisi02\",\"name\":\"李四\",\"position\":\"运营经理\",\"orgcode\":\"123456789\",\"role\":\"user\",\"enable\":\"true\",\"extension\":{\"entrydate\":\"2022-11-16\",\"employeetype\":\"4\",\"workplace\":\"南京\"}}]

isv需要根据角色给用户进行赋权,如果admin赋予管理员角色

最大一次同步用户数是500个

currentsynctime

m

string

默认时区东8区,时间戳,时间格式:20220420114117642

flag

m

integer(2)

0-删除 1-新增 2-修改

testflag

m

integer(2)

0-生产正式数据 1-调测数据

timestamp

m

string

默认时区东8区,时间戳,时间格式:20220420114117642

响应参数

参数

必选

参数类型

描述

resultcode

m

string(6)

响应码,具体请参见调用结果码说明

resultmsg

o

string(255)

响应信息

示例:

post https://example.isv.com/produceapi/authsync
connection: keep-alive
content-type: application/json
authtoken: "stbnyl*****************ubt271qdr6wdavltlrb”
host: example.isv.com
user-agent: apache-httpclient/4.5.3 (java/1.8.0_191)
{
"instanceid": "huaiweitest123456", 
"tenantid": "68cbc86ab******92f36422fa0e", 
"appid": "ksid******34456",
"userlist": "[{ username:\"zhangsan01\",name:\"张三\",position:\"系统管理员\",orgcode:\"123456789\",role:\"admin\" enable:\"true\"},{ username:\"lisi\",name:\"李四\",position:\"用户\",orgcode:\"123456789\",role:\"user\" enable:\"true\"},]", 
" currentsynctime": "20220413093539534", 
"flag": 1, 
"testflag": 0, 
"timestamp": "20220413093539534",
}
http/1.1 200 ok
body-sign: sign_type="hmac-sha256", signature= "xxxxxxxxxx"  
content-type: application/json
{
" resultcode": "000000",
" resultmsg": "success"
}

http body签名:

body-sign: sign_type="hmac-sha256", signature= "xxxxxxxxxxxxx" ,详情参考《http body签名》

相关文档

网站地图