curl --request POST \
--url https://{baseUrl}/ipbox/api/retornoDiscador \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data loteId=loteId \
--data de=de \
--data ate=ateimport requests
url = "https://{baseUrl}/ipbox/api/retornoDiscador"
payload = {
"loteId": "loteId",
"de": "de",
"ate": "ate"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({loteId: 'loteId', de: 'de', ate: 'ate'})
};
fetch('https://{baseUrl}/ipbox/api/retornoDiscador', 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://{baseUrl}/ipbox/api/retornoDiscador",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "loteId=loteId&de=de&ate=ate",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://{baseUrl}/ipbox/api/retornoDiscador"
payload := strings.NewReader("loteId=loteId&de=de&ate=ate")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{baseUrl}/ipbox/api/retornoDiscador")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("loteId=loteId&de=de&ate=ate")
.asString();require 'uri'
require 'net/http'
url = URI("https://{baseUrl}/ipbox/api/retornoDiscador")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "loteId=loteId&de=de&ate=ate"
response = http.request(request)
puts response.read_bodyretornoDiscador
Retorna o status de cada uma das tentativas de ligação do discador no período especificado.
Response:
Se foram efetuadas discagens, retorna CSV com todos os status das ligações efetuadas no período especificado. Ver o formato do CSV abaixo.
Se a data/hora inicial ou final não forem informadas, serão retornados os resultados do dia corrente.
Formato CSV retornado:
data_hora;codigo;ddd;numero;codigo_status;status
Exemplo CSV:
28/09/2017 20:04:50;1534664;11;22334455;4;ATENDIDO
28/09/2017 20:05:18;2577333;33;22332233;3;SEM_RESPOSTA
06/10/2017 08:00:55;2777322;33;22332233;5;OCUPADO
06/10/2017 08:10:55;2475367;33;22332233;0;DESCONHECIDO
Status possíveis:
0 = DESCONHECIDO
1 = INDISPONIVEL
3 = SEM_RESPOSTA
4 = ATENDIDO
5 = OCUPADO
8 = CONGESTIONADO
94 = FAX
95 = SECRETARIA_ELETRONICA
96 = CAIXA_POSTAL
97 = MENSAGEM_OPERADORA
98 = MACHINE
99 = BLACKLISTED
curl --request POST \
--url https://{baseUrl}/ipbox/api/retornoDiscador \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data loteId=loteId \
--data de=de \
--data ate=ateimport requests
url = "https://{baseUrl}/ipbox/api/retornoDiscador"
payload = {
"loteId": "loteId",
"de": "de",
"ate": "ate"
}
headers = {"Content-Type": "application/x-www-form-urlencoded"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
body: new URLSearchParams({loteId: 'loteId', de: 'de', ate: 'ate'})
};
fetch('https://{baseUrl}/ipbox/api/retornoDiscador', 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://{baseUrl}/ipbox/api/retornoDiscador",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "loteId=loteId&de=de&ate=ate",
CURLOPT_HTTPHEADER => [
"Content-Type: application/x-www-form-urlencoded"
],
]);
$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://{baseUrl}/ipbox/api/retornoDiscador"
payload := strings.NewReader("loteId=loteId&de=de&ate=ate")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/x-www-form-urlencoded")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{baseUrl}/ipbox/api/retornoDiscador")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("loteId=loteId&de=de&ate=ate")
.asString();require 'uri'
require 'net/http'
url = URI("https://{baseUrl}/ipbox/api/retornoDiscador")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "loteId=loteId&de=de&ate=ate"
response = http.request(request)
puts response.read_bodyBody
Response
Successful response