Getting Started

Best Meter Reading results can be accomblished if the numbers are around 28px big

Cloud API Quick Start Guide

In this guide, we will show you how to use the Anyline Cloud API.

Input Image Requirements

  • Please make sure that the image in not blurry and in good quality.

  • The scannable item should be centered in the image and not rotated more than 10 degrees.

  • Recommended Formats: JPG

  • Supported Formats: JPG, PNG, HEIC

  • Maximum Body size: 10MB

Examples of good scanning cases

Energy:

Energy

ID:

Energy

MRZ:

Energy

Request properties

Your POST request should contain three things to be valid: "license", "blob" and "config"

license

Here you put in your Anyline Cloud API License.

{
    "license" : "MyAnylineLicense"
}

blob

The blob proerty is for your image in the base64 format.

{
    "blob": "Base64EcnryptedString"
}

config

The "config" parameter will define which product you are using and also in the future configurate your request. The Cloud API configuration is exactly structured as the configuration from the Anyline technologies. See in the different modes, what the config should include.

Modes

Energy:

{
    "config": {
        "viewPlugin": {
            "plugin": {
                "meterPlugin": {
                    "scanMode": "MyEnergyScanMode"
                }
            }
        }
    }
}

The Energy scanMode property can be one of the following:

Mode

AUTO_ANALOG_DIGITAL_METER

AUTO_ANALOG_DIGITAL_DIAL_METER

ANALOG_METER

DIGITAL_METER

DIAL_METER

DOT_MATRIX_METER

ANALOG_DIGITAL_SNR_BAR

The AUTO_ANALOG_DIGITAL_METER mode will automatically detect if it’s an analog or a digital meter. The AUTO_ANALOG_DIGITAL_DIAL_METER mode will automatically detect if it’s an analog, digital or dial meter. This use-case is optimised for EMEA countries.
The ANALOG_DIGITAL_SNR_BAR mode will automatically detect if it’s an analog or a digital meter and also scan the serial number and barcode of the meter, if they are present.
Using the ANALOG_DIGITAL_SNR_BAR mode, the meter is identified by its barcode or serial number. This use-case is optimised for APAC countries.
When scanning serial numbers with the ANALOG_DIGITAL_SNR_BAR mode, only digits and the letters C, D, N, P, S and T are supported at the moment.
{
    "config": {
        "viewPlugin": {
            "plugin": {
                "meterPlugin": {
                    "scanMode": "MyEnergyScanMode"
                }
            }
        }
    }
}

Request Example

This is an example request for the Energy Mode:

Example Energy request:

POST /v1/scan
Host: api.anyline.com
Accept: application/json

{
    "config": {
        "viewPlugin": {
            "plugin": {
                "meterPlugin": {
                    "scanMode": "AUTO_ANALOG_DIGITAL_METER"
                }
            }
        }
    },
    "license": "MyAnylineAPILicense",
    "blob": "Base64EcnryptedString"
}

Example Energy response:

200 OK
Content-Type: application/json

{
    "sdkVersion": "46.2",
    "result": {
        "reading":"115414.0",
        "outline":"No Outline",
        "confidence":99
    }
}

ID:

{
    "config": {
        "viewPlugin": {
            "plugin": {
                "idPlugin": {
                    "idConfig": {}
                }
            }
        }
    }
}

Request Example

This is an example request for the ID Mode:

Example ID request:

POST /v1/scan
Host: api.anyline.com
Accept: application/json

{
    "config": {
        "viewPlugin": {
            "plugin": {
                "idPlugin": {
                    "idConfig": {}
                }
            }
        }
    },
    "license": "MyAnylineAPILicense",
    "blob": "Base64EcnryptedString"
}

Example ID response:

200 OK
Content-Type: application/json

