Advertiser Report Export API

This api allows advertiser to export their reports data in csv format

API

The export api requires authentication both for retrieving and requesting an export.

Api request authentication

You must authenticate your request using your api authentication token.

You can get your authentication token from your user profile in the User Information section.

In order to authenticate your requests using the auth token you need to provide the following http header

    curl <url> -H 'Authorization: Token <auth_token>'

Demand a new export

Http Api Request

In order to request a new export you have to execute an HTTP POST request to the following endpoint

    https://dashboard.instal.com/advertiser/api/v1/reports/exports/

In the request body you have to put a json string with the following structure

{
    'start_date':'YYYY-MM-DD',
    'stop_date':'YYYY-MM-DD'
}

Request example using curl

    curl -X POST \
      https://dashboard.instal.com/advertiser/api/v1/reports/exports/ \
      -H 'Authorization: Token <auth_token>' \
      -H 'Content-Type: application/json' \
      -d '{"start_date":"2017-10-01", "stop_date":"2017-10-03"}'

If you want a more fine grained control over the export results you may want to use the additional parameters

Required Name Type Description
required start_date string Start date in 'YYYY-MM-DD' format
required stop_date string Stop date in 'YYYY-MM-DD' format
optional sorting string Field used for column sorting (time,campaign,aff_sub_id,cr) default campaign_id
optional format string Export file format default csv
optional csv_headers bool (if using csv format) Add field headers on top of the export, default true
optional interval string Report time resolution (hourly, daily, monthly) default daily

Response

The post response will contain the request id and status. you must keep the task id in order to be able to fetch the results once that the process will be completed

{
    "result": "QUEUED | ERROR", 
    "task_id": "<task_id>"
}

Retrieve an export

Request

To retrieve an export you have to use it's task_id performing an HTTP GET request to the following endpoint as follows

   https://dashboard.instal.com/advertiser/api/v1/reports/exports/<task_id> 

Response

The response is in standard json format structured as follows

{
    "state": "SUCCESS|PENDING", 
    "result": "<export download url>"
}

Example request using curl

curl https://dashboard.instal.com/advertiser/api/v1/reports/exports/<task_id> \
      -H 'Authorization: Token <auth_token>'

Response fields

Name Type Description
state string Task state SUCCESS or PENDING
result string If result is completed this field will contain the download url for the export otherwise it will be null

Export result

Csv

The resulting csv file will be structured as follows:

Column Type Description
aff_sub_id string Affiliate id
time int Time in format YYYY-MM-DD HH:mm
clicks_aggr int Clicks count aggregation
campaign string Campaign name
country string Country
creative_id string Creative name
app_id string App package name
campaign_id int Campaign id
cost_aggr float Costs aggregation
cr float Conversion rate
conversions_aggr int Conversions aggregation
name_os string Os name
version_os float Os version
lang string User language
publisher_id int publisher id