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

发起审批

发起一个新的审批实例

标签审批实例

请求说明

字段
请求地址
https://openapi.wps.cn/v7/workflow/approval_instances
HTTP 方法
POST
接口描述
发起一个新的审批实例
签名方式
KSO-1
限频策略
权限要求
操作审批实例(应用授权) kso.workflow_approval_instance.readwrite

请求头 (Headers)

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

请求体(Body)

请求体格式: application/json

没有可用的数据

请求体示例

json
{
  "approval_define_id": "string",
  "contents": [
    {
      "attachments": [
        {
          "drive_file": {
            "file_id": "string",
            "share_link": "string"
          },
          "file_name": "string",
          "file_size": 0,
          "s3_file": {
            "file_md5": "string",
            "link": "string",
            "s3_file_type": "image_file",
            "store_key": "string",
            "thumb_store_key": "string"
          },
          "store_type": "drive_file"
        }
      ],
      "date_range": {
        "duration": "string",
        "end_time": "string",
        "end_time_extra": "string",
        "start_time": "string",
        "start_time_extra": "string"
      },
      "id": "string",
      "title": "string",
      "type": "text_type_input",
      "value": "string",
      "values": [
        "string"
      ]
    }
  ],
  "creator": "string",
  "custom_form": "string",
  "dept_id": "string",
  "node_users": [
    {
      "approves": [
        "string"
      ],
      "node_id": "string"
    }
  ],
  "remind": true,
  "title": "string"
}

响应体(Response)

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

没有可用的数据

响应体示例

json
{
  "data": {
    "approval_define_id": "string",
    "approval_tasks": [
      {
        "approval_rule": "step",
        "end_time": "string",
        "id": "string",
        "node_id": "string",
        "start_time": "string",
        "status": "pending",
        "title": "string",
        "user_id": "string"
      }
    ],
    "contents": [
      {
        "attachments": [
          {
            "drive_file": {
              "file_id": "string",
              "share_link": "string"
            },
            "file_name": "string",
            "file_size": 0,
            "s3_file": {
              "file_md5": "string",
              "link": "string",
              "s3_file_type": "image_file",
              "store_key": "string",
              "thumb_store_key": "string"
            },
            "store_type": "drive_file"
          }
        ],
        "date_range": {
          "duration": "string",
          "duration_title": "string",
          "end_time": "string",
          "end_time_extra": "string",
          "end_time_title": "string",
          "start_time": "string",
          "start_time_extra": "string",
          "start_time_title": "string",
          "style": "year_month",
          "time_range": "all_dates"
        },
        "form_options": [
          {
            "key": "string",
            "value": "string"
          }
        ],
        "id": "string",
        "title": "string",
        "type": "text_type_input",
        "value": "string"
      }
    ],
    "current_task_id": "string",
    "current_tasks": [
      {
        "approval_rule": "step",
        "end_time": "string",
        "id": "string",
        "node_id": "string",
        "start_time": "string",
        "status": "pending",
        "title": "string",
        "user_id": "string"
      }
    ],
    "end_time": "string",
    "id": "string",
    "pending_nodes": [
      {
        "approval_node": {
          "approval_rule": "step",
          "select_ranges": [
            {
              "select_type": "user",
              "select_value": "string"
            }
          ],
          "select_type": "single_choice",
          "transferred_to_admin": true,
          "user_empty_policy": "transfer_to_admin",
          "user_list": [
            {
              "avatar": "string",
              "company_id": "string",
              "id": "string",
              "name": "string",
              "type": "user"
            }
          ],
          "user_type": "optional"
        },
        "cc_node": {
          "is_allow_add_cc": true,
          "select_ranges": [
            {
              "select_type": "user",
              "select_value": "string"
            }
          ],
          "user_list": [
            {
              "avatar": "string",
              "company_id": "string",
              "id": "string",
              "name": "string",
              "type": "user"
            }
          ],
          "user_type": "optional"
        },
        "id": "string",
        "name": "string",
        "task_type": "approval"
      }
    ],
    "serial_no": "string",
    "start_time": "string",
    "status": "auditing",
    "timeline": [
      {
        "comment": "string",
        "comment_attachments": {
          "attachments": [
            {
              "drive_file": {
                "file_id": "string",
                "share_link": "string"
              },
              "file_name": "string",
              "file_size": 0,
              "s3_file": {
                "file_md5": "string",
                "link": "string",
                "s3_file_type": "image_file",
                "store_key": "string",
                "thumb_store_key": "string"
              },
              "store_type": "drive_file"
            }
          ],
          "images": [
            {
              "drive_file": {
                "file_id": "string",
                "share_link": "string"
              },
              "file_name": "string",
              "file_size": 0,
              "s3_file": {
                "file_md5": "string",
                "link": "string",
                "s3_file_type": "image_file",
                "store_key": "string",
                "thumb_store_key": "string"
              },
              "store_type": "drive_file"
            }
          ],
          "signature": {
            "drive_file": {
              "file_id": "string",
              "share_link": "string"
            },
            "file_name": "string",
            "file_size": 0,
            "s3_file": {
              "file_md5": "string",
              "link": "string",
              "s3_file_type": "image_file",
              "store_key": "string",
              "thumb_store_key": "string"
            },
            "store_type": "drive_file"
          }
        },
        "ctime": 0,
        "id": 0,
        "node_id": 0,
        "node_name": "string",
        "operator": "string",
        "type": "approval_created",
        "user_list": [
          "string"
        ]
      }
    ],
    "title": "string",
    "user_id": "string"
  },
  "code": 0,
  "msg": "string"
}