House Registration OCR
API Documentation for House Registration OCR
Extract House Registration information from image
Error Definition
http status | error_code | error_message | description |
---|---|---|---|
200 | 200 | success | Success |
400 | 001 | Can’t detect both house registration or resident details | Please ensure both house registration and resident details are uploaded in the same document |
400 | 001 | mage validation error maybe something wrong | Please ensure your base_64_image had transform correctly |
Key List
key | key_thai |
---|---|
book number | เล่มที่ ในรายการเกี่ยวกับบ้าน |
house number from house info | เลขรหัสประจำบ้าน ในรายการเกี่ยวกับบ้าน |
registrar office | สำนักทะเบียน ในรายการเกี่ยวกับบ้าน |
address | รายการที่อยู่ ในรายการเกี่ยวกับบ้าน |
village name | ชื่อหมู่บ้าน ในรายการเกี่ยวกับบ้าน |
house name | ชื่อบ้าน ในรายการเกี่ยวกับบ้าน |
house category | ประเภทบ้าน ในรายการเกี่ยวกับบ้าน |
house style | ลักษณะบ้าน ในรายการเกี่ยวกับบ้าน |
date of house number registration | วันเดือนปีที่กำหนดบ้านเลขที่ ในรายการเกี่ยวกับบ้าน |
registrar name of house info | ชื่อนายทะเบียน ในรายการเกี่ยวกับบ้าน |
date of house registration | วันเดือนปีที่พิมพ์ทะเบียนบ้าน ในรายการเกี่ยวกับบ้าน |
page of person info | เลขหน้า ในรายการข้อมูลบุคคล |
book number from person info | เล่มที่ ในรายการข้อมูลบุคคล |
house number from person info | รายการบุคคลในบ้านของเลขรหัสประจำบ้าน ในรายการข้อมูลบุคคล |
order | ลำดับที่ ในรายการข้อมูลบุคคล |
name | ชื่อ ในรายการข้อมูลบุคคล |
nationality | สัญชาติ ในรายการข้อมูลบุคคล |
sex | เพศ ในรายการข้อมูลบุคคล |
id number | เลขประจำตัวประชาชน ในรายการข้อมูลบุคคล |
status | สถานภาพ ในรายการข้อมูลบุคคล |
date of birth | เกิดเมื่อ ในรายการข้อมูลบุคคล |
mother name | ชื่อมารดาผู้ให้กำเนิด ในรายการข้อมูลบุคคล |
mother id number | เลขประจำตัวประชาชนมารดาผู้ให้กำเนิด ในรายการข้อมูลบุคคล |
mother nationality | สัญชาติมารดาผู้ให้กำเนิด ในรายการข้อมูลบุคคล |
father name | ชื่อบิดาผู้ให้กำเนิด ในรายการข้อมูลบุคคล |
father id number | เลขประจำตัวประชาชนบิดาผู้ให้กำเนิด ในรายการข้อมูลบุคคล |
father nationality | สัญชาติบิดาผู้ให้กำเนิด ในรายการข้อมูลบุคคล |
from info | มาจาก ในรายการข้อมูลบุคคล |
registrar name of from info | ชื่อนายทะเบียนในส่วนของมาจาก ในรายการข้อมูลบุคคล |
to info | ไปที่ ในรายการข้อมูลบุคคล |
registrar name of from info | ชื่อนายทะเบียนในส่วนของไปที่ ในรายการข้อมูลบุคคล |
Extract House Registration information from image
POST https://apis.aigen.online/aiscript/house-registration/v2
Request Body
Name | Type | Description |
---|---|---|
image* | Input base64 images encoded utf-8 |
- 200: OK Successful Response
- 206: Partial Content Partial Content
- 400: Bad Request Bad Request
- 422: Unprocessable Entity Validation Error
{
"status": "200",
"request_id": "string",
"error": [
{
"code": "string",
"message": "string"
}
],
"data": [
{
"book_number": {},
"house_number_from_house_info": {},
"registrar_office": {},
"address": {},
"village_name": {},
"house_name": {},
"house_category": {},
"house_style": {},
"date_of_house_number_registration": {},
"registrar_name_of_house_info": {},
"date_of_house_registration": {},
"page_of_person_info": {},
"book_number_from_person_info": {},
"house_number_from_person_info": {},
"order": {},
"name": {},
"nationality": {},
"sex": {},
"id_number": {},
"status": {},
"date_of_birth": {},
"mother_name": {},
"mother_id_number": {},
"mother_nationality": {},
"father_name": {},
"father_id_number": {},
"father_nationality": {},
"from_info": {},
"registrar_name_of_from_info": {},
"to_info": {},
"registrar_name_of_to_info": {}
},
{
"data": "string"
}
]
}
{
"status": "error",
"request_id": "Unique id of the response",
"error": "{'code':'no_field_detect', 'message':'Can't detect both house registration or resident details'}",
"data": [
{
"book_number": {},
"house_number_from_house_info": {},
"registrar_office": {},
"address": {},
"village_name": {},
"house_name": {},
"house_category": {},
"house_style": {},
"date_of_house_number_registration": {},
"registrar_name_of_house_info": {},
"date_of_house_registration": {},
"page_of_person_info": {},
"book_number_from_person_info": {},
"house_number_from_person_info": {},
"order": {},
"name": {},
"nationality": {},
"sex": {},
"id_number": {},
"status": {},
"date_of_birth": {},
"mother_name": {},
"mother_id_number": {},
"mother_nationality": {},
"father_name": {},
"father_id_number": {},
"father_nationality": {},
"from_info": {},
"registrar_name_of_from_info": {},
"to_info": {},
"registrar_name_of_to_info": {}
},
{
"data": "string"
}
]
}
{
"status": "error",
"request_id": "Unique id of the response",
"error": "{'code':'no_field_detect', 'message':'Can't detect both house registration or resident details'}",
"data": "Unknown Type: null"
}
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
- Python
- Nodejs
- PHP
- CURL
import requests
api = "https://apis.aigen.online/aiscript/house-registration/v2"
headers = {"x-aigen-key": "<key>"}
data = {"image": "<base64_string>"}
res = requests.post(api, json=data, headers=headers)
print(res.json())
const axios = require("axios");
const api = "https://apis.aigen.online/aiscript/house-registration/v2";
const headers = {
"x-aigen-key": "<key>",
};
const data = { image: "<base64_string>" };
axios
.post(api, data, { headers: headers })
.then((res) => {
console.log(res.data);
})
.catch((err) => {
console.error(err.response.data);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://apis.aigen.online/aiscript/house-registration/v2',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"image": "<base64_string>",
}',
CURLOPT_HTTPHEADER => array(
'X-AIGEN-KEY: <aigen-key>',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
curl --location 'https://apis.aigen.online/aiscript/house-registration/v2' \
--header 'X-AIGEN-KEY: <aigen-key>' \
--header 'Content-Type: application/json' \
--data '{
"image": "<base64_string>",
}'