curl --request POST \
--url https://{baseUrl}/ipbox/api/getProspectLote \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data lote=descricao_loteimport requests
url = "https://{baseUrl}/ipbox/api/getProspectLote"
payload = { "lote": "descricao_lote" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({lote: 'descricao_lote'})
};
fetch('https://{baseUrl}/ipbox/api/getProspectLote', 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/getProspectLote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "lote=descricao_lote",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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/getProspectLote"
payload := strings.NewReader("lote=descricao_lote")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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/getProspectLote")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("lote=descricao_lote")
.asString();require 'uri'
require 'net/http'
url = URI("https://{baseUrl}/ipbox/api/getProspectLote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "lote=descricao_lote"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"lote": "LOTE A",
"lote_id": "10",
"prospects": [
{
"id": 501,
"nome": "João Silva",
"codigo": "API119947",
"cpf": "",
"numeros": [
{
"ddd": "11",
"numero": "994744333"
}
],
"situacao": "FILA"
}
]
}
}getProspectLote
Retorna a lista de prospects do lote especificado.
Correção a uma nota anterior desta documentação: a resposta não é um download com Content-Disposition: attachment — não há esse header aqui. O que acontece é que o conteúdo é gerado em um arquivo temporário e transmitido via readfile_chunked() direto no api.php, antes de chamar a função padrão de resposta da API — por isso, ao contrário de todos os outros endpoints, esta resposta de sucesso não recebe o header Cache-Control: no-cache e usa Content-Type: application/json (o padrão global do arquivo) em vez do application/vnd.api+json normalmente usado pela API. Na prática, para a maioria dos clientes HTTP isso é irrelevante — o corpo continua sendo um JSON válido.
curl --request POST \
--url https://{baseUrl}/ipbox/api/getProspectLote \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data lote=descricao_loteimport requests
url = "https://{baseUrl}/ipbox/api/getProspectLote"
payload = { "lote": "descricao_lote" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/x-www-form-urlencoded"
}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Authorization: '<api-key>',
'Content-Type': 'application/x-www-form-urlencoded'
},
body: new URLSearchParams({lote: 'descricao_lote'})
};
fetch('https://{baseUrl}/ipbox/api/getProspectLote', 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/getProspectLote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "lote=descricao_lote",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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/getProspectLote"
payload := strings.NewReader("lote=descricao_lote")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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/getProspectLote")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/x-www-form-urlencoded")
.body("lote=descricao_lote")
.asString();require 'uri'
require 'net/http'
url = URI("https://{baseUrl}/ipbox/api/getProspectLote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/x-www-form-urlencoded'
request.body = "lote=descricao_lote"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"lote": "LOTE A",
"lote_id": "10",
"prospects": [
{
"id": 501,
"nome": "João Silva",
"codigo": "API119947",
"cpf": "",
"numeros": [
{
"ddd": "11",
"numero": "994744333"
}
],
"situacao": "FILA"
}
]
}
}Authorizations
Token gerado em IPBoX > API > Token. Aceita o token puro, ou com prefixo Bearer / Basic.
Body
Descrição do lote.
"descricao_lote"
