接口文档· 更新于 2026-11-26
红字确认单申请
POST
/openapi/invoice/nuoNuo/saveInvoiceRedConfirm.do发票外部服务转发接口;上游原始路径:/nuoNuo/saveInvoiceRedConfirm.do;来源 Controller:NuoNuoController;上游鉴权:无上游拦截器鉴权;OpenAPI 发票转发层要求 appkey/timestamp/sign/source
请求地址
生产环境
https://open.gch168.com/openapi/invoice/nuoNuo/saveInvoiceRedConfirm.do- 请求方式
- POST
- 内容类型
- application/json
- 传输安全
- TLS 1.2 及以上
支持的鉴权方式
查看接入认证说明 →以下任一鉴权方式通过即可调用,签名细节与凭证获取请查看接入说明。
Header 签名(普通开放接口)API_KEY
通过 ApiKey、客户号或企业号识别租户,并对时间戳、随机串进行 MD5 签名校验,适用于绝大多数普通开放接口。
Sign = MD5(secretKey + timestamp + nonceStr),签名比较忽略大小写
请求头
公共请求头 →| 请求头 | 必填 | 类型 | 示例值 | 说明 |
|---|---|---|---|---|
| appkey | 必填 | String | invoice-app-key | 调用方应用密钥,发票转发层用于签名归属和计量 |
| timestamp | 必填 | String | 1710000000000 | 请求时间戳,5 分钟内有效,发票转发层用于签名归属和计量 |
| sign | 必填 | String | A1234567890123456789012345678901 |
请求参数
| 参数名 | 位置 | 类型 | 必填 | 示例值 | 说明 |
|---|---|---|---|---|---|
userTax | BODY | String | 选填 | 91330000123456789X | taxNum |
isSandbox | BODY | String | 选填 | isSandboxValue | isSandbox |
appKey | BODY | String | 选填 | appKeyValue | appKey |
billId | BODY | String | 选填 | billIdValue | 红字确认单申请号 |
blueInvoiceLine | BODY | String | 必填 | blueInvoiceLineValue | 对应蓝票发票种类 |
applySource | BODY | String | 必填 | applySourceValue | 申请方 |
blueInvoiceNumber | BODY | String | 必填 | blueInvoiceNumberValue | 对应蓝票全电号码 |
billTime | BODY | String | 选填 | 2026-05-27 12:00:00 | 填开时间 |
sellerTaxNo | BODY | String | 必填 | 91330000123456789X | 销方税号 |
sellerName | BODY | String | 必填 | sellerNameValue | 销方名称 |
departmentId | BODY | String | 选填 | departmentIdValue | 部门门店id |
clerkId | BODY | String | 选填 | clerkIdValue | 开票员id |
buyerTaxNo | BODY | String | 选填 | 91330000123456789X | 购方税号 |
buyerName | BODY | String | 必填 | buyerNameValue | 购方名称 |
vatUsage | BODY | String | 选填 | vatUsageValue | 蓝字发票增值税用途 |
saleTaxUsage | BODY | String | 选填 | 91330000123456789X | 蓝字发票消费税用途 |
accountStatus | BODY | String | 选填 | accountStatusValue | 发票入账状态 |
redReason | BODY | String | 必填 | redReasonValue | 冲红原因 |
extensionNumber | BODY | String | 选填 | extensionNumberValue | 分机号 |
blueInvoiceCode | BODY | String | 选填 | blueInvoiceCodeValue | 对应蓝字发票代码(蓝票是增值税发票时必传) |
blueElecInvoiceNumber | BODY | String | 选填 | blueElecInvoiceNumberValue | 对应蓝字数电票号码(数电普票,数电专票,数纸普票,数纸专票都需要传,蓝票是增值税发票时不传) |
orderNo | BODY | String | 选填 | orderNoValue | 若有值,则在无需确认或购销双方已确认后去自动开红票,发票的开票单号用该值 |
detail | BODY | Array | 选填 | [] | 红字确认单明细信息列表(全电部分冲红时才需要传) |
blueDetailIndex | BODY | String | 必填 | blueDetailIndexValue | 对应蓝票明细行序号 |
goodsName | BODY | String | 必填 | goodsNameValue | 商品名称 |
unit | BODY | String | 选填 | unitValue | 单位 |
specType | BODY | String | 选填 | specTypeValue | 规格型号 |
num | BODY | String | 选填 | numValue | 数量 |
taxExcludedPrice | BODY | String | 选填 | 91330000123456789X | 单价(不含税)为正数 |
taxExcludedAmount | BODY | String | 选填 | 91330000123456789X | 商品金额(不含税);带负号,精确到小数点后两位 |
taxAmount | BODY | String | 选填 | 91330000123456789X | 商品税额,带负号,精确到小数点后两位 |
taxRate | BODY | String | 必填 | 91330000123456789X | 税率 |
goodsCode | BODY | String | 必填 | goodsCodeValue | 商品编码 |
favouredPolicyFlag | BODY | String | 选填 | favouredPolicyFlagValue | 优惠政策标识 |
响应参数
业务成功时返回 code = 200,其余状态码见下方接口状态码与全局状态码。
| 字段名 | 类型 | 示例值 | 说明 |
|---|---|---|---|
errCode | Integer | 200 | 业务响应码 |
errMsg | String | success | 响应消息 |
data | String | ok | 响应数据;上游 NuoNuoController 返回 JsonResult 字符串,serviceImpl 未暴露稳定响应 POJO 时按第三方原始 JSON 字符串记录 |
状态码
全局状态码 →| 状态码 | 说明 |
|---|---|
| 200 | 调用成功 |
请求与响应示例
请求示例
请求示例
POST /openapi/invoice/nuoNuo/saveInvoiceRedConfirm.do
appkey: invoice-app-key
timestamp: 1710000000000
sign: A1234567890123456789012345678901
source: pb
{"userTax":"91330000123456789X","isSandbox":"isSandboxValue","appKey":"appKeyValue","billId":"billIdValue","blueInvoiceLine":"blueInvoiceLineValue","applySource":"applySourceValue","blueInvoiceNumber":"blueInvoiceNumberValue","billTime":"2026-05-27 12:00:00","sellerTaxNo":"91330000123456789X","sellerName":"sellerNameValue"}
响应示例
响应示例
{
"errCode": 200,
"errMsg": "success",
"data": "ok"
}