How to use the Partner API

Overview

Maybe you already read it in the getting started guide: in the export section of your partner UI, you can export most of the data relevant for you in CSV, XLS and XML format. In some cases however, you might want to import data automatically. This article explains you how to do so.

Creating a report an export URL

To prepare your automated data import, you need to create an export URL. The easiest way to do this is to get the download link in the export section of your UI. Just login,  and click on export in the main navigation menu. Proceed to select the kind of data you want to export and the file type you want the data to be exported in. As was mentioned above, you can choose from CSV, XLS and XML formats. Just right-click on the relevant format icon in the relevant row and select the target URL via the browser window. Suppose you choose the day to day reporting and want to export them in CSV format. In this case, your URL will look more or less like this:

1 https://export-demonet.ingenioustech.biz/256a6f26-b72b-37f8e24ee373/statsdaily_2209.csv?jobid=30578a36

This link contains the following elements:

  • The https:// is the protocol.

  • The export-demonet.network.biz is the domain. The export element is used for all export links related to the platform, the other elements identify the platform you are admitted to. Your domain will be different than the presented one and specific to the network you work with.

  • The 256a6f26-b72b-37f8e24ee373/statsdaily_2209.csv element is called the path. It can be subdivided in the following elements:

    • The 256a6f26-b72b-37f8e24ee373/ is the magic key, which identifies you as a partner.

    • The statsdaily element is name of the report.

    • _2209 is the user ID identifying you as the user for which the report is generated.

  • The .csv element is the file extension, indicating the format you choose.

  • The jobid is used to identify the export in the context of your partner UI.

Applying filters

To prepare your link for automated usage, start by removing the jobid from the export link. After you have removed the jobid, you need to apply filters to specify the data you export automatically. You can find a complete overview of the available filters in the table below.

These filters need to be added to the export link using the following structure:

filter[filtername]=filtervalue

Place the first filter immediately after the question mark in the export link and begin all further elements with an ampersand. If you do so, your link will look more or less like this:

1 https://export-demonet.ingenioustech.biz/256a6f26-b72b-37f8e24ee373/statsdaily_2209.csv?filter[a:advertiser]=123&filter[timerange_type]=dynamic&filter[timerange]=thisweek1&filter[a:status]=3

Filter description

Filter name

Compulsory

Format

Filter description

Filter name

Compulsory

Format

This filter allows you to filter data by advertiser.

a:advertiser

No

Use the ID of the advertiser. You can find them by exporting the advertiser list in the export section. Please note you can use multiple IDs at a time.

This filter defines whether the time frame you select relates to the moment on which conversions were updated or tracked.

timetype

No. If the filter is not used, the time frame will relate to moment on which conversions were tracked.

Either use ‘tracking’ or ‘updated’.

This filter allows you to define whether the time frame for which you want a report is absolute (exact dates) or dynamic (for example: last ten days, last month, etc).

timerange_type

Yes

Either use absolute or ‘dynamic.

If you are using a dynamic time frame, you need to specify it here.

timerange

Only if you select a dynamic time frame.

Please for a full overview, read the article Dynamic time range options.

If you are using an absolute time frame, you need to define a date on which the frame starts.

date_from

Only if you select an absolute time frame.

dd.mm.yyyy

If you are using an absolute time frame, you need to define a date on which the frame ends.

date_to

Only if you select an absolute time frame.

dd.mm.yyyy

To limit the output to conversions with a specific status, use this filter.

a:status

No

  • 0 for open,

  • 1 for approved,

  • 2 for rejected

  • and 3 for confirmed.

Please note you can use multiple values at a time.

This filter allows you to filter data by currency.

currencycode

No

Use the ISO 4217 currency code. Please note you can only use one currency code at a time.

This filter allows you to include sub IDs in the report.

allsmcs

No

Use true to include the sub IDs.

Available export files

Apart from the day to day reporting, which is called statsdaily, the following reports are available:

To use them, all you have to do is replace the name of the report.

Server restraints

Due to limited server capacity, the maximum number of files you can export is 10 per report per hour.