cURL
curl --request GET \
--url https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/sessions/history \
--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/sessions/history"
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/sessions/history', 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/sessions/history",
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/sessions/history"
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/sessions/history")
.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/sessions/history")
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{
"apn": "teste.br",
"imsi": "878978978979879000",
"uniqueId": "65456rer5er45ew6r4e5w64r6",
"cep": "38415897",
"city": "Teste",
"imei": "8.6247605171275e+22",
"inputBytes": 38415897,
"ip": "20.258.54.140",
"latitude": "45654.789",
"longitude": "3841.5897",
"msisdn": "5516989526578",
"operator": "ALGAR",
"outputBytes": 8989,
"sessionTime": 1148,
"startTime": "2024-02-16T18:09:07.000Z",
"state": "MG",
"stopTime": "2024-02-16T18:28:15.000Z",
"technology": "3G",
"updateTime": "2024-02-16T18:28:15.000Z",
"antenna": "20969927f4200856180f34343jyu",
"date": "2024-02-16T18:28:15.000Z"
}"No Content"{
"errors": "Parameter not found"
}{
"valueInBytes": 1235
}{
"errors": "O acesso ao recurso foi negado."
}{
"errors": "URI de API/Recurso inexistente para processamento."
}{
"errors": "Parameter not found"
}MoT
Busca histórico de conexão de um sim card
Requisição para buscar o histórico de conexão de um sim card
GET
/
sessions
/
history
cURL
curl --request GET \
--url https://apicorp.algartelecom.com.br/telecom/product-Inventory-management/management/v1/sessions/history \
--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/sessions/history"
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/sessions/history', 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/sessions/history",
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/sessions/history"
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/sessions/history")
.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/sessions/history")
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{
"apn": "teste.br",
"imsi": "878978978979879000",
"uniqueId": "65456rer5er45ew6r4e5w64r6",
"cep": "38415897",
"city": "Teste",
"imei": "8.6247605171275e+22",
"inputBytes": 38415897,
"ip": "20.258.54.140",
"latitude": "45654.789",
"longitude": "3841.5897",
"msisdn": "5516989526578",
"operator": "ALGAR",
"outputBytes": 8989,
"sessionTime": 1148,
"startTime": "2024-02-16T18:09:07.000Z",
"state": "MG",
"stopTime": "2024-02-16T18:28:15.000Z",
"technology": "3G",
"updateTime": "2024-02-16T18:28:15.000Z",
"antenna": "20969927f4200856180f34343jyu",
"date": "2024-02-16T18:28:15.000Z"
}"No Content"{
"errors": "Parameter not found"
}{
"valueInBytes": 1235
}{
"errors": "O acesso ao recurso foi negado."
}{
"errors": "URI de API/Recurso inexistente 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"
Id do cliente
Example:
"client_id"
Token gerado.
Example:
"access_token"
Query Parameters
Operadora
Example:
"ALGAR"
Identificador do IMSI
Example:
"30321515124185"
Identificador do cliente.
Example:
"359687"
Data do histórico
Example:
"2024-01-01T00:00:00.000Z7"
Número do SIMCARD
Example:
"5516991556585"
Número da página para paginação.
Example:
0
Tamanho da página para paginação.
Example:
24
Response
OK

