RealDoc - Sync API Documentation

Important Notice:

  • All request and response parameters are strictly subject to the official API documentation.
  • The API response may contain fields not defined in the documentation. These fields are for internal debugging purposes only and are not guaranteed to be stable or compatible. Do not rely on these fields in production environments. ZOLOZ reserves the right to modify or remove these fields at any time without prior notice.

Overview

  • API Path: POST /api/v1/zoloz/realdoc/parse
  • API Description: Used to extract information from the uploaded document and return structured extraction results.

Request Parameters

Field Name

Type

Required

Description

Example

bizId

String

Yes

Business ID

20230601001

fileContent

String

No

The document file to be extracted. It must be Base64-encoded before being passed. The maximum file size is 10MB.

/9j/4AAQSkZJRgABAQAAlgCWAAD/4QCARXhpZgAA

fileUrl

String

No

The URL address of the document to be extracted.

Note: Provide either fileUrl or fileContent. If you provide both, fileUrl takes precedence.

https://example.com/file.pdf

fileType

String

No

File type (pdf, jpg/jpeg, png, webp, bmp, and tiff)

pdf

schemaId

String

No

The document extraction template ID. Different templates correspond to different document types. Valid values:

  • companies_registry_v1: Company registration certificate
  • business_registration_certificate_v1: Business registration certificate
  • invoice_v1: Invoice
  • receipt_v1: Receipt
  • bank_statement_v1: Bank statement
  • mys_birth_certificate_v1: Malaysia birth certificate

If schemaId is not passed, full information extraction will be performed, and the response will be returned in the following format:

copy
{
    "data": {
        "raw_text": [
            {
                "bbox": [
                    55, 
                    290, 
                    64, 
                    375
                ], 
                "text": "xxxx"
            }, 
            {
                "bbox": [
                    68, 
                    290, 
                    80, 
                    503
                ], 
                "text": "xxxx"
            }
        ]
    }
}
bank_statement_v1

includeExtInfo

String

No

Whether to return extended information for each extracted field in the response. Extended information includes the field's confidence score (confidence_score), bounding box coordinates (bbox), and page number (page).

Supported values:

  • Y: Return extended information.
  • N (default): Do not return extended information.

Y

Request Example

Basic Request Example

copy
{
    "bizId": "20230601001", 
    "fileType": "pdf", 
    "fileContent": "/9j/4AAQSkZJRgABAQAAlgCWAAD/4QCARXhpZgAA", 
    "schemaId": "bank_statement_v1"
}

Request Example with Extended Information (includeExtInfo=Y)

copy
{
    "bizId": "20230601002", 
    "fileType": "pdf", 
    "fileContent": "/9j/4AAQSkZJRgABAQAAlgCWAAD/4QCARXhpZgAA", 
    "schemaId": "bank_statement_v1", 
    "includeExtInfo": "Y"
}

Response Parameters

Field Name

Type

Description

transactionId

String

Transaction ID

data

Map<String, Object>

The document extraction result. The structure varies depending on the schemaId used.

When includeExtInfo=Y, the value of each field changes from a string to an object containing text, confidence_score, bbox, and page.

result

Result

Business result

Data Field Extended Information Description

When the request parameter includeExtInfo is set to Y, the value of each extracted field in data changes from a string to an object containing the following properties:

Field Name

Data Type

Description

Example

text

String

The extracted field value.

Customer Name

bbox

Integer

The bounding box coordinates of the extracted information, in the format [x1, y1, x2, y2].

[12, 15, 45, 18]

confidence_score

Double

Confidence score, ranging from 0 to 1.

Confidence levels:

  • High: ≥ 0.95
  • Medium: 0.80 – 0.95
  • Low: < 0.80

0.98

page

Integer

The page number where the extracted field is located.

1

Result Parameters

Field Name

Type

Description

resultStatus

String

Result status

  • S: Success
  • F: Failure

resultCode

String

SUCCESS: Success

PARAMETER_ERRORInput parameter error

AUTHORIZATION_ERROR: Authentication or authorization error

CLIENT_BUSINESS_ERROR: Client business error. For example, downloading from the document link fails.

INTERNAL_BUSINESS_ERROR: Internal business error

SYSTEM_ERROR: System error

resultMessage

String

Result message

  • On success, returns Success
  • On failure, returns a specific failure message

Response Example

Basic Response Example

