Update Device
POST {{base_url}}/api/v2/device/update
Description
This endpoint is used to update the details of a specific device. It allows you to modify the asset name, anchor status, and location coordinates of the device.
- Note: 5G(LTE) devices can't be set as anchors.
Post Request Body Contents
deviceId
(string): This field specifies the unique identifier of the device you want to update.assetName
(string): This field represents the new asset name that you want to assign to the device.fixAsset
(boolean): This field indicates the updated fixAsset status of the device. If set totrue
, the device is a fixed asset; if set tofalse
, it is not an fixed asset.isAnchor
(boolean): This field indicates the updated anchor status of the device. If set totrue
, the device is an anchor; if set tofalse
, it is not an anchor.location
(object - optional): This object contains the updated latitude and longitude coordinates of the device's location. This field is required ifisAnchor
is set totrue
. lat and lng values should be accurate to at least 6 significant digits.lat
(number): The latitude coordinate of the device's location,lng
(number): The longitude coordinate of the device's location.
Summary
When you make a POST request to the provided endpoint with the specified payload, the AssetFlo system will update the paramaters of the device specified by the deviceId with the updated values in the payload.
Request Body
{"deviceId"=>"Device MAC Address", "assetName"=>"Device Name", "isAnchor"=>"true or false", "fixAsset"=>"true or false", "location"=>{"lat"=>"latitude coordinate", "lng"=>"longitude coordinate"}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"_id":"636178633fe3bb06d32a5c10","deviceId":"de0366b789d8","archived":false,"assetName":"5G-de03","beaconType":"unknown","createdAt":1667332195543,"deviceType":"Tag","fixAsset":false,"groups":["GroupVehicleId"],"icon":"tagIcon","id":"de0366b789d8","isProvisioned":true,"organization":"assetflotest","protocol":"LTE","source":"API","status":"Active","updatedAt":1668181680559,"configurationId":"636d59c0e62bb0cdfd95076e","connectors":["DIG"],"isPush":true,"serialNo":"JU13214BA906","firmware":[{"firmwareId":"636d8f4ac51b3407c5ae05d1","protocol":"LTE","version":16},{"protocol":"BLE","version":3}],"noLocation":"used","geotabId":"b11","productId":10239}