cURL
curl --request GET \
--url https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events \
--header 'Content-Type: <content-type>' \
--header 'access_token: <access_token>' \
--header 'client_id: <client_id>'import requests
url = "https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events"
headers = {
"Content-Type": "<content-type>",
"client_id": "<client_id>",
"access_token": "<access_token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Content-Type': '<content-type>',
client_id: '<client_id>',
access_token: '<access_token>'
}
};
fetch('https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events', 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/broker/alert-events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"access_token: <access_token>",
"client_id: <client_id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("client_id", "<client_id>")
req.Header.Add("access_token", "<access_token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events")
.header("Content-Type", "<content-type>")
.header("client_id", "<client_id>")
.header("access_token", "<access_token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["client_id"] = '<client_id>'
request["access_token"] = '<access_token>'
response = http.request(request)
puts response.read_body{
"id": 29255,
"alertId": 168,
"customerId": 58987,
"terminalId": 654556,
"contractId": 45447,
"msisdn": "5516998784563",
"eventType": "CONTRACT_CONSUMPTION",
"field": "consumptionPercent",
"operator": ">",
"thresholdValue": 150,
"eventValue": 166.66666666666666,
"name": "teste",
"createdAt": "2025-01-30T16:10:04"
}{
"error": "Requisição mal formada."
}{
"error": "Requisição requer autenticação."
}{
"error": "O acesso ao recurso foi negado."
}{
"error": "URI de API/Recurso inexiste para processamento."
}{
"errors": "Parameter not found"
}Broker
Busca eventos
faz uma busca por eventos
GET
/
broker
/
alert-events
cURL
curl --request GET \
--url https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events \
--header 'Content-Type: <content-type>' \
--header 'access_token: <access_token>' \
--header 'client_id: <client_id>'import requests
url = "https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events"
headers = {
"Content-Type": "<content-type>",
"client_id": "<client_id>",
"access_token": "<access_token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'Content-Type': '<content-type>',
client_id: '<client_id>',
access_token: '<access_token>'
}
};
fetch('https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events', 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/broker/alert-events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Content-Type: <content-type>",
"access_token: <access_token>",
"client_id: <client_id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("client_id", "<client_id>")
req.Header.Add("access_token", "<access_token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events")
.header("Content-Type", "<content-type>")
.header("client_id", "<client_id>")
.header("access_token", "<access_token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/broker/alert-events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["client_id"] = '<client_id>'
request["access_token"] = '<access_token>'
response = http.request(request)
puts response.read_body{
"id": 29255,
"alertId": 168,
"customerId": 58987,
"terminalId": 654556,
"contractId": 45447,
"msisdn": "5516998784563",
"eventType": "CONTRACT_CONSUMPTION",
"field": "consumptionPercent",
"operator": ">",
"thresholdValue": 150,
"eventValue": 166.66666666666666,
"name": "teste",
"createdAt": "2025-01-30T16:10:04"
}{
"error": "Requisição mal formada."
}{
"error": "Requisição requer autenticação."
}{
"error": "O acesso ao recurso foi negado."
}{
"error": "URI de API/Recurso inexiste para processamento."
}{
"errors": "Parameter not found"
}Headers
Define o formato da requisição.
🔹 Valor padrão:
application/json
📌 Dica: Copie e cole esse valor no campo Content-Type.
Example:
"application/json"
Identificador do client id do sensedia
Example:
"123"
Token gerado
Example:
"Basic MzQ4OSozNDMyLTMOMzItMTIz"
Query Parameters
Visão a ser contemplada
Available options:
true, false Página
Example:
"1"
Tamanho da página
Example:
"30"
Numero do MSISDN do dispositivo
Example:
"5534991026676"
ID do contrato
Example:
"65454546"
Disparado em(inicio) - se preenchido a dateTo é obrigatória
Example:
"2025-02-05T10:51:08.073Z"
Disparado em(final) - se preenchido a dateFrom é obrigatória
Example:
"2025-02-05T10:51:08.073Z"
Tipo de evento
Available options:
CONSUMPTION(Consumo de simcards), CONTRACT_CONSUMPTION(Consumo de contrato) Tipo
Available options:
consumptionCurrentDay(Consumo do dia), consumptionTotal(Consumo total), consumptionPercent(Consumo percentual), consumptionCurrentDayAnomaly(Anomalia de consumo do dia), consumptionTotalAnomaly(Anomalia de consumo total) Response
Request report created successfully
Example:
{
"id": 29255,
"alertId": 168,
"customerId": 58987,
"terminalId": 654556,
"contractId": 45447,
"msisdn": "5516998784563",
"eventType": "CONTRACT_CONSUMPTION",
"field": "consumptionPercent",
"operator": ">",
"thresholdValue": 150,
"eventValue": 166.66666666666666,
"name": "teste",
"createdAt": "2025-01-30T16:10:04"
}

