Required Headers
{
"Content-Type" : "application/json",
"X-Api-Key" : "(string:plain:required) Company Token Given By Provider",
"X-Compress-Json": "(string|boolean:optional) true|false|yes if result compressed JSON"
}
Required Body (Format: json)
{
"fileName" : "(string:plain:required) fileName.ext:fileName of image",
"batchId" : "(string:plain:required) batchId:determine by client",
"image" : "(string:base64:required) base64Image:binary image that encoded by client"
}
Error from server. This means there was an error with scripts
500
{
"message": "Internal Server Error"
}
Or 502 status is error caused server.
Header Response
{
"Content-Type" : "(string:always) application/json; charset=utf8",
"X-Token-Expired-After": "(string|number:optional) formatted date(Y-m-d\\TH:i:s\\.u\\Z, time) or 0 if could not detect or not exists if fail",
}
Success 200
{
"data": {
"ThisExampleKey": "And All Result"
}
}
500
{
"message": "Internal Server Error"
}
Forbidden : 403 (Need to valid API KEY)
{
"message": "Forbidden"
}
Header Token Empty: 400
{
"message": "Bad Request. Token Required"
}
Invalid Token: 401
{
"message": "Request Unauthorized"
}
Token Expired : 401
{
"message": "Request Unauthorized. Expired Token"
}
Route Does Not Exists : 404
{
"message": "Not Found Module"
}
Sub Route Does Not Exists : 404
{
"message": "Not Found"
}
Parameter FOR KK ERROR : 412 (Precondition failed : Header is Not application/json)
{
"message": "No resource Image detect. POST method must be as json image data {\"fileName\":\"image.jpeg\", \"batchId\": \"string batchId\", \"image\": \"string base64\"}"
}
Parameter FOR KK ERROR : 412 (Precondition failed about sending data json key
image
is not present)
{
"message": "No resource Image detect. Or params `image` must be as string encoded image file"
}
Parameter FOR KK ERROR : 412 (Precondition failed about sending data json key
fileName
is not present or invalid data type)
{
"message": "Please insert parameter `fileName`. Parameter fileName must be as a string"
}
Parameter FOR KK ERROR : 412 (Precondition failed about sending data json key
batchId
is not present or invalid data type)
{
"message": "Please insert parameter `batchId`. Parameter batchId must be as a string"
}
Parameter FOR KK ERROR : 412 (Precondition failed about sending data json key
image
is not valid base64 string)
{
"message": "Unsupported / Invalid Image Format. Only base64 string allowed"
}
Parameter FOR KK ERROR : 412 (Precondition failed about sending data json key
image
is valid base64 but is not binary string image)
{
"message": "Unsupported / Invalid Image Format. Supported jpeg or png only"
}
Parameter FOR KK ERROR : 409 (Precondition failed about sending data json key
image
is valid base64 but is not valid image
{
"message": "Text Extraction Error : Request has unsupported document format"
}
Response 409 about text extraction: 409
{
"message": "Text Extraction Error : (any information here)"
}
Response 417 invalid image to extract: 417
{
"message": "Expectation Failed. Could not parse data from given image"
}
Response Does not meet Requirement By Company Confidence : 451
{
"message": "Unavailable For Legal Reasons. Confidence is not meet requirement"
}
This error also serve to client. As note for provider (serve to client)
Response 417 invalid hash : 417 (this system server error) - invalid code hash
{
"message": "Expectation Failed. Invalid Hash Given By System"
}
Date Problem On Server Database (Invalid Date Expired) : 503
{
"message": "Service Unavailable. Date Company Reason"
}
Date Problem On Server Database (Invalid To Save Transaction) : 503
{
"message": "Service Unavailable. Reason is Data Invalid"
}
AutoApprovalDateUTC
is 3 days after current time.