单据权限

  • 接口:common/staff/claimAuthority
  • Method:POST
  • 数据格式:JSON
  • 限流信息:100次每天和50次每小时
  • 多语言环境:在接口请求头中添加Key为locale,Value值为语言环境,目前支持的语言有zh_CN(中文)、en_US(英文)、ja_JP(日文)、zh_TW(繁体),请选取其中一种
  • 接口说明:单据权限控制
  • 其他补充信息:

参数:

请求参数

字段名称 字段类型 字段描述 是否必填 长度限制(字节)
bizId String 当前次接口同步的唯一标识 TRUE 36
timestamp long 当前次接口同步时间对应的时间戳 TRUE 13
data JSONArrayt 请求数据数组 TRUE
data[].header_type String 单据类型编码 TRUE 64
data[].department_codes List 部门代码(部门/人员/级别/岗位必须填一个值) FALSE 64
data[].user_codes List 人员代码(部门/人员/级别/岗位必须填一个值) FALSE 64
data[].level_codes List 级别代码(部门/人员/级别/岗位必须填一个值) FALSE 64
data[].position_codes List 岗位代码(部门/人员/级别/岗位必须填一个值) FALSE 64
data[].exclude_user_codes List 移除的人员代码 FALSE 64
data[].department_child_include_flag String 是否包含子部门 FALSE 1
data[].staff_flag String 是否启用权限分配(默认Y) FALSE 1

返回参数

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

示例:

请求数据

{
  "bizId": "92e8725f-41c1-4884-97d2-fac89513c3a6",
  "data": {
    "department_child_include_flag": "Y",
    "department_codes": [
      "001"
    ],
    "exclude_user_codes": [
      "GS9879"
    ],
    "header_type": "C007",
    "level_codes": [
      "A"
    ],
    "position_codes": [
      "B001"
    ],
    "staff_flag": "Y",
    "user_codes": [
      "P3583",
      "P3584"
    ]
  },
  "timestamp": 1733205638575
}

返回数据

{
  "body": {
    "bizId": "92e8725f-41c1-4884-97d2-fac89513c3a6",
    "data": {
      "created": "此次请求新建成功了5条数据",
      "dbErrors": [
      ],
      "validatorErrors": [
        {
          "GS12890": "指定用户编码GS12890不存在"
        },
        {
          "GS13227": "指定用户编码GS13227不存在"
        }
      ]
    },
    "resCode": 200000,
    "resMsg": "success"
  },
  "statusCode": "OK",
  "statusCodeValue": 200
}

results matching ""

    No results matching ""