Look up devices by serial number
POST
/GetDevicesByCode
const url = 'https://api.eianalytic.com/ApiWeb.svc/GetDevicesByCode';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"phantomCodes":"189256049","Token":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.eianalytic.com/ApiWeb.svc/GetDevicesByCode \ --header 'Content-Type: application/json' \ --data '{ "phantomCodes": "189256049", "Token": "example" }'Look up one or more devices by serial number.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
phantomCodes
required
One or more sensor serial numbers as a comma-separated string — not an array.
string
Token
required
The database token returned by Login. Sent in the request body, not
in a header.
string
Responses
Section titled “Responses”A list of devices.
Media typeapplication/json
Array<object>
object
Key
The Key half of every response envelope.
object
StatusNumber
required
0 means OK. See the Conventions page for the full table.
integer
Description
required
string
Configs
Present on some responses; empty in the documented examples.
Array<object>
object
Value
Array<object>
A sensor as reported by GetDevices / GetDevicesByCode.
object
ID
integer
code
string
model
string
type
Sensor type code.
integer
channelCount
integer
name
string
description
string
enabled
integer
batteryVoltage
number format: float
batteryType
1 = 1/6D, 2 = AAA, 3 = CR2032, 4 = CR2477.
integer
temperature
Sensor internal temperature in °C.
number format: float
signalStrengthValue
RSSI in dBm.
integer
firmwareVersion
integer
lastUpdateConfig
string
Example
[ { "Key": { "StatusNumber": 0, "Description": "OK" }, "Value": [ { "code": "189257624", "model": "EINAHR", "description": "High Range Accelerometer", "batteryType": 1, "signalStrengthValue": -88 } ] }]