| 类型 | 说明 |
|---|---|
| input | -- |
| textarea | -- |
| date | RFC3339格式,2019-10-01T08:12:01+08:00 |
| radio/radioV2 | option 中的 text 字段 |
| address | China/Beijing/Beijing/Chaoyang Qu/chang an jie 如果地址控件允许输入详细地址,则最后一项为用户输入的详细地址 |
{
"id": "widget1",
"custom_id": "user_info",
"name": "Item application",
"type": "input",
"value": "data"
}| 类型 | 说明 |
|---|---|
| number | -- |
| amount | -- |
| formula | -- |
{
"id": "widget1",
"name": "Item application",
"type": "number",
"value": 1234.56
}| 类型 | 说明 |
|---|---|
| contact | user_id |
{
"id": "widget1",
"name": "Item application",
"type": "contact",
"value": ["f8ca557e"],
"open_ids": ["ou_12345"]
}| 类型 | 说明 |
|---|---|
| connect | instance_code |
| attachmentV2 | 附件控件, ext为附件名字,value为附件地址, 按逗号分隔 |
| image/imageV2 | 图片控件, ext为图片名字,value为图片地址, 按逗号分隔 |
{
"id": "widget1",
"name": "Item application",
"type": "attachmentV2",
"ext": "'Item 1 name','Item 2 name'",
"value": ["Item 1", "Item 2"]
}| 类型 | 说明 |
|---|---|
| connect | instance_code |
| attachment | 附件控件,建议用attachmentV2 |
| checkbox/checkboxV2 | option中的text字段 |
{
"id": "widget1",
"name": "Item application",
"type": "checkbox",
"value": ["Item 1"]
}| 类型 | 说明 |
|---|---|
| dateInterval | start和end满足RFC3339格式 |
{
"id": "widget1",
"name": "Item application",
"type": "dateInterval",
"value": {
"start": "2019-10-01T08:12:01+08:00",
"end": "2019-10-02T08:12:01+08:00",
"interval": 2.0
}
}| 类型 | 说明 |
|---|---|
| fieldList | value是二维数组 |
{
"id": "widget1",
"name": "Item application",
"type": "fieldList",
"value": [
[
{
"id": "widget1",
"type": "checkbox",
"value": ["jxpsebqp-0"]
}
]
]
}| 类型 | 说明 |
|---|---|
| document | -- |
{
"id":"widget1",
"type":"document",
"value":
{
"token": "doxcx7B8OzLFHExkiwYuPGAwf",
"type": "doc",
"title": "title",
"url": "https://bytedance.feishu.cn/docx/doxcx7B8OzLFHExkiwYuPGAwf"
}
}| 类型 | 说明 |
|---|---|
| department | -- |
{
"id":"widget1",
"type":"department",
"value":[
{
"open_id":"od-xxx"
}
]
}| 字段 | 说明 |
|---|---|
| id | 控件 ID |
| name | 控件名称 |
| type | leaveGroup |
| value | -- |
| ∟name | 假期名称 |
| ∟start | 开始时间,满足 RFC3339 格式 |
| ∟end | 结束时间,满足 RFC3339 格式 |
| ∟interval | 时长,单位天,有些假期类型用户手动输入请假时长 |
{
"id": "widget1",
"name": "leave",
"type": "leaveGroup",
"value": {
"name": "annual leave"
"start": "2019-10-01T00:00:00+08:00",
"end": "2019-10-02T00:0:00+08:00",
"interval": 2.0
}
}| 字段 | 说明 |
|---|---|
| id | 控件 ID |
| name | 控件名称 |
| type | leaveGroupV2 |
| value | -- |
| ∟name | 假期名称 |
| ∟start | 开始时间,满足 RFC3339 格式 |
| ∟end | 结束时间,满足 RFC3339 格式 |
| ∟interval | 时长,有些假期类型用户手动输入请假时长 |
| ∟unit | 时长单位, DAY/HOUR ,有些假期类型用户手动输入请假时长 |
| ∟reason | 原因 |
{
"id": "widget1",
"name": "leave",
"type": "widgetLeaveGroupV2",
"value": {
"name": "annual leave"
"start": "2019-10-01T00:00:00+08:00",
"end": "2019-10-02T00:0:00+08:00",
"interval": 2.0,
"unit": "DAY",
"reason": "out going"
}
}| 类型 | 说明 |
|---|---|
| remedyGroup | time满足RFC3339格式 |
{
"id": "widget1",
"name": "remedy",
"type": "remedyGroup",
"value": {
"time": "2019-10-01T08:12:01+08:00",
"reason": "forgot"
}
}| 类型 | 说明 |
|---|---|
| shiftGroup | shiftTime和returnTime满足RFC3339格式 |
{
"id": "widget1",
"name": "shift",
"type": "shiftGroup",
"value": {
"shiftTime": "2019-10-01T08:12:01+08:00",
"returnTime": "2019-10-02T08:12:01+08:00",
"reason": "ask for leave"
}
}| 类型 | 说明 |
|---|---|
| workGroup | start和end满足RFC3339格式 |
{
"id": "widget1",
"name": "work",
"type": "workGroup",
"value": {
"name": "Overtime pay"
"start": "2019-10-01T08:12:01+08:00",
"end": "2019-10-02T08:12:01+08:00",
"interval": 2.0,
"reason": "ask for leave"
}
}| 类型 | 说明 |
|---|---|
| tripGroup | start和end满足RFC3339格式 |
{
"id": "widget1",
"name": "trip",
"type": "tripGroup",
"value": {
"schedule": [{
"start": "2019-10-0T00:00:00Z+08:00",
"end": "2019-10-01T00:00:00Z+08:00",
"interval": 123.45,
"departure": "China/Beijing/Beijing",
"destination": "China/Shanghai/Shanghai",
"transportation": "Airplane",
"oneRound": "One Way",
"remark": "business",
}],
"interval": 2.0,
"reason": "business",
"peer": ["f7cb567e"],
}
}| 类型 | 说明 |
|---|---|
| telephone | 电话 |
{
"id":"widget1",
"type":"telephone",
"value": {
"country_code":"+86",
"national_number":"13122222222"
}
}| HTTP状态码 | 错误码 | 描述 | 排查建议 |
|---|---|---|---|
| 400 | 1390001 | param is invalid | 参数错误 |
| 400 | 1395001 | There have been some errors. Please try again later | 服务出现错误,请稍候再试 |
| 400 | 1390003 | instance code not found | 检查审批实例code是否正确 |
| 403 | 1390009 | no operation permission | 检查操作权限是否正确 |
| 400 | 1390004 | user_id or open_id not found | 检查user_id,open_id是否正确 |
curl --location --request POST 'https://open.feishu.cn/open-apis/approval/v4/instances/?locale=zh-CN&user_id=f7cb567e&user_id_type=open_id' \
--header 'Authorization: Bearer <token>'{
"code": 0,
"msg": "success",
"data": {
"approval_name": "Payment",
"start_time": "1564590532967",
"end_time": "1564590532967",
"user_id": "f3ta757q",
"open_id": "ou_3cda9c969f737aaa05e6915dce306cb9",
"serial_number": "202102060002",
"department_id": "od-8ec33ffec336c3a39a278bc25e931676",
"status": "PENDING",
"uuid": "1234567",
"form": "[{\"id\": \"widget1\",\"custom_id\": \"user_info\",\"name\": \"Item application\",\"type\": \"textarea\"},\"value\":\"aaaa\"]",
"task_list": [
{
"id": "1234",
"user_id": "f7cb567e",
"open_id": "ou_123457",
"status": "PENDING",
"node_id": "46e6d96cfa756980907209209ec03b64",
"node_name": "开始",
"custom_node_id": "manager",
"type": "AND",
"start_time": "1564590532967",
"end_time": "0"
}
],
"comment_list": [
{
"id": "1234",
"user_id": "f7cb567e",
"open_id": "ou_123456",
"comment": "ok",
"create_time": "评论时间",
"files": [
{
"url": "https://p3-approval-sign.byteimg.com/lark-approval-attachment/image/20220714/1/332f3596-0845-4746-a4bc-818d54ad435b.png~tplv-ottatrvjsm-image.image?x-expires=1659033558&x-signature=6edF3k%2BaHeAuvfcBRGOkbckoUl4%3D#.png",
"file_size": 186823,
"title": "e018906140ed9388234bd03b0.png",
"type": "image"
}
]
}
],
"timeline": [
{
"type": "PASS",
"create_time": "1564590532967",
"user_id": "f7cb567e",
"open_id": "ou_123456",
"user_id_list": [
"eea5gefe"
],
"open_id_list": [
"ou_123456"
],
"task_id": "1234",
"comment": "ok",
"cc_user_list": [
{
"user_id": "eea5gefe",
"cc_id": "123445",
"open_id": "ou_12345"
}
],
"ext": "{\"user_id\":\"62d4a44c\",\"open_id\":\"ou_123456\"}",
"node_key": "APPROVAL_240330_4058663",
"files": [
{
"url": "https://p3-approval-sign.byteimg.com/lark-approval-attachment/image/20220714/1/332f3596-0845-4746-a4bc-818d54ad435b.png~tplv-ottatrvjsm-image.image?x-expires=1659033558&x-signature=6edF3k%2BaHeAuvfcBRGOkbckoUl4%3D#.png",
"file_size": 186823,
"title": "e018906140ed9388234bd03b0.png",
"type": "image"
}
]
}
],
"modified_instance_code": "81D31358-93AF-92D6-7425-01A5D67C4E71",
"reverted_instance_code": "81D31358-93AF-92D6-7425-01A5D67C4E71",
"approval_code": "7C468A54-8745-2245-9675-08B7C63E7A85",
"reverted": false,
"instance_code": "81D31358-93AF-92D6-7425-01A5D67C4E71"
}
}