RecognizeCarInvoice
Supports structured recognition and output of key fields including invoice code, invoice number, invoice date, invoice amount, VAT tax amount, certificate number, purchaser name, and purchaser ID number/code.
Operation description
Applicable scenarios
Alibaba Cloud motor vehicle sales invoice recognition is an officially self-developed OCR text recognition product. It is applicable to scenarios where you need to recognize key information on vehicle purchase invoices, such as invoice amount, purchaser name, vehicle type, brand model, and seller name.
Alibaba Cloud OCR products are built on the powerful AI technology and massive data resources of Alibaba DAMO Academy. After years of development and refinement, they offer high service stability, easy operation, real-time performance, and comprehensive capabilities.
Sample image for this API

Core capabilities
| Categorization | Description |
| Image formats | Supports PNG, JPG, JPEG, BMP, GIF, TIFF, and WebP. |
| Image enhancement | Image enhancement is enabled by default, including automatic image rotate, automatic distortion correction, and automatic enhancement of blurry images. |
| Multiple type coverage | Supports image recognition of low-quality images with blur, uneven lighting, perspective distortion, and arbitrary backgrounds. |
| High accuracy | The overall recognition accuracy can reach 98%. |
How to use this API
| Step | Description |
| 1 | Activate the Invoice and Certificate Recognition service. Before or after activation, you can try the recognition feature for free in the Experience Center. |
| 2 | Purchase a Motor Vehicle Sales Invoice Recognition resource plan. This API provides a free quota for testing. You can also skip purchasing a resource plan, and the system will automatically deduct fees based on actual usage through the "pay-as-you-go" billing method. |
| 3 | Refer to the code samples provided on the debug page to complete API integration. After integration, invoke the API to obtain recognition results. If you use a RAM user to invoke the API, the Alibaba Cloud account must grant authorization to the Resource Access Management (RAM) users. For information about how to create a RAM user, see Create a RAM user. The OCR service provides a system policy named AliyunOCRFullAccess. For information about how to grant permissions, see Grant permissions to a RAM user on the Users page. |
Important notes
| Type | Description |
| Image formats |
|
| Image dimensions |
|
| Image size |
|
| Related capabilities |
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ocr:RecognizeCarInvoice |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Url |
string |
No |
|
https://img.alicdn.com/tfs/TB1hC7bXCzqK1RjSZPcXXbTepXa-832-616.jpg |
| body |
string |
No |
|
Image binary file |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| Code |
string |
The fault code. This field is not returned if the recognition is successful. |
noPermission |
| Data |
string |
The returned data. |
{ "data": { "taxCode": "0492725/*+0/法55337*<56-24/*184-/*<94 16-6+9*-897+98546/<>74*++16<43800*>+-< 116*丰1<4201/*18+-/74*++16<43800*>+-< 116*丰1<4201/*18+-/ |
| Message |
string |
The fault message. This field is not returned if the recognition is successful. |
You are not authorized to perform this operation. |
| RequestId |
string |
The unique request ID. |
43A29C77-405E-4CC0-BC55-EE694AD00655 |
Metric description of response elements
| Field | Type | Description |
| data | object | The structured information. |
| sliceRect | list | The coordinate information of detected sub-images. |
| prism_keyValueInfo | list | The coordinate information of structured fields. |
| ftype | int | Indicates whether the document is a photocopy (1: yes, 0: no). |
| height | int | The height of the image after algorithm correction. |
| width | int | The width of the image after algorithm correction. |
| orgHeight | int | The height of the original image. |
| orgWidth | int | The width of the original image. |
Recognition results (data field)
| Field | Type | Description |
| taxCode | string | The tax control code. |
| invoiceDate | string | The invoice date. |
| invoiceCode | string | The invoice code. |
| invoiceNumber | string | The invoice number. |
| machineCode | string | The machine code. |
| purchaserName | string | The purchaser name. |
| purchaseCode | string | The purchaser ID number/organization code. |
| vehicleType | string | The vehicle type. |
| brandMode | string | The brand model. |
| origin | string | The place of origin. |
| certificateNumber | string | The certificate number. |
| importCertificateNumber | string | The import certificate number. |
| commodityInspectionNumber | string | The commodity inspection number. |
| engineNumber | string | The engine number. |
| vinCode | string | The vehicle identification number (VIN)/frame number. |
| invoiceAmountCn | string | The total amount including tax (in Chinese characters). |
| invoiceAmount | string | The total amount including tax (in digits). |
| sellerName | string | The seller name. |
| sellerContact | string | The seller phone number. |
| sellerTaxNumber | string | The seller taxpayer identification number. |
| sellerBankAccount | string | The seller bank account number. |
| sellerAddress | string | The seller address. |
| sellerDepositaryBank | string | The seller depositary bank. |
| taxRate | string | The VAT rate or levy rate. |
| tax | string | The VAT amount. |
| taxAuthoritiesInfo | string | The tax authority name and code. |
| taxAuthoritiesName | string | The tax authority name. |
| taxAuthoritiesCode | string | The tax authority code. |
| preTaxAmount | string | The pre-tax amount. |
| passengerLimitNumber | string | The passenger limit. |
| issuer | string | The invoice issuer. |
| tonnage | string | The tonnage. |
| purchaserTaxNumber | string | The purchaser taxpayer identification number. |
| taxPaymentNumber | string | The tax payment certificate number. |
Structured coordinate information (prism_keyValueInfo field)
| Field | Type | Description |
| key | string | The recognized field name. |
| keyProb | int | The confidence score of the field name. |
| value | string | The value corresponding to the recognized field name. |
| valueProb | int | The |
Examples
Success response
JSON format
{
"Code": "noPermission",
"Data": "{\n \"data\": {\n \"taxCode\": \"0492725/*+0/法55337*<56-24/*184-/*<94 16-6+9*-897+98546/<>74*++16<43800*>+-< 116*丰1<4201/*18+-/74*++16<43800*>+-< 116*丰1<4201/*18+-/ \"valuePos\": [\n {\n \"x\": 203,\n \"y\": 510\n },\n {\n \"x\": 203,\n \"y\": 524\n },\n {\n \"x\": 176,\n \"y\": 524\n },\n {\n \"x\": 176,\n \"y\": 510\n }\n ],\n \"valueProb\": 99\n },\n {\n \"key\": \"tax\",\n \"keyProb\": 100,\n \"value\": \"14384.62\",\n \"valuePos\": [\n {\n \"x\": 413,\n \"y\": 509\n },\n {\n \"x\": 413,\n \"y\": 524\n },\n {\n \"x\": 323,\n \"y\": 524\n },\n {\n \"x\": 323,\n \"y\": 509\n }\n ],\n \"valueProb\": 100\n },\n {\n \"key\": \"taxAuthoritiesInfo\",\n \"keyProb\": 100,\n \"value\": \"安阳县国家税务局341052200\",\n \"valuePos\": [\n {\n \"x\": 633,\n \"y\": 498\n },\n {\n \"x\": 633,\n \"y\": 525\n },\n {\n \"x\": 537,\n \"y\": 525\n },\n {\n \"x\": 537,\n \"y\": 498\n }\n ],\n \"valueProb\": 99\n },\n {\n \"key\": \"taxAuthoritiesName\",\n \"keyProb\": 100,\n \"value\": \"安阳县国家税务局\",\n \"valuePos\": [\n {\n \"x\": 633,\n \"y\": 498\n },\n {\n \"x\": 633,\n \"y\": 525\n },\n {\n \"x\": 537,\n \"y\": 525\n },\n {\n \"x\": 537,\n \"y\": 498\n }\n ],\n \"valueProb\": 99\n },\n {\n \"key\": \"taxAuthoritiesCode\",\n \"keyProb\": 100,\n \"value\": \"341052200\",\n \"valuePos\": [\n {\n \"x\": 633,\n \"y\": 498\n },\n {\n \"x\": 633,\n \"y\": 525\n },\n {\n \"x\": 537,\n \"y\": 525\n },\n {\n \"x\": 537,\n \"y\": 498\n }\n ],\n \"valueProb\": 99\n },\n {\n \"key\": \"preTaxAmount\",\n \"keyProb\": 97,\n \"value\": \"84615.38\",\n \"valuePos\": [\n {\n \"x\": 216,\n \"y\": 557\n },\n {\n \"x\": 216,\n \"y\": 543\n },\n {\n \"x\": 305,\n \"y\": 544\n },\n {\n \"x\": 305,\n \"y\": 559\n }\n ],\n \"valueProb\": 97\n },\n {\n \"key\": \"passengerLimitNumber\",\n \"keyProb\": 100,\n \"value\": \"5\",\n \"valuePos\": [\n {\n \"x\": 723,\n \"y\": 545\n },\n {\n \"x\": 723,\n \"y\": 557\n },\n {\n \"x\": 714,\n \"y\": 557\n },\n {\n \"x\": 714,\n \"y\": 545\n }\n ],\n \"valueProb\": 100\n },\n {\n \"key\": \"issuer\",\n \"keyProb\": 100,\n \"value\": \"赵迪\",\n \"valuePos\": [\n {\n \"x\": 437,\n \"y\": 573\n },\n {\n \"x\": 437,\n \"y\": 588\n },\n {\n \"x\": 410,\n \"y\": 588\n },\n {\n \"x\": 410,\n \"y\": 573\n }\n ],\n \"valueProb\": 100\n },\n {\n \"key\": \"tonnage\",\n \"keyProb\": 100,\n \"value\": \"\",\n \"valueProb\": 100\n },\n {\n \"key\": \"purchaserTaxNumber\",\n \"keyProb\": 100,\n \"value\": \"410523197206046072\",\n \"valuePos\": [\n {\n \"x\": 730,\n \"y\": 240\n },\n {\n \"x\": 730,\n \"y\": 253\n },\n {\n \"x\": 569,\n \"y\": 253\n },\n {\n \"x\": 569,\n \"y\": 240\n }\n ],\n \"valueProb\": 100\n },\n {\n \"key\": \"taxPaymentNumber\",\n \"keyProb\": 100,\n \"value\": \"\",\n \"valueProb\": 100\n }\n ],\n \"width\": 832\n}",
"Message": "You are not authorized to perform this operation.",
"RequestId": "43A29C77-405E-4CC0-BC55-EE694AD00655"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.