批量同步接口
- 接口:common/customerAccounts/v2/batch
- Method:POST
- 数据格式:JSON
- 限流信息:100次每天
- 多语言环境:在接口请求头中添加Key为locale,Value值为语言环境,目前支持的语言有zh_CN(中文)、en_US(英文)、ja_JP(日文)、zh_TW(繁体),请选取其中一种
- 接口说明:该接口用作客户银行的批量同步,在整批数据中如果只有几条数据因为其他原因失败,那么只有这几条数据不会被处理,其他数据仍会被正常处理
- 其他补充信息:单次数据量过大时候(超过200条)会全部转为异步处理,具体参考回调示例
参数:
请求参数
字段名称 |
字段类型 |
字段描述 |
是否必填 |
长度限制(字节) |
bizId |
String |
当前次接口同步的唯一标识 |
TRUE |
36 |
timestamp |
long |
当前次接口同步对应的时间戳 |
TRUE |
13 |
data |
Array |
当前次接口同步的数据集合 |
TRUE |
无 |
data.code |
String |
银行账号 |
TRUE |
255 |
data.customer_code |
String |
客户编码 |
TRUE |
64 |
data.account_name |
String |
银行账户名称 |
TRUE |
255 |
data.bank_name |
String |
开户银行名称 |
TRUE |
255 |
data.bank_branch |
String |
开户分行 |
FALSE |
255 |
data.bank_code |
String |
客户银行编码 |
FALSE |
255 |
data.bank_swift_id |
Integer |
客户银行swift代码 |
FALSE |
255 |
data.bank_address |
String |
客户银行地址 |
FALSE |
255 |
data.state |
String |
客户银行所在省 |
FALSE |
255 |
data.city |
String |
客户银行所在市 |
FALSE |
255 |
data.primary_flag |
String |
默认银行标志(Y/N) |
FALSE |
1 |
data.enabled_flag |
String |
启用标志(Y/N,默认Y) |
FALSE |
1 |
返回参数
字段名称 |
字段类型 |
字段描述 |
bizId |
String |
当前次接口同步的唯一标识 |
resCode |
Integer |
响应状态码(见附录) |
resMsg |
String |
返回信息描述 |
created |
String |
创建成功的条数 |
updated |
String |
更新成功的条数 |
validatorErrors |
Array |
字段强校验不合格的数据 |
dbErrors |
Array |
数据持久化时出现错误的数据 |
warnings |
Array |
字段弱校验不合格的数据,任会做同步处理 |
示例:
请求数据
{
"bizId" : "f0d748cd-9bbc-4293-992b-5b93c4cfe43e",
"timestamp" : 1592994453437,
"data" : [ {
"state" : "成都",
"city" : "北京",
"enabledFlag" : "Y",
"code" : "6217002400009843329",
"customer_code" : "test-customer7",
"account_name" : "test-customer7-accountName1",
"bank_name" : "中国农业银行",
"bank_branch" : "上海支行",
"bank_code" : "test-customer7-code",
"bank_swift_id" : "bank-swift-customer7-test",
"band_address" : "上海宝山",
"primary_flag" : "Y"
}, {
"state" : "南京",
"city" : "南京",
"enabledFlag" : "Y",
"code" : "6217002449955679304",
"customer_code" : "test-customer9",
"account_name" : "test-customer9-accountName1",
"bank_name" : "中国工商银行",
"bank_branch" : "南京支行",
"bank_code" : "test-customer9-code",
"bank_swift_id" : "bank-swift-customer9-test",
"band_address" : "南京北区",
"primary_flag" : "Y"
} ]
}
返回数据
{
"resCode" : 200000,
"resMsg" : "success",
"bizId" : "f0d748cd-9bbc-4293-992b-5b93c4cfe43e",
"data" : {
"validatorErrors" : [ ],
"created" : "此次请求新建成功了2条数据",
"warnings" : [ ],
"dbErrors" : [ ],
"updated" : "此次请求更新成功了0条数据"
}
}