Obter Campanha
curl --request GET \
--url https://api.selltrust.com.br/api/v1/email-campaign/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.selltrust.com.br/api/v1/email-campaign/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.selltrust.com.br/api/v1/email-campaign/{id}', 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://api.selltrust.com.br/api/v1/email-campaign/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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://api.selltrust.com.br/api/v1/email-campaign/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.selltrust.com.br/api/v1/email-campaign/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.selltrust.com.br/api/v1/email-campaign/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "uuid-da-campanha",
"store_id": "uuid-da-loja",
"name": "Lançamento de novembro",
"subject": "Novidades para você, {{ customer.first_name }}",
"html": "<!doctype html>\n<html lang=\"pt-BR\">…</html>",
"audience": {
"match": "ALL",
"rules": [
{
"type": "PURCHASED_LAST_DAYS",
"days": 30
},
{
"type": "TOTAL_SPENT",
"operator": "GT",
"value": 300
}
]
},
"status": "SENT",
"scheduled_at": null,
"started_at": "2026-11-10T15:00:00.000Z",
"finished_at": "2026-11-10T15:04:00.000Z",
"canceled_at": null,
"total_recipients": 128,
"sent_count": 126,
"failed_count": 1,
"skipped_count": 1,
"error": null,
"created_by": "uuid-do-usuario",
"created_at": "2026-11-10T14:30:00.000Z",
"updated_at": "2026-11-10T14:30:00.000Z",
"pending_count": 0,
"attributed_orders": 7,
"attributed_revenue": 913.3
}
Campanhas de email
Obter Campanha
GET
/
api
/
v1
/
email-campaign
/
{id}
Obter Campanha
curl --request GET \
--url https://api.selltrust.com.br/api/v1/email-campaign/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.selltrust.com.br/api/v1/email-campaign/{id}"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.selltrust.com.br/api/v1/email-campaign/{id}', 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://api.selltrust.com.br/api/v1/email-campaign/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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://api.selltrust.com.br/api/v1/email-campaign/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.selltrust.com.br/api/v1/email-campaign/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.selltrust.com.br/api/v1/email-campaign/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"id": "uuid-da-campanha",
"store_id": "uuid-da-loja",
"name": "Lançamento de novembro",
"subject": "Novidades para você, {{ customer.first_name }}",
"html": "<!doctype html>\n<html lang=\"pt-BR\">…</html>",
"audience": {
"match": "ALL",
"rules": [
{
"type": "PURCHASED_LAST_DAYS",
"days": 30
},
{
"type": "TOTAL_SPENT",
"operator": "GT",
"value": 300
}
]
},
"status": "SENT",
"scheduled_at": null,
"started_at": "2026-11-10T15:00:00.000Z",
"finished_at": "2026-11-10T15:04:00.000Z",
"canceled_at": null,
"total_recipients": 128,
"sent_count": 126,
"failed_count": 1,
"skipped_count": 1,
"error": null,
"created_by": "uuid-do-usuario",
"created_at": "2026-11-10T14:30:00.000Z",
"updated_at": "2026-11-10T14:30:00.000Z",
"pending_count": 0,
"attributed_orders": 7,
"attributed_revenue": 913.3
}
Retorna a campanha com o HTML, as contagens e os resultados:
total_recipients,sent_count,failed_count,skipped_count(descadastro ou cancelamento) epending_count(ainda na fila). Durante o envio os números são ao vivo.attributed_orderseattributed_revenue: pedidos aprovados que vieram de um clique no email.
Exige a permissão Gerenciar Marketing (
MANAGE_MARKETING) do usuário que criou o token. Veja Permissões do token.{
"id": "uuid-da-campanha",
"store_id": "uuid-da-loja",
"name": "Lançamento de novembro",
"subject": "Novidades para você, {{ customer.first_name }}",
"html": "<!doctype html>\n<html lang=\"pt-BR\">…</html>",
"audience": {
"match": "ALL",
"rules": [
{
"type": "PURCHASED_LAST_DAYS",
"days": 30
},
{
"type": "TOTAL_SPENT",
"operator": "GT",
"value": 300
}
]
},
"status": "SENT",
"scheduled_at": null,
"started_at": "2026-11-10T15:00:00.000Z",
"finished_at": "2026-11-10T15:04:00.000Z",
"canceled_at": null,
"total_recipients": 128,
"sent_count": 126,
"failed_count": 1,
"skipped_count": 1,
"error": null,
"created_by": "uuid-do-usuario",
"created_at": "2026-11-10T14:30:00.000Z",
"updated_at": "2026-11-10T14:30:00.000Z",
"pending_count": 0,
"attributed_orders": 7,
"attributed_revenue": 913.3
}
