Raw Clicks Report

Operations to fetch raw clicks

In the endpoints documented here, each click is a “row” in the response. The data is not aggregated.

Important: While the clicks analytics are kept forever, the raw data used to create the response on these endpoints is only kept for a period of 3 months on the Everflow servers. Requests for time intervals that go beyond that period will not return clicks. Raw data for clicks that lead to conversions, however, is kept forever.


Click Report

POST /v1/affiliates/reporting/clicks/stream

This endpoint is used to extract a raw list of clicks. In the result of this request, each click will be one element / row. To avoid extremely slow response times and limit the size of the payload, this endpoint is limited in what it actually returns.

The maximum number of clicks that can be returned by this endpoint is : 5000. If there are more than 5000 clicks that match the request, they will not be returned.

Requests are only allowed for a period of 14 days of less. Requesting a longer period will result in an error (400 bad request).

This endpoint should not be used to extract every click from the platform.

Each request must contain :

  • from and to dates in YYYY-mm-DD HH:MM:SS format
  • timezone_id used for the request. Find all timezones here

but can also contain optional query filters.

Query filters allow you to limit the scope of the report returned by the API. You could create a filter to limit the reporting data to a single partner for example. You can use multiple filters in a request.

Filters that apply to the same resource_type will act as OR operator. Different resource_type work with an AND operator. The following filters :

{
  //...
  "query": {
    "filters": [
      {
          "filter_id_value": "883",
          "resource_type": "offer"
      },
      {
          "filter_id_value": "518",
          "resource_type": "offer"
      },
      {
          "filter_id_value": "United States",
          "resource_type": "country"
      }
    ]
  }
}

translate to “Pull reporting data for US traffic on offer 883 OR offer 518”.

The resource-type used in the filters and exclusions can take the following values :

offer, creative, country, carrier, device_platform, device_type, device_make, browser, language, connection_type, campaign, source_id, offer_url, device_model, s1, s2, s3, s4, s5, coupon_code

cURL
curl --request POST \
  --url https://api.eflow.team/v1/affiliates/reporting/clicks/stream \
  --header 'content-type: application/json' \
  --header 'X-Eflow-API-Key: <INSERT API KEY>' \
  --data '<INSERT PAYLOAD>'

Example 1 : Include only clicks that comes from the US or Canada and that have the "internal" value passed as a sub1.

{
    "from": "2022-02-08 16:30:00",
	"to": "2022-02-08 16:45:00",
    "timezone_id": 90,
    "query":
    {
        "filters":
        [
            {
                "filter_id_value": "internal",
                "resource_type": "s1"
            },
            {
                "filter_id_value": "Canada",
                "resource_type": "country"
            },
            {
                "filter_id_value": "United States",
                "resource_type": "country"
            }
        ]
    }
}

Example 2 : All clicks on 2 offers

{
    "from": "2022-02-01 12:30:00",
	"to": "2022-02-01 13:00:00",
    "timezone_id": 90,
    "query":
    {
        "filters":
        [
            {
                "filter_id_value": "882",
                "resource_type": "offer"
            },
            {
                "filter_id_value": "883",
                "resource_type": "offer"
            }
        ]
    }
}

Example 3 : Clicks that have a sub3 value of "test"