copy
{
    "result": {
        "resultStatus": "S",
        "resultCode": "SUCCESS",
        "resultMessage": "Success"
    },
    "data": {
        "account_holders_name": "MS. IxxG",
        "account_number": "91802xxxxx04",
        "bank_name": "AXIS BANK",
        "starting_balance": "47315.01",
        "ending_balance": "115368.01",
        "deposits_and_credits": "372700.00",
        "withdrawals_and_debits": "304647.00",
        "scheme_code": "CA- LARGE RETAILERS AND DISTRIBUTORS",
        "customer_id": "88xxx0",
        "currency": "INR",
        "lien_amount": "0.00",
        "nomination_details": "NOMINATION REGISTERED",
        "PIN": "11xxx1",
        "details": [
            {
                "date": "10/04/2019",
                "description": "MOB/SELFFT/SURJEET SINGH/9130100",
                "balance": "315.01"
            },
            {
                "date": "13/04/2019",
                "description": "GST @18% on Charge",
                "balance": "2028.81"
            }
        ]
    },
    "transactionId": "R000000202510111032563d0e515f"
}

Response Example with Extended Information (includeExtInfo=Y)

When a valid schemaId is provided and includeExtInfo is set to Y, the value of each field in data becomes an object containing extended information.

copy
{
    "result": {
        "resultStatus": "S", 
        "resultCode": "SUCCESS", 
        "resultMessage": "Success"
    }, 
    "data": {
        "account_holders_name": {
            "text": "MS. IxxG", 
            "confidence_score": 0.95, 
            "bbox": [
                12, 
                15, 
                45, 
                18
            ], 
            "page": 1
        }, 
        "account_number": {
            "text": "91802xxxxx04", 
            "confidence_score": 0.98, 
            "bbox": [
                22, 
                25, 
                45, 
                18
            ], 
            "page": 1
        }, 
        "bank_name": {
            "text": "AXIS BANK", 
            "confidence_score": 0.99, 
            "bbox": [
                30, 
                5, 
                70, 
                8
            ], 
            "page": 1
        }, 
        "starting_balance": {
            "text": "47315.01", 
            "confidence_score": 0.92, 
            "bbox": [
                65, 
                25, 
                90, 
                28
            ], 
            "page": 1
        }, 
        "ending_balance": {
            "text": "115368.01", 
            "confidence_score": 0.93, 
            "bbox": [
                65, 
                30, 
                90, 
                33
            ], 
            "page": 1
        }, 
        "details": [
            {
                "date": {
                    "text": "10/04/2019", 
                    "confidence_score": 0.97, 
                    "bbox": [
                        5, 
                        0.45, 
                        0.2, 
                        48
                    ], 
                    "page": 1
                }, 
                "description": {
                    "text": "MOB/SELFFT/SURJEET SINGH/9130100", 
                    "confidence_score": 0.9, 
                    "bbox": [
                        22, 
                        0.45, 
                        75, 
                        48
                    ], 
                    "page": 1
                }, 
                "balance": {
                    "text": "315.01", 
                    "confidence_score": 0.96, 
                    "bbox": [
                        80, 
                        45, 
                        95, 
                        48
                    ], 
                    "page": 1
                }
            }
        ]
    }, 
    "transactionId": "R000000202510111032563d0e515f"
}

Examples of data formats

The data structure varies depending on the schemaId used. The following examples all show the response structure when includeExtInfo=N (default).

invoice_v1

copy
{
    "invoice_number": "25117000000923922723",
    "invoice_date": "July 11, 2025",
    "total_tax": "31.66",
    "invoice_amount": "275.22",
    "currency": "¥",
    "buyer_name": "xxx company",
    "buyer_tax_id": "9xxxx",
    "seller_name": "Beijing Hema Network Technology Co., Ltd.",
    "seller_tax_id": "9xxx",
    "drawer": "Tang xx",
    "details": [
        {
            "description": "*Other food*food-13%",
            "unit_price": "248.85",
            "quantity": "1",
            "line_amount": "248.85",
            "discount": ""
        },
        {
            "description": "**Other food*food-13%",
            "unit_price": "",
            "quantity": "",
            "line_amount": "-5.29",
            "discount": ""
        }
    ]
}

receipt_v1

copy
 {
    "receipt_number": "00050109",
    "merchant_name": "Wuhan Yuxiwan Xinjingxi Catering Co., Ltd.",
    "total_amount": "1185.00",
    "date": "2024-11-06",
    "details": [
        {
            "description": "Braised Pork Ribs with Fresh Rehmannia Soup",
            "line_amount": "180.00"
        },
        {
            "description": "Stewed Free-Range Chicken",
            "line_amount": "208.00"
        },
        {
            "description": "Tofu Stewed with Yan Fish",
            "line_amount": "188.00"
        },
        {
            "description": "Sauteed Tripe with Fermented Rice",
            "line_amount": "56.00"
        },
        {
            "description": "Spicy Salt Pork Ribs",
            "line_amount": "78.00"
        },
        {
            "description": "Steamed Goose Slices",
            "line_amount": "168.00"
        },
        {
            "description": "Stuffed Bitter Melon",
            "line_amount": "66.00"
        },
        {
            "description": "Pickled Cabbage Stir-Fried with Pork Tripe",
            "line_amount": "93.00"
        },
        {
            "description": "Scallion-Scented Yam",
            "line_amount": "66.00"
        },
        {
            "description": "Vegetables",
            "line_amount": "52.00"
        },
        {
            "description": "Beverages",
            "line_amount": "30.00"
        }
    ]
}

