Time to read: 7 min

The article covers the following topics:

General Info

First of all, to get started with API, you need to find your API-key. To do it, just navigate to 'Users' Tab - > 'Users management' -> 'User edit page'.

Only the General manager has permission to get the 'User edit page'.

Next thing you need is API URL, you can find it in 'Settings' Tab -> 'Settings' -> 'Tracking domains' -> 'URLs' section.

Find out more about where you can find your/Affiliate's API-key and API URL here.

API Request Structure: GET/POST + api domain + path + ? + api-key=189471975956279174174.

It should be noted that header content-type - application/x-www-form-urlencoded is used on an ongoing basis.

Below will be introduced commonly used Statistics methods with examples of usage.

[GET] Custom Statistics

To get custom statistics data via API, you need to navigate to the 'Statistics' section in the API Doc and choose the 'Custom statistics' method (follow the link):

Here you may see a lot of parameters that can be used to receive needed data. Some of the parameters are required:

  • slice[] - enter needed available custom slice or slices (hour, month, quarter, year, day, offer, country, city, os, os_version, device, device_model, browser, goal, sub1, sub2, sub3, sub4, sub5).

Additional slices only for General manager: advertiser, affiliate, manager, smart_id.

Additional slices only for users with special permissions: trafficback_reason. You can manage user's permissions via Admin panel in 'Users' section - > 'User management' -> 'User edit page'.

  • filter[date_from] - enter the date from which you want to get statistics in the format: YYYY-MM-DD.

  • filter[date_to] - enter the date to which you want to get statistics in the format: YYYY-MM-DD.

Example on how to get custom statistics via API:

https://api-rocketcompany.affise.com/3.0/stats/custom?api-key=a227fe0ec61dd5467368266c12345678&slice[]=hour&filter[date_from]=2020-02-24&filter[date_to]=2020-02-27

The response will look like:

❗ The numbers in the Actions array in the Total array are shown according to the conversions' statuses in the API-request.

[GET] Conversions

To get conversions data via API, you need to navigate to the Statistics section in the API Doc and choose the 'Conversions' method (follow the link):

❗ Conversions statistics available only for users who have permission to view the Statistics section (conversions list READ/ WRITE permission).

Example on how to get conversions via API:

https://api-rocketcompany.affise.com/3.0/stats/conversions?api-key=a227fe0ec61dd5467368266c1234567

The response is to look like:

__api-demo.affise.com_3.0_stats_conversions_api-key=0a245fefb75f40dc9.. 2022-05-26 at 12.20.04 PM

[GET] Conversion

To get conversions statistics data via API, you need to navigate to the 'Statistics' section in API Doc and choose 'Conversions' method (follow the link):

❗ Keep in mind that Conversion statistics is available only for General manager users.

Example on how to get conversions statistics via API:

https://api-rocketcompany.affise.com/3.0/stats/conversionsbyid?api-key=a227fe0ec61dd5467368266c12345678&id=5e575ee7c0417b8d008b456d

The response will look like:

❗ Avoid using action_id instead of conversion_id. Otherwise, the conversion will not be found, because action_id sends by Advertiser, and conversion_id generates by Affise system. You can get conversion_id via [GET] Conversions method, where conversion_id is id.

[GET] Clicks

To get clicks statistics data via API, you need to navigate to the 'Statistics' section in API Doc and choose 'Clicks' method (follow the link):

Here you may see a lot of parameters that can be used to receive needed data. Some of the parameters are required:

  • date_from - enter date from which you want to get statistics in the format: YYYY-MM-DD.

  • date_to - enter date to which you want to get statistics in the format: YYYY-MM-DD.

❗ Keep in mind that Clicks statistics available only for General manager users. You can check the clicks statistics for not more than the last 7 days.

Example on how to get clicks statistics for the one day via API:

https://api-rocketcompany.affise.com/3.0/stats/clicks?api-key=35d1e0b180bea77b8545ec1d12345678&date_from=2020-04-01&date_to=2020-04-01

The response will look like:

[GET] By cap

To get Cap statistics data via API, you need to navigate to the 'Statistics' section in the API Doc and choose the 'By cap' method (follow the link):

Here you may see a lot of parameters that can be used to receive needed data. Some of the parameters are required:

  • offer_id[] - Offer's ID.

  • fields[] - Fields for each offer in response. Available values: stats, stats_merged, descr.

❗ Keep in mind that statistics By cap available only for General manager users.

Example on how to get Cap statistics via API:

https://api-rocketcompany.affise.com/3.0/stats/caps?api-key=35d1e0b180bea77b8545ec1d12345678&offer_id[]=132049&fields[]=stats

The response will look like:

You may also find the following articles helpful:


If you have more questions on how to use Statistics methods, feel free to contact the Affise Support Team via [email protected] or your Dedicated Account Manager.

Did this answer your question?