Envia uma mensagem de 'modo' para terminais de destino (Autenticação)
curl --request POST \
--url https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode \
--header 'Content-Type: application/json' \
--data '
[
{
"DestinationID": "01008988SKY5909",
"UserMessageID": 2097,
"Mode": 1,
"WakeupInterval": 2
}
]
'import requests
url = "https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode"
payload = [
{
"DestinationID": "01008988SKY5909",
"UserMessageID": 2097,
"Mode": 1,
"WakeupInterval": 2
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
DestinationID: '01008988SKY5909',
UserMessageID: 2097,
Mode: 1,
WakeupInterval: 2
}
])
};
fetch('https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode', 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://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'DestinationID' => '01008988SKY5909',
'UserMessageID' => 2097,
'Mode' => 1,
'WakeupInterval' => 2
]
]),
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://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode"
payload := strings.NewReader("[\n {\n \"DestinationID\": \"01008988SKY5909\",\n \"UserMessageID\": 2097,\n \"Mode\": 1,\n \"WakeupInterval\": 2\n }\n]")
req, _ := http.NewRequest("POST", 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.post("https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode")
.header("Content-Type", "application/json")
.body("[\n {\n \"DestinationID\": \"01008988SKY5909\",\n \"UserMessageID\": 2097,\n \"Mode\": 1,\n \"WakeupInterval\": 2\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"DestinationID\": \"01008988SKY5909\",\n \"UserMessageID\": 2097,\n \"Mode\": 1,\n \"WakeupInterval\": 2\n }\n]"
response = http.request(request)
puts response.read_body{
"Submissions": [
{
"ID": 10844864715,
"DestinationID": "01008988SKY5909",
"UserMessageID": 2097,
"OTAMessageSize": 202,
"OperationMode": null
},
{
"ID": 10844864716,
"DestinationID": "01008988SKY5900",
"UserMessageID": 2098,
"OTAMessageSize": 202,
"OperationMode": null
},
{
"ErrorID": 21827,
"UserMessageID": 2099,
"OperationMode": null
}
]
}"Quando falha a autenticação e autorização.""Quando o usuário ultrapassa o limite provisionado de requisições para o endpoint da API, será retornado o código HTTP 429 “Muitas Requisições”."Terminal
Envia mensagem de “modo” aos terminais
Autenticação: Token Bearer
Limitação de taxa: sim (grupo SEND de métodos)
Autorização: Conta de usuário
POST
/
api
/
v
{version}
/
terminal
/
mode
Envia uma mensagem de 'modo' para terminais de destino (Autenticação)
curl --request POST \
--url https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode \
--header 'Content-Type: application/json' \
--data '
[
{
"DestinationID": "01008988SKY5909",
"UserMessageID": 2097,
"Mode": 1,
"WakeupInterval": 2
}
]
'import requests
url = "https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode"
payload = [
{
"DestinationID": "01008988SKY5909",
"UserMessageID": 2097,
"Mode": 1,
"WakeupInterval": 2
}
]
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify([
{
DestinationID: '01008988SKY5909',
UserMessageID: 2097,
Mode: 1,
WakeupInterval: 2
}
])
};
fetch('https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode', 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://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'DestinationID' => '01008988SKY5909',
'UserMessageID' => 2097,
'Mode' => 1,
'WakeupInterval' => 2
]
]),
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://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode"
payload := strings.NewReader("[\n {\n \"DestinationID\": \"01008988SKY5909\",\n \"UserMessageID\": 2097,\n \"Mode\": 1,\n \"WakeupInterval\": 2\n }\n]")
req, _ := http.NewRequest("POST", 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.post("https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode")
.header("Content-Type", "application/json")
.body("[\n {\n \"DestinationID\": \"01008988SKY5909\",\n \"UserMessageID\": 2097,\n \"Mode\": 1,\n \"WakeupInterval\": 2\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/api/v{version}/terminal/mode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"DestinationID\": \"01008988SKY5909\",\n \"UserMessageID\": 2097,\n \"Mode\": 1,\n \"WakeupInterval\": 2\n }\n]"
response = http.request(request)
puts response.read_body{
"Submissions": [
{
"ID": 10844864715,
"DestinationID": "01008988SKY5909",
"UserMessageID": 2097,
"OTAMessageSize": 202,
"OperationMode": null
},
{
"ID": 10844864716,
"DestinationID": "01008988SKY5900",
"UserMessageID": 2098,
"OTAMessageSize": 202,
"OperationMode": null
},
{
"ErrorID": 21827,
"UserMessageID": 2099,
"OperationMode": null
}
]
}"Quando falha a autenticação e autorização.""Quando o usuário ultrapassa o limite provisionado de requisições para o endpoint da API, será retornado o código HTTP 429 “Muitas Requisições”."Path Parameters
Body
application/jsontext/jsonapplication/*+json
Destino da mensagem (ID principal do terminal).
Example:
"01008988SKY5909"
O UserMessageID é o número de identificação da mensagem do cliente. O cliente deve fornecer um ID de mensagem se quiser mapear para o número do Gateway - o ID na classe FowardSubmission. O Gateway não armazena o UserMessageID em nenhum lugar.
Example:
2097
Modo do terminal. Opções possíveis incluem:
- 0: ALWAYS_ON (se ALWAYS_ON estiver definido, WakeupInterval será ignorado)
- 1: WAKE_UP [IDP e OGx]
- 2: RECEIVE_ON_SEND [somente OGx] (se RECEIVE_ON_SEND estiver definido, WakeupInterval será ignorado)
- 3: HYBRID [somente OGx]
Intervalo de ativação do terminal. Opções possíveis incluem:
- 0: IDP/OGx: Operação normal
- 1: IDP/OGx: 30 segundos
- 2: IDP/OGx: 60 segundos
- 3: IDP/OGx: 2 minutos
- 4: IDP/OGx: 3 minutos
- 5: IDP/OGx: 5 minutos
- 6: IDP/OGx: 10 minutos
- 7: IDP/OGx: 15 minutos
- 8: IDP/OGx: 20 minutos
- 9: IDP/OGx: 30 minutos
- 10: IDP/OGx: 60 minutos
- 11: OGx: 2 horas
- 12: OGx: 3 horas
- 13: OGx: 6 horas
- 14: OGx: 12 horas
- 15: OGx: 24 horas
Response
Chamada realizada com sucesso. Verifique o ErrorID para possíveis erros.

