Shping Tesseract Service

A service which allows to recognize user receipts. All endpoints have path prefix tesseract-service/ and configured on develop environment only.

Recognize

Recognize user receipt.

POST /tesseract-service/recognize
Parameters
Name Type Description
authenticateit-identity-ticket header Required: Session's ticket
Example body
{
    "url": "https://s3.ap-southeast-2.amazonaws.com/dev-cdn.shping.com/2022/2/2/TesseractOCRTests.png"
}

Also post request can contain multipart/form-data with image.

Example Response
{
    "task_id": "20d49d31-c7d5-4ea3-a1d7-d99d036198ce"
}

Status

Get recognize status. Status can be 'processing' or 'completed'.

GET /tesseract-service/status/<task_id>

or

GET /tesseract-service/status/<task_id>?details=true
Parameters
Name Type Description
authenticateit-identity-ticket header Required: Session's ticket
task_id string task id (guid)
Example Response
{
    "result": "Noisyimage\nto test\nTesseract OCR\n",
    "status": "completed"
}

for details case

{
    "characters_count": 28,
    "confidence": 92.5827422,
    "id": "20d49d31-c7d5-4ea3-a1d7-d99d036198ce",
    "language": "en",
    "result": "Noisyimage\nto test\nTesseract OCR\n",
    "sourceFile": "temp\\TesseractOCRTests.png",
    "sourceFileType": "PNG",
    "status": "completed",
    "ts": 1644502422.318675,
    "update_ts": 1644502429.283758,
    "words_count": 5
}

results matching ""

    No results matching ""