Domain name for API request: ocr.intl.tencentcloudapi.com.
This API is used to recognize a Philippine TIN ID card.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: RecognizePhilippinesTinIDOCR. |
| Version | Yes | String | Common Params. The value used for this API: 2018-11-19. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. This API only supports: ap-singapore. |
| ReturnHeadImage | Yes | Boolean | Whether to return the identity photo. |
| ImageBase64 | No | String | The Base64-encoded value of an image. Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported. Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s. Either the ImageUrl or ImageBase64 of the image must be provided. If both are provided, only ImageUrl will be used. |
| ImageUrl | No | String | The URL of the image. Supported image formats: PNG, JPG, and JPEG. GIF is currently not supported. Supported image size: The downloaded image after Base64 encoding can be up to 7 MB. The download time of the image cannot exceed 3s. We recommend that you store the image in Tencent Cloud for higher download speed and stability. For a non-Tencent Cloud URL, the download speed and stability may be affected. |
| Parameter Name | Type | Description |
|---|---|---|
| HeadPortrait | TextDetectionResult | Base64 encoded result of portrait photo. |
| LicenseNumber | TextDetectionResult | The tax identification number (TIN). |
| FullName | TextDetectionResult | Full name of the taxpayer. |
| Address | TextDetectionResult | The address. |
| Birthday | TextDetectionResult | The birth date. |
| IssueDate | TextDetectionResult | The issue date. |
| GivenName | TextDetectionResult | Given name of the taxpayer. |
| LastName | TextDetectionResult | Last name of the taxpayer. |
| MiddleName | TextDetectionResult | Middle name of the taxpayer. |
| RDO | TextDetectionResult | Revenue district office where the taxpayer is registered. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
RecognizePhilippinesTinIDOCR
{
"ReturnHeadImage": true,
"ImageBase64": "/9j/4AAQSkZJRg.....s97n//2Q==",
"ImageUrl": "https://ocr-demo-1254418846.cos.ap-guangzhou.myqcloud.com/***/fakeurl.jpg"
}
{
"Response": {
"Address": {
"Polygon": [],
"Value": "18 A KATIPUNAN ****** RIZAL "
},
"Birthday": {
"Polygon": [
{
"X": 665,
"Y": 737
},
{
"X": 997,
"Y": 737
},
{
"X": 997,
"Y": 787
},
{
"X": 665,
"Y": 787
}
],
"Value": "August **,1972"
},
"FullName": {
"Polygon": [],
"Value": "VER******ALBIOR"
},
"HeadPortrait": {
"Polygon": [
{
"X": 1118,
"Y": 512
},
{
"X": 1368,
"Y": 512
},
{
"X": 1368,
"Y": 808
},
{
"X": 1118,
"Y": 808
}
],
"Value": "/9j/4AAQSkZJRg.....s97n//2Q=="
},
"IssueDate": {
"Polygon": [
{
"X": 665,
"Y": 737
},
{
"X": 997,
"Y": 737
},
{
"X": 997,
"Y": 787
},
{
"X": 665,
"Y": 787
}
],
"Value": "August **,1972"
},
"LicenseNumber": {
"Polygon": [
{
"X": 505,
"Y": 522
},
{
"X": 897,
"Y": 522
},
{
"X": 897,
"Y": 572
},
{
"X": 505,
"Y": 572
}
],
"Value": "497-***-***-000"
},
"RequestId": "df40cc1c-e074-44ab-ab39-cc2c105a5cd4"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| FailedOperation.DownLoadError | File download failed. |
| FailedOperation.ImageDecodeFailed | Image decoding failed. |
| FailedOperation.OcrFailed | OCR recognition failed. |
| FailedOperation.UnKnowError | Unknown error. |
| FailedOperation.UnOpenError | The service has not been activated. |
| InvalidParameter.EngineImageDecodeFailed | Image decoding failed. |
| InvalidParameterValue.InvalidParameterValueLimit | Incorrect parameter value. |
| LimitExceeded.TooLargeFileError | File content too large. |
| ResourcesSoldOut.ChargeStatusException | The billing status is abnormal. |
文档反馈