5.10 线上发票红冲接口
<p>[TOC]</p>
<p>请求模式:渠道方→华农阿凡达平台</p>
<p>接口描述:用于渠道进行发票红冲、作废等操作。</p>
<p>测试接口地址:<a href="https://porsche-avatar.chinahuanong.com.cn/avatar/invoice/invoiceOffset">https://porsche-avatar.chinahuanong.com.cn/avatar/invoice/invoiceOffset</a></p>
<p>生产接口地址:<a href="https://avatar.chinahuanong.com.cn/avatar/invoice/invoiceOffset">https://avatar.chinahuanong.com.cn/avatar/invoice/invoiceOffset</a></p>
<h3>请求头</h3>
<p><code>head</code></p>
<table>
<thead>
<tr>
<th>字段名称</th>
<th>字段代码</th>
<th>类型</th>
<th>是否必传</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>渠道代码</td>
<td>policySource</td>
<td>varchar</td>
<td>Y</td>
<td>保险公司分配给渠道方的渠道编码</td>
</tr>
<tr>
<td>请求时间</td>
<td>reqTime</td>
<td>DateTime</td>
<td>Y</td>
<td>格式为:yyyy-MM-dd HH:mm:ss。</td>
</tr>
<tr>
<td>唯一标识符</td>
<td>uuid</td>
<td>varchar</td>
<td>Y</td>
<td>单次请求唯一标识符,可用UUID生成</td>
</tr>
</tbody>
</table>
<h3>请求体</h3>
<p><code>invoiceOffset</code></p>
<table>
<thead>
<tr>
<th>字段名称</th>
<th>字段代码</th>
<th>类型</th>
<th>是否必传</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>发票申请号</td>
<td>invoiceApplyNo</td>
<td>varchar</td>
<td>Y</td>
<td>线上开票接口传入的发票申请号</td>
</tr>
<tr>
<td>请求类型</td>
<td>requestType</td>
<td>varchar</td>
<td>Y</td>
<td>1-红冲</td>
</tr>
<tr>
<td>通知单编号</td>
<td>noticeNo</td>
<td>varchar</td>
<td>CY</td>
<td></td>
</tr>
<tr>
<td>红冲原因</td>
<td>redIssueReason</td>
<td>varchar</td>
<td>CY</td>
<td>数电发票必传 红冲原因(1 销货退回 2 开票有误 3 服务终止 4 销售折让)</td>
</tr>
<tr>
<td>红字确认单流水号</td>
<td>redConfirmSerialNo</td>
<td>varchar</td>
<td>CY</td>
<td></td>
</tr>
</tbody>
</table>
<h3>响应头</h3>
<p><code>head</code></p>
<table>
<thead>
<tr>
<th>字段名称</th>
<th>字段代码</th>
<th>类型</th>
<th>是否必传</th>
<th>字段描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>渠道代码</td>
<td>policySource</td>
<td>varchar</td>
<td>Y</td>
<td>保险公司分配给渠道方的渠道编码</td>
</tr>
<tr>
<td>响应时间</td>
<td>respTime</td>
<td>DateTime</td>
<td>Y</td>
<td></td>
</tr>
<tr>
<td>唯一标识符</td>
<td>uuid</td>
<td>varchar</td>
<td>Y</td>
<td>单次请求唯一标识符,可用UUID生成</td>
</tr>
</tbody>
</table>
<h3>响应体</h3>
<p><code>respBody</code></p>
<table>
<thead>
<tr>
<th>字段名称</th>
<th>字段代码</th>
<th>类型</th>
<th>是否必传</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>处理状态码</td>
<td>dealCode</td>
<td>varchar</td>
<td>Y</td>
<td>处理结果状态码</td>
</tr>
<tr>
<td>处理结果描述</td>
<td>dealDesc</td>
<td>varchar</td>
<td>Y</td>
<td>处理结果描述</td>
</tr>
</tbody>
</table>
<h3>示例报文</h3>
<h4>请求</h4>
<pre><code class="language-json">{
&quot;head&quot;:{
&quot;policySource&quot;:&quot;PHN_TC&quot;,
&quot;reqTime&quot;:&quot;2023-03-14 14:17:43&quot;,
&quot;uuid&quot;:&quot;3cfaad6d-59b1-46cc-8617-f1e4abe9a692&quot;
},
&quot;invoiceOffset&quot;:{
&quot;invoiceApplyNo&quot;:&quot;532925188625&quot;,
&quot;requestType&quot;:&quot;1&quot;,
&quot;noticeNo&quot;:&quot;123&quot;,
&quot;redIssueReason&quot;:&quot;2&quot;,
&quot;redConfirmSerialNo&quot;:&quot;Hz131241&quot;
}
}</code></pre>
<h4>返回</h4>
<pre><code class="language-json">{
&quot;head&quot;:{
&quot;policySource&quot;:&quot;PHN_TC&quot;,
&quot;respTime&quot;:&quot;2023-03-14 14:17:46&quot;,
&quot;uuid&quot;:&quot;3cfaad6d-59b1-46cc-8617-f1e4abe9a692&quot;
},
&quot;respBody&quot;:{
&quot;dealCode&quot;:&quot;1&quot;,
&quot;dealDesc&quot;:&quot;成功&quot;,
}
}</code></pre>