Reports by actions¶
Parameters¶
HTTP method |
Access rights |
URL | Parameters |
Note |
---|---|---|---|---|
GET | statistics | https://api.admitad.com/statistics/actions/ |
|
Statistical data on actions.* |
* Returns the result in the JSON format.
** Sets skipping and the number of records returned. For example limit=5&offset=2.
*** Filter by dates, ad spaces, affiliate programs, subIDs, source, status, keywords, actions, rates, payment IDsБ and types of rates, 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. The values for dates status_updated_start and status_updated_end should be in format %d.%m.%Y %H:%M:%S - 01.05.2012 21:12:01.
**** Filter by processing status. Possible values: 0/1 - unprocessed/processed
***** Filter by status of payment to the publisher. Possible values: 0/1 - unpaid/paid
****** The parameter that allows to obtain aggregated data for the entire request. Possible values: 1/0 - aggregated data/not aggregated result
******* Sorting order. Possible values:
- datetime
Sign ‘-‘ before the value means inverse sort order. For example, order_by=-clicks&order_by=cr.
Example of use¶
Example of a request with utility ``curl``:
curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/statistics/actions/?date_start=01.01.2011&limit=2&order_by=date&offset=1&action_id=12&total=0
Example of the response from the API server in the JSON format:
{
"results": [
{
"status": "pending",
"comment": null,
"conversion_time": 135,
"keyword": null,
"advcampaign_name": "AdvCamp 1",
"advcampaign_id": 6,
"cart": null,
"subid": null,
"subid1": null,
"subid2": null,
"subid3": null,
"subid4": null,
"click_user_referer": null,
"currency": "USD",
"action_date": "2011-02-22 19:54:34",
"website_name": "site1",
"action": "action name",
"click_date": "2011-02-22 19:52:19",
"payment": 70.0,
"tariff_id": 11,
"banner_id": 131,
"action_id": 241,
"processed": 1,
"paid": 0,
"order_id": "999",
"closing_date": "2012-04-02",
"action_type": "lead",
"status_updated": "2011-09-16 23:13:35",
"positions": [
{
"tariff_id": 1,
"payment": "12.00",
"rate": null,
"datetime": "2011-02-22 20:12:04",
"amount": "32.00",
"percentage": false,
"product_url": "",
"id": 1
},
{
"tariff_id": 1,
"payment": "23.00",
"rate": null,
"datetime": "2011-02-22 21:37:14",
"amount": "32.00",
"percentage": false,
"product_url": "",
"id": 2
}
]
},
{
"status": "pending",
"comment": null,
"conversion_time": 844,
"keyword": null,
"advcampaign_name": "AdvCamp 1",
"advcampaign_id": 6,
"cart": 90,
"subid": null,
"subid1": null,
"subid2": null,
"subid3": null,
"subid4": null,
"click_user_referer": null,
"currency": "USD",
"action_date": "2011-02-24 18:58:14",
"website_name": "site1",
"action": "action name",
"click_date": "2011-02-24 18:44:10",
"payment": 45.0,
"tariff_id": 11,
"banner_id": 91,
"action_id": 242,
"processed": 0,
"paid": 0,
"order_id": "998",
"action_type": "sale",
"closing_date": "2012-04-02",
"status_updated": "2011-09-16 23:08:31",
"positions": [
{
"tariff_id": 1,
"payment": "12.00",
"rate": null,
"datetime": "2011-02-24 21:41:01",
"amount": "32.00",
"percentage": false,
"product_url": "http://example.com/test/product/url",
"id": 3
},
{
"tariff_id": 1,
"payment": "12.00",
"rate": null,
"datetime": "2011-02-24 22:22:47",
"amount": "32.00",
"percentage": false,
"product_url": "http://example.com/test/product/url"
"id": 4
}
]
}
],
"_meta": {
"count": 55,
"limit": 2,
"offset": 1
}
}
Example of a request with utility ``curl``:
curl -L -H 'Authorization: Bearer access_token' -X GET https://api.admitad.com/statistics/actions/?date_start=01.01.2011&limit=2&order_by=date&offset=1&action_id=12&total=1
Example of the response from the API server in the JSON format:
[
{
"currency": "RUB"
"payment_sum": 1462248.20,
"cart": 1640014.39
},
{
"currency": "USD"
"payment_sum": 1470220.86,
"cart": 1654822.73
},
{
"currency": "EUR"
"payment_sum": 1463807.20,
"cart": 1638854.84
}
]
Description of API server response fields¶
Name |
Description |
---|---|
action_id | Payment ID |
advcampaign_name | Name of affiliate program |
advcampaign_id | Affiliate program ID |
website_name | Name of ad space |
status | Status (pending/approved/declined/approved_but_stalled - on hold/confirmed/declined/confirmed but delayed). “Confirmed but delayed” means that the advertiser’s account currently has insufficient funds for payment. |
comment | Comment |
action_date | Date of action |
action_type | Type of action (lead/sale) |
payment | Amount of payment |
action | Name of rate |
tariff_id | Rate ID |
currency | System currencies |
conversion_time | Conversion time |
keyword | Keyword |
cart | Order amount |
subid(1-4) | SubID |
click_date | Click time |
click_user_referer | Click referrer |
click_country_code | Сode of the country where the click was registered |
banner_id | Banner ID |
closing_date | Actual date of payment processing |
status_updated | Date and time of the payment status change |
processed | Processing state - Yes/No(1/0). “Processed” when the status is “Confirmed” means that the funds have been credited to the publisher’s account. |
paid | Status of payment to the publisher - Yes/No (1/0). |
order_id | Order number on the advertiser’s end |
positions | Order items |
Description of order items fields¶
Name |
Description |
---|---|
id | Item identifier |
tariff_id | Rate ID |
datetime | Date and time of item registration |
amount | Amount of payment (price * quantity) |
payment | Payment to the publisher |
rate | Rate |
product_url | Link to the purchased product |
product_id | Product ID |
product_name | Product name |
product_image | Link to product image |
percentage | Interest-based nature of the rate (True if the rate is interest-based) |
Total request fields description¶
Name |
Description |
---|---|
currency | System currencies |
payment_sum | Amount of payments |
cart | Amount of orders |