Click Aggregation API

Returns an aggregation on clicks based on custom indexes with commission totals. To make use of custom indexes click here.

GET: https://api.wecantrack.com/api/v2/clicks/aggregation
Request
Query Parameters
Parameter
Data Type
Available Options
Required
Description
last_clicks

Integer

Yes

Last n clicks. Max value 75000.

group_by

String

networks, network_accounts, custom_index_1..5

No

Specify the field that needs to be aggregated on. Multiple Group Bys can be done by comma separation e.g. custom_index_1, custom_index_2. Defaults to networks

custom_index_1..5

String

No

Filter on any custom index

networks

String

No

Filter on network IDs. Multiple filters possible by comma separation. Max elements 5

network_accounts

String

No

Filter on network account IDs. Multiple filters possible by comma separation. Max elements 5

order_by

String

clicks, commissions, sales, custom_index_1..5

No

Defaults to commissions

order_direction

String

desc or asc

No

Specify which direction the result needs to be ordered on. Defaults to desc

page

Number

Default 1

No

Current page cursor

limit

Number

Maximum limit of 1000

No

The total amount of results per request

Response
Header
Content-Type: application/json
200 Body - OK

Response Example

				
					[
    {
        "total_commission_USD": 160.40,
        "total_commission_EUR": 140,
        "custom_index_1": "123",
        "clicks": 421,
        "sales": 132
    },
    {
        "total_commission_USD": 36.48,
        "total_commission_EUR": 31,
        "custom_index_1": null,
        "clicks": 2021,
        "sales": 3
    },
    {},
    {},
]
...