Transactions
Overview
enVision Cloud provides a set of endpoints that enable authorized parties to download historical transaction data for the purpose of analysis or integration into upstream systems.
Response Format
All calls to transaction APIs return an array of transaction records.
[
{
"id": 0,
"deviceClientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"errorCode": 0,
"errorDescription": "0-SUCCESS",
"transactionDateTime": "2020-01-30T20:37:59.601Z",
"elapsedTimeMilliseconds": 0,
"isManualDimension": true,
"measurementUnitOfMeasureCd": "in",
"weightUnitOfMeasureCd": "lb",
"measurementFidelity": 0.5,
"rotationAngle": 1.2,
"length": 14.0,
"width": 14.0,
"height": 16.5,
"weight": 4.1,
"cameraSerialId": "ABCD12345",
"barcodeReference": "",
"customReference1": "",
"customReference2": "",
"customReference3": "",
"transactionReference": "ORD12345"
}
]
Property | Data Type | Description |
---|---|---|
Id | int | enVision System-assigned unique identifier for the transaction |
deviceClientId | string | The id of the device that created the transaction |
errorCode | int | Error code result. 0 indicates Success |
errorDescription | string | error message associated with the Error Code. |
transactionDateTime | DateTime | UTC Date time of the transaction. |
elapsedTimeMilliseconds | int | Count of elapsed milliseconds taken to complete the measurement result on the device. |
isManualDimension | boolean | True if the measurement was the result of manual data entry (applicable only for use with enVision Connect) |
measurementUnitOfMeasureCd | string | Object dimensions unit of measure (e.g. in, cm or mm) |
weightUnitOfMeasureCd | string | The Weight Unit of Measure (e.g. lb or kg) |
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 |
rotationAngle | float | object angle of rotation rounded to 1 decimal place |
length | float | object length in measurementUnitOfMeasureCd units rounded to 1 decimal place |
width | float | object width in measurementUnitOfMeasureCd units rounded to 1 decimal place |
height | float | object height in measurementUnitOfMeasureCd units rounded to 1 decimal place |
weight | float | Total weight in weightUnitOfMeasureCd units rounded to 1 decimal place |
barcodeReference | string | an object Id (such as a barcode etc.) that was captured on the enVision device when the transaction was created. Not applicable if enVision device not equipped with a barcode scanner |
customReference1 | string | a custom reference value supplied by the host system during a cloud trigger operation |
customReference2 | string | a custom reference value supplied by the host system during a cloud trigger operation |
customReference3 | string | a custom reference value supplied by the host system during a cloud trigger operation |
transactionReference | string | transaction reference supplied by the host system during a cloud trigger operation |
Endpoints
Transactions by Date
Returns a list of transactions where the UTC time of the transaction occurred between the specified dates.
/api/transactions/bydate
curl "https://api.ece.phdsolutions.ca/api/transactions/bydate?startDate=2020-02-01&endDate=2020-12-31" \
-X GET \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
Request Parameters
Parameter | Required | Description |
---|---|---|
startDate | Yes | The start date of the range requested. Must be specified in yyyy-MM-dd . If you wish to provide a time component, use yyyy-MM-dd HH:mm:ss |
endDate | Yes | The end date of the range requested. Must be specified in yyyy-MM-dd format. If you wish to provide a time component, use yyyy-MM-dd HH:mm:ss |
Transactions by Terminal
Returns a list of transactions for the specified terminal where the UTC time of the transaction occurred between the specified dates.
/api/transactions/byterminal
curl "https://api.ece.phdsolutions.ca/api/transactions/byterminal?terminalId=4&startDate=2020-02-01&endDate=2020-12-31" \
-X GET \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
Request Parameters
Parameter | Required | Description |
---|---|---|
terminaId | Yes | The terminalId of the request. Terminals can be fetched using the /Terminals API endpoints |
startDate | Yes | The start date of the range requested. Must be specified in yyyy-MM-dd . If you wish to provide a time component, use yyyy-MM-dd HH:mm:ss |
endDate | Yes | The end date of the range requested. Must be specified in yyyy-MM-dd format. If you wish to provide a time component, use yyyy-MM-dd HH:mm:ss |
Transactions by Device
Returns a list of transactions for the specified device where the UTC time of the transaction occurred between the specified dates.
/api/transactions/bydevice
curl "https://api.ece.phdsolutions.ca/api/transactions/bydevice?deviceClientId=219ADFB2-04CF-4F70-8F2E-71C92D5F76A0&startDate=2020-02-01&endDate=2020-12-31" \
-X GET \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
Request Parameters
Parameter | Required | Description |
---|---|---|
deviceClientId | Yes | The deviceClientId for the request. Device Client Ids can be fetched using the /DeviceClients API endpoints |
startDate | Yes | The start date of the range requested. Must be specified in yyyy-MM-dd . If you wish to provide a time component, use yyyy-MM-dd HH:mm:ss |
endDate | Yes | The end date of the range requested. Must be specified in yyyy-MM-dd format. If you wish to provide a time component, use yyyy-MM-dd HH:mm:ss |
Transactions by Id
Returns a list of up to X transactions where the Id is greater than the Id specified. The lastId is used an an anchor in order to enable a calling system to receive new records.
/api/transactions/batch
curl "https://api.ece.phdsolutions.ca/api/transactions/batch?lastId=55&numberOfRecords=1000" \
-X GET \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"
Request Parameters
Parameter | Required | Description |
---|---|---|
lastId | Yes | The last, largest Id the calling system has received in a previous call. |
numberOfRecords | Yes | The desired number of records to return. The maximum amount is 1000. |