cURL
curl --request POST \
--url https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tracking_code": "BR123456789BR",
"carrier": "correios",
"send_email": true
}
'import requests
url = "https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking"
payload = {
"tracking_code": "BR123456789BR",
"carrier": "correios",
"send_email": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tracking_code: 'BR123456789BR', carrier: 'correios', send_email: true})
};
fetch('https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking', 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.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tracking_code' => 'BR123456789BR',
'carrier' => 'correios',
'send_email' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking"
payload := strings.NewReader("{\n \"tracking_code\": \"BR123456789BR\",\n \"carrier\": \"correios\",\n \"send_email\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tracking_code\": \"BR123456789BR\",\n \"carrier\": \"correios\",\n \"send_email\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tracking_code\": \"BR123456789BR\",\n \"carrier\": \"correios\",\n \"send_email\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Código de rastreio atualizado com sucesso",
"transaction": {
"id": 123,
"hash": "abc123...",
"tracking_code": "BR123456789BR",
"carrier": "correios",
"tracking_url": "https://rastreamento.correios.com.br/...",
"updated_at": "2025-03-03T12:00:00.000000Z"
},
"email_sent": true
}Transações
Atualizar código de rastreio
Atualiza o código de rastreio de uma única transação de produto físico vinculada à sua conta.
POST
/
transactions
/
{hash}
/
tracking
cURL
curl --request POST \
--url https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tracking_code": "BR123456789BR",
"carrier": "correios",
"send_email": true
}
'import requests
url = "https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking"
payload = {
"tracking_code": "BR123456789BR",
"carrier": "correios",
"send_email": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tracking_code: 'BR123456789BR', carrier: 'correios', send_email: true})
};
fetch('https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking', 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.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tracking_code' => 'BR123456789BR',
'carrier' => 'correios',
'send_email' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking"
payload := strings.NewReader("{\n \"tracking_code\": \"BR123456789BR\",\n \"carrier\": \"correios\",\n \"send_email\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tracking_code\": \"BR123456789BR\",\n \"carrier\": \"correios\",\n \"send_email\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloud.pepperpay.com.br/public/v1/transactions/{hash}/tracking")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tracking_code\": \"BR123456789BR\",\n \"carrier\": \"correios\",\n \"send_email\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Código de rastreio atualizado com sucesso",
"transaction": {
"id": 123,
"hash": "abc123...",
"tracking_code": "BR123456789BR",
"carrier": "correios",
"tracking_url": "https://rastreamento.correios.com.br/...",
"updated_at": "2025-03-03T12:00:00.000000Z"
},
"email_sent": true
}Autorizações
Use o token da Pepper API no formato: Bearer {seu_token_aqui}
Parâmetros de caminho
Hash da transação
Corpo
application/json
Dados para atualização do código de rastreio
Código de rastreio
Required string length:
1 - 255Transportadora
Opções disponíveis:
correios, jadlog, total, azul, loggi, melhor_envio, megatransporte, other Obrigatório somente quando carrier = other. Link de rastreamento customizado.
Se deve enviar e-mail ao cliente com o código. Padrão: true.
⌘I