PP 30 OCR

Extract PP30 information from image

Error Definition

http statuserror_codeerror_message

200

-

-

400

001

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

400

002

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

400

003

cannot find any field in document please check your image data

500

500

some 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*

String

Base64 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())

Last updated