post:
tags:
- Reports
security:
- ApiKeyAuth: []
summary: Build custom report
description: >
List of available operators:
| Operator | Type | Expression Example |
| EQUALS | Number | 10 |
| NOT_EQUAL | Number | 10 |
| EQUALS_OR_GREATER_THAN | Number | 10 |
| EQUALS_OR_LESS_THAN | Number | 10 |
| GREATER_THAN | Number | 10 |
| LESS_THAN | Number | 10 |
| MATCH_REGEXP | String | /uuid=100[0-9]{2}/ |
| NOT_MATCH_REGEXP | String | /uuid=100[0-9]{2}/ |
| BEGINS_WITH | String | abc |
| ENDS_WITH | String | zyx |
| CONTAINS | String | mnp |
| NOT_CONTAIN | String | abc |
| IN_LIST | Array | [“a”, “b”, “c”] |
| NOT_IN_LIST | Array | [“a”, “b”, “c”] |
| BETWEEN | Array | |
| IS_SET | | |
| IS_NOT_SET | | |
| IS_TRUE | | |
| IS_FALSE | | |
| HAS_LABEL | whitelist or blacklist | |
| NOT_HAS_LABEL | whitelist or blacklist | |
Field 'metrics'
Stats
clicks
campaign_unique_clicks
stream_unique_clicks
global_unique_clicks
uc_campaign_rate
uc_stream_rate
uc_global_rate
bots
bot_share
proxies
empty_referrers
conversions
leads
sales
rejected
rebills
approve
lp_clicks
lp_ctr
landing_clicked_period
cr
crs
crl
roi
roi_confirmed
epc
epc_confirmed
cps
cpa
cpc
ecpc
ecpm
ecpm_confirmed
ec
ec_confirmed
Money
profitability
cost
revenue
profit
lead_revenue
sale_revenue
rejected_revenue
profit_confirmed
Field 'columns'
IDS
click_id
sub_id
visitor_code
campaign_id
campaign_group_id
parent_campaign_id
landing_id
offer_id
ts_id
stream_id
language_id
device_type_id
Data
campaign
campaign_group
parent_campaign
landing
landing_clicked_datetime
landing_clicked_period
offer
ts
affiliate_network
stream
language
device_type
connection_type
ip
country_code
country
region
city
user_agent
operator
os
os_version
browser
browser_version
device_model
isp
source
referrer
search_engine
keyword
destination
sub_id_1..30
extra_param_1..10
revenue
cost
profit
ad_campaign_id
external_id
creative_id
Flags
is_unique_stream
is_unique_campaign
is_lead
is_sale
is_rejected
is_bot
is_using_proxy
Date and Time
datetime
year
month
week
weekday
day
hour
day_hour
Other
Conversions Specific (for Entry-point Conversions):
conversion_id
click_datetime
postback_datetime
sale_datetime
sale_period
tid
status
previous_status
original_status
params
requestBody:
description: Build a custom report
required: true
content:
application/json:
schema:
$ref: ../schemas/ReportsRequest.yaml
responses:
'200':
description: Reports
content:
application/json:
schema:
$ref: ../schemas/Report.yaml
'400':
$ref: ../responses/BadRequest.yaml
'401':
$ref: ../responses/Unauthorized.yaml
'402':
$ref: ../responses/PaymentRequired.yaml
'406':
$ref: ../responses/NotAcceptable.yaml
'500':
$ref: ../responses/InternalError.yaml
x-code-samples:
- lang: PHP
source: >-
[
'from' => '2017-09-10',
'to' => '2017-09-12',
'timezone' => 'Europe/Madrid'
],
'dimensions' => ['ts', 'landing'],
'metrics' => ['clicks', 'bot_share', 'cr'],
'filters' => [
"OR" => [
"AND" => [
['name' => 'campaign_id', 'operator' => 'EQUALS', 'expression' => 4],
['name' => 'stream_id', 'operator' => 'EQUALS', 'expression' => 8],
],
['name' => 'campaign_id', 'operator' => 'EQUALS', 'expression' => 5]
]
]
];
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params));
echo curl_exec($ch);