使用票据要素信息进行发票明细查询
接口说明
- url: /common/invoice/findReceiptDetail
- method: get
- 参数类型: query parameter
请求参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| bizId | String | Y | |
| invoice_num | String | Y | 发票号码 |
| invoice_code | String | N | 发票代码 |
| invoice_type | String | Y | 发票类型 |
| receipt_date | Long | N | 发票日期 |
| passenger_name | String | N | 乘客姓名 |
| need_document_info | Boolean | Y | 是否查询对应单据号 |
返回参数
| 参数名 | 类型 | 说明 |
|---|---|---|
| resCode | Integer | |
| resMsg | String | |
| bizId | String | |
| data | Object |
data对象参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| receipt_id | Integer | 票据ID |
| source | String | 来源 |
| source_type | String | 发票来源类型 |
| source_file | String | 发票附件是否是源文件 (Y: 附件是源文件,N: 非源文件,该字段为null时不具有任何意义) |
| invalid_invoice | String | 无效发票标记 (Y: 无效发票) |
| invoice_input | String | 发票查验四要素以及位置信息 |
| invoice_type | String | 发票类型 |
| invoice_status | String | 查验状态 |
| comments | String | 备注 |
| invoice_message | String | 查验状态说明 |
| invoice_attachments | String | 附件 |
| company_id | Integer | 公司ID |
| log_id | Long | 导入批次ID |
| expense_id | Integer | 消费记录ID |
| invoice_code | String | 发票代码 |
| invoice_num | String | 发票号码 |
| invoice_serial | String | 校验码 |
| amount | BigDecimal | 金额 |
| currency | String | 币种 |
| flight_detail | String | 航班明细 |
| trips | String | 滴滴导入的发票的行程信息 |
| accumulation_type_id | Integer | 费用计算方式 |
| exchange_rate | BigDecimal | 汇率 |
| original_tax_amount | BigDecimal | 税额 |
| pay_amount | BigDecimal | 支付金额 |
| tax_code_id | Integer | 税码ID |
| tax_amount | BigDecimal | 税额 |
| subtotal_amount | BigDecimal | 小计 |
| receipt_date | Long | 发票日期 |
| buyer_name | String | 购买方名称 |
| fare | BigDecimal | 费用 |
| fuel_surcharge | BigDecimal | 燃油附加费 |
| buyer_tax_code | String | 购买方税号 |
| seller_name | String | 销售方名称 |
| seller_tax_code | String | 销售方税号 |
| type_id | Integer | 发票费用类型ID |
| passenger_name | String | 乘客姓名 |
| name | String | 发票标题 |
| flight_class | String | 飞机舱位 |
| train_class | String | 火车座位 |
| ship_class | String | 船舱位 |
| train_number | String | 火车号 |
| receipt_location | String | 开票地点 |
| location_from | String | 出发地 |
| location_to | String | 到达地 |
| mobile_number | String | 手机号 |
| shop_name | String | 销售方名称 |
| shop_location | String | 销售方地址 |
| start_datetime | Long | 开始时 |
| end_datetime | Long | 结束时 |
| destination_city | String | 出发地 |
| destination_city_to | String | 目的地 |
| flight_number | String | 航班 |
| mileage | BigDecimal | 里程 |
| duration | String | 耗时 |
| submit_user | String | 提交者 |
| created_by | String | 创建者 |
| status | Byte | 状态 |
| review_flag | String | 预览 |
| purchase_invoice | String | 采购发票 |
| val_rule_result | String | 校验后得到的非法信息 |
| abnormal_status | String | 异常状态 |
| explain_message | String | 说明信息 |
| deal_status | String | 处理状态 |
| abnormal_update_date | Long | 异常状态更新日期 |
| station_from | String | 出发站点 |
| station_to | String | 到达站点 |
| other_info | String | 其他信息 |
| id_number | String | 身份证号 |
| buyer_account_bank | String | 购方开户行及账号 |
| buyer_address_phone | String | 购方地址与电话 |
| seller_account_bank | String | 销方开户行及账号 |
| seller_address_phone | String | 销方地址与电话 |
| blacklist_flag | String | 税号黑名单标记位 |
| blacklist_reason | String | 税号黑名单原因 |
| receipt_detail_list | List | |
| document_num | String | 单据号 |
| digital_attachments_status | String | 版式文件下载状态 |
| digital_attachments_message | String | 版式文件信息 |
| digital_attachments | String | 版式文件 |
receipt_Detail_list对象参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| detail_id | Integer | 明细ID |
| receipt_id | Integer | 票据ID |
| expense_id | Integer | 消费记录ID |
| name | String | 名称 |
| unit | String | 单位 |
| net_price | BigDecimal | 不含税单价 |
| price | BigDecimal | 单价 |
| receipt_amount | BigDecimal | 金额 |
| net_amount | BigDecimal | 不含税金额 |
| tax_amount | BigDecimal | 税额 |
| tax_code_id | Integer | 税码ID |
| unit_id | Integer | 单位ID |
| material_id | Integer | 名称ID |
| tax_rate | Integer | 税率 |
| quantity | BigDecimal | 数量 |
| specification | String | 规格 |
| classification_code | String | 税收分类编码 |
| type_id | Integer | 明细费用类型ID |
| company_id | Integer | 公司ID |
| discount | String | 折扣 |
| discount_amount | BigDecimal | 折扣金额 |
| original_amount | BigDecimal | 原始金额 |
| passage_start_date | Long | 通行时间起 |
| passage_end_date | Long | 通行时间止 |
| license_plate | String | 车牌号 |
| car_type | String | 车辆类型 |
| submit_user | String | 提交人 |
| created_by | String | 创建人 |
请求示例
请求参数
/common/invoice/findReceiptDetail?bizId=12345678-12345678&invoice_num=07137577&invoice_code=031002100104&invoice_type=04&need_document_info=false
返回参数
{
"resCode": 200000,
"resMsg": "查询成功",
"bizId": "12345678-12345678",
"data": {
"receipt_id": 474183,
"source": "ocr",
"invoice_input": "{\"No\": \"07137577\", \"Code\": \"031002100104\", \"Date\": \"20221018\", \"VCode\": \"180154\"}",
"invoice_type": "04",
"invoice_status": "Y",
"invoice_attachments": "[{\"location\": {\"direction\": \"0\"}, \"direction\": \"0\", \"file_name\": \"IMG_20221019_090129.jpg\", \"created_by\": 224068, \"attachment_url\": \"3809/2022/10-20/receipt/c33cbc1b-2826-4f2b-9352-f9e80ee7283d.jpg\"}]",
"company_id": 3809,
"expense_id": 41984514,
"invoice_code": "031002100104",
"invoice_num": "07137577",
"invoice_serial": "04190929504682180154",
"amount": 236.00,
"currency": "CNY",
"exchange_rate": 1.0000000000,
"receipt_date": 1666022400000,
"buyer_name": "阿拉山口振德医用纺织有限公司",
"buyer_tax_code": "91652702MA77504P39",
"seller_name": "上海恩祈酒店有限公司",
"seller_tax_code": "91310105694215216Q",
"blacklist_flag": "Y",
"blacklist_reason": "{\"tax_code\":\"91310105694215216Q\",\"available\":\"Y\",\"blacklist_flag\":\"Y\",\"national_tax_id\":14,\"abnormal_households\":\"Y\",\"serious_illegal_risk\":[{\"in_date\":\"2021-06-02\",\"out_date\":null,\"in_reason\":\"不知道\",\"out_reason\":null,\"in_department\":\"不知道\",\"out_department\":null,\"national_tax_id\":14,\"serious_illegal_id\":2},{\"in_date\":\"2021-06-02\",\"out_date\":\"2023-07-27\",\"in_reason\":\"不知道\",\"out_reason\":\"不知道\",\"in_department\":\"不知道\",\"out_department\":\"test\",\"national_tax_id\":14,\"serious_illegal_id\":3}],\"major_tax_illegal_risk\":[{\"agent\":null,\"result\":null,\"address\":null,\"org_code\":null,\"property\":null,\"tax_code\":\"123\",\"created_time\":null,\"illegal_fact\":null,\"updated_time\":null,\"original_link\":null,\"corporate_name\":\"无敌公司\",\"finance_officer\":null,\"national_tax_id\":14,\"occurrence_time\":\"2022-09-14\",\"responsible_person\":null,\"major_tax_illegal_id\":1},{\"agent\":null,\"result\":null,\"address\":null,\"org_code\":null,\"property\":null,\"tax_code\":\"456\",\"created_time\":null,\"illegal_fact\":null,\"updated_time\":null,\"original_link\":null,\"corporate_name\":\"丢丢怪\",\"finance_officer\":null,\"national_tax_id\":14,\"occurrence_time\":\"2022-09-12\",\"responsible_person\":null,\"major_tax_illegal_id\":2}],\"customized_tax_blacklist\":null,\"operational_anomaly_risk\":[{\"in_date\":\"2021-06-02\",\"out_date\":\"2023-07-27\",\"province\":\"湖北\",\"in_reason\":\"没有交钱\",\"department\":\"武汉动力\",\"out_reason\":\"交钱了\",\"description\":\"暂无\",\"national_tax_id\":14,\"registration_no\":\"123456789\",\"operational_anomaly_id\":3},{\"in_date\":\"2021-06-02\",\"out_date\":null,\"province\":\"广东\",\"in_reason\":\"没有交税\",\"department\":\"广东移动\",\"out_reason\":null,\"description\":\"暂无\",\"national_tax_id\":14,\"registration_no\":\"789456123\",\"operational_anomaly_id\":4},{\"in_date\":\"2021-06-02\",\"out_date\":\"2023-07-27\",\"province\":\"湖北\",\"in_reason\":\"没有交钱\",\"department\":\"武汉动力\",\"out_reason\":\"交钱了\",\"description\":\"暂无\",\"national_tax_id\":14,\"registration_no\":\"123456789\",\"operational_anomaly_id\":5},{\"in_date\":\"2021-06-02\",\"out_date\":null,\"province\":\"广东\",\"in_reason\":\"没有交税\",\"department\":\"广东移动\",\"out_reason\":null,\"description\":\"暂无\",\"national_tax_id\":14,\"registration_no\":\"789456123\",\"operational_anomaly_id\":6}]}",
"shop_name": "上海恩祈酒店有限公司",
"submit_user": "测试小号010",
"created_by": "沈世缘",
"status": 0,
"abnormal_status": "0",
"receipt_detail_list": [
{
"detail_id": 15081,
"receipt_id": 474183,
"name": "*住宿服务*房费",
"unit": "间",
"net_price": 222.64,
"receipt_amount": 236.00,
"net_amount": 222.64,
"material_id": 126,
"tax_rate": 6,
"quantity": 1.0000000000,
"specification": "商B",
"company_id": 3809,
"discount": "N",
"original_amount": 236.00,
"submit_user": "测试小号010",
"created_by": "测试小号010"
}
]
}
}