Authentication

The LEADTOOLS Cloud Services API requires an authentication header in order to access its API. To use the service, you must have a valid Application ID and password. Application passwords will be sent via email when an application is created. To sign up and create an application, please click here.

The LEADTOOLS Cloud Services API utilizes Basic Access Authentication for all API calls made to the service. Every request made to the service will require an appropriately formatted Authorization Header. The Authorization header should follow the following standard "Authorization: Basic <AppID:Password>". The Basic HTTP authentication scheme is defined in RFC 7617. More information can be found here: https://developer.mozilla.org/en-US/docs/web/http/authentication.

Adding the appropriate authorization header may differ between programming languages, and language frameworks being used. Check out our Tutorial Samples for different implementations.

Parameter Description Accepted Values
AppId The ID corresponding to your LEAD Technologies application account. Accepts a variable length string.
Password The password corresponding to your LEAD Technologies application account. Accepts a variable length string.

Common Service Request URL Parameters

The following parameters are required unless indicated otherwise, and are used by all Conversion and Recognition API calls:

Parameter Description Accepted Values
fileUrl (Optional) The URL to the file to be processed. For more information, refer to the Cloud Services Overview section. A string or URI containing a valid URL to the file to be uploaded.
firstPage The first page in the file to process. An integer value between 1 and the total number of pages in the file.
lastPage The last page in the file to process Passing a value of -1 or 0 will indicate to the service that all pages between the First Page parameter, and the last page in the file will be processed. Otherwise, an integer value between 1 and the total number of pages in the file must be passed, and the value must be greater than or equal to the value specified in the FirstPage parameter.
guid (Optional) Unique identifier corresponding to an uploaded file. This value will be returned when a file is uploaded using the UploadFile service call. A valid GUID
filePassword (Optional) The password to unlock a password protected file. A string.
callbackUrl (Optional) Passing a callbackURL to the service will allow us to notify you when your file has finished processing. If the callbackUrl is invalid or malicious, it will be ignored. The LEADTOOLS Cloud Services will send the request’s ID in the body of the message sent to the callbackUrl. A string or URI containing a valid URL to message.
ocrLanguage (Optional) The OCR Language to use when OCRing a Raster file. Defaults to en (English) if no languages are specified. 0 - en
1 - af
2 - sq
3 - az
4 - eu
5 - be
6 - bg
7 - ca
8 - hr
9 - cs
10 - da
11 - nl
12 - et
13 - fi
14 - fr
15 - gl
16 - de
17 - el
18 - hu
19 - is
20 - id
21 - it
22 - ko
23 - lv
24 - lt
25 - mk
26 - ms
27 - mt
28 - no
29 - pl
30 - pt
31 - ro
32 - ru
33 - sr
34 - sk
35 - sl
36 - es
37 - sw
38 - sv
39 - te
40 - th
41 - tr
42 - uk
43 - vi

Return Data Objects

ExtractAMMVAID

{
    "FileStatus": ,
    "RequestData": [
        {
            "RecognitionType": "AMMVA",
            "data": [
                {
                    "AddressCity": "",
                    "AddressPostalCode": "",
                    "AddressRegion": "",
                    "AddressStateAbbreviation": "",
                    "AddressStreet1": "",
                    "AddressStreet2": "",
                    "DateOfBirth": "",
                    "ExpirationDate": "",
                    "Expired": ,
                    "EyeColor": "",
                    "FirstName": "",
                    "HairColor": "",
                    "IssueDate": "",
                    "IssuerIdentificationNumber": "",
                    "Jurisdiction": "",
                    "JurisdictionVersion": "",
                    "LastName": "",
                    "NumberOfEntries": ,
                    "Over18": ,
                    "Over19": ,
                    "Over21": ,
                    "Sex": "",
                    "Version": ""
                }
            ],
            "ServiceType": "Recognition"
        }
    ]
}

ExtractBarcode

{
    "FileStatus": ,
    "RequestData": [
        {
            "RecognitionType": "Barcode",
            "data": [
                {
                    "Symbology": "",
                    "Value": "",
                    "Bounds": "",
                    "RotationAngle": 
                }
            ],
            "ServiceType": "Recognition"
        }
    ]
}

ExtractAllBarcodes

{
    "FileStatus": ,
    "RequestData": [
        {
            "RecognitionType": "Barcode",
            "data": [
                {
                    "Symbology": "",
                    "Value": "",
                    "Bounds": "",
                    "RotationAngle": 
                },
                {
                    "Symbology": "",
                    "Value": "",
                    "Bounds": "",
                    "RotationAngle": 
                }
            ],
            "ServiceType": "Recognition"
        }
    ]
}

ExtractText

{
    "FileStatus": ,
    "RequestData": [
        {
            "RecognitionType": "ExtractText",
            "data": "http://url-to-ExtractTextJson.json",
            "ServiceType": "Recognition"
        }
    ]
}

ExtractCheck

{
    "FileStatus": ,
    "RequestData": [
        {
            "RecognitionType": "MICR",
            "data": [
            {
                "Account": {
                    "Text":,
                    "Bounds": 
                },
                "Auxiliary": {
                    "Text":,
                    "Bounds": 
                },
                "CheckNumber": {
                    "Text":,
                    "Bounds": 
                },
                "Routing": {
                    "Text":,
                    "Bounds": 
                },
                "Amount": {
                    "Text":,
                    "Bounds":
                },
                "Micr": {
                    "Text":,
                    "Bounds": 
                },
                "Date": {
                    "Text":,
                    "Bounds":
                },
                "Name": {
                    "Text":,
                    "Bounds":
                },
                "Signature": {
                    "Text": ,
                    "Bounds":
                }
            }
            ],
            "ServiceType": "Recognition"
        }
    ]
}

Convert

{
    "FileStatus": ,
    "RequestData": [
        {
            "urls": [
                "http://url-to-Convert"
            ],
            "ServiceType": "Conversion"
        }
    ]
}

ConvertRedact

{
    "FileStatus": ,
    "RequestData": [
        {
            "urls": [
                "http://url-to-Convert_Redacted"
            ],
            "ServiceType": "Conversion"
        }
    ]
}

ConvertBarcodeSplit

{
    "FileStatus": ,
    "RequestData": [
        {
            "RecognitionType": "Barcode",
            "data": {
                "Urls": [
                     "http://url-to-Convert"
                ],
                "BarcodeResults": [
                    {
                        "PageNumber": ,
                        "Symbology": "",
                        "Value": "",
                        "Bounds": "",
                        "RotationAngle": 
                    },
                    {
                        "PageNumber": ,
                        "Symbology": "",
                        "Value": "",
                        "Bounds": "",
                        "RotationAngle":
                    }
                ]
            },
            "ServiceType": "Conversion"
        }
    ]
}