接口文档
财咖云接口文档-凭证
更新于 5 天前 · 阅读 29
财咖云接口文档-凭证
| 版本号 | 1.3.0 |
| 发布者 | 北京财咖网络科技有限公司 |
目录
一、 获取Token
二、 凭证
1. 单体查询
(1) 请求参数
(2) 响应
(3) 返回示例
2. 列表查询
(1) 请求参数
(2) 响应
(3) 返回示例
3. 新增凭证
(1) 请求参数
(2) 请求示例
(3) 响应
(4) 返回示例
4. 批量新增凭证
(1) 请求参数
(2) 请求示例
(3) 响应
(4) 返回示例
一、获取Token
| 接口描述 | 获取应用Token |
| HTTP URL | api/system.do?token |
| HTTP Method | GET |
| 备注 | Token的最大有效期是 2 小时 |
请求参数
| 名称 | 类型 | 必填 | 描述 |
| appKey | String | 是 | 应用标识(财咖分配) |
| appSecret | String | 是 | 应用密钥(财咖分配) |
响应
| 名称 | 类型 | 示例值 | 描述 |
| success | boolean | true/false | 是否成功 |
| msg | String | 提示信息 | |
| data | Object | 具体返回结果Token |
返回示例
{
"success": true,
"msg": "操作成功",
"data": "479B00B0D271080A415469F0F67838D0"
}二、凭证
1.单体查询
| 接口描述 | 根据ID查询凭证信息 |
| HTTP URL | api/voucher.do?getVoucher |
| HTTP Method | GET |
(1)请求参数
| 名称 | 类型 | 必填 | 示例值 | 描述 |
| token | String | 是 | 加密串 | |
| id | String | 是 | 凭证ID |
(2)响应
| 名称 | 类型 | 示例值 | 描述 |
| success | boolean | true/false | 是否成功 |
| msg | String | 提示信息 | |
| data | Object | 具体返回结果 |
(3)返回示例
{
"success": true,
"msg": "操作成功",
"data": {
"id": "297efd797f06486f017f065150750011",
"voucherCode": "记0303",
"accountbookId": "2c91e3f674cfeac80174d85ce8a6021c",
"accountbookName": "A2A2",
"submitterId": "8a8ab0b246dc81120146dc8181950052",
"voucherDateTime": "2021-06-30 00:00:00",
"voucherSource": 1,
"auditStatus": null,
"ordinary": "Y",
"status": 10,
"createDate": "2022-02-17 14:14:27",
"updateDate": "2022-02-18 14:14:11",
"auditUserId": null,
"auditTime": "2022-02-17 15:02:37",
"billDetailList": [{
"id": "297efd797f06486f017f065150760012",
"voucherId": "297efd797f06486f017f065150750011",
"digest": "测试",
"subjectId": "1001004",
"subjectName": "库存现金_股份现金账户0001",
"debitAmount": 1.00,
"creditAmount": null,
"auxpropertyIds": "",
"vdSort": 1,
"createDate": "2022-02-17 14:14:27",
"updateDate": "2022-02-22 11:12:26",
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": null,
"accountbookId": "2c91e3f674cfeac80174d85ce8a6021c",
"voucherDateTime": "2021-06-30 00:00:00",
"voucherSource": 1,
"ordinary": "Y",
"status": 10,
"voucherYearMonth": "2021-06",
"detailApList": []
},
{
"id": "297efd797f06486f017f065150760014",
"voucherId": "297efd797f06486f017f065150750011",
"digest": "测试",
"subjectId": "1002001",
"subjectName": "银行存款_华夏银行中关村支行3149",
"debitAmount": null,
"creditAmount": 1.00,
"auxpropertyIds": "",
"vdSort": 2,
"createDate": "2022-02-17 14:14:27",
"updateDate": "2022-02-17 15:59:05",
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": null,
"accountbookId": "2c91e3f674cfeac80174d85ce8a6021c",
"voucherDateTime": "2021-06-30 00:00:00",
"voucherSource": 1,
"ordinary": "Y",
"status": 10,
"voucherYearMonth": "2021-06",
"detailApList": []
}
]
}
}2.列表查询
| 接口描述 | 根据条件查询凭证列表 |
| HTTP URL | api/voucher.do?getVoucherList |
| HTTP Method | GET |
(1)请求参数
| 名称 | 类型 | 必填 | 示例值 | 描述 |
| token | String | 是 | 加密串 | |
| accountbookId | String | 是 | 账簿ID | |
| id | String | 否 | 凭证ID | |
| code | String | 否 | 凭证号 | |
| ordinary | String | 否 | 凭证类型(Y=普通凭证中心 N=特殊凭证中心) | |
| voucherSource | Integer | 否 | 凭证来源(0自动生成,1手动录入) | |
| status | Integer | 否 | 状态 | |
| beginTime | String | 否 | 凭证日期开始时间 | |
| endTime | String | 否 | 凭证日期结束时间 | |
| curPage | Integer | 否 | 当前页码 | |
| pageSize | Integer | 否 | 每页数量 |
(2)响应
| 名称 | 类型 | 示例值 | 描述 |
| success | boolean | true/false | 是否成功 |
| msg | String | 提示信息 | |
| data | [] | 具体返回列表 |
(3)返回示例
{
"success": true,
"msg": "操作成功",
"data": [{
"id": "2c91e3ed82859536018286d1bc5b09ee",
"voucherCode": "记0232",
"accountbookId": "2c91e3f674cfeac80174d85ce8a6021c",
"accountbookName": null,
"submitterId": "8a8ab0b246dc81120146dc8181950052",
"voucherDateTime": "2021-04-01 00:00:00",
"voucherSource": 0,
"auditStatus": null,
"ordinary": "Y",
"status": 10,
"createDate": "2022-08-10 16:14:28",
"updateDate": null,
"auditUserId": null,
"auditTime": null,
"billDetailList": [{
"id": "2c91e3ed82859536018286d1bc6309ef",
"voucherId": "2c91e3ed82859536018286d1bc5b09ee",
"digest": "支付 : 重庆蝶欣商贸有限公司1 - 款项",
"subjectId": "2202002",
"subjectName": null,
"debitAmount": 14.00,
"creditAmount": null,
"auxpropertyIds": "[{'auxptyDetailId':'','auxptyId':'2c91e3f674cfeac801750b3fd36a0677'},{'auxptyDetailId':'2c91e3017f90f5c601801719ca9b68cb','auxptyId':'3'}]",
"vdSort": 0,
"createDate": "2022-08-10 16:14:28",
"updateDate": null,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": null,
"accountbookId": "2c91e3f674cfeac80174d85ce8a6021c",
"voucherDateTime": "2021-04-01 00:00:00",
"voucherSource": 0,
"ordinary": "Y",
"status": 10,
"voucherYearMonth": "2021-04",
"detailApList": [{
"id": "2c91e3ed82859536018286d1bc6309f0",
"billId": "2c91e3ed82859536018286d1bc6309ef",
"auxptyId": "2c91e3f674cfeac801750b3fd36a0677",
"auxptyName": null,
"auxptyDetailId": "",
"auxptyDetailName": null
},
{
"id": "2c91e3ed82859536018286d1bc6309f1",
"billId": "2c91e3ed82859536018286d1bc6309ef",
"auxptyId": "3",
"auxptyName": null,
"auxptyDetailId": "2c91e3017f90f5c601801719ca9b68cb",
"auxptyDetailName": null
}
]
},
{
"id": "2c91e3ed82859536018286d1bc6309f4",
"voucherId": "2c91e3ed82859536018286d1bc5b09ee",
"digest": "支付 : 重庆蝶欣商贸有限公司1 - 款项",
"subjectId": "1002001",
"subjectName": null,
"debitAmount": null,
"creditAmount": 14.00,
"auxpropertyIds": null,
"vdSort": 1,
"createDate": "2022-08-10 16:14:28",
"updateDate": null,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": null,
"accountbookId": "2c91e3f674cfeac80174d85ce8a6021c",
"voucherDateTime": "2021-04-01 00:00:00",
"voucherSource": 0,
"ordinary": "Y",
"status": 10,
"voucherYearMonth": "2021-04",
"detailApList": []
}
]
},
{
"id": "2c91e3ed82859536018286d1bcc709f7",
"voucherCode": "记0233",
"accountbookId": "2c91e3f674cfeac80174d85ce8a6021c",
"accountbookName": null,
"submitterId": "8a8ab0b246dc81120146dc8181950052",
"voucherDateTime": "2021-04-01 00:00:00",
"voucherSource": 0,
"auditStatus": null,
"ordinary": "Y",
"status": 10,
"createDate": "2022-08-10 16:14:29",
"updateDate": null,
"auditUserId": null,
"auditTime": null,
"billDetailList": [{
"id": "2c91e3ed82859536018286d1bcce09f8",
"voucherId": "2c91e3ed82859536018286d1bcc709f7",
"digest": "支付 : 重庆蝶欣商贸有限公司1 - 款项",
"subjectId": "2202002",
"subjectName": null,
"debitAmount": 14.00,
"creditAmount": null,
"auxpropertyIds": "[{'auxptyDetailId':'','auxptyId':'2c91e3f674cfeac801750b3fd36a0677'},{'auxptyDetailId':'2c91e3017f90f5c601801719ca9b68cb','auxptyId':'3'}]",
"vdSort": 0,
"createDate": "2022-08-10 16:14:29",
"updateDate": null,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": null,
"accountbookId": "2c91e3f674cfeac80174d85ce8a6021c",
"voucherDateTime": "2021-04-01 00:00:00",
"voucherSource": 0,
"ordinary": "Y",
"status": 10,
"voucherYearMonth": "2021-04",
"detailApList": [{
"id": "2c91e3ed82859536018286d1bcce09f9",
"billId": "2c91e3ed82859536018286d1bcce09f8",
"auxptyId": "2c91e3f674cfeac801750b3fd36a0677",
"auxptyName": null,
"auxptyDetailId": "",
"auxptyDetailName": null
},
{
"id": "2c91e3ed82859536018286d1bcce09fa",
"billId": "2c91e3ed82859536018286d1bcce09f8",
"auxptyId": "3",
"auxptyName": null,
"auxptyDetailId": "2c91e3017f90f5c601801719ca9b68cb",
"auxptyDetailName": null
}
]
},
{
"id": "2c91e3ed82859536018286d1bcce09fd",
"voucherId": "2c91e3ed82859536018286d1bcc709f7",
"digest": "支付 : 重庆蝶欣商贸有限公司1 - 款项",
"subjectId": "1002001",
"subjectName": null,
"debitAmount": null,
"creditAmount": 14.00,
"auxpropertyIds": null,
"vdSort": 1,
"createDate": "2022-08-10 16:14:29",
"updateDate": null,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": null,
"accountbookId": "2c91e3f674cfeac80174d85ce8a6021c",
"voucherDateTime": "2021-04-01 00:00:00",
"voucherSource": 0,
"ordinary": "Y",
"status": 10,
"voucherYearMonth": "2021-04",
"detailApList": []
}
]
}
]
}3.新增凭证
| 接口描述 | 保存凭证信息 |
| HTTP URL | api/voucher.do?doSave&token=xxx |
| HTTP Method | POST |
(1)请求参数
| 名称 | 类型 | 必填 | 示例值 | 描述 |
| accountbookName | String | 是 | 账簿名称 | |
| voucherDateTime | String | 是 | 凭证日期 | |
| ordinary | String | 是 | 凭证类型(Y:总账,N:管理) | |
| status | String | 是 | 状态(10:暂存,20:待审批,30:已审批) | |
| submitterId | String | 否 | 提交人ID | |
| auditUserId | String | 否 | 审批人ID | |
| billDetailList | 是 | 凭证详情集合 | ||
| digest | String | 是 | 摘要 | |
| subjectName | String | 是 | 科目名称 | |
| debitAmount | String | 是 | 借方金额 | |
| creditAmount | String | 是 | 贷方金额 | |
| auxptyDepartName | String | 否 | 部门辅助核算名称 | |
| auxptyUserName | String | 否 | 职员辅助核算名称 | |
| auxptyCustomerName | String | 否 | 客户辅助核算名称 | |
| auxptySupplierName | String | 否 | 供应商辅助核算名称 | |
| detailApList | List | 否 | 自定义辅助核算 | |
| auxptyName | String | 否 | 辅助核算类别名称 | |
| auxptyDetailName | String | 否 | 辅助核算档案名称 |
(2)请求示例
{
"accountbookName": "A2A2",
"submitterId": "8a8ab0b246dc81120146dc8181950052",
"voucherDateTime": "2021-04-01 00:00:00",
"ordinary": "Y",
"status": 10,
"billDetailList": [{
"digest": "测试数据1",
"subjectName": "应交税费_应交增值税_进项税额",
"debitAmount": -44292.02,
"creditAmount": null,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": null,
"detailApList": null
},
{
"digest": "测试数据2",
"subjectName": "预付账款",
"debitAmount": null,
"creditAmount": -44292.02,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": "河北京沃环保科技有限公司",
"detailApList": [{
"auxptyName": "项目",
"auxptyDetailName": "默认项目"
}]
}
]
}(3)响应
| 名称 | 类型 | 示例值 | 描述 |
| success | boolean | true/false | 是否成功 |
| msg | String | 提示信息 |
(4)返回示例
{
"success": true,
"msg": "保存成功",
"data": {}4.批量新增凭证
| 接口描述 | 批量保存凭证信息 |
| HTTP URL | api/voucher.do?doBatchSave&token=xxx |
| HTTP Method | POST |
(1)请求参数
| 名称 | 类型 | 必填 | 示例值 | 描述 |
| accountbookName | String | 是 | 账簿名称 | |
| voucherDateTime | String | 是 | 凭证日期 | |
| ordinary | String | 是 | 凭证类型(Y:总账,N:管理) | |
| status | String | 是 | 状态(10:暂存,20:待审批,30:已审批) | |
| submitterId | String | 否 | 提交人ID | |
| auditUserId | String | 否 | 审批人ID | |
| billDetailList | List | 是 | 凭证详情集合 | |
| digest | String | 是 | 摘要 | |
| subjectName | String | 是 | 科目名称 | |
| debitAmount | String | 是 | 借方金额 | |
| creditAmount | String | 是 | 贷方金额 | |
| auxptyDepartName | String | 否 | 部门辅助核算名称 | |
| auxptyUserName | String | 否 | 职员辅助核算名称 | |
| auxptyCustomerName | String | 否 | 客户辅助核算名称 | |
| auxptySupplierName | String | 否 | 供应商辅助核算名称 | |
| detailApList | List | 否 | 自定义辅助核算 | |
| auxptyName | String | 否 | 辅助核算类别名称 | |
| auxptyDetailName | String | 否 | 辅助核算档案名称 |
(2)请求示例
[{
"accountbookName": "A2A2",
"submitterId": "8a8ab0b246dc81120146dc8181950052",
"voucherDateTime": "2021-04-01 00:00:00",
"ordinary": "Y",
"status": 10,
"billDetailList": [{
"digest": "测试数据3",
"subjectName": "应交税费_应交增值税_进项税额",
"debitAmount": -44292.02,
"creditAmount": null,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": null,
"detailApList": []
},
{
"digest": "测试数据4",
"subjectName": "预付账款",
"debitAmount": null,
"creditAmount": -44292.02,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": "河北京沃环保科技有限公司",
"detailApList": [{
"auxptyName": "项目",
"auxptyDetailName": "默认项目"
}]
}
]
}, {
"accountbookName": "A2A2",
"submitterId": "8a8ab0b246dc81120146dc8181950052",
"voucherDateTime": "2021-04-01 00:00:00",
"ordinary": "Y",
"status": 10,
"billDetailList": [{
"digest": "测试数据5",
"subjectName": "应交税费_应交增值税_进项税额",
"debitAmount": -44292.02,
"creditAmount": null,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": null,
"detailApList": []
},
{
"digest": "测试数据6",
"subjectName": "预付账款",
"debitAmount": null,
"creditAmount": -44292.02,
"auxptyDepartName": null,
"auxptyUserName": null,
"auxptyCustomerName": null,
"auxptySupplierName": "河北京沃环保科技有限公司",
"detailApList": [{
"auxptyName": "项目",
"auxptyDetailName": "默认项目"
}]
}
]
}](3)响应
| 名称 | 类型 | 示例值 | 描述 |
| success | boolean | true/false | 是否成功 |
| msg | String | 提示信息 |
(4)返回示例
{
"success": true,
"msg": "保存成功",
"data": {}💬 评论(0)
还没有评论,来抢沙发~
