API Guide
  1. Thailand
API Guide
  • Get Started
  • Document AI
    • Malaysia
      • Extract Bank Statement Data
      • Extract Bill of Lading Data
      • Extract Business Card Data
      • Extract Car Meter Data
      • Extract Cheque (Front) Data
      • Extract Company Financial Statement Data
      • Extract Resume Data
      • Extract E-Invoice Data
      • Extract Electricity Bill Data
      • Extract Identity Card Data
      • Extract Invoice Data
      • Extract Passport Data
      • Extract Payslip Data
      • Extract Price Tag Data
      • Extract Purchase Order Data
      • Extract Receipt (General) Data
      • Extract SSM Documents Data
      • Extract Water Bill Data
    • Thailand
      • Extract Business Card Data
        POST
      • Extract Identity Card Data
        POST
      • Extract Passport Data
        POST
      • Extract Receipt Data
        POST
    • Vietnam
      • Extract Business Card Data
      • Extract Identity Card Data
      • Extract Passport Data
      • Extract Receipt Data
    • Philippines
      • Extract Business Card Data
      • Extract Identity Card Data
      • Extract Passport Data
      • Extract Receipt Data
  1. Thailand

Extract Receipt Data

POST
/document-ai/{model-id}

Extracted Data Types#

The following types will always be present in the API response. If a type parameter is not found in the input, its value will be null.
Parameter NameVariable Type
receipt_tax_idstring | null
receipt_invoice_numberstring | null
receipt_vendor_addressstring | null
receipt_vendor_contact_numberstring | null
receipt_vendor_namestring | null
receipt_datestring | null
receipt_timestring | null
receipt_itemArray of Objects
receipt_item[].item_quantitystring | null
receipt_item[].item_descriptionstring | null
receipt_item[].item_per_unit_pricestring | null
receipt_item[].item_total_amountstring | null
receipt_subtotalstring | null
receipt_taxstring | null
receipt_service_chargestring | null
receipt_total_include_taxstring | null
receipt_total_paidstring | null
receipt_changestring | null

Notes#

Each type parameter in the data array will always have the specified type, with the possibility of being null.
If a specific type parameter is not present in the input, its value in the response will be null.

Request

Authorization
Add parameter in header
X-API-KEY
Example:
X-API-KEY: ********************
Path Params
model-id
string 
required
To utilize the Axtraction AI API effectively, you must specify a model ID in your requests. The model ID follows the format model- followed by a 12-characters numbers and alphabet. This ID identifies the specific AI model you want to use for document processing.
If you do not have a model yet, you can create one by visiting the Axtraction AI web app. There, you can set up your model according to your requirements and obtain the corresponding model ID for your API requests.
Example:
model-a1b2c3d4e5f6
Body Params multipart/form-data
file
file 
optional
If fileBase64 is not provided, then file is required. Format: PDF, JPEG, PNG.
fileBase64
string 
optional
If file is not provided, then fileBase64 is required. If both file and fileBase64 are provided, only file will be used.
Example:
JVBERi0xLjMNCiXi48/....
mimeType
string 
optional
Required only when fileBase64 is provided. Supported: application/pdf, image/jpeg, image/jpg, image/png.
Example:
application/pdf

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.axtraction.ai/v1/document/document-ai/model-a1b2c3d4e5f6' \
--header 'X-API-KEY;' \
--form 'file=@""' \
--form 'fileBase64="JVBERi0xLjMNCiXi48/...."' \
--form 'mimeType="application/pdf"'

Responses

🟢200Success
application/json
Body
success
boolean 
required
data
array [object {2}] 
required
type
string 
required
value
string  | integer  | boolean  | array  | object  | number  | null 
required
miscellaneous
object 
required
processedTime
number 
required
Example
{
    "success": true,
    "data": [
        {
            "type": "receipt_tax_id",
            "value": "TAX123456"
        },
        {
            "type": "receipt_invoice_number",
            "value": "INV-2024-002"
        },
        {
            "type": "receipt_vendor_address",
            "value": "456 Vendor Road, Bangkok"
        },
        {
            "type": "receipt_vendor_contact_number",
            "value": "012-345-6789"
        },
        {
            "type": "receipt_vendor_name",
            "value": "XYZ Corporation"
        },
        {
            "type": "receipt_date",
            "value": "2024-11-01"
        },
        {
            "type": "receipt_time",
            "value": "10:30"
        },
        {
            "type": "receipt_item",
            "value": [
                {
                    "item_quantity": "3",
                    "item_description": "Office Chair",
                    "item_per_unit_price": "150.00",
                    "item_total_amount": "450.00"
                },
                {
                    "item_quantity": "2",
                    "item_description": "Desk",
                    "item_per_unit_price": "250.00",
                    "item_total_amount": "500.00"
                }
            ]
        },
        {
            "type": "receipt_subtotal",
            "value": "950.00"
        },
        {
            "type": "receipt_tax",
            "value": "95.00"
        },
        {
            "type": "receipt_service_charge",
            "value": "20.00"
        },
        {
            "type": "receipt_total_include_tax",
            "value": "1065.00"
        },
        {
            "type": "receipt_total_paid",
            "value": "1065.00"
        },
        {
            "type": "receipt_change",
            "value": "0.00"
        }
    ],
    "miscellaneous": {
        "processedTime": 112.345
    }
}
Modified at 2025-05-13 04:14:34
Previous
Extract Passport Data
Next
Extract Business Card Data
Built with