Get Specific Pin on a Zone Map API
Require Authentication
This API is used to get specific pin on a zone map for the company based on combination of deviceID and token.
URL
api/projects/pindetail/:projectID/:projectpinID
Required parameter (in URL)
- :projectID «contains projectID that want to be looked for. It must be put in the URL, e.g: api/projects/pindetail/1/4. To get available projectID, please visit Get Available Zones»
- :projectpinID «contains projectpinID that want to be looked for. It must be put in the URL, e.g: api/projects/pindetail/1/4»
Required parameter (POST)
- deviceID
- token
Optional parameter
Example JSON Payload
{
"deviceID": "ABCD-EFGH-IJKL-MNOP",
"token": "bb602ab13b8090268cd6e3bb9dfa39e2"
}
Possible return HTTP status code
- 200
- 401
- 404
- 405
Return message
{
"status": "success",
"message": {
"isManagedAssets": false,
"fillLevel": 0,
"projectpinID": 6946,
"projectID": 341,
"projectName": "TestZone",
"projectgroupID": 0,
"groupName": "",
"iconType": "pintype",
"iconID": 2,
"iconURL": "https://wasteinsights-public-files.s3.ap-southeast-2.amazonaws.com/images/icons/default/appsize/enclosure.png",
"iconName": "Enclosure Bin",
"customlocationID": 0,
"locationName": "",
"pinAddress1": "",
"pinAddress2": "",
"pinCity": "",
"pinState": "",
"pinCountry": "",
"pinZipCode": "",
"latitude": 53.349281434148,
"longitude": -6.268064498901,
"name": "Dublin clone 3",
"description": "",
"serialNumber": "",
"assetTag": [],
"manufacturerID": 0,
"manufacturerName": "",
"createdDate": 1640870177,
"creatorUserID": 90,
"pinType": {
"pintypeID": 134,
"pinTypeName": "bb test",
"depthWhenEmpty_cm": 20,
"distanceSensorToFillLine_cm": 2,
"iconType": "system",
"iconID": 2,
"iconURL": "https://wasteinsights-public-files.s3.ap-southeast-2.amazonaws.com/images/icons/default/websize/enclosure.png",
"pinTypeDescription": "",
"pinTypeImageOriginalName": "",
"pinTypeImageURL": "",
"manufacturerID": 0,
"manufacturerName": "",
"pinTypeCreatedDate": 1591353799,
"pinTypeCreatedByUserID": 90,
"pinTypeModifiedDate": 1614829214,
"pinTypeModifiedByUserID": 90,
"total_projectpins": 33,
"iconName": "Enclosure Bin"
},
"currentAllocatedSensor": [
{
"sensorallocatedID": 4135,
"sensorsID": 6071,
"sensorstokenID": 3,
"sensorCompany": "SmartsensorNew",
"sensorDeviceID": "TAOGLAS CLONE SENSOR 3",
"firmwareVersion": "",
"sensorName": "Taoglas clone sensor 3",
"description": "",
"allocationDate": 1640870344,
"depthWhenEmpty_cm": 98,
"distanceSensorToFillLine_cm": 18,
"endDate": 0,
"latestSensorDataDate": 0,
"latestSensorData": {
"gpsLat": "53.349281311035",
"gpsLon": "-6.268064498901",
"sensorDeviceID": "TAOGLAS CLONE SENSOR 3",
"temperatureExist": "Y",
"temperatureValue": 23.4,
"temperatureOkay": "Y",
"accelerometer_x": -11.279999732971,
"accelerometer_y": 12.720000267029,
"accelerometer_z": -60.279998779297,
"ultrasoundExist": "Y",
"ultrasound": 5000,
"laserDistance1": 0,
"laserDistance2": 0,
"laserAverageDistance": 0,
"averageDistance": 1666,
"ultrasoundFillLevel": "-4983",
"laserDistance1FillLevel": "118",
"laserDistance2FillLevel": "118",
"laserAverageFillLevel": "118",
"averageFillLevel": "-1581",
"batteryLevel": 66,
"signalStrengthExist": "N",
"signalStrength_rssi_dbm": 0,
"signalStrength_bitErrorRate": 0,
"timestampdata": 1671140524
}
}
],
"vendorID": null,
"vendorName": null,
"pinnotes": []
}
}
Note:
Since customlocationID is optional, if customlocationID is set to 0 and locationName is set to empty string, it indicates that asset type does not have custom location assigned.
Since manufacturerID is optional, if manufacturerID is set to 0 and manufacturerName is set to empty string, it indicates that asset type does not have manufacturer assigned.
currentAllocatedSensor has been sorted by latestSensorDataDate desc.
latestSensorData will contain 1 latest sensor data. But if the latest sensor data ultrasoundExist = 'N', it will find update the ultrasoundExist and ultrasound field with latest ultrasound success data reading, it will do the same for temperatureExist and temperatureValue, signalStrengthExist and signalStrength_rssi_dbm and signalStrength_bitErrorRate