cURL
curl --request PUT \
--url https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110 \
--header 'Content-Type: application/json' \
--data '
{
"token": "20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08",
"config": {
"deviceConfiguration": {
"isTracking": false,
"samplingFrequency": 10,
"reportingFrequency": 10,
"conditionalConfiguration": {
"mcdPowerOptimization": {
"active": true,
"powerOptimizedReportingFrequency": 240
}
},
"devicePropertyConfiguration": {
"fmd": {
"isEnabled": true
},
"mcd": {
"isEnabled": false
},
"fall": {
"isEnabled": true
},
"tilt": {
"maxValue": 180,
"isEnabled": false
},
"light": {
"isEnabled": false
},
"shock": {
"maxValue": 30,
"isEnabled": true
},
"humidity": {
"maxValue": 100,
"minValue": 0,
"isEnabled": true,
"breachPersistenceTimeLimit": 5
},
"location": {
"priority": {
"level1": "GNSS",
"level2": "WIFI",
"level3": "CELL"
},
"isEnabled": true
},
"pressure": {
"maxValue": 1260,
"minValue": 260,
"isEnabled": true,
"breachPersistenceTimeLimit": 10
},
"temperature": {
"maxValue": 60,
"minValue": -20,
"isEnabled": true,
"breachPersistenceTimeLimit": 5
},
"lightExposure": {
"type": "continuous",
"isEnabled": true
},
"powerSavingWhileOutOfService": {
"isEnabled": false
}
}
}
},
"tag_id": "f6b687e2-4231-4996-86db-adf7611dfcac"
}
'import requests
url = "https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110"
payload = {
"token": "20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08",
"config": { "deviceConfiguration": {
"isTracking": False,
"samplingFrequency": 10,
"reportingFrequency": 10,
"conditionalConfiguration": { "mcdPowerOptimization": {
"active": True,
"powerOptimizedReportingFrequency": 240
} },
"devicePropertyConfiguration": {
"fmd": { "isEnabled": True },
"mcd": { "isEnabled": False },
"fall": { "isEnabled": True },
"tilt": {
"maxValue": 180,
"isEnabled": False
},
"light": { "isEnabled": False },
"shock": {
"maxValue": 30,
"isEnabled": True
},
"humidity": {
"maxValue": 100,
"minValue": 0,
"isEnabled": True,
"breachPersistenceTimeLimit": 5
},
"location": {
"priority": {
"level1": "GNSS",
"level2": "WIFI",
"level3": "CELL"
},
"isEnabled": True
},
"pressure": {
"maxValue": 1260,
"minValue": 260,
"isEnabled": True,
"breachPersistenceTimeLimit": 10
},
"temperature": {
"maxValue": 60,
"minValue": -20,
"isEnabled": True,
"breachPersistenceTimeLimit": 5
},
"lightExposure": {
"type": "continuous",
"isEnabled": True
},
"powerSavingWhileOutOfService": { "isEnabled": False }
}
} },
"tag_id": "f6b687e2-4231-4996-86db-adf7611dfcac"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: '20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08',
config: {
deviceConfiguration: {
isTracking: false,
samplingFrequency: 10,
reportingFrequency: 10,
conditionalConfiguration: {mcdPowerOptimization: {active: true, powerOptimizedReportingFrequency: 240}},
devicePropertyConfiguration: {
fmd: {isEnabled: true},
mcd: {isEnabled: false},
fall: {isEnabled: true},
tilt: {maxValue: 180, isEnabled: false},
light: {isEnabled: false},
shock: {maxValue: 30, isEnabled: true},
humidity: {maxValue: 100, minValue: 0, isEnabled: true, breachPersistenceTimeLimit: 5},
location: {priority: {level1: 'GNSS', level2: 'WIFI', level3: 'CELL'}, isEnabled: true},
pressure: {maxValue: 1260, minValue: 260, isEnabled: true, breachPersistenceTimeLimit: 10},
temperature: {maxValue: 60, minValue: -20, isEnabled: true, breachPersistenceTimeLimit: 5},
lightExposure: {type: 'continuous', isEnabled: true},
powerSavingWhileOutOfService: {isEnabled: false}
}
}
},
tag_id: 'f6b687e2-4231-4996-86db-adf7611dfcac'
})
};
fetch('https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'token' => '20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08',
'config' => [
'deviceConfiguration' => [
'isTracking' => false,
'samplingFrequency' => 10,
'reportingFrequency' => 10,
'conditionalConfiguration' => [
'mcdPowerOptimization' => [
'active' => true,
'powerOptimizedReportingFrequency' => 240
]
],
'devicePropertyConfiguration' => [
'fmd' => [
'isEnabled' => true
],
'mcd' => [
'isEnabled' => false
],
'fall' => [
'isEnabled' => true
],
'tilt' => [
'maxValue' => 180,
'isEnabled' => false
],
'light' => [
'isEnabled' => false
],
'shock' => [
'maxValue' => 30,
'isEnabled' => true
],
'humidity' => [
'maxValue' => 100,
'minValue' => 0,
'isEnabled' => true,
'breachPersistenceTimeLimit' => 5
],
'location' => [
'priority' => [
'level1' => 'GNSS',
'level2' => 'WIFI',
'level3' => 'CELL'
],
'isEnabled' => true
],
'pressure' => [
'maxValue' => 1260,
'minValue' => 260,
'isEnabled' => true,
'breachPersistenceTimeLimit' => 10
],
'temperature' => [
'maxValue' => 60,
'minValue' => -20,
'isEnabled' => true,
'breachPersistenceTimeLimit' => 5
],
'lightExposure' => [
'type' => 'continuous',
'isEnabled' => true
],
'powerSavingWhileOutOfService' => [
'isEnabled' => false
]
]
]
],
'tag_id' => 'f6b687e2-4231-4996-86db-adf7611dfcac'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110"
payload := strings.NewReader("{\n \"token\": \"20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08\",\n \"config\": {\n \"deviceConfiguration\": {\n \"isTracking\": false,\n \"samplingFrequency\": 10,\n \"reportingFrequency\": 10,\n \"conditionalConfiguration\": {\n \"mcdPowerOptimization\": {\n \"active\": true,\n \"powerOptimizedReportingFrequency\": 240\n }\n },\n \"devicePropertyConfiguration\": {\n \"fmd\": {\n \"isEnabled\": true\n },\n \"mcd\": {\n \"isEnabled\": false\n },\n \"fall\": {\n \"isEnabled\": true\n },\n \"tilt\": {\n \"maxValue\": 180,\n \"isEnabled\": false\n },\n \"light\": {\n \"isEnabled\": false\n },\n \"shock\": {\n \"maxValue\": 30,\n \"isEnabled\": true\n },\n \"humidity\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"location\": {\n \"priority\": {\n \"level1\": \"GNSS\",\n \"level2\": \"WIFI\",\n \"level3\": \"CELL\"\n },\n \"isEnabled\": true\n },\n \"pressure\": {\n \"maxValue\": 1260,\n \"minValue\": 260,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 10\n },\n \"temperature\": {\n \"maxValue\": 60,\n \"minValue\": -20,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"lightExposure\": {\n \"type\": \"continuous\",\n \"isEnabled\": true\n },\n \"powerSavingWhileOutOfService\": {\n \"isEnabled\": false\n }\n }\n }\n },\n \"tag_id\": \"f6b687e2-4231-4996-86db-adf7611dfcac\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08\",\n \"config\": {\n \"deviceConfiguration\": {\n \"isTracking\": false,\n \"samplingFrequency\": 10,\n \"reportingFrequency\": 10,\n \"conditionalConfiguration\": {\n \"mcdPowerOptimization\": {\n \"active\": true,\n \"powerOptimizedReportingFrequency\": 240\n }\n },\n \"devicePropertyConfiguration\": {\n \"fmd\": {\n \"isEnabled\": true\n },\n \"mcd\": {\n \"isEnabled\": false\n },\n \"fall\": {\n \"isEnabled\": true\n },\n \"tilt\": {\n \"maxValue\": 180,\n \"isEnabled\": false\n },\n \"light\": {\n \"isEnabled\": false\n },\n \"shock\": {\n \"maxValue\": 30,\n \"isEnabled\": true\n },\n \"humidity\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"location\": {\n \"priority\": {\n \"level1\": \"GNSS\",\n \"level2\": \"WIFI\",\n \"level3\": \"CELL\"\n },\n \"isEnabled\": true\n },\n \"pressure\": {\n \"maxValue\": 1260,\n \"minValue\": 260,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 10\n },\n \"temperature\": {\n \"maxValue\": 60,\n \"minValue\": -20,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"lightExposure\": {\n \"type\": \"continuous\",\n \"isEnabled\": true\n },\n \"powerSavingWhileOutOfService\": {\n \"isEnabled\": false\n }\n }\n }\n },\n \"tag_id\": \"f6b687e2-4231-4996-86db-adf7611dfcac\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08\",\n \"config\": {\n \"deviceConfiguration\": {\n \"isTracking\": false,\n \"samplingFrequency\": 10,\n \"reportingFrequency\": 10,\n \"conditionalConfiguration\": {\n \"mcdPowerOptimization\": {\n \"active\": true,\n \"powerOptimizedReportingFrequency\": 240\n }\n },\n \"devicePropertyConfiguration\": {\n \"fmd\": {\n \"isEnabled\": true\n },\n \"mcd\": {\n \"isEnabled\": false\n },\n \"fall\": {\n \"isEnabled\": true\n },\n \"tilt\": {\n \"maxValue\": 180,\n \"isEnabled\": false\n },\n \"light\": {\n \"isEnabled\": false\n },\n \"shock\": {\n \"maxValue\": 30,\n \"isEnabled\": true\n },\n \"humidity\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"location\": {\n \"priority\": {\n \"level1\": \"GNSS\",\n \"level2\": \"WIFI\",\n \"level3\": \"CELL\"\n },\n \"isEnabled\": true\n },\n \"pressure\": {\n \"maxValue\": 1260,\n \"minValue\": 260,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 10\n },\n \"temperature\": {\n \"maxValue\": 60,\n \"minValue\": -20,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"lightExposure\": {\n \"type\": \"continuous\",\n \"isEnabled\": true\n },\n \"powerSavingWhileOutOfService\": {\n \"isEnabled\": false\n }\n }\n }\n },\n \"tag_id\": \"f6b687e2-4231-4996-86db-adf7611dfcac\"\n}"
response = http.request(request)
puts response.read_body{
"serialNumber": "TRK000013414",
"deviceConfiguration": {
"isTracking": true,
"samplingFrequency": 10,
"reportingFrequency": 10,
"conditionalConfiguration": {
"mcdPowerOptimization": {
"active": 1,
"powerOptimizedReportingFrequency": 240
}
},
"devicePropertyConfiguration": {
"fmd": {
"isEnabled": 1
},
"mcd": {
"isEnabled": true
},
"fall": {
"isEnabled": 1
},
"tilt": {
"maxValue": 180,
"isEnabled": true
},
"light": {
"isEnabled": true
},
"shock": {
"maxValue": 30,
"isEnabled": 1
},
"humidity": {
"maxValue": 100,
"minValue": 0,
"isEnabled": 1,
"breachPersistenceTimeLimit": 5
},
"location": {
"priority": {
"level1": "GNSS",
"level2": "WIFI",
"level3": "CELL"
},
"isEnabled": 1
},
"pressure": {
"maxValue": 1260,
"minValue": 260,
"isEnabled": 1,
"breachPersistenceTimeLimit": 10
},
"temperature": {
"maxValue": 60,
"minValue": -20,
"isEnabled": 1,
"breachPersistenceTimeLimit": 5
},
"lightExposure": {
"type": "continuous",
"isEnabled": 1
},
"powerSavingWhileOutOfService": {
"isEnabled": true
}
}
}
}{
"error": "Input Error. Check the request payload for issues."
}{
"error": "Requisição requer autenticação."
}{
"error": "Access denied. Additional privileges are needed access the requested resource"
}{
"error": "Not Found. The requested resource does not exist."
}{
"error": "Rate Limited. Too many requests."
}{
"error": "Unexpected error"
}Tag
Nova configuração Qualcomm QTS110
Envia uma nova configuração qualcomm
PUT
/
tag
/
quallcomm
/
config
/
QTS110
cURL
curl --request PUT \
--url https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110 \
--header 'Content-Type: application/json' \
--data '
{
"token": "20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08",
"config": {
"deviceConfiguration": {
"isTracking": false,
"samplingFrequency": 10,
"reportingFrequency": 10,
"conditionalConfiguration": {
"mcdPowerOptimization": {
"active": true,
"powerOptimizedReportingFrequency": 240
}
},
"devicePropertyConfiguration": {
"fmd": {
"isEnabled": true
},
"mcd": {
"isEnabled": false
},
"fall": {
"isEnabled": true
},
"tilt": {
"maxValue": 180,
"isEnabled": false
},
"light": {
"isEnabled": false
},
"shock": {
"maxValue": 30,
"isEnabled": true
},
"humidity": {
"maxValue": 100,
"minValue": 0,
"isEnabled": true,
"breachPersistenceTimeLimit": 5
},
"location": {
"priority": {
"level1": "GNSS",
"level2": "WIFI",
"level3": "CELL"
},
"isEnabled": true
},
"pressure": {
"maxValue": 1260,
"minValue": 260,
"isEnabled": true,
"breachPersistenceTimeLimit": 10
},
"temperature": {
"maxValue": 60,
"minValue": -20,
"isEnabled": true,
"breachPersistenceTimeLimit": 5
},
"lightExposure": {
"type": "continuous",
"isEnabled": true
},
"powerSavingWhileOutOfService": {
"isEnabled": false
}
}
}
},
"tag_id": "f6b687e2-4231-4996-86db-adf7611dfcac"
}
'import requests
url = "https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110"
payload = {
"token": "20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08",
"config": { "deviceConfiguration": {
"isTracking": False,
"samplingFrequency": 10,
"reportingFrequency": 10,
"conditionalConfiguration": { "mcdPowerOptimization": {
"active": True,
"powerOptimizedReportingFrequency": 240
} },
"devicePropertyConfiguration": {
"fmd": { "isEnabled": True },
"mcd": { "isEnabled": False },
"fall": { "isEnabled": True },
"tilt": {
"maxValue": 180,
"isEnabled": False
},
"light": { "isEnabled": False },
"shock": {
"maxValue": 30,
"isEnabled": True
},
"humidity": {
"maxValue": 100,
"minValue": 0,
"isEnabled": True,
"breachPersistenceTimeLimit": 5
},
"location": {
"priority": {
"level1": "GNSS",
"level2": "WIFI",
"level3": "CELL"
},
"isEnabled": True
},
"pressure": {
"maxValue": 1260,
"minValue": 260,
"isEnabled": True,
"breachPersistenceTimeLimit": 10
},
"temperature": {
"maxValue": 60,
"minValue": -20,
"isEnabled": True,
"breachPersistenceTimeLimit": 5
},
"lightExposure": {
"type": "continuous",
"isEnabled": True
},
"powerSavingWhileOutOfService": { "isEnabled": False }
}
} },
"tag_id": "f6b687e2-4231-4996-86db-adf7611dfcac"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
token: '20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08',
config: {
deviceConfiguration: {
isTracking: false,
samplingFrequency: 10,
reportingFrequency: 10,
conditionalConfiguration: {mcdPowerOptimization: {active: true, powerOptimizedReportingFrequency: 240}},
devicePropertyConfiguration: {
fmd: {isEnabled: true},
mcd: {isEnabled: false},
fall: {isEnabled: true},
tilt: {maxValue: 180, isEnabled: false},
light: {isEnabled: false},
shock: {maxValue: 30, isEnabled: true},
humidity: {maxValue: 100, minValue: 0, isEnabled: true, breachPersistenceTimeLimit: 5},
location: {priority: {level1: 'GNSS', level2: 'WIFI', level3: 'CELL'}, isEnabled: true},
pressure: {maxValue: 1260, minValue: 260, isEnabled: true, breachPersistenceTimeLimit: 10},
temperature: {maxValue: 60, minValue: -20, isEnabled: true, breachPersistenceTimeLimit: 5},
lightExposure: {type: 'continuous', isEnabled: true},
powerSavingWhileOutOfService: {isEnabled: false}
}
}
},
tag_id: 'f6b687e2-4231-4996-86db-adf7611dfcac'
})
};
fetch('https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'token' => '20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08',
'config' => [
'deviceConfiguration' => [
'isTracking' => false,
'samplingFrequency' => 10,
'reportingFrequency' => 10,
'conditionalConfiguration' => [
'mcdPowerOptimization' => [
'active' => true,
'powerOptimizedReportingFrequency' => 240
]
],
'devicePropertyConfiguration' => [
'fmd' => [
'isEnabled' => true
],
'mcd' => [
'isEnabled' => false
],
'fall' => [
'isEnabled' => true
],
'tilt' => [
'maxValue' => 180,
'isEnabled' => false
],
'light' => [
'isEnabled' => false
],
'shock' => [
'maxValue' => 30,
'isEnabled' => true
],
'humidity' => [
'maxValue' => 100,
'minValue' => 0,
'isEnabled' => true,
'breachPersistenceTimeLimit' => 5
],
'location' => [
'priority' => [
'level1' => 'GNSS',
'level2' => 'WIFI',
'level3' => 'CELL'
],
'isEnabled' => true
],
'pressure' => [
'maxValue' => 1260,
'minValue' => 260,
'isEnabled' => true,
'breachPersistenceTimeLimit' => 10
],
'temperature' => [
'maxValue' => 60,
'minValue' => -20,
'isEnabled' => true,
'breachPersistenceTimeLimit' => 5
],
'lightExposure' => [
'type' => 'continuous',
'isEnabled' => true
],
'powerSavingWhileOutOfService' => [
'isEnabled' => false
]
]
]
],
'tag_id' => 'f6b687e2-4231-4996-86db-adf7611dfcac'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110"
payload := strings.NewReader("{\n \"token\": \"20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08\",\n \"config\": {\n \"deviceConfiguration\": {\n \"isTracking\": false,\n \"samplingFrequency\": 10,\n \"reportingFrequency\": 10,\n \"conditionalConfiguration\": {\n \"mcdPowerOptimization\": {\n \"active\": true,\n \"powerOptimizedReportingFrequency\": 240\n }\n },\n \"devicePropertyConfiguration\": {\n \"fmd\": {\n \"isEnabled\": true\n },\n \"mcd\": {\n \"isEnabled\": false\n },\n \"fall\": {\n \"isEnabled\": true\n },\n \"tilt\": {\n \"maxValue\": 180,\n \"isEnabled\": false\n },\n \"light\": {\n \"isEnabled\": false\n },\n \"shock\": {\n \"maxValue\": 30,\n \"isEnabled\": true\n },\n \"humidity\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"location\": {\n \"priority\": {\n \"level1\": \"GNSS\",\n \"level2\": \"WIFI\",\n \"level3\": \"CELL\"\n },\n \"isEnabled\": true\n },\n \"pressure\": {\n \"maxValue\": 1260,\n \"minValue\": 260,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 10\n },\n \"temperature\": {\n \"maxValue\": 60,\n \"minValue\": -20,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"lightExposure\": {\n \"type\": \"continuous\",\n \"isEnabled\": true\n },\n \"powerSavingWhileOutOfService\": {\n \"isEnabled\": false\n }\n }\n }\n },\n \"tag_id\": \"f6b687e2-4231-4996-86db-adf7611dfcac\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08\",\n \"config\": {\n \"deviceConfiguration\": {\n \"isTracking\": false,\n \"samplingFrequency\": 10,\n \"reportingFrequency\": 10,\n \"conditionalConfiguration\": {\n \"mcdPowerOptimization\": {\n \"active\": true,\n \"powerOptimizedReportingFrequency\": 240\n }\n },\n \"devicePropertyConfiguration\": {\n \"fmd\": {\n \"isEnabled\": true\n },\n \"mcd\": {\n \"isEnabled\": false\n },\n \"fall\": {\n \"isEnabled\": true\n },\n \"tilt\": {\n \"maxValue\": 180,\n \"isEnabled\": false\n },\n \"light\": {\n \"isEnabled\": false\n },\n \"shock\": {\n \"maxValue\": 30,\n \"isEnabled\": true\n },\n \"humidity\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"location\": {\n \"priority\": {\n \"level1\": \"GNSS\",\n \"level2\": \"WIFI\",\n \"level3\": \"CELL\"\n },\n \"isEnabled\": true\n },\n \"pressure\": {\n \"maxValue\": 1260,\n \"minValue\": 260,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 10\n },\n \"temperature\": {\n \"maxValue\": 60,\n \"minValue\": -20,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"lightExposure\": {\n \"type\": \"continuous\",\n \"isEnabled\": true\n },\n \"powerSavingWhileOutOfService\": {\n \"isEnabled\": false\n }\n }\n }\n },\n \"tag_id\": \"f6b687e2-4231-4996-86db-adf7611dfcac\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allcomtelecom.com/api:XUynQtIz/tag/quallcomm/config/QTS110")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"token\": \"20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08\",\n \"config\": {\n \"deviceConfiguration\": {\n \"isTracking\": false,\n \"samplingFrequency\": 10,\n \"reportingFrequency\": 10,\n \"conditionalConfiguration\": {\n \"mcdPowerOptimization\": {\n \"active\": true,\n \"powerOptimizedReportingFrequency\": 240\n }\n },\n \"devicePropertyConfiguration\": {\n \"fmd\": {\n \"isEnabled\": true\n },\n \"mcd\": {\n \"isEnabled\": false\n },\n \"fall\": {\n \"isEnabled\": true\n },\n \"tilt\": {\n \"maxValue\": 180,\n \"isEnabled\": false\n },\n \"light\": {\n \"isEnabled\": false\n },\n \"shock\": {\n \"maxValue\": 30,\n \"isEnabled\": true\n },\n \"humidity\": {\n \"maxValue\": 100,\n \"minValue\": 0,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"location\": {\n \"priority\": {\n \"level1\": \"GNSS\",\n \"level2\": \"WIFI\",\n \"level3\": \"CELL\"\n },\n \"isEnabled\": true\n },\n \"pressure\": {\n \"maxValue\": 1260,\n \"minValue\": 260,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 10\n },\n \"temperature\": {\n \"maxValue\": 60,\n \"minValue\": -20,\n \"isEnabled\": true,\n \"breachPersistenceTimeLimit\": 5\n },\n \"lightExposure\": {\n \"type\": \"continuous\",\n \"isEnabled\": true\n },\n \"powerSavingWhileOutOfService\": {\n \"isEnabled\": false\n }\n }\n }\n },\n \"tag_id\": \"f6b687e2-4231-4996-86db-adf7611dfcac\"\n}"
response = http.request(request)
puts response.read_body{
"serialNumber": "TRK000013414",
"deviceConfiguration": {
"isTracking": true,
"samplingFrequency": 10,
"reportingFrequency": 10,
"conditionalConfiguration": {
"mcdPowerOptimization": {
"active": 1,
"powerOptimizedReportingFrequency": 240
}
},
"devicePropertyConfiguration": {
"fmd": {
"isEnabled": 1
},
"mcd": {
"isEnabled": true
},
"fall": {
"isEnabled": 1
},
"tilt": {
"maxValue": 180,
"isEnabled": true
},
"light": {
"isEnabled": true
},
"shock": {
"maxValue": 30,
"isEnabled": 1
},
"humidity": {
"maxValue": 100,
"minValue": 0,
"isEnabled": 1,
"breachPersistenceTimeLimit": 5
},
"location": {
"priority": {
"level1": "GNSS",
"level2": "WIFI",
"level3": "CELL"
},
"isEnabled": 1
},
"pressure": {
"maxValue": 1260,
"minValue": 260,
"isEnabled": 1,
"breachPersistenceTimeLimit": 10
},
"temperature": {
"maxValue": 60,
"minValue": -20,
"isEnabled": 1,
"breachPersistenceTimeLimit": 5
},
"lightExposure": {
"type": "continuous",
"isEnabled": 1
},
"powerSavingWhileOutOfService": {
"isEnabled": true
}
}
}
}{
"error": "Input Error. Check the request payload for issues."
}{
"error": "Requisição requer autenticação."
}{
"error": "Access denied. Additional privileges are needed access the requested resource"
}{
"error": "Not Found. The requested resource does not exist."
}{
"error": "Rate Limited. Too many requests."
}{
"error": "Unexpected error"
}Body
application/json
Informações necessárias para vincular uma tag a um cliente.
Example:
"20234397fs9vcd978qr308q9703cbfdbd9vuy07wrw97rq90qrw08"
Example:
{
"deviceConfiguration": {
"isTracking": false,
"samplingFrequency": 10,
"reportingFrequency": 10,
"conditionalConfiguration": {
"mcdPowerOptimization": {
"active": true,
"powerOptimizedReportingFrequency": 240
}
},
"devicePropertyConfiguration": {
"fmd": { "isEnabled": true },
"mcd": { "isEnabled": false },
"fall": { "isEnabled": true },
"tilt": { "maxValue": 180, "isEnabled": false },
"light": { "isEnabled": false },
"shock": { "maxValue": 30, "isEnabled": true },
"humidity": {
"maxValue": 100,
"minValue": 0,
"isEnabled": true,
"breachPersistenceTimeLimit": 5
},
"location": {
"priority": {
"level1": "GNSS",
"level2": "WIFI",
"level3": "CELL"
},
"isEnabled": true
},
"pressure": {
"maxValue": 1260,
"minValue": 260,
"isEnabled": true,
"breachPersistenceTimeLimit": 10
},
"temperature": {
"maxValue": 60,
"minValue": -20,
"isEnabled": true,
"breachPersistenceTimeLimit": 5
},
"lightExposure": { "type": "continuous", "isEnabled": true },
"powerSavingWhileOutOfService": { "isEnabled": false }
}
}
}
Example:
"f6b687e2-4231-4996-86db-adf7611dfcac"
Response
Configurações enviadas com sucesso.
Example:
{
"serialNumber": "TRK000013414",
"deviceConfiguration": {
"isTracking": true,
"samplingFrequency": 10,
"reportingFrequency": 10,
"conditionalConfiguration": {
"mcdPowerOptimization": {
"active": 1,
"powerOptimizedReportingFrequency": 240
}
},
"devicePropertyConfiguration": {
"fmd": { "isEnabled": 1 },
"mcd": { "isEnabled": true },
"fall": { "isEnabled": 1 },
"tilt": { "maxValue": 180, "isEnabled": true },
"light": { "isEnabled": true },
"shock": { "maxValue": 30, "isEnabled": 1 },
"humidity": {
"maxValue": 100,
"minValue": 0,
"isEnabled": 1,
"breachPersistenceTimeLimit": 5
},
"location": {
"priority": {
"level1": "GNSS",
"level2": "WIFI",
"level3": "CELL"
},
"isEnabled": 1
},
"pressure": {
"maxValue": 1260,
"minValue": 260,
"isEnabled": 1,
"breachPersistenceTimeLimit": 10
},
"temperature": {
"maxValue": 60,
"minValue": -20,
"isEnabled": 1,
"breachPersistenceTimeLimit": 5
},
"lightExposure": { "type": "continuous", "isEnabled": 1 },
"powerSavingWhileOutOfService": { "isEnabled": true }
}
}
}