{
    "sdkVersion": "46.2"
    "result": {
        "fieldConfidences": {
        "allCheckDigitsValid": -1,
        "checkDigitDateOfBirth": 100,
        "checkDigitDateOfExpiry": 100,
        "checkDigitDocumentNumber": 100,
        "checkDigitFinal": 100,
        "checkDigitPersonalNumber": 100,
        "dateOfBirth": 100,
        "dateOfExpiry": 100,
        "documentNumber": 100,
        "documentType": 100,
        "formattedDateOfBirth": -1,
        "formattedDateOfExpiry": -1,
        "formattedVizDateOfIssue": -1,
        "givenNames": 100,
        "issuingCountryCode": 100,
        "mrzString": 100,
        "nationalityCountryCode": 100,
        "optionalData": -1,
        "personalNumber": 100,
        "sex": 100,
        "surname": 100,
        "vizDateOfIssue": 99
        },
        "allCheckDigitsValid": "0",
        "checkDigitDateOfBirth": "0",
        "checkDigitDateOfExpiry": "0",
        "checkDigitDocumentNumber": "0",
        "checkDigitFinal": "4",
        "checkDigitPersonalNumber": "",
        "dateOfBirth": "741211",
        "dateOfExpiry": "190824",
        "documentNumber": "P3893189 ",
        "documentType": "P",
        "formattedDateOfBirth": "11.12.1974",
        "formattedDateOfExpiry": "24.08.2019",
        "formattedVizDateOfIssue": "25.08.2009",
        "givenNames": "GERT",
        "issuingCountryCode": "AUT",
        "mrzString": "P<AUTSCHARF<<GERT<<<<<<<<<<<<<<<<<<<<<<<<<<<\\nP3893189<0AUT7412110M1908240<<<<<<<<<<<<<<<4",
        "nationalityCountryCode": "AUT",
        "optionalData": "",
        "personalNumber": "              ",
        "sex": "M",
        "surname": "SCHARF",
        "vizDateOfIssue": "20090825"
    }
}

MRZ:

{
    "config": {
        "viewPlugin": {
            "plugin": {
                "idPlugin": {
                    "mrzConfig": {}
                }
            }
        }
    }
}

Request Example

This is an example request for the MRZ Mode:

Example MRZ request:

POST /v1/scan
Host: api.anyline.com
Accept: application/json

{
    "config": {
        "viewPlugin": {
            "plugin": {
                "idPlugin": {
                    "mrzConfig": {}
                }
            }
        }
    },
    "license": "MyAnylineAPILicense",
    "blob": "Base64EcnryptedString"
}

Example MRZ response:

200 OK
Content-Type: application/json

{
    "sdkVersion": "46.2",
    "result": {
        "fieldConfidences": {
            "allCheckDigitsValid": -1,
            "checkDigitDateOfBirth": 100,
            "checkDigitDateOfExpiry": 100,
            "checkDigitDocumentNumber": 100,
            "checkDigitFinal": 100,
            "checkDigitPersonalNumber": 100,
            "dateOfBirth": 100,
            "dateOfExpiry": 100,
            "documentNumber": 100,
            "documentType": 100,
            "formattedDateOfBirth": 100,
            "formattedDateOfExpiry": 100,
            "formattedVizDateOfIssue": -1,
            "givenNames": 100,
            "issuingCountryCode": 100,
            "mrzString": 100,
            "nationalityCountryCode": 100,
            "optionalData": -1,
            "personalNumber": 100,
            "sex": 100,
            "surname": 100,
            "vizDateOfIssue": 99
        },
        "allCheckDigitsValid": "0",
        "checkDigitDateOfBirth": "0",
        "checkDigitDateOfExpiry": "0",
        "checkDigitDocumentNumber": "0",
        "checkDigitFinal": "4",
        "checkDigitPersonalNumber": "",
        "dateOfBirth": "741211",
        "dateOfExpiry": "190824",
        "documentNumber": "P3893189 ",
        "documentType": "P",
        "formattedDateOfBirth": "11.12.1974",
        "formattedDateOfExpiry": "24.08.2019",
        "formattedVizDateOfIssue": "25.08.2009",
        "givenNames": "GERT",
        "issuingCountryCode": "AUT",
        "mrzString": "P<AUTSCHARF<<GERT<<<<<<<<<<<<<<<<<<<<<<<<<<<\\nP3893189<0AUT7412110M1908240<<<<<<<<<<<<<<<4",
        "nationalityCountryCode": "AUT",
        "optionalData": "",
        "personalNumber": "              ",
        "sex": "M",
        "surname": "SCHARF",
        "vizDateOfIssue": "20090825"
    }
}