Preços de campanhas publicitárias
Ler 4 minutos
campaign/prices
Parâmetros:
- token - autorização (string)
- currency - moeda (string, por defeito: moeda da conta). Valores:
- rub
- usd
- language - linguagem de descrição de campanhas publicitárias (string, por defeito: idioma da conta). Valores:
- ru - Russo
- en - Inglês
- es - Espanhol
- pt - Português
<?php
$post = array(
'token' => $token
);
if ($curl = curl_init()) {
curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/campaign/prices');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
$out = curl_exec($curl);
echo $out;
curl_close($curl);
}
// Resultado:
{
"paid": {
"currency": "RUB",
"base_price": 0.10,
"description": "1 página visita"
},
"paid_prof": {
"currency": "RUB",
"base_price": 0.25,
"optional_clicks_price": 0.049,
"max_inner_clicks": 4,
"description": "Visite + poucos cliques"
},
"paid_adv": {
"currency": "RUB",
"base_price": 0.15,
"optional_clicks_price": 0.049,
"max_inner_clicks": 4,
"max_outer_clicks": 4,
"description": "Cliques em anúncios"
},
"paid_se": {
"currency": "RUB",
"base_price": 0.15,
"if_outer_clicks_add_price": 0.197,
"optional_clicks_price": 0.049,
"max_inner_clicks": 4,
"max_outer_clicks": 4,
"description": "Visitas do mecanismo de pesquisa"
},
"paid_se_behavioral": {
"currency": "RUB",
"base_price": 0.15,
"optional_clicks_price": 0.049,
"max_inner_clicks": 4,
"max_before_clicks": 4,
"description": "Fatores comportamentais aprimorados na pesquisa"
},
}
Description of fields:
- currency - currency according to standard ISO 4217
- base_price - base price of the 1st execution of an advertising campaign
- if_outer_clicks_add_price - additional price for subject to availability max_outer_clicks
- optional_clicks_price - cost of each optional click max_before_clicks, max_inner_clicks, max_outer_clicks
- max_before_clicks - optional maximum allowed number of clicks on other sites in search results (according to campaign/add)
- max_inner_clicks - optional maximum number of clicks on internal pages (according to campaign/add)
- max_outer_clicks - optional maximum allowed clicks on the pages of the opened site (according to campaign/add)
- description - Descrição do tipo de campanha publicitária
The cost of implementation should be calculated using the following formula:

* if there is no optional_clicks_price or if_outer_clicks_add_price, we take them equal to zero