Apiguide

Measure

Describes the Measure endpoint

The /measure instructs the device to perform a measure operation and return the result.

The IP address of the device is required to call this endpoint. Check the Integration Guide for details on determining the device IP address.
Request
curl -i "http://<YOUR_DEVICE_ADDRESS>/api/measure" \
-X GET
Example Response
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "elapsedMilliseconds": 646,
    "dateTimeLocal": "2024-07-25T16:30:45.4432137-04:00",
    "dateTimeUtc": "2024-07-25T20:30:45.4432237Z",
    "errorCode": 0,
    "errorMessage": "(0) - SUCCESS",
    "objectCount": 1,
    "unitOfMeasure": "in",
    "measurementFidelity": 0.2,
    "dimensionsLegalForTrade": false,
    "imageId": "3e4a14fa-d786-4403-b257-2a39b863e996",
    "measuredObjects": [
        {
            "trackId": 119,
            "errorCode": 0,
            "errorMessage": "(0) - SUCCESS",
            "rotationAngle": 33,
            "length": 5.6,
            "width": 4.6,
            "height": 4
        }
    ]
}

Request Parameters

None.

Response Properties

A single MeasureResult object

MeasureResult Properties

PropertyData TypeDescription
elapsedMillisecondsintCount of elapsed milliseconds taken to complete the measurement result on the device.
dateTimeLocaldatetimeDevice-local datetime of transaction
dateTimeUtcdatetimeUTC datetime of transaction
errorCodeintError code result. 0 indicates Success
errorMessagestringerror message associated with the Error Code.
objectCountintCount of objects measured. This will either be 1 or zero.
unitOfMeasurestringObject dimensions unit of measure (e.g. in, cm or mm)
measurementFidelitystringThe tidelity of the dimensions measurements. This may be whole units, half units or 1/5 units. 1.0 = whole, 0.5 = half, 0.2 = 1/5 units
dimensionsLegalForTradebooleanTrue if the device was operating in Legal for Trade mode when the measurements were captured.
imageIdstringthe image identifier. Use this value as input to a subsequent API call to /images to fetch images for this transaction.
measuredObjectsMeasureObjectResult[]an array of MeasureObjectResult objects. The count of elements in the array is equal to the objectCount value

MeasureObjectResult Properties

PropertyData TypeDescription
trackIdintSystem-assigned trackId for the object.
errorCodeintObject-level error code result. 0 indicates Success
errorMessagestringerror message associated with the Error Code.
rotationAnglefloatobject angle of rotation
lengthfloatobject length in unitOfMeasure units
widthfloatobject width in unitOfMeasure units
heightfloatobject height in unitOfMeasure units

Copyright © PHD Solutions 2024