文字识别 OCR-发票验真:响应参数
响应参数
![](https://support.huaweicloud.com/api-ocr/public_sys-resources/note_3.0-zh-cn.png)
根据识别的结果,可能有不同的HTTP响应状态码(status code)。例如,200表示API调用成功,400表示调用失败,详细的状态码和响应参数说明如下。
状态码: 200
参数 |
参数类型 |
描述 |
---|---|---|
result |
Object |
识别结果。 调用失败时不返回此字段。 依据发票类型不同,返回参数不同。 |
参数 |
参数类型 |
描述 |
---|---|---|
result |
Object |
调用成功时返回的识别结果。 |
type |
String |
发票类型,取值范围:
|
code |
String |
发票代码。 |
number |
String |
发票号码。 |
issue_date |
String |
开票日期。 |
machine_number |
String |
机器编号。 |
check_code |
String |
校验码。 |
status |
String |
发票状态,取值范围:
|
subtotal_amount |
String |
合计金额(不含税)。 |
subtotal_tax |
String |
合计税额。 |
total |
String |
价税合计(小写)。 |
total_in_words |
String |
价税合计(大写)。 |
remarks |
String |
备注。 |
receiver |
String |
收款人。 |
issuer |
String |
开票人。 |
reviewer |
String |
复核人。 |
buyer_name |
String |
购买方名称。 |
buyer_id |
String |
购买方纳税人识别号。 |
buyer_address |
String |
购买方地址、电话。 |
buyer_bank |
String |
购买方开户行及账号。 |
seller_name |
String |
销售方名称。 |
seller_id |
String |
销售方纳税人识别号。 |
seller_address |
String |
销售方地址、电话。 |
seller_bank |
String |
销售方开户行及账号。 |
deductible_toll |
String |
通行费发票返回信息:
|
result_code |
String |
取值范围见表8。 |
result_message |
String |
取值范围见表8。 |
items |
object |
发票中包含的消费信息。 |
name |
String |
货物或应税劳务、服务名称、项目名称(通行费)。 |
specification |
String |
规格型号。 |
unit |
String |
单位。 |
quantity |
String |
数量。 |
unit_price |
String |
单价。 |
amount |
String |
金额。 |
tax_rate |
String |
税率。 |
tax |
String |
税额。 |
license_plate_number |
String |
车牌号。 |
vehicle_type |
String |
类型。 |
start_date |
String |
通行日期起。 |
end_date |
String |
通行日期止。 |
参数 |
参数类型 |
描述 |
---|---|---|
result |
object |
调用成功时返回的识别结果。 |
type |
String |
发票类型,取值范围: 机动车销售统一发票:motor_vehicle_sales。 |
code |
String |
发票代码。 |
number |
String |
发票号码。 |
issue_date |
String |
开票日期。 |
machine_number |
String |
机器编号。 |
status |
String |
发票状态,取值范围:
|
subtotal_amount |
String |
不含税价(小写)。 |
total |
String |
价税合计(小写)。 |
total_in_words |
String |
价税合计(大写)。 |
issuer |
String |
开票人。 |
buyer_name |
String |
购方名称。 |
buyer_organization_number |
String |
购买方身份证号码/组织机构代码。 |
buyer_id |
String |
购买方纳税人识别号。 |
seller_name |
String |
销货单位名称。 |
seller_id |
String |
销售方纳税人识别号。 |
seller_phone |
String |
销售方电话。 |
seller_account |
String |
销售方账号。 |
seller_address |
String |
销售方地址。 |
seller_bank |
String |
销售方开户银行。 |
tax_rate |
String |
税率。 |
tax |
String |
税额。 |
tax_authority |
String |
主管税务机关名称。 |
tax_authority_code |
String |
主管税务机关代码。 |
tax_payment_receipt |
String |
完税凭证号码。 |
tonnage |
String |
吨位。 |
seating_capacity |
String |
限乘人数。 |
vehicle_type |
String |
车辆类型。 |
brand_model |
String |
厂牌型号。 |
manufacturing_location |
String |
产地。 |
quality_certificate |
String |
合格证号。 |
import_certificate |
String |
进口证明书号。 |
inspection_number |
String |
商检单号。 |
engine_number |
String |
发动机号码。 |
vehicle_identification_number |
String |
车辆识别代号/车架号码。 |
result_code |
String |
取值范围见表8。 |
result_message |
String |
取值范围见表8。 |
参数 |
参数类型 |
描述 |
---|---|---|
result |
object |
调用成功时返回的识别结果。 |
type |
String |
发票类型,取值范围: 二手车销售统一发票:used_vehicle_sales。 |
code |
String |
发票代码。 |
number |
String |
发票号码。 |
issue_date |
String |
开票日期。 |
machine_number |
String |
机器编号。 |
status |
String |
发票状态,取值范围:
|
total |
String |
车价合计(小写)。 |
total_in_words |
String |
车价合计(大写)。 |
remarks |
String |
备注。 |
issuer |
String |
开票人。 |
buyer_name |
String |
买方单位/个人。 |
buyer_organization_number |
String |
买单位代码/身份证号码。 |
buyer_address |
String |
买方单位/个人住址。 |
buyer_phone |
String |
买方电话。 |
seller_name |
String |
卖方单位/个人。 |
seller_organization_number |
String |
卖方单位代码/身份证号码。 |
seller_address |
String |
卖方单位 /个人住址。 |
seller_phone |
String |
卖方电话。 |
vehicle_license_plate_number |
String |
车牌照号。 |
registration_certificate_number |
String |
登记证号。 |
vehicle_type |
String |
车辆类型。 |
vehicle_identification_number |
String |
车辆识别代号/车架号码。 |
brand_model |
String |
厂牌型号。 |
transfer_motor_vehicle_department_name |
String |
转入地车辆车管所名称。 |
auction_unit_name |
String |
经营,拍卖单位。 |
auction_unit_address |
String |
经营,拍卖单位地址。 |
auction_unit_tax_number |
String |
经营,拍卖单位纳税人识别号。 |
auction_unit_bank_and_account |
String |
开户银行及账号。 |
auction_unit_phone |
String |
经营,拍卖单位电话。 |
used_vehicle_market_name |
String |
二手车市场。 |
used_vehicle_market_tax_number |
String |
二手车市场纳税人识别号。 |
used_vehicle_market_address |
String |
二手车市场地址。 |
used_vehicle_market_bank_and_account |
String |
二手车市场开户银行及账号。 |
used_vehicle_market_phone |
String |
二手车市场电话。 |
result_code |
String |
取值范围见表8。 |
result_message |
String |
取值范围见表8。 |
业务状态码(result_code) |
描述信息(result_message) |
处理方法 |
---|---|---|
1000 |
The invoice verification information is consistent with the tax authority’s information. |
无需处理,发票验证信息与税务机关信息一致。 |
1001 |
One invoice can be verified for only five times per day. |
超过当天查验次数,请第二天再查验。 |
1002 |
The invoice verification information cannot be found in the tax authority’s information. |
被查验发票信息有误,请核对发票信息是否填写正确。 |
1003 |
The invoice verification information is inconsistent with the tax authority’s information. |
被查验发票信息有误,请核对发票信息是否填写正确。 |
1004 |
Only invoices issued within the last five years can be verified. |
超过5年的发票不能查验。 |
1005 |
Unsupported invoice type. |
被查验发票信息有误,请核对发票信息是否填写正确。 |
1006 |
The invoice verification information is abnormal in the tax authority’s information. |
税局机关接口异常,请等候税局机关恢复后再重试(建议2小时后重试)。 |
1007 |
This batch of invoices is being verified. |
该批次发票正在核验中,请第二天再查验。 |
1008 |
The request to the invoice verification service provided by the State Taxation Administration of China timed out. |
(税局机关)发票查询服务请求超时,请等候税局机关恢复后再重试(建议2小时后重试)。 |
1009 |
Verification request rejected. Online invoice verification is currently not supported in this region. |
(税局机关)查验请求被拒绝,此区域暂未开通线上查验通道。 |
1010 |
Parameter error. |
参数错误,请检查请求参数是否填写正确。 |
状态码: 400
参数 |
参数类型 |
描述 |
---|---|---|
error_code |
String |
调用失败时的错误码,具体请参见错误码。 当出现错误码“ModelArts.4204”时,请参考为什么调用API时提示“ModelArts.4204”?章节。 调用成功时不返回此字段。 |
error_msg |
String |
调用失败时返回的错误信息。 调用成功时不返回此字段。 |