接口文档· 更新于 2026-11-26
下载数电票源文件
POST
/openapi/invoice/direct/nuoNuo/downloadQdSourceFile发票外部服务转发接口;上游原始路径:/direct/nuoNuo/downloadQdSourceFile;来源 Controller:DirectNuoNuoController;上游鉴权:SignatureInterceptor:sign=MD5(appkey + 客户号/企业号 + timestamp),source 控制明密文
请求地址
生产环境
https://open.gch168.com/openapi/invoice/direct/nuoNuo/downloadQdSourceFile- 请求方式
- POST
- 内容类型
- application/json
- 传输安全
- TLS 1.2 及以上
支持的鉴权方式
查看接入认证说明 →以下任一鉴权方式通过即可调用,签名细节与凭证获取请查看接入说明。
Header 签名(普通开放接口)API_KEY
通过 ApiKey、客户号或企业号识别租户,并对时间戳、随机串进行 MD5 签名校验,适用于绝大多数普通开放接口。
Sign = MD5(secretKey + timestamp + nonceStr),签名比较忽略大小写
请求头
公共请求头 →| 请求头 | 必填 | 类型 | 示例值 | 说明 |
|---|---|---|---|---|
| appkey | 必填 | String | invoice-app-key | 调用方应用密钥,发票转发层读取该请求头做签名归属;Hsy/DirectNuoNuo 上游拦截器读取同名 Query 参数 |
| timestamp | 必填 | String | 1710000000000 | 请求时间戳,5 分钟内有效,发票转发层读取该请求头做签名归属;Hsy/DirectNuoNuo 上游拦截器读取同名 Query 参数 |
| sign | 必填 | String |
请求参数
| 参数名 | 位置 | 类型 | 必填 | 示例值 | 说明 |
|---|---|---|---|---|---|
appkey | QUERY | String | 必填 | invoice-app-key | 调用方应用密钥,Hsy/DirectNuoNuo 上游 SignatureInterceptor 读取该 Query 参数 |
timestamp | QUERY | String | 必填 | 1710000000000 | 请求时间戳,5 分钟内有效,Hsy/DirectNuoNuo 上游 SignatureInterceptor 读取该 Query 参数 |
param | BODY | String | 必填 | {"userTax":"91330000123456789X","isSandbox":"isSandboxValue","appKey":"appKeyValue","uid":"uidValue","eleAccount":"eleAccountValue","role":"roleValue","fileExtension":"fileExtensionValue","downloadType":"downloadTypeValue","invoiceList":[{"buyerName":"buyerNameValue","elecInvoiceNumber":"elecInvoiceNumberValue","invoiceTime":"2026-05-27 12:00:00","sellerName":"sellerNameValue"}]} | 发票服务拦截器读取的业务参数;source=pb 时为明文 JSON 字符串,其他来源为 AES 密文。子级为解密后的业务 JSON 字段。 |
userTax | BODY | String | 选填 | 91330000123456789X | taxNum |
isSandbox | BODY | String | 选填 | isSandboxValue | isSandbox |
appKey | BODY | String | 选填 | appKeyValue | appKey |
uid | BODY | String | 选填 | uidValue | 用户id |
eleAccount | BODY | String | 选填 | eleAccountValue | 账号 |
role | BODY | String | 选填 | roleValue | 角色 |
fileExtension | BODY | String | 选填 | fileExtensionValue | 源文件后缀,默认pdf,ofd,xml |
downloadType | BODY | String | 选填 | downloadTypeValue | 下载类型,manual: 手动下载,auto: 自动下载,默认手动下载 |
invoiceList | BODY | Array | 选填 | [] | 数电票列表 |
buyerName | BODY | String | 选填 | buyerNameValue | 购方名称 |
elecInvoiceNumber | BODY | String | 选填 | elecInvoiceNumberValue | 数电号码 |
invoiceTime | BODY | String | 选填 | 2026-05-27 12:00:00 | 开票时间 |
sellerName | BODY | String | 选填 | sellerNameValue | 销方名称 |
响应参数
业务成功时返回 code = 200,其余状态码见下方接口状态码与全局状态码。
| 字段名 | 类型 | 示例值 | 说明 |
|---|---|---|---|
code | Integer | 200 | 业务响应码 |
msg | String | success | 响应消息 |
data | String | ok | 响应数据;上游 Controller 返回 ResultModel<String>,serviceImpl 未暴露稳定响应 POJO 时按第三方原始 JSON 字符串记录,非 pb 来源可能为 AES 加密字符串 |
状态码
全局状态码 →| 状态码 | 说明 |
|---|---|
| 200 | 调用成功 |
请求与响应示例
请求示例
请求示例
POST /openapi/invoice/direct/nuoNuo/downloadQdSourceFile?appkey=invoice-app-key×tamp=1710000000000
appkey: invoice-app-key
timestamp: 1710000000000
sign: A1234567890123456789012345678901
source: pb
{"param":"{\"userTax\":\"91330000123456789X\",\"isSandbox\":\"isSandboxValue\",\"appKey\":\"appKeyValue\",\"uid\":\"uidValue\",\"eleAccount\":\"eleAccountValue\",\"role\":\"roleValue\",\"fileExtension\":\"fileExtensionValue\",\"downloadType\":\"downloadTypeValue\",\"invoiceList\":[{\"buyerName\":\"buyerNameValue\",\"elecInvoiceNumber\":\"elecInvoiceNumberValue\",\"invoiceTime\":\"2026-05-27 12:00:00\",\"sellerName\":\"sellerNameValue\"}]}"}
响应示例
响应示例
{
"code": 200,
"msg": "success",
"data": "ok"
}