Passport API documentation version v0.5b
https://api.passport.evergreens.com.ua:5105/
/recognizeEntity
post
post /recognizeEntity
Secured by x-auth
Used to send a valid auth access token.
Query Parameters
- image: (file)
Image file for recognizing (Image size up to 15mb. Format 'image/jpeg', 'image/png')
- image_url: (string)
URL to image for recognizing (Image size up to 15mb. Format 'image/jpeg', 'image/png')
Example:
https://evergreens.com.ua/passport.jpg - Requst_examples: (string)
Full foem example at http://passport.evergreens.com.ua/
Examples:
image:
**Request Headers** Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryzGBvzWlgi9aCSXAD Host: api.passport.evergreens.com.ua:5105 **Request Payload** ------WebKitFormBoundaryzGBvzWlgi9aCSXAD Content-Disposition: form-data; name="timestamp" 1535539239 ------WebKitFormBoundaryzGBvzWlgi9aCSXAD Content-Disposition: form-data; name="sign" b9711d5da768daM8oadss02f067a286b813a0a39e57ba2c1bfe ------WebKitFormBoundaryzGBvzWlgi9aCSXAD Content-Disposition: form-data; name="image"; filename="photo_2018-07-27_08-25-53.jpg" Content-Type: image/jpegimage_url:
**Request Headers** Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryzGBvzWlgi9aCSXAD Host: api.passport.evergreens.com.ua:5105 **Request Payload** ------WebKitFormBoundaryzGBvzWlgi9aCSXAD Content-Disposition: form-data; name="timestamp" 1535539239 ------WebKitFormBoundaryzGBvzWlgi9aCSXAD Content-Disposition: form-data; name="sign" b9711d5da768daM8oadss02f067a286b813a0a39e57ba2c1bfe ------WebKitFormBoundaryzGBvzWlgi9aCSXAD Content-Disposition: form-data; name="image_url" https://medianew.lardi-trans.com/originImage/forumMessages/591c2258e4b099fcaf84abe9/20170517_125610.jpg
HTTP status code 200
Body
Media type: application/json
Type: array
Examples:
side_D:
[
{
"status": "success"
},
{
"message": "Process of recognize was successfully finished. Side: D"
},
{
"hash": "153553469413484946cdbb512e0e576c2de8168c5f5fc6e20ad358add4c2d68aa22b68f1f55ac2ba"
},
{
"D.1": "MAZDA",
"D.2": "CX7",
"D.3": "ЗАГАЛЬНИЙ ЛЕГКОВИЙ УНІВЕРСАЛ-В",
"E": "GAU2L22MOJD025211",
"P.1": "2967"
},
{
"alert": "Network couldn't found 4 corners of passport. For better result please make new photo that meet the requirements."
}
]
side_A_old:
[
{
"status": "success"
},
{
"message": "Process of recognize was successfully finished. Side: A_old"
},
{
"hash": "153553614696490367342e82a653c5985d9c892607b66a8bcda26d3bc6067a02cdf663e056633888"
},
{
"A": "AA8320OO",
"B": "2017",
"C.1.1": "ПЕТРЕНКО",
"C.1.2": "ПЕТРО ПЕТРОВИЧ",
"C.1.3": "М. КИЇВ ГОЛОСІЇВСКИЙ ВУЛ. ВАСИЛЬКІВСЬКА 3 32",
"H": "ТСЦ 8047",
"I": "16.02.2017"
},
{
"alert": ""
}
]
side_A_new:
[
{
"status": "success"
},
{
"message": "Process of recognize was successfully finished. Side: A_new"
},
{
"hash": "15355362430134690015f682a12ba8a42c90239dc99874cfd9fb5b8a30ad459b38622d1956209381"
},
{
"A": "AA8320OO",
"B": "23.01.2017",
"B.1": "23.01.2017",
"B.2": "2017",
"C.1.1": "ПЕТРЕНКО",
"C.1.2": "ПЕТРО ПЕТРОВИЧ",
"C.1.3": "М. КИЇВ ГОЛОСІЇВСКИЙ ВУЛ. ВАСИЛЬКІВСЬКА 3 32",
"H": "ТСЦ 8046"
},
{
"alert": ""
}
]
HTTP status code 500
Obligatory conditions for the photo of the technical passport:
- all four corners of the passport must be shown on the photo
- the technical passport on a photo of a readable kind (quality photos, absence of the erased symbols)
- the top of the technical passport on the photo is placed parallel to the horizon
- Homogeneous background
- Uniform illumination (without light and darkened)
- The area of the document should occupy 70% of the total area of the image
Body
Media type: application/json
Type: array
Example:
error:
[
{
"status": "error"
},
{
"message": "The picture does not meet the requirement. Try it again."
}
]
Secured by x-auth
Query Parameters
- timestamp: required (string)
The unix time stamp for AUTH
- sign: required (string)
Crypted private key
Example:
php:
hash('sha256' , $timestamp.$secretKey.$timestamp);
HTTP status code 403
Bad token.
Body
Media type: application/json
Type: object
Example:
{
"error": "403",
"message": "Please authenticate."
}