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
Property | Data Type | Description |
---|---|---|
elapsedMilliseconds | int | Count of elapsed milliseconds taken to complete the measurement result on the device. |
dateTimeLocal | datetime | Device-local datetime of transaction |
dateTimeUtc | datetime | UTC datetime of transaction |
errorCode | int | Error code result. 0 indicates Success |
errorMessage | string | error message associated with the Error Code. |
objectCount | int | Count of objects measured. This will either be 1 or zero. |
unitOfMeasure | string | Object dimensions unit of measure (e.g. in, cm or mm) |
measurementFidelity | string | The 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 |
dimensionsLegalForTrade | boolean | True if the device was operating in Legal for Trade mode when the measurements were captured. |
imageId | string | the image identifier. Use this value as input to a subsequent API call to /images to fetch images for this transaction. |
measuredObjects | MeasureObjectResult[] | an array of MeasureObjectResult objects. The count of elements in the array is equal to the objectCount value |
MeasureObjectResult Properties
Property | Data Type | Description |
---|---|---|
trackId | int | System-assigned trackId for the object. |
errorCode | int | Object-level error code result. 0 indicates Success |
errorMessage | string | error message associated with the Error Code. |
rotationAngle | float | object angle of rotation |
length | float | object length in unitOfMeasure units |
width | float | object width in unitOfMeasure units |
height | float | object height in unitOfMeasure units |