Skip to main content

PP 30 OCR

API Documentation for PP 30 OCR

Extract PP30 information from image

Error Definition

http statuserror_codeerror_message
200--
400001

cannot convert image please check your image (image must be base64 of png,jpg,tif,tiff,pdf)

400002

cannot convert image please check your image (image must be base64 and image size must between 500x500 and 10000x10000)

400003cannot find any field in document please check your image data
500500some error occur in serverside

Key Definition

key namekey thai
tax_id_numberเลขประจำตัวผู้เสียภาษี
monthly_salesยอดขายในเดือนนี้ (หัวข้อ 1)
type_documentแบบที่ยื่น
entrepreneur_nameชื่อผู้ประกอบการ
establishmentชื่อสถานประกอบการ
tax_summary_11ภาษีสุทธิ ต้องชำระ (หัวข้อ 11)
tax_summary_12ภาษีสุทธิ ชำระเกิน (หัวข้อ 12)
type_tax_fillingแบบที่ยื่น
month_tax_fillingเดือนภาษี

PP 30 OCR

POST https://apis.aigen.online/aiscript/pp-30/v1

Request Body

NameTypeDescription
image*StringBase64 image encoded string
{
"status": "200",
"message": "success",
"respones_id": "string",
"error_list": [
{
"code": "string",
"message": "string"
}
],
"result": [
{
"key": "sales",
"text": "4516.50",
"bboxes": [
[
[
0
]
]
]
}
]
}

Example code

import requests
import json

api = "https://apis.aigen.online/aiscript/pp-30/v1"
headers = {"x-aigen-key": "<key>", "content-type": "application/json"}
data = json.dumps({"image": "<base64_string>"})

res = requests.post(api, data=data, headers=headers)
print(res.json())