{
    "from": "2022-02-01 12:30:00",
    "to": "2022-02-01 13:00:00",
    "timezone_id": 90,
    "query":
    {
        "filters":
        [
            {
                "filter_id_value": "test",
                "resource_type": "s3"
            }
        ]
    }
}
Response
{
	"clicks": [
		{
			"transaction_id": "410da86457f54ae388a871d54a33275b",
			"is_unique": 1,
			"unix_timestamp": 1702313995,
			"tracking_url": "www.tracking-link.com",
			"source_id": "",
			"sub1": "facebook",
			"sub2": "",
			"sub3": "",
			"sub4": "",
			"sub5": "",
			"revenue_type": "CPA",
			"revenue": 0,
			"referer": "",
			"error_code": 0,
			"user_ip": "127.0.0.1",
			"error_message": "N/A",
			"idfa": "",
			"idfa_md5": "",
			"idfa_sha1": "",
			"google_ad_id": "",
			"google_ad_id_md5": "",
			"google_ad_id_sha1": "",
			"android_id": "",
			"android_id_md5": "",
			"android_id_sha1": "",
			"relationship": {
				"offer": {
					"network_offer_id": 1,
					"network_id": 1,
					"name": "Example Offer",
					"offer_status": "active",
					"network_tracking_domain_id": 1
				},
				"geolocation": {
          "country_code": "US",
          "country_name": "United States",
          "region_code": "",
          "region_name": "California",
          "city_name": "Burbank",
          "dma": 803,
          "dma_name": "Los Angeles, CA",
          "timezone": "America/Los_Angeles",
          "carrier_name": "T-Mobile USA",
          "carrier_code": 0,
          "organization": "",
          "isp_name": "T-mobile Usa Inc.",
          "is_mobile": false,
          "is_proxy": false,
          "postal_code": ""
        },
        "device_information": {
          "is_mobile": true,
          "platform_name": "macOS",
          "os_version": "",
          "brand": "Apple",
          "model": "",
          "is_tablet": false,
          "browser_name": "Safari",
          "browser_version": "",
          "device_type": "PC",
          "language": "fr",
          "http_accept_language": "",
          "is_robot": false,
          "is_filter": false
        },
				"query_parameters": {
					"__cc": "SUMMER"
				}
			},
			"currency_id": "USD",
			"coupon_code": "SUMMER"
		}
	]
}

Click By ID

GET /v1/affiliates/reporting/clicks/:transactionId

Fetch a single click by its unique Everflow transaction ID.

Path Parameters

Parameter Description
transactionId The Click ID (32 char)

cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/reporting/clicks/<32 char Transaction ID>' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
	"transaction_id": "d746e9ab66914764b6a0cf6ab25d0cdf",
	"is_unique": 1,
	"unix_timestamp": 1661970238,
	"tracking_url": "www.tracking-domain.test",
	"source_id": "",
	"sub1": "internal",
	"sub2": "",
	"sub3": "facebook",
	"sub4": "",
	"sub5": "",
	"revenue_type": "CPA",
	"revenue": 0,
	"referer": "",
	"error_code": 0,
	"user_ip": "68.26.161.189",
	"error_message": "N/A",
	"idfa": "",
	"idfa_md5": "",
	"idfa_sha1": "",
	"google_ad_id": "",
	"google_ad_id_md5": "",
	"google_ad_id_sha1": "",
	"android_id": "",
	"android_id_md5": "",
	"android_id_sha1": "",
	"relationship": {
		"offer": {
			"network_offer_id": 3,
			"network_id": 1,
			"name": "Example Offer Name",
			"offer_status": "active",
			"network_tracking_domain_id": 1
		},
		"geolocation": {
			"country_code": "US",
			"country_name": "United States",
			"region_code": "",
			"region_name": "California",
			"city_name": "Burbank",
			"dma": 803,
			"dma_name": "Los Angeles, CA",
			"timezone": "America/Los_Angeles",
			"carrier_name": "T-Mobile USA",
			"carrier_code": 0,
			"organization": "",
			"isp_name": "T-mobile Usa Inc.",
			"is_mobile": false,
			"is_proxy": false,
			"postal_code": ""
		},
		"device_information": {
			"is_mobile": true,
			"platform_name": "macOS",
			"os_version": "",
			"brand": "Apple",
			"model": "",
			"is_tablet": false,
			"browser_name": "Safari",
			"browser_version": "",
			"device_type": "PC",
			"language": "fr",
			"http_accept_language": "",
			"is_robot": false,
			"is_filter": false
		},
		"query_parameters": null
	},
	"currency_id": "USD",
	"coupon_code": "SUMMER"
}