Estimar custo por quantidade
curl --request GET \
--url https://api.ararahq.com/v1/campaigns/estimate \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ararahq.com/v1/campaigns/estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ararahq.com/v1/campaigns/estimate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ararahq.com/v1/campaigns/estimate",
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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"templateCategory": "MARKETING",
"recipientCount": 2,
"templateCost": 0.59,
"araraFee": 0.177,
"unitPrice": 0.3835,
"totalCost": 0.767,
"markets": [
{
"market": "BR",
"count": 2,
"unitPrice": 0.3835,
"metaCostUnit": 0.295,
"subtotal": 0.767
}
]
}Campanhas
Estimar custo por quantidade
Usa o preço de referência do mercado local. Para campanha com números
de vários países, use o POST. templateName aceita nome ou ID.
Permissão: READ.
GET
/
v1
/
campaigns
/
estimate
Estimar custo por quantidade
curl --request GET \
--url https://api.ararahq.com/v1/campaigns/estimate \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ararahq.com/v1/campaigns/estimate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.ararahq.com/v1/campaigns/estimate"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ararahq.com/v1/campaigns/estimate",
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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"templateCategory": "MARKETING",
"recipientCount": 2,
"templateCost": 0.59,
"araraFee": 0.177,
"unitPrice": 0.3835,
"totalCost": 0.767,
"markets": [
{
"market": "BR",
"count": 2,
"unitPrice": 0.3835,
"metaCostUnit": 0.295,
"subtotal": 0.767
}
]
}Authorizations
Chave de API da Arara (ara_live_...), enviada no header Authorization: Bearer ara_live_.... Crie e gerencie as chaves no painel: https://app.ararahq.com/dashboard/apikeys. O valor completo aparece uma única vez, na criação.
Query Parameters
Nome ou ID do template.
Quantidade de destinatários, de 1 a 1.000.000.
Required range:
1 <= x <= 1000000Response
Estimativa
Custo Meta total, em reais.
Taxa Arara total, em reais.
Preço médio por mensagem.
Total a debitar, em reais.
Quebra por mercado. Vazio no GET.
Show child attributes
Show child attributes