批量同步接口

  • 接口:common/columnValue/batch
  • Method:POST
  • 数据格式:JSON
  • 限流信息:100次每天和50次每小时
  • 多语言环境:在接口请求头中添加Key为locale,Value值为语言环境,目前支持的语言有zh_CN(中文)、en_US(英文)、ja_JP(日文)、zh_TW(繁体),请选取其中一种
  • 接口说明:该接口用作值列表联动数据的批量同步,在整批数据中如果只有几条数据因为其他原因失败,那么只有这几条数据不会被处理,其他数据仍会被正常处理
  • 其他补充信息:单次数据量过大时候(超过200条)会全部转为异步处理,具体参考回调示例

参数:

请求参数

字段名称 字段类型 字段描述 是否必填 长度限制(字节)
bizId String 当前次接口同步的唯一标识 TRUE 36
timestamp long 当前次接口同步对应的时间戳 TRUE 13
code String 联动编码 TRUE 64
data Array 当前次接口同步的数据集合 TRUE
data.sequence_num Integer 序号 false
data.parent_value String 关联父数据的编码 TRUE 64
data.child_value String 关联子数据的编码 TRUE 64
data.enabled_flag String 删除标志(Y/N,默认为N) FALSE 1

返回参数

字段名称 字段类型 字段描述
bizId String 当前次接口同步的唯一标识
resCode Integer 响应状态码(见附录)
resMsg String 返回信息描述
created String 创建成功的条数
updated String 更新成功的条数
validatorErrors Array 字段强校验不合格的数据
dbErrors Array 数据持久化时出现错误的数据
warnings Array 字段弱校验不合格的数据,仍会做同步处理

示例:

请求数据

{
  "bizId": "c40f1bf0-e757-4a72-8863-fd6749821584",
  "timestamp": 1591266599229,
  "code": "test_department",
  "data": [
    {
      "sequence_num": 61,
      "parent_value": "D1",
      "child_value": "005",
      "enabled_flag": "N"
    },
    {
      "sequence_num": 61,
      "parent_value": "D1123",
      "child_value": "0051513",
      "enabled_flag": "N"
    }
  ]
}

返回数据

{
  "resCode": 200000,
  "resMsg": "success",
  "bizId": "c40f1bf0-e757-4a72-8863-fd6749821584",
  "data": {
    "validatorErrors": [
      {
        "code": "test_department3809D11230051513",
        "messages": [
          "父类型为department对应的值信息错误"
        ]
      }
    ],
    "created": "此次请求新建成功了0条数据",
    "warnings": [],
    "dbErrors": [],
    "updated": "此次请求更新成功了1条数据"
  }
}

results matching ""

    No results matching ""