Reports by subID¶
Parameters¶
HTTP method |
Access rights |
URL | Parameters |
Note |
---|---|---|---|---|
GET | statistics | https://api.admitad.com/statistics/sub_ids/ |
|
Statistical data on subID.* |
* Returns the result in the JSON format.
** Sets skipping and the number of records returned. For example limit=5&offset=2.
*** Filter by date, ad spaces, and affiliate programs, respectively. For example campaign=3&campaign=4&website=8&date_start=01.01.2011, where the values are identifiers of filtered categories or filtered data. The values for dates should be in format ‘%d.%m.%Y’ - ‘01.05.2012’.
**** Filter by subid, subid1, subid2, subid3, subid4. Can take values corresponding to URL. For example, subid=a&subid2=b.
- ***** Sorting order. Possible values:
- actions
- clicks
- cr
- ecpc
- leads
- payment_sum
- payment_sum_approved
- payment_sum_declined
- payment_sum_open
- sales
subid (subid1, subid2, subid3, subid4 - for the corresponding URL)
Sign ‘-‘ before the value means inverse sort order. For example, order_by=-clicks&order_by=cr.
****** The parameter that allows to obtain aggregated data for the entire request. Possible values: 1/0 - aggregated data/not aggregated result
******* group_subids is the grouping condition, by default, reports are grouped by subid, but one can specify other values from the subid, subid1, subid2, subid3, subid4 set. For example, group_subids=subid3,
Example of use¶
Example of a request with utility ``curl``:
curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/statistics/sub_ids/?date_start=01.01.2011&limit=2&order_by=-payment_sum
Example of the response from the API server in the JSON format:
{
"results": [
{
"leads_sum": 37,
"payment_sum_approved": 0.0,
"currency": "RUB",
"payment_sum_declined": 0.0,
"payment_sum_open": 26453.35,
"subid": "",
"sales_sum": 9,
"cr": 0.0,
"ecpc": 1556.079412,
"clicks": 17
},
{
"leads_sum": 4,
"payment_sum_approved": 0.0,
"currency": "RUB",
"payment_sum_declined": 0.0,
"payment_sum_open": 4238.46,
"subid": "testsubid",
"sales_sum": 1,
"cr": 0.0,
"ecpc": 0.0,
"clicks": 0
}
],
"_meta": {
"count": 14,
"limit": 2,
"offset": 0
}
}
Example of a request with utility ``curl``:
curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/statistics/sub_ids/?date_start=01.01.2011&limit=2&order_by=-payment_sum&total=1
Example of the response from the API server in the JSON format:
[
{
"leads_sum": 21594304,
"payment_sum": 3382089.02,
"views": 7337610,
"payment_sum_declined": 1705783.09,
"actions_sum_total": 22023257,
"payment_sum_approved": 1646173.57,
"currency": "RUB",
"sales_sum": 21694727,
"payment_sum_open": 1735915.45,
"cr": 311.76,
"ecpc": 0.48,
"clicks": 7064253
}
]
Description of API server response fields¶
Name |
Description |
---|---|
subid | SubID (if grouped by subid) |
subid1 | SubID1 (only if grouped by subid1) |
subid2 | SubID2 (only if grouped by subid2) |
subid3 | SubID3 (only if grouped by subid3) |
subid4 | SubID4 (only if grouped by subid4) |
currency | System currencies |
leads_sum | Number of leads |
sales_sum | Number of sales |
payment_sum_declined | The amount related to the rejected actions |
payment_sum_approved | The amount related to the confirmed actions |
payment_sum_open | The amount related to the actions on hold |
clicks | The number of clicks |
ecpc | eCPC |
cr | Conversion rate |