Skip to content
产品中心
能力中心
场景方案
应用市场
WebOffice
开发者后台

创建审批定义

创建审批定义

标签审批定义

请求说明

字段
请求地址
https://openapi.wps.cn/v7/workflow/approval_defines
HTTP 方法
POST
接口描述
新建一个审批定义
签名方式
KSO-1
限频策略
权限要求
创建审批定义(应用授权) kso.workflow_approval_define.readwrite

请求头 (Headers)

属性名类型是否必填描述可选值
X-Kso-Id-Type
string类型
* internal - 内部
* external - 外部
internal, external

请求体(Body)

请求体格式: application/json

没有可用的数据

请求体示例

json
{
  "creator": "string",
  "form_defines": [
    {
      "condition_groups": [
        {
          "conditions": [
            {
              "custom_data_rule": "string",
              "elem_biz_key": "string",
              "form_id": "string",
              "rule": "belongs",
              "type": "text_type_input",
              "value": "string"
            }
          ]
        }
      ],
      "date_range": {
        "date_range_place": "string",
        "duration_title": "string",
        "end_time_title": "string",
        "start_time_title": "string",
        "style": "year_month",
        "time_range": "all_dates"
      },
      "extra": "string",
      "form_options": [
        {
          "key": "string",
          "value": "string"
        }
      ],
      "id": "string",
      "placeholder": "string",
      "required": true,
      "title": "string",
      "type": "text_type_input"
    }
  ],
  "icon": "tmp1",
  "name": "string",
  "process_define": {
    "nodes": [
      {
        "child_nodes": [
          "string"
        ],
        "condition_groups": [
          {}
        ],
        "extra": {
          "config": {
            "add_node_forbidden": true,
            "edit_forbidden": true,
            "remove_forbidden": true
          }
        },
        "id": "string",
        "name": "string",
        "next_node_id": "string",
        "task": {
          "task_approve": {
            "approval_rule": "step",
            "select_type": "single_choice",
            "target": {
              "level": 0,
              "select_ranges": [
                {
                  "select_type": "user",
                  "select_value": "string"
                }
              ],
              "user_group_ids": [
                "string"
              ],
              "user_ids": [
                "string"
              ],
              "user_type": "optional"
            },
            "user_empty_policy": "transfer_to_admin"
          },
          "task_cc": {
            "is_allow_add_cc": true,
            "target": {
              "level": 0,
              "select_ranges": [
                {
                  "select_type": "user",
                  "select_value": "string"
                }
              ],
              "user_group_ids": [
                "string"
              ],
              "user_ids": [
                "string"
              ],
              "user_type": "optional"
            }
          },
          "type": "approval"
        },
        "type": "sequence"
      }
    ],
    "root": "string"
  },
  "setting": {
    "allow_revoke_approved_days": 0,
    "approval_deduplicate_mode": "none",
    "approval_share_to_company": true,
    "is_allow_resubmit": true,
    "is_allow_revoke": true,
    "is_allow_revoke_approved": true,
    "is_allow_rollback": true,
    "is_show_in_backend_page": true,
    "is_show_in_home_page": true,
    "must_with_approve_signature": true,
    "must_with_refuse_reason": true,
    "must_with_return_reason": true,
    "one_click_approval": true
  },
  "visible_scopes": [
    {
      "company_id": "string",
      "is_admin": true,
      "scope_id": "string",
      "scope_type": "company"
    }
  ]
}

响应体(Response)

HTTP状态码: 200
响应体格式: application/json

没有可用的数据

响应体示例

json
{
  "data": {
    "created_by": {
      "avatar": "string",
      "company_id": "string",
      "id": "string",
      "name": "string",
      "type": "user"
    },
    "ctime": "string",
    "form_designs": [
      {
        "condition_groups": [
          {
            "conditions": [
              {
                "custom_data_rule": "string",
                "elem_biz_key": "string",
                "form_id": "string",
                "rule": "belongs",
                "type": "text_type_input",
                "value": "string"
              }
            ]
          }
        ],
        "date_range": {
          "date_range_place": "string",
          "duration_title": "string",
          "end_time_title": "string",
          "start_time_title": "string",
          "style": "year_month",
          "time_range": "all_dates"
        },
        "extra": "string",
        "form_options": [
          {
            "key": "string",
            "value": "string"
          }
        ],
        "id": "string",
        "placeholder": "string",
        "required": true,
        "title": "string",
        "type": "text_type_input"
      }
    ],
    "group_id": "string",
    "icon": "tmp1",
    "id": "string",
    "name": "string",
    "process_define": {
      "nodes": [
        {
          "child_nodes": [
            "string"
          ],
          "condition_groups": [
            {}
          ],
          "extra": {
            "config": {
              "add_node_forbidden": true,
              "edit_forbidden": true,
              "remove_forbidden": true
            }
          },
          "id": "string",
          "name": "string",
          "next_node_id": "string",
          "task": {
            "task_approve": {
              "approval_rule": "step",
              "select_type": "single_choice",
              "target": {
                "level": 0,
                "select_ranges": [
                  {
                    "select_type": "user",
                    "select_value": "string"
                  }
                ],
                "user_group_ids": [
                  "string"
                ],
                "user_ids": [
                  "string"
                ],
                "user_type": "optional"
              },
              "user_empty_policy": "transfer_to_admin"
            },
            "task_cc": {
              "is_allow_add_cc": true,
              "target": {
                "level": 0,
                "select_ranges": [
                  {
                    "select_type": "user",
                    "select_value": "string"
                  }
                ],
                "user_group_ids": [
                  "string"
                ],
                "user_ids": [
                  "string"
                ],
                "user_type": "optional"
              }
            },
            "type": "approval"
          },
          "type": "sequence"
        }
      ],
      "root": "string"
    },
    "setting": {
      "allow_revoke_approved_days": 0,
      "approval_deduplicate_mode": "none",
      "approval_share_to_company": true,
      "is_allow_resubmit": true,
      "is_allow_revoke": true,
      "is_allow_revoke_approved": true,
      "is_allow_rollback": true,
      "is_show_in_backend_page": true,
      "is_show_in_home_page": true,
      "must_with_approve_signature": true,
      "must_with_refuse_reason": true,
      "must_with_return_reason": true,
      "one_click_approval": true
    },
    "visible_scopes": [
      {
        "company_id": "string",
        "is_admin": true,
        "scope_id": "string",
        "scope_type": "company"
      }
    ]
  },
  "code": 0,
  "msg": "string"
}