Apiguide

Transactions

API endpoints for retrieving Transactions from enVision Cloud

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.

You must include a valid Bearer token in the Authorization header of any request to enVision Cloud APIs. Tokens can be managed in the enVision Cloud Portal

Response Format

All calls to transaction APIs return an array of transaction records.

Example Response
[
  {
    "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"
  }
]
PropertyData TypeDescription
IdintenVision System-assigned unique identifier for the transaction
deviceClientIdstringThe id of the device that created the transaction
errorCodeintError code result. 0 indicates Success
errorDescriptionstringerror message associated with the Error Code.
transactionDateTimeDateTimeUTC Date time of the transaction.
elapsedTimeMillisecondsintCount of elapsed milliseconds taken to complete the measurement result on the device.
isManualDimensionbooleanTrue if the measurement was the result of manual data entry (applicable only for use with enVision Connect)
measurementUnitOfMeasureCdstringObject dimensions unit of measure (e.g. in, cm or mm)
weightUnitOfMeasureCdstringThe Weight Unit of Measure (e.g. lb or kg)
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
rotationAnglefloatobject angle of rotation rounded to 1 decimal place
lengthfloatobject length in measurementUnitOfMeasureCd units rounded to 1 decimal place
widthfloatobject width in measurementUnitOfMeasureCd units rounded to 1 decimal place
heightfloatobject height in measurementUnitOfMeasureCd units rounded to 1 decimal place
weightfloatTotal weight in weightUnitOfMeasureCd units rounded to 1 decimal place
barcodeReferencestringan 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
customReference1stringa custom reference value supplied by the host system during a cloud trigger operation
customReference2stringa custom reference value supplied by the host system during a cloud trigger operation
customReference3stringa custom reference value supplied by the host system during a cloud trigger operation
transactionReferencestringtransaction 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
Example Request
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

ParameterRequiredDescription
startDateYesThe 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
endDateYesThe 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
Example Request
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

ParameterRequiredDescription
terminaIdYesThe terminalId of the request. Terminals can be fetched using the /Terminals API endpoints
startDateYesThe 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
endDateYesThe 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
Example Request
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

ParameterRequiredDescription
deviceClientIdYesThe deviceClientId for the request. Device Client Ids can be fetched using the /DeviceClients API endpoints
startDateYesThe 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
endDateYesThe 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
Example Request
curl "https://api.ece.phdsolutions.ca/api/transactions/batch?lastId=55&numberOfRecords=1000" \
-X GET \
-H "Authorization: Bearer YOUR_AUTH_TOKEN"

Request Parameters

ParameterRequiredDescription
lastIdYesThe last, largest Id the calling system has received in a previous call.
numberOfRecordsYesThe desired number of records to return. The maximum amount is 1000.

Copyright © PHD Solutions 2024