# 发票查询
# 简介
根据发票ID,查询发票内容。
# 服务提供方
享道
# 接口URL
/openapi/invoice/detail
# 请求方式
GET
# 请求频次
单次
# 请求参数
参数名称 | 类型 | 必选 | 说明 |
---|---|---|---|
timestamp | long | 是 | 请求时间,Unix Timestamp单位毫秒 |
invoice_id | string | 是 | 发票ID |
# 响应参数
参数名称 | 类型 | 必有 | 说明 |
---|---|---|---|
errCode | int | 是 | 服务响应状态,参见附录5 |
errMsg | string | 是 | 服务响应状态说明,参见附录5 |
content | object | 是 | |
content.invoice_id | string | 是 | 发票ID |
content.receive_email | string | 否 | 收件人邮箱 |
content.application_time | long | 是 | 申请时间,Unix timestampt 单位秒(S) |
content.title | string | 是 | 发票抬头 |
content.tax_number | string | 否 | 税号(单位发票必填,个人发票不填) |
content.content | string | 是 | 开票内容 |
content.amount | int | 是 | 开票总金额,单位分 |
content.status | int | 是 | 申请状态 1:开票中 2:已开票 3:开票失败 4:已取消 5:已作废 |
content.invoice_link | string | 是 | 行程单下载地址 |
content.cancel_invoice_link | string | 否 | 负票下载地址 |
content.invoice_code | string | 是 | 发票代码 |
content.invoice_num | string | 是 | 8位发票号码 |
content.invoice_time | string | 是 | 开具时间 |
content.invoice_check | string | 是 | 发票校验码 |
content.trip_info | list | 否 | 发票关联行程信息 |
content.trip_info.order_id | string | 是 | 订单号 |
content.trip_info.invoice_amount | string | 是 | 订单开票金额 |
# 请求事例
请求
curl --request POST \
--url https://open-sit.saicmobility.com/merchant/v1/openapi/invoice/detail \
--header 'content-type: application/json' \
--header 'x-merchantid: saic_com' \
--header 'x-sign: 30ab36e41f74bd22a8240f4ab2e19b5aff1f2039' \
--header 'x-signalgorithm: 1' \
--header 'x-timestamp: 20201021112640' \
--data '{"invoice_id":"I8c8276a165a046319ef1b1f6d3ac6613","timestamp":20201021112640}'
响应
{
"errCode": 10000,
"errMsg": "successful",
"content": {
"invoice_id": "I8c8276a165a046319ef1b1f6d3ac6613",
"receive_email": "chengyong@saicmobility.com",
"application_time": 1603181719,
"title": "增值税纸质专用发票",
"tax_number": "91310115MA1K427762",
"content": "运输服务 客运服务费",
"amount": 6000000,
"status": 4,
"invoice_type": 2,
"invoice_code": "1603181725848",
"invoice_num": "1603181725850",
"invoice_time": "1603181725",
"invoice_check": "xxx",
"trip_info": [
{
"order_id": "xxxxx",
"invoice_amount": 1111
}
]
}
}