companies_registry_v1

copy
{
    "document_type": "CERTIFICATE OF INCORPORATION",
    "certificate_no": "7xxx6",
    "company_name": {
        "english": "xxx Co., Limited",
        "chinese": "xxx Co., Ltd."
    },
    "date_of_incorporation": "19 May 2025",
    "company_type": "limited company"
}

business_registration_certificate_v1

copy
{
    "document_type": "BUSINESS REGISTRATION CERTIFICATE",
    "document_copy_type": "ORIGINAL",
    "company_name": {
        "chinese": "xxxx Co., Ltd.",
        "english": "xxxxCO., LIMITED"
    },
    "branch_name": "",
    "address": "UNIT NO.532B ON 5/F STAR HOUSE NO.3 SALISBURY ROAD TSIM SHA TSUI KL",
    "nature_of_business": "Cosmetics, Investment",
    "legal_status": "BODY CORPORATE",
    "date_of_commencement": "23/11/2024",
    "date_of_expiry": "22/11/2025",
    "certificate_no": "7xxx",
    "fee_and_levy": {
        "total": "$2,200",
        "fee": "$2,200",
        "levy": "$0"
    }
}

bank_statement_v1

copy
{
        "account_holders_name": "MS. IxxG",
        "account_number": "91802xxxxx04",
        "bank_name": "AXIS BANK",
        "starting_balance": "47315.01",
        "ending_balance": "115368.01",
        "deposits_and_credits": "372700.00",
        "withdrawals_and_debits": "304647.00",
        "scheme_code": "CA- LARGE RETAILERS AND DISTRIBUTORS",
        "customer_id": "88xxx0",
        "currency": "INR",
        "lien_amount": "0.00",
        "nomination_details": "NOMINATION REGISTERED",
        "PIN": "11xxx1",
        "details": [
            {
                "date": "10/04/2019",
                "description": "MOB/SELFFT/SURJEET SINGH/9130100",
                "balance": "315.01"
            },
            {
                "date": "13/04/2019",
                "description": "GST @18% on Charge",
                "balance": "2028.81"
            }
        ]
    }

mys_birth_certificate_v1

copy
{
    "BASIC": {
        "Registration_Area": "MALAYSIA BARAT",
        "Registration_Centre": "JPN NEGERI JOHOR"
    },
    "CHILD": {
        "Full_Name": "xxUYO",
        "Date_and_Time_of_Birth": "15 FEBRUARI 2018 05:21 AM",
        "Race": "INDONESIA",
        "Place_of_Birth": "PUSAT PAKAR SAKITPUAN DAN PERBIDANAN KHOR & LOH SKUDAI",
        "Status_of_Citizenship": "WARGANEGARA",
        "Gender": "LELAKI",
        "Religion": "ISLAM"
    },
    "FATHER": {
        "Name": "xxONO",
        "Identity_Card_Number": "7xx3",
        "Age": "47 TAHUN",
        "Status_of_Citizenship": "BUKAN WARGANEGARA",
        "Status_of_Residence": "PEMASTAUTIN TETAP",
        "Race": "INDONESIA",
        "Religion": "ISLAM",
        "Types_and_Number_of_Other_Document": "Maklumat Tidak Berkenaan"
    }
,
    "MOTHER": {
        "Name": "xxRTI",
        "Identity_Card_Number": "7xx3",
        "Age": "37 TAHUN",
        "Status_of_Citizenship": "BUKAN WARGANEGARA",
        "Status_of_Residence": "Maklumat Tidak Berkenaan",
        "Race": "INDONESIA",
        "Religion": "ISLAM",
        "Types_and_Number_of_Other_Document": "PASPORT INDONESIA Bxx4",
        "Residence_Address": "LOT 368 A JALAN AHAD KAMPUNG UNGKU MOHSIN 80350 JOHOR BAHRU JOHOR"
    },
    "INFORMANT": {
        "Name": "xxONO",
        "Identity_Card_Number": "7xx3",
        "Date_of_Registration": "21 FEBRUARI 2018",
        "Types_and_Number_of_Other_Document": "Maklumat Tidak Berkenaan"
    }
}