importMailing
curl --request POST \
--url https://{baseUrl}/ipbox/api/importMailing \
--header 'Content-Type: multipart/form-data' \
--form lote_id=lote_id \
--form higienizar=higienizarimport requests
url = "https://{baseUrl}/ipbox/api/importMailing"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--"
headers = {"Content-Type": "multipart/form-data"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('lote_id', 'lote_id');
form.append('higienizar', 'higienizar');
const options = {method: 'POST'};
options.body = form;
fetch('https://{baseUrl}/ipbox/api/importMailing', 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/importMailing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$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/importMailing"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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/importMailing")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://{baseUrl}/ipbox/api/importMailing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_bodyProspects
importMailing
Importa no lote especificado os prospects contidos no arquivo csv enviado. Os prospects existentes são apagados quando uma nova importação é feita.
Formato CSV:
id_contato_crm;nome_cliente;ddd1;telefone1;ddd2;telefone2;ddd3;telefone3;ddd4;telefone4;ddd5;telefone5
Exemplo CSV (p/ o layout padrão):
682181526;LUIZ OLIVEIRA ANDRADE;11;55678912;11;998345521;;;;;;
468246710;DANIEL AUGUSTO DA SILVA;11;77635432;11;976883211;11;42336094;;;;
Response:
msg | Mensagem com o resultado da importação Exemplos: import ok = importação incluída na fila com sucesso import erro = importação não completada com erro cancelado = importação cancelada |
id | Id da importação |
POST
/
ipbox
/
api
/
importMailing
importMailing
curl --request POST \
--url https://{baseUrl}/ipbox/api/importMailing \
--header 'Content-Type: multipart/form-data' \
--form lote_id=lote_id \
--form higienizar=higienizarimport requests
url = "https://{baseUrl}/ipbox/api/importMailing"
payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--"
headers = {"Content-Type": "multipart/form-data"}
response = requests.post(url, data=payload, headers=headers)
print(response.text)const form = new FormData();
form.append('lote_id', 'lote_id');
form.append('higienizar', 'higienizar');
const options = {method: 'POST'};
options.body = form;
fetch('https://{baseUrl}/ipbox/api/importMailing', 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/importMailing",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data"
],
]);
$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/importMailing"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
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/importMailing")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://{baseUrl}/ipbox/api/importMailing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"lote_id\"\r\n\r\nlote_id\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"higienizar\"\r\n\r\nhigienizar\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body