获取审批详情
POST
https://open.fxiaoke.com/cgi/approval/get
1. 普通报销审批
参数名称 | 类型 | 说明 |
---|---|---|
title | string | 标题 |
amount | double | 报销金额,精确到小数点后两位 |
customerId | string | 客户Id |
remark | string | 备注 |
attachments | array[object] | 附件 |
2. 差旅报销审批
参数名称 | 类型 | 说明 |
---|---|---|
travelType | int | 类型(1飞机,2汽车,3火车,4住宿,5打车,6餐饮,7其他) |
travelAmount | double | 报销金额,精确到小数点后两位 |
remark | string | 备注 |
startAddress | string | 出发地点 |
endAddress | string | 目的地点 |
startTime | string | 出发时间,时间格式为yyyy-MM-dd HH:mm |
endTime | string | 到达时间,时间格式为yyyy-MM-dd HH:mm |
attachments | array[object] | 附件 |
参数名称 | 类型 | 说明 |
---|---|---|
id | string | 附件id(可以通过此Id调用素材接口下载文件) |
type | int | 附件类型(1录音,2图片,3文件) |
name | string | 附件名称 |
3. 出差申请
参数名称 | 类型 | 说明 |
---|---|---|
items | array | 出差明细列表 |
item.startPoint | string | 出发地 |
item.startTime | string | 出发时间,时间格式为yyyy-MM-dd HH:mm |
item.endPoint | string | 目的地 |
item.endTime | string | 到达时间,时间格式为yyyy-MM-dd HH:mm |
item.vehicle | int | 交通工具(1火车,2飞机,3汽车,4其他) |
item.daysNumber | int | 住宿天数 |
memberIds | array[string] | 出差人openUserId列表 |
approveReason | string | 事由 |
approveBudget | double | 预算,精确到小数点后两位 |
approvePrepayments | double | 预支,精确到小数点后两位 |
4. 折扣申请
参数名称 | 类型 | 说明 |
---|---|---|
amount | double | 金额,精确到小数点后两位 |
discountPercent | double | 折扣率,精确到小数点后两位 |
endTime | string | 结束时间,时间格式为yyyy-MM-dd |
companyName | string | 公司名称 |
remark | string | 说明 |
5. 借款申请
参数名称 | 类型 | 说明 |
---|---|---|
borrowerId | string | 借款人openUserId |
reason | string | 事由 |
amount | double | 借款金额,精确到小数点后两位 |
6. 付款申请
参数名称 | 类型 | 说明 |
---|---|---|
paymentAmount | double | 金额,精确到小数点后两位 |
paymentTime | string | 付款时间,时间格式为yyyy-MM-dd HH:mm |
paymentType | string | 付款方式 |
invoiced | boolean | 是否开票 |
receiverName | string | 收款人姓名 |
receiverAccount | string | 收款人账号 |
openBank | string | 开户行 |
companyName | string | 企业名称 |
remark | string | 备注 |
7. 加班申请
参数名称 | 类型 | 说明 |
---|---|---|
leaveType | int | 加班固定为8 |
startTime | string | 开始时间,时间格式为yyyy-MM-dd HH:mm |
endTime | string | 结束时间,时间格式为yyyy-MM-dd HH:mm |
hours | double | 加班小时数,精确到小数点后一位 |
8. 请假申请
参数名称 | 类型 | 说明 |
---|---|---|
leaveType | int | 1事假,2病假,3调休,4年休假,5婚假,6生育假,7丧假,9外勤,10出差,11其他 |
startTime | string | 开始时间,时间格式为yyyy-MM-dd HH:mm |
endTime | string | 结束时间,时间格式为yyyy-MM-dd HH:mm |
hours | double | 请假小时数,精确到小数点后一位 |
9.当approveType为100时为自定义表单
{
"key1": {
"label": "", // 字段中文描述
"value": "" ,// 字段值
"type":"text"
},
"key2": {
"label": "",
"value": ["", ""], // 多选框的情况
"type":"select_many"
}
}
select_many:多选框,其value对应数组,file_attachment:附件,其value对象附件的Id(素材Id)
image:图片,其value对象附件的Id(素材Id)
参数名称 | 类型 | 说明 |
---|---|---|
id | string | 附件Id(开放平台mediaId) |
type | int | 附件类型(1录音,2图片,3文件) |
name | string | 附件名称 |
10. 审批对象类型列表
参数名称 | 类型 | 说明 |
---|---|---|
OldCustomer | 2 | 旧客户对象 |
OldContact | 3 | 旧联系人对象 |
EventTag | 100 | 销售记录 |
SalesClue | 101 | 线索 |
Customer | 102 | 客户 |
Contact | 103 | 联系人 |
Product | 104 | 产品 |
Payment | 105 | 回款 |
Refund | 106 | 退款 |
SaleAction | 107 | 销售流程 |
Opportunity | 108 | 商机 |
Bill | 109 | 开票 |
Trade | 110 | 成交 |
CustomerOrder | 111 | 订单 |
ReturnOrder | 112 | 退货单 |
Visit | 113 | 拜访 |
VisitActistudyon | 114 | 拜访动作 |
InventoryAction | 115 | 盘点动作 |
Contract | 116 | 合同 |
SalesCluePool | 117 | 线索池 |
HighSeas | 118 | 公海 |
Competitor | 119 | 竞争对手 |
MarketingEvent | 120 | 市场活动 |
Inventory | 121 | 盘点 |
Metadata | 200 | 自定义 |
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://open.fxiaoke.com/cgi/approval/get' \
--header 'Content-Type: application/json' \
--data-raw '{
"corpAccessToken":"CORP_ACCESS_TOKEN",
"corpId":"CORP_ID",
"approvalId":1
}'
响应示例响应示例
200 - 成功 - 成功示例
{
"approval": {
"approvalId": 71676,
"feed": {
"feedContent": "加班",
"createTime": "2017-01-05 22:22:46",
"lastUpdateTime": "2017-01-05 22:22:46"
},
"visibleDepartmentIds": [
1195
],
"visibleEmployeeIds": [
"FSUID_442A9447ADD9EB86760B4AF319D187AC",
"FSUID_F7E1595DBD7CE7D0232EBE075CD8E54B"
],
"approvalTasks": [
{
"taskId": "245d484112044ef5b6b4bafdf8a646ac",
"type": "single",
"state": "in_progress",
"taskMembers": [
{
"state": "in_progress",
"employeeId": "FSUID_442A9447ADD9EB86760B4AF319D187AC"
}
],
"sequenceNumber": "1"
},
{
"taskId": "67333e3d8a974abf8427d44c5ac20cb5",
"type": "single",
"state": "schedule",
"taskMembers": [
{
"state": "schedule",
"employeeId": "FSUID_F7E1595DBD7CE7D0232EBE075CD8E54B"
}
],
"sequenceNumber": "2"
}
],
"formRecord": {
"invoiced": true,
"receiverName": "雷龙",
"companyName": "永辉",
"paymentTime": "2017-01-04 22:25",
"paymentAmount": 12,
"receiverAccount": "ll",
"paymentType": "支付宝"
},
"senderId": "FSUID_68D40E4FE7F461644E37E70B9BD64522",
"status": 1,
"approveType": 6,
"flowType": 1,
"currentTaskId": "245d484112044ef5b6b4bafdf8a646ac",
"approvalFormName": "付款申请",
"approvalFormId": "9A8AF67A-4793-4D8C-AE3D-AA03FB9F80CF"
},
"errorCode": 0,
"errorMessage": "success"
}
请求参数
Body 参数application/json