National ID Transliteration
The Transliteration service allows you to convert Arabic data extracted from the National ID into their English equivalents. It is different from Translation in that it does not return the meaning of the word, but its proper pronunciation in another language. This service is very useful for faster/automated data entry.
Transliteration (Arabic to English)
POST https://valifystage.com/api/v1/transliterate/egy-nid/
Headers
Content-Type
string
application/json
Authorization
string
Bearer <access-token>
Request Body
bundle_key
string
A bundle key provided to you by Valify.
data*
object
Object containing at least one of the parameters below:
{
"first_name": <str>,
"full_name": <str>,
"street": <str>,
"area": <str>,
"front_nid": <str>,
"serial_number": <str>,
"back_nid":' <str>,
"expiry_date": <str>,
"release_date": <str>,
"date_of_birth": <str>,
"gender": <str>,
"religion": <str>,
"husband_name":<str>,
"marital_status": <str>
}
Status Codes
{
'result': {
'first_name': '<str>',
'full_name': '<str>',
'street': '<str>',
'area': '<str>',
'front_nid': '<str>',
'serial_number': '<str>',
'back_nid': '<str>',
'release_date': '<str>',
'gender': '<str>',
'marital_status': '<str>',
'profession': '<str>',
'religion': '<str>',
'husband_name': '<str>',
'expiry_date': '<str>'
},
'transaction_id': '<str>',
'trials_remaining': '<int>'
}{
"message": "Bad Request – invalid request received (e.g. missing Bundle key, required parameters or invalid json) | Make sure all the required parameters are included"
}{
"message": "Unauthorized – your Bundle key is invalid"
}{
"message": "Forbidden – specified access_token could not be found"
}{
"message": "Not Found"
}{
"message": "Unsupported Media Type"
}{
"message": "<error-description>",
"error_code": <valify-error-code>
}{
"message": "Internal Server Error"
}Integration
import requests
import base64
token = '<token>'
data = {
'bundle_key': '<str>',
'data':{
'first_name': '<str>',
'full_name': '<str>',
'street': '<str>',
'police_station': '<str>',
'governorate': '<str>',
'front_nid': '<str>',
'serial_number': '<str>',
'back_nid': '<str>',
'expiry_date': '<str>',
'release_date': '<str>',
'date_of_birth': '<str>',
'gender': '<str>',
'religion': '<str>',
'husband_name':'<str>',
'marital_status': '<str>'
}
}
r = requests.post("https://valifystage.com/api/v1/transliterate/egy-nid/",
json=data,
headers={'Authorization': 'Bearer %s' % token}
)
print(r.json())Last updated