Egyptian Tax Card OCR


Valify's Tax Card OCR empowers organizations to effortlessly extract accurate and relevant information from Tax Card documents. Our powerful solution automates data extraction in a structured format, ensuring compliance with Egyptian regulatory requirements and streamlining business processes.

Egyptian National ID OCR

POST https://valifystage.com/api/v1/ocr/

Headers

Name
Type
Description

Content-Type*

string

application/json

Authentication*

string

Bearer <access-token>

Request Body

Name
Type
Description

document_type*

string

egy_tax_card

data*

object

Object containing the parameters below: { img: <base64 str>, bundle_key: <str>, lang: <str> }

{
    "result": {
        "tax_id": '<string>',
        "release_date": '<string>',
        "expiry_date": '<string>',
    },
    "transaction_id": '<str>',
    "trials_remaining": '<int>'
}

Integration

import requests
import base64

def base64_encode(file_name):
    with open(file_name, "rb") as image_file:
        encoded_string = base64.b64encode(image_file.read())
        return encoded_string
    return ""

image = base64_encode('<image path>')
token = "<token>"
data = {
    'document_type': 'egy_tax_card', 
    'data':
    {   
        'img': image,
        'bundle_key': '<bundle key>',
        'lang': '<str>' # optional, default: en
    }
}

r = requests.post("https://<base-url>/api/v1/ocr/",
        json=data,
        headers={'Authorization': 'Bearer %s' % token}
    )
print(r.json())                      

Last updated