批量同步接口
- 接口:common/leaseAsset/batch
- Method:POST
- 数据格式:JSON
- 限流信息:150次每天和50次每小时
- 多语言环境:在接口请求头中添加Key为locale,Value值为语言环境,目前支持的语言有zh_CN(中文)、en_US(英文)、ja_JP(日文)、zh_TW(繁体),请选取其中一种
- 接口说明:该接口用作租赁资产信息的批量同步(根据code是否存在判断新增/更新),在整批数据中如果只有几条数据因为其他原因失败,那么只有这几条数据不会被处理,其他数据仍会被正常处理
- 其他补充信息:无
参数:
请求参数
字段名称 |
字段类型 |
字段描述 |
是否必填 |
长度限制(字节) |
bizId |
String |
当前次接口同步的唯一标识 |
TRUE |
36 |
timestamp |
long |
当前次接口同步对应的时间戳 |
TRUE |
13 |
data |
Array |
当前次接口同步的数据集合 |
TRUE |
无 |
data.code |
String |
租赁资产代码 |
TRUE |
64 |
data.lease_asset_number |
String |
租赁资产编码 |
FALSE |
64 |
data.lease_asset_name |
String |
租赁资产名称 |
TRUE |
255 |
data.type_code |
String |
租赁资产类型编码 |
TRUE |
64 |
data.branch_code |
String |
所属公司编码 |
TRUE |
64 |
data.supplier_codes |
List |
所属供应商编码的集合 |
FALSE |
64 |
data.department_code |
String |
所属部门编码 |
FALSE |
64 |
data.store_type |
String |
门店类型 |
FALSE |
64 |
data.store_status |
String |
门店状态 |
FALSE |
64 |
data.store_level |
String |
门店等级 |
FALSE |
64 |
data.city |
String |
城市 |
FALSE |
64 |
data.address |
String |
详细地址 |
FALSE |
256 |
data.lease_asset_area |
BigDecimal |
租赁资产面积(平方米) |
FALSE |
256 |
data.lease_asset_start_date |
Long |
租赁资产开始时间 |
FALSE |
13 |
data.lease_asset_end_date |
Long |
租赁资产结束时间 |
FALSE |
13 |
data.lease_asset_owner |
String |
资产负责员工号 |
FALSE |
64 |
data.operations_manager |
String |
营运经理员工号 |
FALSE |
64 |
data.enabled_flag |
String |
启用标志(Y/N,默认为Y) |
FALSE |
1 |
data.description |
String |
描述 |
FALSE |
64 |
data.attribute1 |
String |
attribute1字段信息 |
FALSE |
255 |
data.attribute2 |
String |
attribute2字段信息 |
FALSE |
255 |
data.attribute3 |
String |
attribute3字段信息 |
FALSE |
255 |
data.attribute4 |
String |
attribute4字段信息 |
FALSE |
255 |
data.attribute5 |
String |
attribute5字段信息 |
FALSE |
255 |
data.column1-data.column100 |
String |
column字段信息 |
FALSE |
255 |
返回参数
字段名称 |
字段类型 |
字段描述 |
bizId |
String |
当前次接口同步的唯一标识 |
resCode |
Integer |
响应状态码(见附录) |
resMsg |
String |
返回信息描述 |
created |
String |
创建成功的条数 |
updated |
String |
更新成功的条数 |
validatorErrors |
Array |
字段强校验不合格的数据 |
dbErrors |
Array |
数据持久化时出现错误的数据 |
warnings |
Array |
字段弱校验不合格的数据,任会做同步处理 |
示例:
请求数据
{
"timestamp": 1673249350000,
"bizId": "reqfwerqrw",
"data": [
{
"code": "test_code1",
"lease_asset_number": "number1",
"lease_asset_name": "租赁资产名称1",
"type_code": "test_type_code1",
"branch_code": "DLGS",
"department_code": "DLGS",
"supplier_code": "800-0000311853",
"enabled_flag": "Y",
"staff_flag": "Y",
"column1": "column1",
"attribute1": "attribute1"
}
]
}
返回数据
{
"resCode": 200000,
"resMsg": "success",
"bizId": "reqfwerqrw",
"data": {
"validatorErrors": [],
"created": "此次请求新建成功了0条数据",
"warnings": [],
"dbErrors": [],
"updated": "此次请求更新成功了1条数据"
}
}