Domain name for API request: ocr.tencentcloudapi.com.
This API is used to recognize a Philippine Unified Multi-Purpose ID (UMID) 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: RecognizePhilippinesUMIDOCR. |
Version | Yes | String | Common Params. The value used for this API: 2018-11-19. |
Region | No | String | Common Params. This parameter is not required for this API. |
ImageBase64 | No | String | The Base64-encoded value 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. Either ImageUrl or ImageBase64 of the image must be provided. If both are provided, only ImageUrl is 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. The download speed and stability of non-Tencent Cloud URLs may be low. |
ReturnHeadImage | No | Boolean | Whether to return the identity photo. |
Parameter Name | Type | Description |
---|---|---|
Surname | TextDetectionResult | The surname. |
MiddleName | TextDetectionResult | The middle name. |
GivenName | TextDetectionResult | The given name. |
Address | TextDetectionResult | The address. |
Birthday | TextDetectionResult | The date of birth. |
CRN | TextDetectionResult | The common reference number (CRN). |
Sex | TextDetectionResult | The gender. |
HeadPortrait | TextDetectionResult | The Base64-encoded identity photo. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
This example shows you how to recognize a Philippine UMID card.
POST / HTTP/1.1
Host: ocr.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: RecognizePhilippinesUMIDOCR
<Common request parameters>
{
"ImageBase64": "abc",
"ImageUrl": "abc",
"ReturnHeadImage": true
}
{
"Response": {
"Address": {
"Polygon": [
{
"X": 29,
"Y": 98
},
{
"X": 67,
"Y": 98
},
{
"X": 67,
"Y": 103
},
{
"X": 24,
"Y": 102
}
],
"Value": "19 MOLAVE ST. ROSA-ROSARIOH PHL 4023"
},
"Birthday": {
"Polygon": [
{
"X": 41,
"Y": 14
},
{
"X": 91,
"Y": 14
},
{
"X": 52,
"Y": 98
},
{
"X": 41,
"Y": 98
}
],
"Value": "1996/06/20"
},
"CRN": {
"Polygon": [
{
"X": 449,
"Y": 73
},
{
"X": 653,
"Y": 73
},
{
"X": 65,
"Y": 754
},
{
"X": 44,
"Y": 754
}
],
"Value": "CRN-8884732-0"
},
"GivenName": {
"Polygon": [
{
"X": 26,
"Y": 81
},
{
"X": 41,
"Y": 83
},
{
"X": 41,
"Y": 84
},
{
"X": 26,
"Y": 83
}
],
"Value": "ARMAINE"
},
"HeadPortrait": {
"Polygon": [
{
"X": 16,
"Y": 73
},
{
"X": 23,
"Y": 73
},
{
"X": 23,
"Y": 10
},
{
"X": 1,
"Y": 10
}
],
"Value": "/9j/4AAQSkZp6nI6XG5Dg+oFVdzf32/76oorpSV2Zn//2Q=="
},
"MiddleName": {
"Polygon": [
{
"X": 29,
"Y": 89
},
{
"X": 39,
"Y": 89
},
{
"X": 39,
"Y": 91
},
{
"X": 29,
"Y": 91
}
],
"Value": "IEGA"
},
"RequestId": "6790280d-02e8-4bf2-8aa6-9e95c1a5ef97",
"Sex": {
"Polygon": [
{
"X": 35,
"Y": 95
},
{
"X": 42,
"Y": 15
},
{
"X": 342,
"Y": 96
},
{
"X": 25,
"Y": 96
}
],
"Value": "F"
},
"Surname": {
"Polygon": [
{
"X": 25,
"Y": 74
},
{
"X": 44,
"Y": 74
},
{
"X": 44,
"Y": 84
},
{
"X": 25,
"Y": 84
}
],
"Value": "SINO"
}
}
}
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 failed. |
FailedOperation.UnKnowError | Unknown error. |
FailedOperation.UnOpenError | The service is not activated. |
InvalidParameter.EngineImageDecodeFailed | Image decoding failed. |
InvalidParameterValue.InvalidParameterValueLimit | Incorrect parameter value. |
LimitExceeded.TooLargeFileError | The file is too large. |
ResourcesSoldOut.ChargeStatusException | Exceptional billing status. |
Was this page helpful?