'
##### Response
{
"click":
{
"transaction_id": "93680ac61eb047fab77347734520967f",
"is_unique": 1,
"unix_timestamp": 1625058552,
"tracking_url": "www.tracking-domain.com",
"source_id": "",
"sub1": "s1",
"sub2": "",
"sub3": "facebook",
"sub4": "",
"sub5": "app_store",
"payout_type": "CPA",
"revenue_type": "RPA",
"payout": 0,
"revenue": 0,
"referer": "",
"previous_network_offer_id": 0,
"error_code": 0,
"project_id": "",
"user_ip": "74.14.245.141",
"error_message": "N/A",
"url": "",
"is_view_through": false,
"is_async": false,
"server_side_url": "",
"server_side_output": "",
"custom_landing_page_id": 0,
"is_test_mode": false,
"idfa": "",
"idfa_md5": "",
"idfa_sha1": "",
"google_ad_id": "",
"google_ad_id_md5": "",
"google_ad_id_sha1": "",
"android_id": "",
"android_id_md5": "",
"android_id_sha1": "",
"error_filter_id": "",
"has_conversion": true,
"is_pass_through": false,
"creative_id": 0,
"relationship":
{
"offer":
{
"network_offer_id": 5,
"network_id": 1,
"network_advertiser_id": 13,
"network_offer_group_id": 0,
"name": "CPA Offer",
"offer_status": "active",
"network_tracking_domain_id": 1,
"visibility": "require_approval",
"currency_id": "USD"
},
"advertiser":
{
"network_advertiser_id": 13,
"network_id": 1,
"name": "Ads for Everyone",
"account_status": "active"
},
"account_manager":
{
"network_employee_id": 1,
"network_id": 1,
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"account_status": "active"
},
"affiliate":
{
"network_affiliate_id": 113,
"network_id": 1,
"name": "Digital Supply",
"account_status": "active",
"network_traffic_source_id": 0
},
"affiliate_manager":
{
"network_employee_id": 1,
"network_id": 1,
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"account_status": "active"
},
"geolocation":
{
"country_code": "CA",
"country_name": "Canada",
"region_code": "QC",
"region_name": "Quebec",
"city_name": "Greenfield Park",
"dma": 0,
"dma_name": "",
"timezone": "America/Montreal",
"carrier_name": "",
"carrier_code": 0,
"organization": "Bell Canada",
"isp_name": "bell canada",
"is_mobile": false,
"is_proxy": false,
"postal_code": "j4v 2v7"
},
"device_information":
{
"is_mobile": false,
"platform_name": "macOS",
"os_version": "10.15",
"brand": "Apple",
"model": "Macintosh",
"is_tablet": false,
"browser_name": "Chrome",
"browser_version": "91",
"device_type": "PC",
"language": "en",
"http_accept_language": "en-US,en;q=0.9",
"is_robot": false,
"is_filter": false
},
"http_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36",
"http_accept_language": "en-US,en;q=0.9",
"query_parameters":
{},
"redirect_url": "https://landing-page.com",
"forensiq_score": "0"
},
"coupon_code": "",
"redirect_method": "standard",
"is_sdk_click": false
},
"conversions":
{
"total": 1,
"entries":
[\
{\
"conversion_id": "d51bc674770f40b68a08f8f65fa2a344",\
"conversion_unix_timestamp": 1625058585,\
"sub1": "",\
"sub2": "",\
"sub3": "",\
"sub4": "",\
"sub5": "",\
"source_id": "",\
"status": "approved",\
"payout_type": "cpa",\
"revenue_type": "rpa",\
"payout": 3.5,\
"revenue": 7,\
"session_user_ip": "74.14.245.141",\
"conversion_user_ip": "74.14.245.141",\
"country": "Canada",\
"region": "Quebec",\
"city": "Greenfield Park",\
"dma": 0,\
"carrier": "",\
"platform": "macOS",\
"os_version": "10.15",\
"device_type": "PC",\
"device_model": "",\
"brand": "Apple",\
"browser": "Chrome",\
"language": "en",\
"http_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36",\
"adv1": "",\
"adv2": "",\
"adv3": "",\
"adv4": "",\
"adv5": "",\
"is_event": false,\
"event": "",\
"notes": "",\
"transaction_id": "93680ac61eb047fab77347734520967f",\
"click_unix_timestamp": 1625058552,\
"error_code": 0,\
"error_message": "N/A",\
"sale_amount": 0,\
"is_scrub": false,\
"coupon_code": "",\
"order_id": "",\
"url": "",\
"isp": "bell canada",\
"referer": "",\
"app_id": "",\
"idfa": "",\
"idfa_md5": "",\
"idfa_sha1": "",\
"google_ad_id": "",\
"google_ad_id_md5": "",\
"google_ad_id_sha1": "",\
"android_id": "",\
"android_id_md5": "",\
"android_id_sha1": "",\
"currency_id": "USD",\
"email": "",\
"is_view_through": false,\
"previous_network_offer_id": 0,\
"relationship":\
{\
"offer":\
{\
"network_offer_id": 5,\
"network_id": 1,\
"network_advertiser_id": 13,\
"network_offer_group_id": 0,\
"name": "CPA Offer",\
"offer_status": "active",\
"network_tracking_domain_id": 1,\
"visibility": "require_approval",\
"currency_id": "USD"\
},\
"advertiser":\
{\
"network_advertiser_id": 13,\
"network_id": 1,\
"name": "Ads for Everyone",\
"account_status": "active"\
},\
"account_manager":\
{\
"network_employee_id": 1,\
"network_id": 1,\
"first_name": "John",\
"last_name": "Doe",\
"full_name": "John Doe",\
"account_status": "active"\
},\
"affiliate":\
{\
"network_affiliate_id": 113,\
"network_id": 1,\
"name": "Digital Supply",\
"account_status": "active",\
"network_traffic_source_id": 0\
},\
"affiliate_manager":\
{\
"network_employee_id": 1,\
"network_id": 1,\
"first_name": "John",\
"last_name": "Doe",\
"full_name": "John Doe",\
"account_status": "active"\
},\
"query_parameters": {},\
"attribution_method": "transaction_id",\
"usm_data": null\
},\
"network_offer_payout_revenue_id": 0\
}\
]
},
"pixels":
{
"total": 1,
"entries":
[\
{\
"network_id": 1,\
"network_offer_id": 5,\
"network_offer_payout_revenue_id": 0,\
"affiliate_id": 114,\
"pixel_id": 329,\
"conversion_id": "d51bc674770f40b68a08f8f65fa2a344",\
"transaction_id": "93680ac61eb047fab77347734520967f",\
"timestamp": 1625058585,\
"delivery_method": "postback",\
"pixel_level": "global",\
"pixel_status": "active",\
"pixel_type": "conversion",\
"payload": "http://partner-pixel.io/?tid=93680ac61eb047fab77347734520967f",\
"is_success": true,\
"debug_information": "PostbackUrl: http://partner-pixel.io/?tid=93680ac61eb047fab77347734520967f\nStatus: 200\nScheme: \nPath: \nAuthority: \nHeaders: Keep-Alive: [timeout=5, max=100],Server: [Apache/2.4.10 (Debian)],Connection: [Keep-Alive],Content-Length: [61],Date: [Wed, 30 Jun 2021 13:09:45 GMT],Content-Type: [text/html; charset=UTF-8]\nReturn: Array\n(\n [tid] => 93680ac61eb047fab77347734520967f\n)\n\n",\
"last_attempt": 0,\
"failed_attempts": 0,\
"relationship":\
{\
"offer":\
{\
"network_offer_id": 5,\
"network_id": 1,\
"network_advertiser_id": 13,\
"network_offer_group_id": 0,\
"name": "CPA Offer",\
"offer_status": "active",\
"network_tracking_domain_id": 1,\
"visibility": "require_approval",\
"currency_id": "USD"\
},\
"affiliate":\
{\
"network_affiliate_id": 113,\
"network_id": 1,\
"name": "Digital Supply",\
"account_status": "active",\
"network_traffic_source_id": 0\
}\
}\
}\
]
},
"raw_click": "",
"on_hold_conversions":
{
"total": 0,
"entries":
[]
}
}
---
# Raw Conversions Report | Everflow
Raw Conversions Report
======================
Operations to fetch raw conversions
The endpoints documented in this section allow you to pull conversions and post-conversion events from the API. Each conversion / event will be a “row” in the response as the data is not aggregated.
Note that currency conversion is not supported on raw conversion endpoints. Conversions are always stored in the currency of the offer they belong to and this is how the endpoints return raw conversions.
Are you looking to fetch all your conversions? If so, the [Firehose](https://developers.everflow.io/docs/network/reporting/firehose/)
might be suited for your use case.
* * *
### Conversion Report
POST `/v1/networks/reporting/conversions`
The conversion report is the most flexible way to extract a list of conversions and post-conversion events. It allows you to fetch a list of conversions and post-conversion events while specifying filters to narrow down the scope of the set of data you are pulling.
If you are only looking to pull a limited set of columns in your response, you must use the Conversion Report Export endpoint documented below.
Each request must contain :
* `from` and `to` dates (format can be `YYYY-mm-DD or YYYY-mm-DD hh:mm:ss`)
* The `timezone_id` used for the request. Find all timezones [here](https://developers.everflow.io/docs/metadata/timezones/)
* A `show_conversions` boolean value that determines whether base conversions are returned (`true` / `false`)
* A `show_events` boolean value that determines whether post-conversion events are returned (`true` / `false`)
Please note that the conversion report is limited to the prior 365 days only and are limited to a **maximum duration of one year**. Requests outside of this range will result in an error.
Optional query filters can be added to the call
#### Paging
This endpoint supports paging. Refer to our [User Guide](https://developers.everflow.io/docs/user-guide/paging/)
for usage.
#### [Query Filters](https://developers.everflow.io/docs/network/reporting/raw_conversions/#ddbbabcdaf)
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 conversions for US traffic on offer 883 OR offer 518”.
#### [Filter Resource Types](https://developers.everflow.io/docs/network/reporting/raw_conversions/#fdbcdaebfb)
The `resource-type` used in the query filters can take the following values :
`offer`, `offer_group`, `affiliate`, `advertiser`, `offer_creative`, `transaction_id`, `campaign`, `billing_frequency`, `business_unit`, `label`, `category`, `sub1`, `sub2`, `sub3`, `sub4`, `sub5`, `source_id`, `country`, `account_manager`, `affiliate_manager`, `status`, `sales_manager`, `account_executive`, `offer_url`, `currency_id`, `affiliate_tier`, `adv1`, `adv2`, `adv3`, `adv4`, `adv5`, `browser`, `carrier`, `city`, `coupon_code`, `dma`, `device_brand`, `device_type`, `isp`, `language`, `os_version`, `platform`, `region`, `order_id`
#### [Additional Settings](https://developers.everflow.io/docs/network/reporting/raw_conversions/#cddefdebdc)
Conversion reports support a few more options :
* `show_only_scrub` : defaults to `false` when omitted – can be used to isolate conversions that were throttled
* `show_only_vt` : defaults to `false` when omitted – can be used to isolate view-through conversions
* `show_only_ct` : defaults to `false` when omitted – can be used to isolate click-through events
* `show_only_fail_traffic` : defaults to `false` when omitted – can be used to isolate conversion and events that come from fail traffic
{
"from": "2021-10-12",
//...
"show_only_scrub": true,
"show_only_vt": false,
"show_only_ct": false,
"show_only_fail_traffic": false,
"query": {
// ...
}
}
#### [Examples](https://developers.everflow.io/docs/network/reporting/raw_conversions/#aaeccfeddd)
Here are a few variations of what you can pass as a payload in ithe following call :
curl --request POST 'https://api.eflow.team/v1/networks/reporting/conversions' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example 1** : Pull all approved base conversions over a 1 hour period
{
"from": "2022-02-08 13:00:00",
"to": "2022-02-08 14:00:00",
"timezone_id": 67,
"show_conversions": true,
"show_events": false,
"query":{
"filters": [\
{\
"filter_id_value": "approved",\
"resource_type": "status"\
}\
]
}
}
Conversion status is either `approved`, `pending`, `rejected` or `invalid`
**Example 2** : Pull pending view-through conversions on offer ID 800
{
"from": "2022-02-07",
"to": "2022-02-10",
"timezone_id": 80,
"show_conversions": true,
"show_events": true,
"show_only_vt": true,
"query":{
"filters": [\
{\
"filter_id_value": "pending",\
"resource_type": "status"\
},\
{\
"filter_id_value": "800",\
"resource_type": "offer"\
}\
]
}
}
**Example 3** : Pull all conversions and events that were generated from either of these 2 transaction IDs
{
"from": "2022-02-01",
"to": "2022-02-10",
"timezone_id": 80,
"show_conversions": true,
"show_events": true,
"query":{
"filters": [\
{\
"filter_id_value": "e33e03d630a04f499835cfa3d3158baf",\
"resource_type": "transaction_id"\
},\
{\
"filter_id_value": "2718b9f7adeb4d98869767bc1202edf5",\
"resource_type": "transaction_id"\
}\
]
}
}
**Example 4** : Pull base conversions that were generated from a specific advertiser
{
"from": "2022-02-01",
"to": "2022-02-01",
"timezone_id": 90,
"show_conversions": true,
"show_events": true,
"query":{
"filters": [\
{\
"filter_id_value": "135",\
"resource_type": "advertiser"\
}\
]
}
}
#### [Response](https://developers.everflow.io/docs/network/reporting/raw_conversions/#fcbcccfbad)
A response from the conversion report endpoint will look like :
{
"conversions": [\
{\
"conversion_id": "5d6de3955fcd473fa19ddf33ef9a3b8f",\
"conversion_unix_timestamp": 1643691617,\
"sub1": "inapp",\
"sub2": "external",\
"sub3": "",\
"sub4": "",\
"sub5": "facebook",\
"source_id": "1000",\
"status": "approved",\
"payout_type": "cpa",\
"revenue_type": "rpa",\
"payout": 0.8,\
"revenue": 1,\
"session_user_ip": "80.21.15.xxx",\
"conversion_user_ip": "1.2.3.4",\
"country": "Italy",\
"region": "Milano",\
"city": "Arluno",\
"dma": 0,\
"carrier": "",\
"platform": "iOS",\
"os_version": "10.3",\
"device_type": "Mobile",\
"device_model": "",\
"brand": "Apple",\
"browser": "Facebook for iOS",\
"language": "en",\
"http_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 [FBAN/FBIOS;FBAV/141.0.0.51.91;FBBV/71695290;FBDV/iPhone9,2;FBMD/iPhone;FBSN/iOS;FBSV/10.3.3;FBSS/3;FBCR/AT&T;FBID/phone;FBLC/es_LA;FBOP/5;FBRV/0]",\
"adv1": "",\
"adv2": "",\
"adv3": "",\
"adv4": "",\
"adv5": "",\
"is_event": false,\
"event": "Example Event",\
"notes": "",\
"transaction_id": "042760c2eee8473fb17eec59dfe9de75",\
"click_unix_timestamp": 1643691604,\
"error_code": 0,\
"error_message": "N/A",\
"sale_amount": 96,\
"is_scrub": false,\
"coupon_code": "",\
"order_id": "",\
"url": "",\
"isp": "telecom italia s.p.a.",\
"referer": "",\
"app_id": "",\
"idfa": "",\
"idfa_md5": "",\
"idfa_sha1": "",\
"google_ad_id": "",\
"google_ad_id_md5": "",\
"google_ad_id_sha1": "",\
"android_id": "",\
"android_id_md5": "",\
"android_id_sha1": "",\
"currency_id": "USD",\
"email": "",\
"is_view_through": false,\
"previous_network_offer_id": 0,\
"relationship": {\
"offer": {\
"network_offer_id": 882,\
"network_id": 1,\
"name": "Example Offer",\
"offer_status": "active"\
},\
"advertiser": {\
"network_advertiser_id": 135,\
"network_id": 1,\
"name": "Advertiser Inc."\
},\
"account_manager": {\
"network_employee_id": 15,\
"network_id": 1,\
"first_name": "John",\
"last_name": "Doe",\
"full_name": "John Doe",\
"account_status": "active"\
},\
"affiliate": {\
"network_affiliate_id": 102,\
"network_id": 1,\
"name": "Affiliate Inc.",\
"account_status": "active"\
},\
"affiliate_manager": {\
"network_employee_id": 8,\
"network_id": 1,\
"first_name": "Jane",\
"last_name": "Doe",\
"full_name": "Jane Doe",\
"account_status": "active"\
},\
"query_parameters": {},\
"attribution_method": "cookie",\
"usm_data": null\
},\
"network_offer_payout_revenue_id": 0\
},\
// ...\
],
"paging": {
"page": 1,
"page_size": 50,
"total_count": 3443
}
}
* * *
### Conversion Report Export
POST `/v1/networks/reporting/conversions/export`
The export endpoint is very similar to the report endpoint documented above but adds 2 possibilities :
* It lets you “export” the data in CSV or JSON format
* It optionally lets your specify the columns you want included in your report
Please note that when using the JSON format, the results will be [newlined delimited JSON](https://en.wikipedia.org/wiki/JSON_streaming)
.
You must add the `format` properly to the payloads from the regular table endpoint for requests to work on this endpoint. The `format` can be either :
* `csv`
* `json`
The columns that will be included in the response can also be specified. The possible values are : `offer`, `affiliate`, `advertiser`, `offer_group`, `campaign`, `affiliate_manager`, `creative`, `offer_url`, `category`, `previous_offer`, `source_id`, `sub1`, `sub2`, `sub3`, `sub4`, `sub5`, `adv1`, `adv2`, `adv3`, `adv4`, `adv5`, `country`, `region`, `city`, `platform`, `os_version`, `isp`, `account_manager`, `android_id`, `android_id_md5`, `android_id_sha1`, `app_id`, `brand`, `browser`, `carrier`, `click_date`, `conversion_id`, `conversion_user_ip`, `coupon_code`, `currency`, `delta_hours`, `device`, `email`, `error_message`, `event_name`, `google_ad_id`, `google_ad_id_md5`, `google_ad_id_sha1`, `http_user_agent`, `idfa`, `idfa_md5`, `idfa_sha1`, `language`, `notes`, `order_id`, `order_line_items`, `order_number`, `payout`, `payout_type`, `referrer`, `revenue`, `revenue_type`, `sale_amount`, `session_ip`, `transaction_id`, `type`, `status`, `conversion_date` and `origin`
#### [Examples](https://developers.everflow.io/docs/network/reporting/raw_conversions/#cdfbfdbada)
##### cURL
curl --request POST 'https://api.eflow.team/v1/networks/reporting/conversions/export' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example** : Export approved conversions on offer 800 in JSON format. Only include 4 specific columns.
{
"from": "2022-02-07",
"to": "2022-02-10",
"timezone_id": 80,
"show_conversions": true,
"show_events": true,
"show_only_vt": true,
"query":{
"filters": [\
{\
"filter_id_value": "approved",\
"resource_type": "status"\
},\
{\
"filter_id_value": "800",\
"resource_type": "offer"\
}\
]
},
"columns": [\
"offer", "affiliate", "transaction_id", "conversion_id"\
],
"format": "json"
* * *
### Conversion By ID
GET `/v1/networks/reporting/conversions/:conversionId`
Fetch a single conversion by its unique conversion ID.
#### Path Parameters
| Parameter | Description |
| --- | --- |
| conversionId | The ID of the conversion (32 char) |
#### [Request Example](https://developers.everflow.io/docs/network/reporting/raw_conversions/#caacdddbdd)
##### cURL
curl --request GET 'https://api.eflow.team/v1/networks/reporting/conversions/<32 char Conversion ID>' \
--header 'X-Eflow-API-Key: '
##### Response
{
"conversion_id": "4b66e71ab68842698fe51002336ff9f9",
"conversion_unix_timestamp": 1643692518,
"sub1": "internal",
"sub2": "gaming",
"sub3": "facebook",
"sub4": "",
"sub5": "",
"source_id": "55783",
"status": "approved",
"payout_type": "cpa",
"revenue_type": "rpa",
"payout": 3.5,
"revenue": 7,
"session_user_ip": "208.75.21.101",
"conversion_user_ip": "184.151.111.228",
"country": "United States",
"region": "Michigan",
"city": "Ann Arbor",
"dma": 505,
"carrier": "",
"platform": "Android",
"os_version": "5.1",
"device_type": "Mobile",
"device_model": "",
"brand": "LG",
"browser": "",
"language": "",
"http_user_agent": "Dalvik/2.1.0 (Linux; U; Android 5.1.1; LG-K330 Build/LMY47V)",
"adv1": "",
"adv2": "",
"adv3": "",
"adv4": "",
"adv5": "",
"is_event": false,
"event": "",
"notes": "",
"transaction_id": "8595ae3b74e841bc9bbcc1560e61283e",
"click_unix_timestamp": 1643692502,
"error_code": 0,
"error_message": "N/A",
"sale_amount": 35,
"is_scrub": false,
"coupon_code": "",
"order_id": "",
"url": "",
"isp": "synergy broadband",
"referer": "",
"app_id": "",
"idfa": "",
"idfa_md5": "",
"idfa_sha1": "",
"google_ad_id": "",
"google_ad_id_md5": "",
"google_ad_id_sha1": "",
"android_id": "",
"android_id_md5": "",
"android_id_sha1": "",
"currency_id": "USD",
"email": "",
"is_view_through": false,
"previous_network_offer_id": 0,
"relationship": {
"offer": {
"network_offer_id": 77,
"network_id": 1,
"name": "Example Gaming Offer",
"offer_status": "active"
},
"advertiser": {
"network_advertiser_id": 11,
"network_id": 1,
"name": "Advertiser Inc."
},
"account_manager": {
"network_employee_id": 15,
"network_id": 5,
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"account_status": "active"
},
"affiliate": {
"network_affiliate_id": 14,
"network_id": 1,
"name": "Affiliate Inc.",
"account_status": "active"
},
"affiliate_manager": {
"network_employee_id": 87,
"network_id": 1,
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"account_status": "active"
},
"query_parameters": {
"amount": "3",
"nid": "1",
"transaction_id": "8595ae3b74e841bc9bbcc1560e61283e"
},
"redirect_url": "https://everflow-example.io/?id=8595ae3b74e841bc9bbcc1560e61283e",
"snapshots": [ ],
"attribution_method": "transaction_id",
"usm_data": null
},
"network_offer_payout_revenue_id": 0
}
* * *
### Conversion By Email
POST `/v1/networks/reporting/conversions/email`
This endpoint can be used to extract a list of conversions / events associated with an email address. The endpoint will return a maximum of 100 conversions (the most recent 100 ones).
Note that conversions older than 1 year may be archived and will not be returned by this endpoint.
The endpoint doesn’t take any filters, only a single `email` property in the body of the request.
#### [Request Example](https://developers.everflow.io/docs/network/reporting/raw_conversions/#cdeffcddcc)
##### cURL
curl --request POST \
--url https://api.eflow.team/v1/networks/reporting/conversions/email \
--header 'Content-Type: application/json' \
--header 'X-Eflow-API-Key: ' \
--data '{
"email": "test@example.com"
}'
##### Response
{
"conversions": [\
{\
"conversion_id": "1f4a38f373eb12348ba477d3a5b7b65f",\
"conversion_unix_timestamp": 1634568781,\
"sub1": "google",\
"sub2": "facebook",\
"sub3": "",\
"sub4": "",\
"sub5": "",\
"source_id": "",\
"status": "approved",\
"payout_type": "cpa",\
"revenue_type": "rpa",\
"payout": 0,\
"revenue": 0,\
"session_user_ip": "1.2.3.4",\
"conversion_user_ip": "10.11.12.13",\
"country": "United States",\
"region": "Wisconsin",\
"city": "Sister Bay",\
"dma": 658,\
"carrier": "",\
"platform": "Android",\
"os_version": "10.0",\
"device_type": "Mobile",\
"device_model": "",\
"brand": "Samsung",\
"browser": "Chrome",\
"language": "en",\
"http_user_agent": "Mozilla/5.0 (Linux; Android 11; SM-G973U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.85 Mobile Safari/537.36",\
"adv1": "",\
"adv2": "",\
"adv3": "",\
"adv4": "",\
"adv5": "",\
"is_event": true,\
"event": "Purchase",\
"notes": "",\
"transaction_id": "78ac316a238b59d48f564431008fd481",\
"click_unix_timestamp": 1634568743,\
"error_code": 0,\
"error_message": "N/A",\
"sale_amount": 0,\
"is_scrub": false,\
"coupon_code": "",\
"order_id": "",\
"url": "",\
"isp": "charter communications",\
"referer": "example.org",\
"app_id": "",\
"idfa": "",\
"idfa_md5": "",\
"idfa_sha1": "",\
"google_ad_id": "",\
"google_ad_id_md5": "",\
"google_ad_id_sha1": "",\
"android_id": "",\
"android_id_md5": "",\
"android_id_sha1": "",\
"currency_id": "USD",\
"email": "test@example.com",\
"is_view_through": false,\
"previous_network_offer_id": 0,\
"relationship": {\
"offer": {\
"network_offer_id": 5,\
"network_id": 1,\
"name": "Example Offer",\
"offer_status": "active"\
},\
"advertiser": {\
"network_advertiser_id": 2,\
"network_id": 1,\
"name": "Advertising Revolution"\
},\
"account_manager": {\
"network_employee_id": 1,\
"network_id": 1,\
"first_name": "John",\
"last_name": "Doe",\
"full_name": "John Doe",\
"account_status": "active"\
},\
"affiliate": {\
"network_affiliate_id": 10,\
"network_id": 1,\
"name": "Some Affiliate",\
"account_status": "active"\
},\
"affiliate_manager": {\
"network_employee_id": 1,\
"network_id": 1,\
"first_name": "John",\
"last_name": "Doe",\
"full_name": "John Doe",\
"account_status": "active"\
},\
"query_parameters": {},\
"attribution_method": "unknown",\
"usm_data": null\
},\
"network_offer_payout_revenue_id": 100\
}\
]
}
---
# Raw Impressions Report | Everflow
Raw Impressions Report
======================
Operations to fetch raw impressions
Are you looking to fetch all your impressions? If so, the [Firehose](https://developers.everflow.io/docs/network/reporting/firehose/)
might be suited for your use case.
* * *
### Impression
POST `/v1/networks/reporting/impressions/stream`
_Only be available to customers who have the impression package._
This endpoint is used to extract a raw list of impressions. In the result of this request each impression 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 impressions that can be returned by this endpoint is : **10 000**. If there are more than 10 000 impressions 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`).
While the impressions analytics are kept forever, the raw data used to create the response on this endpoint 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 impressions.
This endpoint should not be used to extract every impression from the platform. Requests to extracts large lists of impressions should be made via the [Request Report](https://helpdesk.everflow.io/customer/saved-scheduled-requested-reports#requested-reports)
feature.
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](https://developers.everflow.io/docs/metadata/timezones/)
but can also contain optional query filters.
#### [Query Filters](https://developers.everflow.io/docs/network/reporting/raw_impressions/#dbdfaccbcb)
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”.
#### [Filter Resource Types](https://developers.everflow.io/docs/network/reporting/raw_impressions/#cbcedadbef)
The `resource-type` used in the filters and exclusions can take the following values :
`offer`, `offer_group`, `affiliate`, `advertiser`, `creative`, `network`, `account_manager`, `affiliate_manager`, `category`, `billing_frequency`, `country`, `region`, `city`, `dma`, `carrier`, `device_platform`, `device_type`, `device_make`, `browser`, `language`, `connection_type`, `campaign`, `source_id`, `offer_url`, `device_model`, `business_unit`, `label`, `sales_manager`, `account_executive`, `everflow_account_manager`, `os_version`, `project_id`, `isp`, `offer_status`, `sub1`, `sub2`, `sub3`, `sub4`, `sub5`, `channel`, `coupon_code`, `affiliate_tier`
#### [Request Example](https://developers.everflow.io/docs/network/reporting/raw_impressions/#dbbadbbbcc)
##### cURL
curl --request POST \
--url https://api.eflow.team/v1/networks/reporting/impressions/stream \
--header 'content-type: application/json' \
--header 'X-Eflow-API-Key: ' \
--data ''
**Example** Pull impressions over a 30 minutes period on 2 specific 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"\
}\
]
}
}
---
# Raw On Hold Conversions Report | Everflow
Raw On Hold Conversions Report
==============================
Operations to fetch raw on hold conversions
The endpoints documented in this section allow you to pull on hold conversions and post-conversion events from the API. Each on hold conversion / event will be a “row” in the response as the data is not aggregated.
Note that currency conversion is not supported on raw on hold conversion endpoints. On hold conversions are always stored in the currency of the offer they belong to and this is how the endpoints return raw on hold conversions.
Requested intervals are limited to a **maximum duration of one year**. For example, requests with `"from": "2022-01-01", "to": "2023-12-31"` are considered invalid and will return an error.
* * *
### On Hold Conversion Report
POST `/v1/networks/reporting/onhold`
The on hold conversion report is the most flexible way to extract a list of on hold conversions and post-conversion events. It allows you to fetch a list of on hold conversions and post-conversion events while specifying filters to narrow down the scope of the set of data you are pulling.
Each request must contain :
* `from` and `to` dates (format can be `YYYY-mm-DD or YYYY-mm-DD hh:mm:ss`)
* The `timezone_id` used for the request. Find all timezones [here](https://developers.everflow.io/docs/metadata/timezones/)
* A `show_conversions` boolean value that determines whether base conversions are returned (`true` / `false`)
* A `show_events` boolean value that determines whether post-conversion events are returned (`true` / `false`)
* The `on_hold_status_filter` used to filter on hold conversions based on their status. It can take the following values : `on_hold`, `approved`, `rejected`. It can be left empty if all on hold conversions need to be returned (`"on_hold_status_filter": ""`).
Please note that the on hold conversion report is limited to the prior 365 days only. Requests outside of this range will result in an error.
Optional query filters can be added to the call
#### Paging
This endpoint supports paging. Refer to our [User Guide](https://developers.everflow.io/docs/user-guide/paging/)
for usage.
#### [Query Filters](https://developers.everflow.io/docs/network/reporting/raw_on_hold_conversions/#aaacbbfafe)
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 offer 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 on hold conversions for US traffic on offer 883 OR offer 518”.
#### [Filter Resource Types](https://developers.everflow.io/docs/network/reporting/raw_on_hold_conversions/#acabbacdfd)
The `resource-type` used in the query filters can take the following values :
`offer`, `transaction_id`, `campaign`, `adv1`, `adv2`, `adv3`, `adv4`, `adv5`, `offer_creative`, `coupon_code`, `dma`, `date`, `isp`, `carrier`, `sub1`, `sub2`, `sub3`, `sub4`, `sub5`, `source_id`, `language`, `device_brand`, `month`, `browser`, `country`, `platform`, `region`, `device_type`, `offer_url`, `os_version`, `city`, `week`, `country_code`
#### [Examples](https://developers.everflow.io/docs/network/reporting/raw_on_hold_conversions/#cbdfacfcba)
Here are a few variations of what you can pass as a payload in ithe following call :
curl --request POST 'https://api.eflow.team/v1/networks/reporting/onhold' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example 1** : Pull all on hold conversions (but no events) over a 1 hour period
{
"from": "2022-02-08 13:00:00",
"to": "2022-02-08 14:00:00",
"timezone_id": 67,
"show_conversions": true,
"show_events": false,
"on_hold_status_filter": "",
"query":{
"filters": []
}
}
**Example 2** : Pull pending on hold conversions and events on offer ID 800
{
"from": "2022-02-07",
"to": "2022-02-10",
"timezone_id": 80,
"show_conversions": true,
"show_events": true,
"on_hold_status_filter": "on_hold",
"query":{
"filters": [\
{\
"filter_id_value": "800",\
"resource_type": "offer"\
}\
]
}
}
**Example 3** : Pull all on hold onversions and events that were generated from either of these 2 transaction IDs
{
"from": "2022-02-01",
"to": "2022-02-10",
"timezone_id": 80,
"show_conversions": true,
"show_events": true,
"on_hold_status_filter": "",
"query":{
"filters": [\
{\
"filter_id_value": "e33e03d630a04f499835cfa3d3158baf",\
"resource_type": "transaction_id"\
},\
{\
"filter_id_value": "2718b9f7adeb4d98869767bc1202edf5",\
"resource_type": "transaction_id"\
}\
]
}
}
#### [Response](https://developers.everflow.io/docs/network/reporting/raw_on_hold_conversions/#bddfcdcbca)
A response from the on hold conversion report endpoint will look like :
{
"conversions": [\
{\
"on_hold_conversion_id": "f9d3fa7e86d241afbec4a6c6c3fe2580",\
"network_id": 1,\
"holding_period_end": 1661980244,\
"status": "on_hold",\
"conversion": {\
"conversion_id": "",\
"conversion_unix_timestamp": 1643691617,\
"sub1": "inapp",\
"sub2": "external",\
"sub3": "",\
"sub4": "",\
"sub5": "facebook",\
"source_id": "1000",\
"status": "",\
"payout_type": "cpa",\
"revenue_type": "rpa",\
"payout": 0.8,\
"revenue": 1,\
"session_user_ip": "80.21.15.xxx",\
"conversion_user_ip": "1.2.3.4",\
"country": "Italy",\
"region": "Milano",\
"city": "Arluno",\
"dma": 0,\
"carrier": "",\
"platform": "iOS",\
"os_version": "10.3",\
"device_type": "Mobile",\
"device_model": "",\
"brand": "Apple",\
"browser": "Facebook for iOS",\
"language": "en",\
"http_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 [FBAN/FBIOS;FBAV/141.0.0.51.91;FBBV/71695290;FBDV/iPhone9,2;FBMD/iPhone;FBSN/iOS;FBSV/10.3.3;FBSS/3;FBCR/AT&T;FBID/phone;FBLC/es_LA;FBOP/5;FBRV/0]",\
"adv1": "",\
"adv2": "",\
"adv3": "",\
"adv4": "",\
"adv5": "",\
"is_event": false,\
"event": "Example Event",\
"notes": "",\
"transaction_id": "042760c2eee8473fb17eec59dfe9de75",\
"click_unix_timestamp": 1643691604,\
"error_code": 0,\
"error_message": "N/A",\
"sale_amount": 96,\
"is_scrub": false,\
"coupon_code": "",\
"order_id": "",\
"url": "",\
"isp": "telecom italia s.p.a.",\
"referer": "",\
"app_id": "",\
"idfa": "",\
"idfa_md5": "",\
"idfa_sha1": "",\
"google_ad_id": "",\
"google_ad_id_md5": "",\
"google_ad_id_sha1": "",\
"android_id": "",\
"android_id_md5": "",\
"android_id_sha1": "",\
"currency_id": "USD",\
"email": "",\
"is_view_through": false,\
"previous_network_offer_id": 0,\
"relationship": {\
"offer": {\
"network_offer_id": 882,\
"network_id": 1,\
"name": "Example Offer",\
"offer_status": "active"\
},\
"advertiser": {\
"network_advertiser_id": 135,\
"network_id": 1,\
"name": "Advertiser Inc."\
},\
"account_manager": {\
"network_employee_id": 15,\
"network_id": 1,\
"first_name": "John",\
"last_name": "Doe",\
"full_name": "John Doe",\
"account_status": "active"\
},\
"affiliate": {\
"network_affiliate_id": 102,\
"network_id": 1,\
"name": "Affiliate Inc.",\
"account_status": "active"\
},\
"affiliate_manager": {\
"network_employee_id": 8,\
"network_id": 1,\
"first_name": "Jane",\
"last_name": "Doe",\
"full_name": "Jane Doe",\
"account_status": "active"\
},\
"query_parameters": {},\
"attribution_method": "cookie",\
"usm_data": null\
},\
"network_offer_payout_revenue_id": 0\
}\
},\
// ...\
],
"paging": {
"page": 1,
"page_size": 2000,
"total_count": 2
}
}
* * *
### On Hold Conversion Report Export
POST `/v1/networks/reporting/onhold/export`
The export endpoint is very similar to the report endpoint documented above but adds 2 possibilities :
* It lets you “export” the data in CSV or JSON format
* It optionally lets your specify the columns you want included in your report
Please note that when using the JSON format, the results will be [newlined delimited JSON](https://en.wikipedia.org/wiki/JSON_streaming)
.
You must add the `format` properly to the payloads from the regular table endpoint for requests to work on this endpoint. The `format` can be either :
* `csv`
* `json`
The columns that will be included in the response can also be specified. The possible values are : `offer`, `affiliate`, `advertiser`, `offer_group`, `campaign`, `affiliate_manager`, `creative`, `offer_url`, `category`, `previous_offer`, `source_id`, `sub1`, `sub2`, `sub3`, `sub4`, `sub5`, `adv1`, `adv2`, `adv3`, `adv4`, `adv5`, `country`, `region`, `city`, `platform`, `os_version`, `isp`, `account_manager`, `android_id`, `android_id_md5`, `android_id_sha1`, `app_id`, `brand`, `browser`, `carrier`, `click_date`, `conversion_id`, `conversion_user_ip`, `coupon_code`, `currency`, `delta_hours`, `device`, `email`, `error_message`, `event_name`, `google_ad_id`, `google_ad_id_md5`, `google_ad_id_sha1`, `http_user_agent`, `idfa`, `idfa_md5`, `idfa_sha1`, `language`, `notes`, `order_id`, `order_line_items`, `order_number`, `payout`, `payout_type`, `referrer`, `revenue`, `revenue_type`, `sale_amount`, `session_ip`, `transaction_id`, `type`, `conversion_status`, `conversion_date`, `origin`, `network_id`, `payout_revenue_id`, `project_id`, `dma`, `is_cookie_based`, `previous_transaction_id`, `is_event_protected`, `is_fired_pixel`, `is_scrub`, `is_view_through`, `attribution_method`, `country_code`, `on_hold_conversion_id`, `holding_period_end`, and `on_hold_status`
#### [Examples](https://developers.everflow.io/docs/network/reporting/raw_on_hold_conversions/#cdafccfcbc)
##### cURL
curl --request POST 'https://api.eflow.team/v1/networks/reporting/onhold/export' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example** : Export approved on hold conversions on offer 800 in JSON format. Only include 5 specific columns.
{
"from": "2022-02-07",
"to": "2022-02-10",
"timezone_id": 80,
"show_conversions": true,
"show_events": true,
"on_hold_status_filter": "approved",
"query":{
"filters": [\
{\
"filter_id_value": "800",\
"resource_type": "offer"\
}\
]
},
"columns": [\
"on_hold_conversion_id", "offer", "affiliate", "transaction_id", "conversion_id"\
],
"format": "json"
* * *
### On Hold Conversion By ID
GET `/v1/networks/reporting/onhold/:onHoldId`
Fetch a single on hold conversion by its unique on hold conversion ID.
#### Path Parameters
| Parameter | Description |
| --- | --- |
| onHoldId | The ID of the on hold conversion (32 char) |
#### [Request Example](https://developers.everflow.io/docs/network/reporting/raw_on_hold_conversions/#cadedfcccc)
##### cURL
curl --request GET 'https://api.eflow.team/v1/networks/reporting/onhold/<32 char On Hold Conversion ID>' \
--header 'X-Eflow-API-Key: '
##### Response
{
"on_hold_conversion_id": "f9d3fa7e86d241afbec4a6c6c3fe2580",
"network_id": 1,
"holding_period_end": 1661980244,
"status": "on_hold",
"conversion": {
"conversion_id": "",
"conversion_unix_timestamp": 1643691617,
"sub1": "inapp",
"sub2": "external",
"sub3": "",
"sub4": "",
"sub5": "facebook",
"source_id": "1000",
"status": "",
"payout_type": "cpa",
"revenue_type": "rpa",
"payout": 0.8,
"revenue": 1,
"session_user_ip": "80.21.15.xxx",
"conversion_user_ip": "1.2.3.4",
"country": "Italy",
"region": "Milano",
"city": "Arluno",
"dma": 0,
"carrier": "",
"platform": "iOS",
"os_version": "10.3",
"device_type": "Mobile",
"device_model": "",
"brand": "Apple",
"browser": "Facebook for iOS",
"language": "en",
"http_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Mobile/14G60 [FBAN/FBIOS;FBAV/141.0.0.51.91;FBBV/71695290;FBDV/iPhone9,2;FBMD/iPhone;FBSN/iOS;FBSV/10.3.3;FBSS/3;FBCR/AT&T;FBID/phone;FBLC/es_LA;FBOP/5;FBRV/0]",
"adv1": "",
"adv2": "",
"adv3": "",
"adv4": "",
"adv5": "",
"is_event": false,
"event": "Example Event",
"notes": "",
"transaction_id": "042760c2eee8473fb17eec59dfe9de75",
"click_unix_timestamp": 1643691604,
"error_code": 0,
"error_message": "N/A",
"sale_amount": 96,
"is_scrub": false,
"coupon_code": "",
"order_id": "",
"url": "",
"isp": "telecom italia s.p.a.",
"referer": "",
"app_id": "",
"idfa": "",
"idfa_md5": "",
"idfa_sha1": "",
"google_ad_id": "",
"google_ad_id_md5": "",
"google_ad_id_sha1": "",
"android_id": "",
"android_id_md5": "",
"android_id_sha1": "",
"currency_id": "USD",
"email": "",
"is_view_through": false,
"previous_network_offer_id": 0,
"relationship": {
"offer": {
"network_offer_id": 882,
"network_id": 1,
"name": "Example Offer",
"offer_status": "active"
},
"advertiser": {
"network_advertiser_id": 135,
"network_id": 1,
"name": "Advertiser Inc."
},
"account_manager": {
"network_employee_id": 15,
"network_id": 1,
"first_name": "John",
"last_name": "Doe",
"full_name": "John Doe",
"account_status": "active"
},
"affiliate": {
"network_affiliate_id": 102,
"network_id": 1,
"name": "Affiliate Inc.",
"account_status": "active"
},
"affiliate_manager": {
"network_employee_id": 8,
"network_id": 1,
"first_name": "Jane",
"last_name": "Doe",
"full_name": "Jane Doe",
"account_status": "active"
},
"query_parameters": {},
"attribution_method": "cookie",
"usm_data": null
},
"network_offer_payout_revenue_id": 0
}
}
---
# Event Report | Everflow
Event Report
============
Operations to fetch the Event Report
* * *
### Event
POST `/v1/networks/reporting/postconversions`
This endpoint allows the performance reporting to be broken down into events in addition to up to 2 other column types.
Each request must contain :
* `from` and `to` dates (format can be `YYYY-mm-DD or YYYY-mm-DD hh:mm:ss`)
* The `timezone_id` used for the request. Find all timezones [here](https://developers.everflow.io/docs/metadata/timezones/)
* A pivot column that will either be `event_name` or `advertiser_event_name` depending on the events you are interested in
* One or two columns to break down the data
Requested intervals are limited to a **maximum duration of one year**. For example, requests with `"from": "2022-01-01", "to": "2023-12-31"` are considered invalid and will return an error.
Optional query filters can be added to the call.
The columns you request to break down the data will be one or two of the following :
`offer`, `offer_id`, `offer_group`, `offer_group_id`, `creative`, `creative_id`, `category`, `campaign`, `campaign_id`, `offer_url`, `project_id`, `affiliate`, `affiliate_id`, `affiliate_manager`, `advertiser`, `advertiser_id`, `account_manager`, `sales_manager`, `account_executive`, `country`, `region`, `city`, `dma`, `isp`, `carrier`, `connection_type`, `platform`, `os_version`, `device_type`, `browser`, `device_make`, `language`, `device_model`, `source_id`, `referer`, `sub1`, `sub2`, `sub3`, `sub4`, `sub5`
#### [Query Filters](https://developers.everflow.io/docs/network/reporting/event_report/#dbccdffbca)
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 events for US traffic on offer 883 OR offer 518”.
#### [Filter Resource Types](https://developers.everflow.io/docs/network/reporting/event_report/#aaccebdbfd)
The `resource-type` used in the query filters can take the following values :
`offer`, `offer_group`, `affiliate`, `advertiser`, `offer_creative`, `affiliate_tier`, `campaign`, `billing_frequency`, `business_unit`, `tracking_domain`
#### [Request Example](https://developers.everflow.io/docs/network/reporting/event_report/#dbdbcefadd)
##### cURL
curl --request POST 'https://api.eflow.team/v1/networks/reporting/postconversions' \
--header 'X-Eflow-API-Key: '
--header 'Content-Type: application/json' \
--data ''
#### Request
{
"from": "2022-02-10",
"to": "2022-02-10",
"timezone_id": 67,
"columns": [\
{\
"column": "offer"\
},\
{\
"column": "affiliate"\
},\
{\
"column": "event_name"\
}\
],
"query": {
"filters": [\
{\
"filter_id_value": "883",\
"resource_type": "offer"\
}\
]
}
}
---
# Tracking Links | Everflow
Tracking Links
==============
Operations to generate tracking links
The endpoints documented here allow you to generate tracking links for offers and smartlinks.
* * *
### Generate Offer Tracking Link
POST `/v1/networks/tracking/offers/clicks`
This endpoint will create a click tracking link for a given offer / affiliate couple. The affiliate must have visibility over the offer and must be allowed to “run” the offer. Otherwise the endpoint will return an error.
A lot like the tracking link widget, this endpoint takes many options if you want to e.g. generate a tracking link with a preset sub id. However only the `network_offer_id` and `network_affiliate_id` parameters are required.
#### [Body Params](https://developers.everflow.io/docs/network/tracking_links/#bfdfdcfeec)
network\_offer\_id int
The ID of the offer
network\_affiliate\_id int
The ID of the affiliate
network\_tracking\_domain\_id int
An optional ID for a specific tracking domain that should be used to generate the link
network\_offer\_url\_id int
An optional offer URL ID. If specified, the offer URL ID must belong to the network\_offer\_id specified (and must exist).
creative\_id int
An optional offer creative ID. If specified, the creative must belong to the network\_offer\_id specified (and must exist).
network\_traffic\_source\_id int
An optional traffic source ID. Note that if a traffic source is associated with the affiliate, this parameter will be ignored and the default traffic source for the affiliate will be used instead.
source\_id string
An optional `source_id` that should be used as a query string parameter on the tracking link.
sub1 string
An optional `sub1` that should be used as a query string parameter on the tracking link.
sub2 string
An optional `sub2` that should be used as a query string parameter on the tracking link.
sub3 string
An optional `sub3` that should be used as a query string parameter on the tracking link.
sub4 string
An optional `sub4` that should be used as a query string parameter on the tracking link.
sub5 string
An optional `sub5` that should be used as a query string parameter on the tracking link.
is\_encrypt\_parameters bool
When enabled, will encrypt all query string parameters into a single one.
is\_redirect\_link bool
Only relevant for direct linking offers. Can be used to override the default setting of the offer and generate a redirect link even on a direct linking offer.
#### [Examples](https://developers.everflow.io/docs/network/tracking_links/#ccdcbbedfa)
curl --request POST 'https://api.eflow.team/v1/networks/tracking/offers/clicks' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example 1** : Fetch a tracking link for offer ID 5 and affiliate ID 7
{
"network_affiliate_id": 7,
"network_offer_id": 5
}
**Example 2** : Fetch a tracking link for offer ID 1 and affiliate ID 3, using `facebook` as a `sub1` value and `media_buying` as a sub3 with encrypted parameters.
{
"network_affiliate_id": 3,
"network_offer_id": 1,
"sub1": "facebook",
"sub3": "media_buying",
"is_encrypt_parameters": true
}
#### [Response](https://developers.everflow.io/docs/network/tracking_links/#adcabffcbf)
{
"url": "http://www.tracking-domain.test/9W598/2CTPL/?sub1=facebook&sub3=media_buying"
}
* * *
### Generate Offer Tracking Link QR Code
POST `/v1/networks/tracking/offers/clicks/qr`
This endpoint is effectively the same as the one documented above, but instead of returning a textual version of the tracking link URL, it returns a QR code that points to the tracking link URL.
The body parameters and requirements are the same, only the response differs.
Note that this is a streaming endpoint and that the response will have the `Content-Type` header set to `image/png`
#### [Body Params](https://developers.everflow.io/docs/network/tracking_links/#cdabacabcb)
network\_offer\_id int
The ID of the offer
network\_affiliate\_id int
The ID of the affiliate
network\_tracking\_domain\_id int
An optional ID for a specific tracking domain that should be used to generate the link
network\_offer\_url\_id int
An optional offer URL ID. If specified, the offer URL ID must belong to the network\_offer\_id specified (and must exist).
creative\_id int
An optional offer creative ID. If specified, the creative must belong to the network\_offer\_id specified (and must exist).
network\_traffic\_source\_id int
An optional traffic source ID. Note that if a traffic source is associated with the affiliate, this parameter will be ignored and the default traffic source for the affiliate will be used instead.
source\_id string
An optional `source_id` that should be used as a query string parameter on the tracking link.
sub1 string
An optional `sub1` that should be used as a query string parameter on the tracking link.
sub2 string
An optional `sub2` that should be used as a query string parameter on the tracking link.
sub3 string
An optional `sub3` that should be used as a query string parameter on the tracking link.
sub4 string
An optional `sub4` that should be used as a query string parameter on the tracking link.
sub5 string
An optional `sub5` that should be used as a query string parameter on the tracking link.
is\_encrypt\_parameters bool
When enabled, will encrypt all query string parameters into a single one.
is\_redirect\_link bool
Only relevant for direct linking offers. Can be used to override the default setting of the offer and generate a redirect link even on a direct linking offer.
#### [Examples](https://developers.everflow.io/docs/network/tracking_links/#cbfbefdbca)
curl --request POST 'https://api.eflow.team/v1/networks/tracking/offers/clicks/qr' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example 1** : Fetch a tracking link for offer ID 5 and affiliate ID 7
{
"network_affiliate_id": 7,
"network_offer_id": 5
}
**Example 2** : Fetch a tracking link for offer ID 1 and affiliate ID 3, using `facebook` as a `sub1` value and `media_buying` as a sub3 with encrypted parameters.
{
"network_affiliate_id": 3,
"network_offer_id": 1,
"sub1": "facebook",
"sub3": "media_buying",
"is_encrypt_parameters": true
}
#### [Response](https://developers.everflow.io/docs/network/tracking_links/#dedbdcccca)
The response will be `*.png` image file streamed back. The result can be saved directly following the curl call. For example :
curl --request POST 'https://api.eflow.team/v1/networks/tracking/offers/clicks/qr' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data '{
"network_affiliate_id": 7,
"network_offer_id": 5
}' > file_qrcode.png
would work.
* * *
### Generate Smartlink Tracking Link
POST `/v1/networks/tracking/campaigns/clicks`
This endpoint will create a click tracking link for a given smartlink / affiliate couple.
A lot like the tracking link widget, this endpoint takes many options if you want to e.g. generate a tracking link with a preset sub id. However only the `network_campaign_id` and `network_affiliate_id` parameters are required.
#### [Body Params](https://developers.everflow.io/docs/network/tracking_links/#acbefdfcca)
network\_campaign\_id int
The ID of the smartlink
network\_affiliate\_id int
The ID of the affiliate
network\_traffic\_source\_id int
An optional traffic source ID. Note that if a traffic source is associated with the affiliate, this parameter will be ignored and the default traffic source for the affiliate will be used instead.
network\_tracking\_domain\_id int
An optional ID for a specific tracking domain that should be used to generate the link
source\_id string
An optional `source_id` that should be used as a query string parameter on the tracking link.
sub1 string
An optional `sub1` that should be used as a query string parameter on the tracking link.
sub2 string
An optional `sub2` that should be used as a query string parameter on the tracking link.
sub3 string
An optional `sub3` that should be used as a query string parameter on the tracking link.
sub4 string
An optional `sub4` that should be used as a query string parameter on the tracking link.
sub5 string
An optional `sub5` that should be used as a query string parameter on the tracking link.
is\_encrypt\_parameters bool
When enabled, will encrypt all query string parameters into a single one.
is\_redirect\_link bool
Only relevant for direct linking offers. Can be used to override the default setting of the offer and generate a redirect link even on a direct linking offer.
#### [Examples](https://developers.everflow.io/docs/network/tracking_links/#acbcdafdcb)
curl --request POST 'https://api.eflow.team/v1/networks/tracking/campaigns/clicks' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example 1** : Fetch a tracking link for smartlink ID 5 and affiliate ID 7
{
"network_affiliate_id": 7,
"network_campaign_id": 5
}
**Example 2** : Fetch a tracking link for smartlink ID 1 and affiliate ID 3, using `facebook` as a `sub1` value and `media_buying` as a sub3 with encrypted parameters.
{
"network_affiliate_id": 3,
"network_campaign_id": 1,
"sub1": "facebook",
"sub3": "media_buying",
"is_encrypt_parameters": true
}
#### [Response](https://developers.everflow.io/docs/network/tracking_links/#cadfdbcfcc)
{
"url": "http://www.servetrack2.test/cmp/5TMX8/27W1G/?sub1=facebook&sub3=media_buying",
"can_affiliate_run_all_offers": true
}
* * *
### Generate Smartlink Tracking Link QR Code
POST `/v1/networks/tracking/campaigns/clicks/qr`
This endpoint is effectively the same as the one documented above, but instead of returning a textual version of the tracking link URL, it returns a QR code that points to the tracking link URL.
The body parameters and requirements are the same, only the response differs.
Note that this is a streaming endpoint and that the response will have the `Content-Type` header set to `image/png`
#### [Body Params](https://developers.everflow.io/docs/network/tracking_links/#fbcdddccfb)
network\_campaign\_id int
The ID of the smartlink
network\_affiliate\_id int
The ID of the affiliate
network\_traffic\_source\_id int
An optional traffic source ID. Note that if a traffic source is associated with the affiliate, this parameter will be ignored and the default traffic source for the affiliate will be used instead.
network\_tracking\_domain\_id int
An optional ID for a specific tracking domain that should be used to generate the link
source\_id string
An optional `source_id` that should be used as a query string parameter on the tracking link.
sub1 string
An optional `sub1` that should be used as a query string parameter on the tracking link.
sub2 string
An optional `sub2` that should be used as a query string parameter on the tracking link.
sub3 string
An optional `sub3` that should be used as a query string parameter on the tracking link.
sub4 string
An optional `sub4` that should be used as a query string parameter on the tracking link.
sub5 string
An optional `sub5` that should be used as a query string parameter on the tracking link.
is\_encrypt\_parameters bool
When enabled, will encrypt all query string parameters into a single one.
is\_redirect\_link bool
Only relevant for direct linking offers. Can be used to override the default setting of the offer and generate a redirect link even on a direct linking offer.
#### [Examples](https://developers.everflow.io/docs/network/tracking_links/#ffdadcbbfb)
curl --request POST 'https://api.eflow.team/v1/networks/tracking/campaigns/clicks/qr' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example 1** : Fetch a tracking link for smartlink ID 5 and affiliate ID 7
{
"network_affiliate_id": 7,
"network_campaign_id": 5
}
**Example 2** : Fetch a tracking link for smartlink ID 1 and affiliate ID 3, using `facebook` as a `sub1` value and `media_buying` as a sub3 with encrypted parameters.
{
"network_affiliate_id": 3,
"network_campaign_id": 1,
"sub1": "facebook",
"sub3": "media_buying",
"is_encrypt_parameters": true
}
#### [Response](https://developers.everflow.io/docs/network/tracking_links/#cbcfbeddcb)
The response will be `*.png` image file streamed back. The result can be saved directly following the curl call. For example :
curl --request POST 'https://api.eflow.team/v1/networks/tracking/campaigns/clicks/qr' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data '{
"network_affiliate_id": 7,
"network_campaign_id": 5
}' > file_qrcode.png
would work.
---
# Reporting | Everflow
Reporting
=========
Reporting and analytics endpoints on the Everflow API
The Everflow UI offers many different types of reports and the API is no different. There is not, however, a one-to-one relationship between every report offered in the UI and the API endpoints as certain API endpoints power many different reports.
Please note that reporting data is subject to [Everflow’s data retention policy](https://www.everflow.io/legal/data-retention)
.
### Aggregated Data Reports
Aggregated data reports are the most commonly used reports in Everflow. This endpoint powers reports like :
* Offer Report
* Sub ID Report
* Flex Report
in the Everflow UI. The reports allow you to pivot your data based on the columns of your choice while also applying filters to narrow down the scope of the data returned.
The endpoints that power these reports will allow you to pull data similar to this in the UI
[View the aggregated data reports documentation](https://developers.everflow.io/docs/affiliate/reporting/affiliate_aggregated_data/)

Aggregated data from the Flex Report
### Dashboard Stats
The endpoints documented here power the cards that appear on the dashboard in the Everflow UI after you login.
While these endpoints are not as powerful or granular as the aggregated data reports, they can be useful to quickly pull summaries.
[View the dashboard stats documentation](https://developers.everflow.io/docs/affiliate/reporting/affiliate_dashboard_stats/)
### Raw Clicks
These endpoints allow you to pull unaggregated data where each click is a “row” of data.
Clicks can be pulled individually (by transaction id) or in sets. A set of clicks can be pulled at once and each click row will contain details about the event (device information, geolocation, query parameters). The set of clicks pulled can be filtered based on different criterias (offer, sub id value, etc.)
The endpoints documented in this section power the Click Report in the Everflow UI.
[View the raw clicks documentation](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_clicks/)
### Raw Conversions
The endpoints allow you to pull unaggregated conversion data where each conversion is a “row” of data.
The set of conversion pulled will contain detailed information about each conversion (revenue information, etc.). The set of conversions pulled can be filtered based on different criterias (offer, country, etc.)
Although it is referred to as the “conversion” report, post-conversion events are also returned by this endpoint.
The conversions can also be extracted in CSV format, effectively mimicking the export functionality from the UI.
[View the raw conversions documentation](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_conversions/)
### Raw On Hold Conversions
The endpoints allow you to pull unaggregated on hold conversion data where each on hold conversion is a “row” of data.
The set of on hold conversion pulled will contain detailed information about each on hold conversion (revenue information, etc.). The set of on hold conversions pulled can be filtered based on different criterias (offer, country, etc.)
Although it is referred to as the “on hold conversion” report, post-conversion events are also returned by this endpoint.
[View the raw on hold conversions documentation](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_on_hold_conversions/)
---
# Dashboard Stats | Everflow
Dashboard Stats
===============
Operations to fetch the Dashboard Stats
* * *
### Dashboard Summary
POST `/v1/affiliates/dashboard/summary`
This endpoint is used to generate the cards at the top of the Everflow dashboard page in the UI. It lists comparative data for standard reporting metrics such as payout, revenue, number of clicks, etc. over time.
For every metric, values for current month vs total of last month and today vs total of yesterday are listed.
Performance values are computed by comparing yesterday value at the same moment of the day as now.
The endpoint takes a single parameter in the request body : a timezone id. Find all timezones [here](https://developers.everflow.io/docs/metadata/timezones/)
#### [Request Example](https://developers.everflow.io/docs/affiliate/reporting/affiliate_dashboard_stats/#cdbdabdfdc)
##### cURL
curl --request POST 'https://api.eflow.team/v1/affiliates/dashboard/summary' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data '{
"timezone_id": 80
}'
##### Response
{
"revenue": {
"today": 4,
"yesterday": 5.6,
"current_month": 23.20,
"last_month": 0,
"trending_percentage": -28.6
},
"click": {
"today": 46,
"yesterday": 9,
"current_month": 74,
"last_month": 0,
"trending_percentage": 411.1
},
"conversion": {
"today": 5,
"yesterday": 7,
"current_month": 29,
"last_month": 0,
"trending_percentage": -28.6
},
"cvr": {
"today": 10.87,
"yesterday": 77.778,
"current_month": 39.189,
"last_month": 0
},
"events": {
"today": 0,
"yesterday": 0,
"current_month": 0,
"last_month": 0,
"trending_percentage": 0
},
"evr": {
"today": 0,
"yesterday": 0,
"current_month": 0,
"last_month": 0
},
"redirect_revenue": {
"today": 0,
"yesterday": 0,
"current_month": 0,
"last_month": 0,
"trending_percentage": 0
},
"impression": {
"today": 0,
"yesterday": 0,
"current_month": 0,
"last_month": 0,
"trending_percentage": 0
}
}
---
# Uploading Files | Everflow
Uploading Files
===============
Operations for uploading files
* * *
### Upload Temporary File
POST `/v1/networks/uploads/temp`
This endpoint allows you to upload files to the Everflow platform. The files uploaded via this enpoint are temporary resources and are not useful on their own. They must then be used to create another resource and serve their purpose.
For example, to add an image creative to an offer via the API, you would first need to upload the image via this endpoint. The temporary file created here would then be use in a subsequent call to actually create the image creative.
Note that the temporary files created here can only be used once before they are permanently destroyed.
#### Query Params
unzip boolean
Whether or not the uploaded file is a compressed (.zip) file.
#### [Body Params](https://developers.everflow.io/docs/network/uploading_files/#cadfcbcdca)
mime\_type string
[MIME type or Media type](https://en.wikipedia.org/wiki/Media_type)
of the uploaded file. For compressed files (when used with the query parameter `unzip`), either `application/zip` or `application/x-zip-compressed` has to be used.
content\_base64 string
Content of the file, encoded in [Base64](https://en.wikipedia.org/wiki/Base64)
.
#### [Payload Example](https://developers.everflow.io/docs/network/uploading_files/#cdbcecbaba)
{
"mime_type": "application/json",
"content_base64": "YmFzZTY0"
}
#### [Request Example](https://developers.everflow.io/docs/network/uploading_files/#cfdfddbbcf)
##### cURL
curl --request POST 'https://api.eflow.team/v1/networks/uploads/temp' \
--header 'X-Eflow-API-Key: '
##### Response
{
"urls": [\
{\
"url": "https://usercontent.everflowclient.io/1/temp/edb7fa7a-24ed-4e10-961a-6c67b6246160",\
"name": ""\
}\
]
}
---
# Smart Links | Everflow
Smart Links
===========
Operations for smart links
* * *
### Find All
GET `/v1/networks/campaigns`
#### Filters
This endpoint supports basic filtering. Refer to [API filters](https://developers.everflow.io/docs/user-guide/api_filters/)
page for usage.
#### Relationships
This endpoint supports the following additional relationships. Refer to our [User Guide](https://developers.everflow.io/docs/user-guide/relationships/)
for usage.
You can ask for them using the `relationship` query parameter. Multiple relationships can be supplied repeating the `relationship` query parameter.
| Value | Description |
| --- | --- |
| reporting | Includes the campaign’s reporting for today |
| redirects | Includes the campaign’s redirects |
| offers | Includes the campaign’s list of offers used in the redirects |
| catch\_all\_offer\_basic | Includes the campaign’s catch-all offer |
#### [Request Example](https://developers.everflow.io/docs/network/smart_links/#cbdadecdad)
##### cURL
curl --request GET 'https://api.eflow.team/v1/networks/campaigns?relationship=redirects' \
--header 'X-Eflow-API-Key: '
##### Response
{
"campaigns":
[\
{\
"network_campaign_id": 1,\
"network_id": 1,\
"campaign_name": "Example SmartLink",\
"campaign_status": "active",\
"network_tracking_domain_id": 1,\
"is_use_secure_link": true,\
"redirect_routing_type": "priority",\
"catch_all_network_offer_id": 775,\
"is_open_to_affiliates": true,\
"run_frequency": "unknown",\
"metric": "unknown",\
"optimization_goal": 0,\
"data_lookback_window": "unknown",\
"data_collection_threshold": 0,\
"time_created": 1633017537,\
"time_saved": 1633017604,\
"relationship":\
{\
"redirects":\
{\
"total": 2,\
"entries":\
[\
{\
"network_campaign_redirect_id": 1,\
"network_campaign_id": 1,\
"redirect_network_offer_id": 10,\
"redirect_network_offer_url_id": 0,\
"routing_value": 1\
},\
{\
"network_campaign_redirect_id": 2,\
"network_campaign_id": 1,\
"redirect_network_offer_id": 3,\
"redirect_network_offer_url_id": 0,\
"ruleset":\
{\
"network_id": 1,\
"network_ruleset_id": 774,\
"time_created": 1633017537,\
"time_saved": 1633017537,\
"countries":\
[\
{\
"network_id": 1,\
"network_targeting_country_id": 156,\
"country_id": 36,\
"label": "Canada",\
"country_code": "CA",\
"targeting_type": "include",\
"match_type": "exact"\
}\
]\
},\
"routing_value": 2,\
}\
]\
},\
"labels":\
{\
"total": 2,\
"entries":\
[\
"label1",\
"label2"\
]\
},\
"encoded_value": "27W1G"\
}\
}\
]
}
* * *
### Find By ID
GET `/v1/networks/campaigns/:campaignId`
#### Path Parameters
| Parameter | Description |
| --- | --- |
| campaignId | The ID of the campaign you want to fetch |
#### Relationships
This endpoint supports the following additional relationships. Refer to our [User Guide](https://developers.everflow.io/docs/user-guide/relationships/)
for usage.
You can ask for them using the `relationship` query parameter. Multiple relationships can be supplied repeating the `relationship` query parameter.
| Value | Description |
| --- | --- |
| reporting | Includes the campaign’s reporting for today |
| redirects | Includes the campaign’s redirects |
| offers | Includes the campaign’s list of offers used in the redirects |
| catch\_all\_offer\_basic | Includes the campaign’s catch-all offer |
#### [Request Example](https://developers.everflow.io/docs/network/smart_links/#dadccbeacc)
##### cURL
curl --request GET 'https://api.eflow.team/v1/networks/campaigns/1?relationship=redirects' \
--header 'X-Eflow-API-Key: '
##### Response
{
"network_campaign_id": 1,
"network_id": 1,
"campaign_name": "Example SmartLink",
"campaign_status": "active",
"network_tracking_domain_id": 1,
"is_use_secure_link": true,
"redirect_routing_type": "priority",
"catch_all_network_offer_id": 775,
"is_open_to_affiliates": true,
"run_frequency": "unknown",
"metric": "unknown",
"optimization_goal": 0,
"data_lookback_window": "unknown",
"data_collection_threshold": 0,
"time_created": 1633017537,
"time_saved": 1633017604,
"relationship": {
"redirects": {
"total": 2,
"entries": [\
{\
"network_campaign_redirect_id": 1,\
"network_campaign_id": 1,\
"redirect_network_offer_id": 2601,\
"redirect_network_offer_url_id": 0,\
"routing_value": 1\
},\
{\
"network_campaign_redirect_id": 2,\
"network_campaign_id": 1,\
"redirect_network_offer_id": 3,\
"redirect_network_offer_url_id": 0,\
"ruleset": {\
"network_id": 1,\
"network_ruleset_id": 774,\
"time_created": 1633017537,\
"time_saved": 1633017537,\
"countries": [\
{\
"network_id": 1,\
"network_targeting_country_id": 156,\
"country_id": 36,\
"label": "Canada",\
"country_code": "CA",\
"targeting_type": "include",\
"match_type": "exact"\
}\
]\
},\
"routing_value": 2,\
}\
]
},
"labels": {
"total": 2,
"entries": [\
"label1",\
"label2"\
]
},
"encoded_value": "27W1G"
}
}
* * *
### Create
POST `/v1/networks/campaigns`
#### [Body Params](https://developers.everflow.io/docs/network/smart_links/#cbcddcdccc)
campaign\_name string
The displayed name of the smart link.
campaign\_status string
Status of the smart link. Can be one of the following values: `active` , `paused` , `deleted`
network\_tracking\_domain\_id int
The ID of the domain to be used in the affiliate tracking link.
is\_use\_secure\_link boolean
Whether or not you want to force SSL. Improves tracking and security by setting tracking links to always use the more secure `https://` instead of `http://` .
redirect\_routing\_type string
The redirect mechanism of the campaign. Determines how the Smart Link traffic is distributed between the listed offers. KPI allows you to automatically deliver traffic ranked in order of the best performing offers for your set KPI. Priority means the first position will be checked, and if the user doesn’t match the offer’s targeting/cap, then it will continue downwards towards the next eligible offer. Choosing Weight will deliver traffic with a percentage split between eligible offers. Can be one of the following values: `priority` , `weight` , `kpi` .
catch\_all\_network\_offer\_id int
The ID of the offer to use as the catch-all offer. The Catch-All Offer will be considered only if partner has access to the offer and the click can’t be matched with any of the offers in the redirect tree.
is\_open\_to\_affiliates boolean
Whether or not you want to make the campaign visible to affiliates. If this option is enabled, the Smart Link will be visible to the partner only if all the offers are runnable by the partner.
run\_frequency string
Determines how often your offers are re-ranked based on the best performing offers towards your KPI. Can be one of the following values: `12_hours` , `24_hours` . Required if redirect\_routing\_type is set to `kpi` .
metric string
The metric to use with the KPI campaign. The highest performing offers for your selected metric will be re-ranked towards receiving the majority of the Smart Link traffic. Can be one of the following values: `profit` , `cvr` , `evr` , `conversions` , `payout` , `revenue` . Required if redirect\_routing\_type is set to `kpi` .
optimization\_goal int
This optimizes ranking towards the offers that are closest towards your set Specific Goal. Required if redirect\_routing\_type is set to `kpi` .
data\_lookback\_window string
Determines the period of data being used for determining how offers are performing at your set Metric. Can be one of the following values: `12_hours` , `24_hours` , `48_hours` . Required if redirect\_routing\_type is set to `kpi` .
data\_collection\_threshold int
The amount of data required before the KPI-based Smart Link starts determining the initial rankings for the best performing offers. Required if redirect\_routing\_type is set to `kpi` .
redirects object array
The list of offers that are part of the campaign.
[View Object Details Hide Object Details](https://developers.everflow.io/docs/network/smart_links/#redirects)
redirect\_network\_offer\_id int
The ID of the offer.
redirect\_network\_offer\_url\_id int
The ID of an offer URL. Defaults to the Base Destination URL.
ruleset object
List of rules for which the redirect applies. See the [ruleset object.](https://developers.everflow.io/docs/user-guide/ruleset/)
routing\_value int
The value used to determine the priority or the weight of the offer in the list. Required if redirect\_routing\_type is set to `priority` or `weight` .
labels string array
The list of labels associated with the campaign.
#### [Payload Example](https://developers.everflow.io/docs/network/smart_links/#ccfabbdcbd)
{
"network_tracking_domain_id": 1,
"campaign_status": "active",
"catch_all_network_offer_id": 1,
"conversion_method": "server_postback",
"is_whitelist_check_enabled": false,
"is_use_secure_link": true,
"is_open_to_affiliates": false,
"campaign_name": "test",
"redirects":
[\
{\
"redirect_network_offer_id": 3,\
"routing_value": 1,\
"redirect_network_offer_url_id": 0,\
"ruleset":\
{\
"countries":\
[\
{\
"targeting_type": "include",\
"match_type": "exact",\
"country_id": 227\
}\
]\
}\
},\
{\
"redirect_network_offer_id": 775,\
"routing_value": 2,\
"redirect_network_offer_url_id": 0\
}\
],
"redirect_routing_type": "priority"
}
* * *
### Update
PUT `/v1/networks/campaigns/:campaignId`
You **must** specify all the fields, not only the ones you wish to update.
If you omit a field that is not marked as required, its default value will be used.
#### Path Parameters
| Parameter | Description |
| --- | --- |
| campaignId | The ID of the smart link you want to update |
#### [Body Params](https://developers.everflow.io/docs/network/smart_links/#dcddddfefe)
campaign\_name string
The displayed name of the smart link.
campaign\_status string
Status of the smart link. Can be one of the following values: `active` , `paused` , `deleted`
network\_tracking\_domain\_id int
The ID of the domain to be used in the affiliate tracking link.
is\_use\_secure\_link boolean
Whether or not you want to force SSL. Improves tracking and security by setting tracking links to always use the more secure `https://` instead of `http://` .
redirect\_routing\_type string
The redirect mechanism of the campaign. Determines how the Smart Link traffic is distributed between the listed offers. KPI allows you to automatically deliver traffic ranked in order of the best performing offers for your set KPI. Priority means the first position will be checked, and if the user doesn’t match the offer’s targeting/cap, then it will continue downwards towards the next eligible offer. Choosing Weight will deliver traffic with a percentage split between eligible offers. Can be one of the following values: `priority` , `weight` , `kpi` .
catch\_all\_network\_offer\_id int
The ID of the offer to use as the catch-all offer. The Catch-All Offer will be considered only if partner has access to the offer and the click can’t be matched with any of the offers in the redirect tree.
is\_open\_to\_affiliates boolean
Whether or not you want to make the campaign visible to affiliates. If this option is enabled, the Smart Link will be visible to the partner only if all the offers are runnable by the partner.
run\_frequency string
Determines how often your offers are re-ranked based on the best performing offers towards your KPI. Can be one of the following values: `12_hours` , `24_hours` . Required if redirect\_routing\_type is set to `kpi` .
metric string
The metric to use with the KPI campaign. The highest performing offers for your selected metric will be re-ranked towards receiving the majority of the Smart Link traffic. Can be one of the following values: `profit` , `cvr` , `evr` , `conversions` , `payout` , `revenue` . Required if redirect\_routing\_type is set to `kpi` .
optimization\_goal int
This optimizes ranking towards the offers that are closest towards your set Specific Goal. Required if redirect\_routing\_type is set to `kpi` .
data\_lookback\_window string
Determines the period of data being used for determining how offers are performing at your set Metric. Can be one of the following values: `12_hours` , `24_hours` , `48_hours` . Required if redirect\_routing\_type is set to `kpi` .
data\_collection\_threshold int
The amount of data required before the KPI-based Smart Link starts determining the initial rankings for the best performing offers. Required if redirect\_routing\_type is set to `kpi` .
redirects object array
The list of offers that are part of the campaign.
[View Object Details Hide Object Details](https://developers.everflow.io/docs/network/smart_links/#redirects)
redirect\_network\_offer\_id int
The ID of the offer.
redirect\_network\_offer\_url\_id int
The ID of an offer URL. Defaults to the Base Destination URL.
ruleset object
List of rules that apply to the redirect. See the [ruleset object.](https://developers.everflow.io/docs/user-guide/ruleset/)
routing\_value int
The value used to determine the priority or the weight of the offer in the list. Required if redirect\_routing\_type is set to `priority` or `weight` .
labels string array
The list of labels associated with the campaign.
#### [Payload Example](https://developers.everflow.io/docs/network/smart_links/#cfcddfadbf)
{
"network_campaign_id": 1,
"network_id": 1,
"campaign_name": "Updated Smartlink",
"campaign_status": "active",
"network_tracking_domain_id": 1,
"is_use_secure_link": true,
"redirect_routing_type": "priority",
"catch_all_network_offer_id": 10,
"is_open_to_affiliates": true,
"conversion_method": "server_postback",
"is_whitelist_check_enabled": false,
"labels":
[\
"label1",\
"label2"\
],
"redirects":
[\
{\
"redirect_network_offer_id": 3,\
"routing_value": 1,\
"ruleset":\
{\
"countries":\
[\
{\
"targeting_type": "include",\
"match_type": "exact",\
"country_id": 227\
}\
]\
}\
},\
{\
"redirect_network_offer_id": 775,\
"routing_value": 2,\
"redirect_network_offer_url_id": 0\
}\
]
}
---
# Raw Clicks Report | Everflow
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](https://developers.everflow.io/docs/metadata/timezones/)
but can also contain optional query filters.
#### [Query Filters](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_clicks/#fddcabbeba)
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”.
#### [Filter Resource Types](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_clicks/#dadbcfcdfa)
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`
#### [Request Example](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_clicks/#cccddfaddd)
##### cURL
curl --request POST \
--url https://api.eflow.team/v1/affiliates/reporting/clicks/stream \
--header 'content-type: application/json' \
--header 'X-Eflow-API-Key: ' \
--data ''
**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": "",\
"currency_id": "USD",\
"coupon_code": "SUMMER",\
"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"\
}\
}\
}\
]
}
* * *
### 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) |
#### [Request Example](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_clicks/#acbdaddcbc)
##### cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/reporting/clicks/<32 char Transaction ID>' \
--header 'X-Eflow-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": "",
"currency_id": "USD",
"coupon_code": "SUMMER",
"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": {
"__cc": "SUMMER"
}
}
}
---
# Raw Conversions Report | Everflow
Raw Conversions Report
======================
Operations to fetch raw conversions
The endpoints documented in this section allow you to pull conversions and post-conversion events from the API. Each conversion / event will be a “row” in the response as the data is not aggregated.
Note that currency conversion is not supported on raw conversion endpoints. Conversions are always stored in the currency of the offer they belong to and this is how the endpoints return raw conversions.
Requested intervals are limited to a **maximum duration of one year**. For example, requests with `"from": "2022-01-01", "to": "2023-12-31"` are considered invalid and will return an error.
* * *
### Conversion Report
POST `/v1/affiliates/reporting/conversions`
The conversion report is the most flexible way to extract a list of conversions and post-conversion events. It allows you to fetch a list of conversions and post-conversion events while specifying filters to narrow down the scope of the set of data you are pulling.
Each request must contain :
* `from` and `to` dates (format can be `YYYY-mm-DD or YYYY-mm-DD hh:mm:ss`)
* The `timezone_id` used for the request. Find all timezones [here](https://developers.everflow.io/docs/metadata/timezones/)
* A `show_conversions` boolean value that determines whether base conversions are returned (`true` / `false`)
* A `show_events` boolean value that determines whether post-conversion events are returned (`true` / `false`)
Please note that the conversion report is limited to the prior 365 days only. Requests outside of this range will result in an error
Optional query filters can be added to the call
#### Paging
This endpoint supports paging. Refer to our [User Guide](https://developers.everflow.io/docs/user-guide/paging/)
for usage.
#### [Query Filters](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_conversions/#bfbdadddca)
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 conversions for US traffic on offer 883 OR offer 518”.
#### [Filter Resource Types](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_conversions/#abcccffefb)
The `resource-type` used in the query filters can take the following values :
`offer`, `offer_creative`, `transaction_id`, `campaign`, `sub1`, `sub2`, `sub3`, `sub4`, `sub5`, `source_id`, `country`, `offer_url`, `browser`, `carrier`, `coupon_code`, `dma`, `device_brand`, `device_type`, `language`, `os_version`, `platform`, `region`
#### [Examples](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_conversions/#bbdcddccec)
Here are a few variations of what you can pass as a payload in ithe following call :
curl --request POST 'https://api.eflow.team/v1/affiliates/reporting/conversions' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example 1** : Pull all conversions (but no events) over a 1 hour period
{
"from": "2022-02-08 13:00:00",
"to": "2022-02-08 14:00:00",
"timezone_id": 67,
"show_conversions": true,
"show_events": false,
"query":{
"filters": []
}
}
**Example 2** : Pull conversions and events on offer ID 800
{
"from": "2022-02-07",
"to": "2022-02-10",
"timezone_id": 80,
"show_conversions": true,
"show_events": true,
"query":{
"filters": [\
{\
"filter_id_value": "800",\
"resource_type": "offer"\
}\
]
}
}
**Example 3** : Pull all conversions and events that were generated from either of these 2 transaction IDs
{
"from": "2022-02-01",
"to": "2022-02-10",
"timezone_id": 80,
"show_conversions": true,
"show_events": true,
"query":{
"filters": [\
{\
"filter_id_value": "e33e03d630a04f499835cfa3d3158baf",\
"resource_type": "transaction_id"\
},\
{\
"filter_id_value": "2718b9f7adeb4d98869767bc1202edf5",\
"resource_type": "transaction_id"\
}\
]
}
}
#### [Response](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_conversions/#afdeffcadd)
A response from the conversion report endpoint will look like :
{
"conversions": [\
{\
"conversion_id": "f9d3fa7e86d241afbec4a6c6c3fe2580",\
"conversion_unix_timestamp": 1661970244,\
"sub1": "internal",\
"sub2": "",\
"sub3": "facebook",\
"sub4": "",\
"sub5": "",\
"source_id": "",\
"revenue_type": "CPA",\
"revenue": 0.8,\
"session_user_ip": "217.66.156.135",\
"conversion_user_ip": "",\
"country": "Russia",\
"region": "Sankt-peterburg",\
"city": "St Petersburg",\
"dma": 0,\
"carrier": "MTS Russia",\
"platform": "macOS",\
"os_version": "",\
"device_type": "PC",\
"brand": "Apple",\
"browser": "Safari",\
"language": "en",\
"http_user_agent": "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_7_2 rv:5.0) Gecko/20111121 Firefox/5.0.1",\
"is_event": false,\
"event": "",\
"transaction_id": "a22f8a1b5fde4801a2ed3dceabf4f8a3",\
"click_unix_timestamp": 1661970238,\
"isp": "mts ojsc",\
"referer": "",\
"app_id": "",\
"idfa": "",\
"idfa_md5": "",\
"idfa_sha1": "",\
"google_ad_id": "",\
"google_ad_id_md5": "",\
"google_ad_id_sha1": "",\
"android_id": "",\
"android_id_md5": "",\
"android_id_sha1": "",\
"currency_id": "USD",\
"is_view_through": false,\
"order_id": "",\
"adv1": "facebook",\
"adv2": "",\
"adv3": "",\
"adv4": "",\
"adv5": "",\
"relationship": {\
"offer": {\
"network_offer_id": 3,\
"network_id": 1,\
"name": "Daily Car",\
"offer_status": "active",\
"network_tracking_domain_id": 1\
},\
"events_count": 0,\
"offer_url": {\
"network_offer_url_id": 100,\
"network_id": 1,\
"network_offer_id": 3,\
"name": "Alternate Offer URL",\
"preview_url": "https://example-shop.com"\
}\
}\
},\
// ...\
],
"paging": {
"page": 1,
"page_size": 2000,
"total_count": 2
}
}
* * *
### Conversion Report Export
POST `/v1/affiliates/reporting/conversions/export`
The export endpoint is very similar to the report endpoint documented above but lets you export in CSV or JSON format.
Please note that when using the JSON format, the results will be [newlined delimited JSON](https://en.wikipedia.org/wiki/JSON_streaming)
.
You must add the `format` properly to the payloads from the regular table endpoint for requests to work on this endpoint. The `format` can be either :
* `csv`
* `json`
#### [Examples](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_conversions/#ccbaedbfdc)
##### cURL
curl --request POST 'https://api.eflow.team/v1/affiliates/reporting/conversions/export' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data ''
**Example** : Export conversions and events on offer 800 in JSON format
{
"from": "2022-02-07",
"to": "2022-02-10",
"timezone_id": 80,
"show_conversions": true,
"show_events": true,
"query":{
"filters": [\
{\
"filter_id_value": "800",\
"resource_type": "offer"\
}\
]
},
"format": "json"
* * *
### Conversion By ID
GET `/v1/affiliates/reporting/conversions/:conversionId`
Fetch a single conversion by its unique conversion ID.
#### Path Parameters
| Parameter | Description |
| --- | --- |
| conversionId | The ID of the conversion (32 char) |
#### [Request Example](https://developers.everflow.io/docs/affiliate/reporting/affiliate_raw_conversions/#ddfcbdcbcc)
##### cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/reporting/conversions/<32 char Conversion ID>' \
--header 'X-Eflow-API-Key: '
##### Response
{
"conversion_id": "f9d3fa7e86d241afbec4a6c6c3fe2580",
"conversion_unix_timestamp": 1661970244,
"sub1": "facebook",
"sub2": "",
"sub3": "internal",
"sub4": "",
"sub5": "",
"source_id": "",
"revenue_type": "CPA",
"revenue": 0.8,
"session_user_ip": "217.66.156.135",
"conversion_user_ip": "",
"country": "Russia",
"region": "Sankt-peterburg",
"city": "St Petersburg",
"dma": 0,
"carrier": "MTS Russia",
"platform": "macOS",
"os_version": "",
"device_type": "PC",
"brand": "Apple",
"browser": "Safari",
"language": "en",
"http_user_agent": "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_7_2 rv:5.0) Gecko/20111121 Firefox/5.0.1",
"is_event": false,
"event": "",
"transaction_id": "a22f8a1b5fde4801a2ed3dceabf4f8a3",
"click_unix_timestamp": 1661970238,
"isp": "mts ojsc",
"referer": "",
"app_id": "",
"idfa": "",
"idfa_md5": "",
"idfa_sha1": "",
"google_ad_id": "",
"google_ad_id_md5": "",
"google_ad_id_sha1": "",
"android_id": "",
"android_id_md5": "",
"android_id_sha1": "",
"currency_id": "USD",
"is_view_through": false,
"order_id": "",
"adv1": "",
"adv2": "",
"adv3": "",
"adv4": "",
"adv5": "",
"relationship": {
"offer": {
"network_offer_id": 3,
"network_id": 1,
"name": "Daily Car",
"offer_status": "active",
"network_tracking_domain_id": 1
},
"events_count": 0
},
"sale_amount": 0,
"coupon_code": "SUMMER"
}
---
# Firehose: Real-Time Event Streaming | Everflow
Firehose: Real-Time Event Streaming
===================================
An alternative to Everflow’s reporting REST API
The Everflow API lets you fetch unaggregated reporting data through the endpoints documented in this section. More specifically :
* [Raw Clicks](https://developers.everflow.io/docs/network/reporting/raw_clicks/)
endpoints allow you to fetch unaggregated click data
* [Raw Impressions](https://developers.everflow.io/docs/network/reporting/raw_impressions/)
endpoints allow you to fetch unaggregated impression data
* [Raw Conversions](https://developers.everflow.io/docs/network/reporting/raw_conversions/)
endpoints allow you to fetch unaggregated conversion / event data
The Firehose, on the other hand, is a real-time data streaming solution that enables networks to receive their tracking events (clicks, impressions, and conversions) directly into their own infrastructure as they occur. This solution is particularly valuable for networks requiring a complete copy of their data without the constraints of traditional API polling.
### Overview
While Everflow’s REST API provides comprehensive access to your data, the Firehose offers distinct advantages for specific use cases:
* Real-time data delivery (typically sub-second latency)
* No rate limiting
* Direct integration with your infrastructure
* Automatic handling of conversion updates
* Elimination of duplicate data concerns associated with time intervals
### Supported Platforms
The Firehose currently supports streaming to:
* [Amazon SQS](https://aws.amazon.com/sqs/)
* [Google Cloud Pub/Sub](https://cloud.google.com/pubsub?hl=en)
* Standard HTTPS POST calls
Additional cloud providers, such as Azure, or other streaming methods, can be supported upon request.
### How It Works
* Tracking events occur on your Everflow instance (clicks, impressions, conversions and conversion updates)
* Events are immediately processed and streamed to your designated message queue
* Your applications can store or consume these events in real-time from your message queue

The firehose publishes on your message queue
### Customization Options
The Firehose implementation is customizable per network:
* Configurable payload structure
* Include all raw query parameters from tracking events
* Custom field mapping and data transformations
* Filtering options for specific event types – you can decide to receive only a subset of your data
Here are examples of the payloads we can send for the different types of events : [click](https://storage.googleapis.com/everflow-documentation/api/network/firehose_click.json)
, [impression](https://storage.googleapis.com/everflow-documentation/api/network/firehose_impression.json)
, [conversion](https://storage.googleapis.com/everflow-documentation/api/network/firehose_conversion.json)
and [conversion update](https://storage.googleapis.com/everflow-documentation/api/network/firehose_conversion_update.json)
.
### Key Benefits
The Firehose addresses several limitations of traditional API-based data retrieval:
* **No Rate Limits**: All events are guaranteed to be delivered, regardless of volume
* **Real-Time Processing**: Eliminate the need for polling intervals and complex scheduling
* **Conversion Updates**: Automatically receive updates to conversion data as they occur without having to fetch past intervals
* **Configurable Payload**: Get the payload that works for your use case
* **Data Consistency**: Avoid challenges with time-based querying and potential data gaps
* **Security**: Secure authentication with your cloud infrastructure, encrypted data transmission
### Implementation Process
To implement the Firehose for your network:
1. Contact Everflow Support to initiate Firehose setup
2. Provide your cloud infrastructure details (e.g., Google Cloud Pub/Sub topic or Amazon SQS queue)
3. Work with our team to configure payload structure and any custom requirements
4. Receive implementation documentation specific to your configuration
5. Begin receiving real-time event data
Please contact Everflow Support to get started. Our team will work with you to determine the best configuration for your needs and guide you through the implementation process.
---
# Traffic Sources | Everflow
Traffic Sources
===============
Operations for traffic sources
Traffic sources are a powerful way of appending parameters and values to links for partners. You can find out more about traffic sources on the [Helpdesk](https://helpdesk.everflow.io/customer/how-to-create-link-templates-with-traffic-sources)
.
* * *
### Find All
GET `/v1/networks/trafficsource`
This endpoint can be used to fetch all active traffic sources.
| Value | Description |
| --- | --- |
| time\_created | The time at which the traffic source was created |
| time\_saved | The time at which the traffic source was last modified |
#### [Request Example](https://developers.everflow.io/docs/network/traffic_sources/#adacfdccda)
##### cURL
curl --request GET 'https://api.eflow.team/v1/networks/trafficsource' \
--header 'X-Eflow-API-Key: '
##### Response
{
"traffic_sources": [\
{\
"network_traffic_source_id": 1,\
"network_id": 5,\
"name": "Traffic Source 1",\
"postback_url": "",\
"time_created": 1494456354,\
"time_saved": 1607456360,\
"relationship": {\
"parameters": {\
"total": 1,\
"entries": [\
{\
"network_traffic_source_id": 1,\
"network_id": 5,\
"tracking_parameter": "param1",\
"tracking_value": "value1"\
}\
]\
}\
},\
"is_public": false\
},\
{\
"network_traffic_source_id": 2,\
"network_id": 5,\
"name": "Traffic Source 2",\
"postback_url": "https://www.postbackurl.com",\
"time_created": 1716117495,\
"time_saved": 1716117495,\
"relationship": {\
"parameters": {\
"total": 2,\
"entries": [\
{\
"network_traffic_source_id": 2,\
"network_id": 5,\
"tracking_parameter": "param1",\
"tracking_value": "value1"\
},\
{\
"network_traffic_source_id": 2,\
"network_id": 5,\
"tracking_parameter": "param2",\
"tracking_value": "value2"\
}\
]\
}\
},\
"is_public": true\
}\
\
\
\
* * *\
\
### Find By ID\
\
GET `/v1/networks/trafficsource/:trafficSourceId`\
\
This is the endpoint that will return a singular traffic source.\
\
#### Path Parameters\
\
| Parameter | Description |\
| --- | --- |\
| trafficSourceId | The ID of the traffic source you want to fetch |\
\
#### [Request Example](https://developers.everflow.io/docs/network/traffic_sources/#aacbbcdccf)\
\
##### cURL\
\
curl --request GET 'https://api.eflow.team/v1/networks/trafficsource/1' \\
--header 'X-Eflow-API-Key: '\
\
\
##### Response\
\
{\
"network_traffic_source_id": 1,\
"network_id": 5,\
"name": "Traffic Source 1",\
"postback_url": "",\
"time_created": 1716117495,\
"time_saved": 1716117495,\
"relationship": {\
"parameters": {\
"total": 1,\
"entries": [\
{\
"network_traffic_source_id": 1,\
"network_id": 5,\
"tracking_parameter": "param1",\
"tracking_value": "value1"\
}\
]\
}\
},\
"is_public": false\
}\
\
\
* * *\
\
### Create\
\
POST `/v1/networks/trafficsource`\
\
#### [Request Body](https://developers.everflow.io/docs/network/traffic_sources/#cddbcbbbfc)\
\
#### Body Params\
\
name string\
\
Name of the traffic source.\
\
postback\_url string\
\
The affiliate IDs that will be affected by the traffic control (only relevant when `is_apply_all_affiliates` is set to `false`)\
\
is\_public boolean\
\
When this is true the affiliate will be able to select for this traffic source when generating tracking links.\
\
parameters object array\
\
An array which contains objects with the keys `tracking_parameter` and `tracking_value` which will store the parameters and values of this particular traffic source. Atleast one object is required in this array.\
\
tracking\_parameter string\
\
Parameter to be added to the traffic source\
\
tracking\_value string\
\
value that will be added to the parameter in the same object\
\
##### Body Example\
\
{\
"name": "traffic source 3",\
"postback_url": "https://www.postbackurl.com",\
"is_public": false,\
"parameters": [\
{\
"tracking_parameter": "param1",\
"tracking_value": "value1"\
},\
{\
"tracking_parameter": "param2",\
"tracking_value": "value2"\
}\
]\
}\
\
\
#### [Request Example](https://developers.everflow.io/docs/network/traffic_sources/#bbdbddcfaf)\
\
##### cURL\
\
curl --request POST 'https://api.eflow.team/v1/networks/trafficsource' \\
--header 'X-Eflow-API-Key: ' \\
--header 'Content-Type: application/json' \\
--data ''\
\
\
##### Response\
\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"name": "traffic source 3",\
"postback_url": "https://www.postbackurl.com",\
"time_created": 1716486829,\
"time_saved": 1716486829,\
"relationship": {\
"parameters": {\
"total": 2,\
"entries": [\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"tracking_parameter": "param1",\
"tracking_value": "value1"\
},\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"tracking_parameter": "param2",\
"tracking_value": "value2"\
}\
]\
}\
},\
"is_public": false\
}\
\
\
* * *\
\
### Update\
\
PUT `/v1/networks/trafficsource`\
\
Update an existing traffic source.\
\
You **must** specify all the fields, not only the ones you wish to update. \
If you omit a field that is not marked as required, its default value will be used.\
\
#### [Request Body](https://developers.everflow.io/docs/network/traffic_sources/#cdabbbcfbc)\
\
#### Body Params\
\
network\_traffic\_source\_id int\
\
The id of the traffic source you are trying to update.\
\
name string\
\
Name of the traffic source.\
\
postback\_url string\
\
The affiliate IDs that will be affected by the traffic control (only relevant when `is_apply_all_affiliates` is set to `false`)\
\
is\_public boolean\
\
When this is true the affiliate will be able to select for this traffic source when generating tracking links.\
\
parameters object array\
\
An array which contains objects with the keys `tracking_parameter` and `tracking_value` which will store the parameters and values of this particular traffic source. Atleast one object is required in this array.\
\
tracking\_parameter string\
\
Parameter to be added to the traffic source\
\
tracking\_value string\
\
value that will be added to the parameter in the same object\
\
##### Body Example\
\
{\
"network_traffic_source_id": 3,\
"name": "traffic source 3",\
"postback_url": "https://www.postbackurl.com",\
"is_public": false,\
"parameters": [\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"tracking_parameter": "param1",\
"tracking_value": "value1"\
},\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"tracking_parameter": "param2",\
"tracking_value": "value2"\
},\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"tracking_parameter": "param3",\
"tracking_value": "value3"\
}\
]\
}\
\
\
#### [Request Example](https://developers.everflow.io/docs/network/traffic_sources/#fdfcdffbdc)\
\
##### cURL\
\
curl --request PUT 'https://api.eflow.team/v1/networks/trafficsource' \\
--header 'X-Eflow-API-Key: ' \\
--header 'Content-Type: application/json' \\
--data ''\
\
\
##### Response\
\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"name": "traffic source 3",\
"postback_url": "https://www.postbackurl.com",\
"time_created": 1716486829,\
"time_saved": 1716487844,\
"relationship": {\
"parameters": {\
"total": 3,\
"entries": [\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"tracking_parameter": "param1",\
"tracking_value": "value1"\
},\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"tracking_parameter": "param2",\
"tracking_value": "value2"\
},\
{\
"network_traffic_source_id": 3,\
"network_id": 5,\
"tracking_parameter": "param3",\
"tracking_value": "value3"\
}\
]\
}\
},\
"is_public": false\
}\
\
\
* * *\
\
### Delete\
\
DELETE `/v1/networks/trafficsource/:trafficSourceId`\
\
Delete an existing traffic source.\
\
#### Path Parameters\
\
| Parameter | Description |\
| --- | --- |\
| trafficSourceId | The ID of the traffic source you want to delete |\
\
#### [Request Example](https://developers.everflow.io/docs/network/traffic_sources/#bdecddafbb)\
\
##### cURL\
\
curl --request DELETE 'https://api.eflow.team/v1/networks/trafficsource/1' \\
--header 'X-Eflow-API-Key: '\
\
\
##### Response\
\
{\
"success": true\
}
---
# Affiliate Postback | Everflow
Affiliate Postback
==================
Operations to fetch the Affiliate Postback Report
In the endpoints documented here, each affiliate postback is a “row” in the response. The data is not aggregated.
* * *
### Affiliate Postback Report
POST `/v1/networks/reporting/affiliate/pixels`
This endpoint is used to extract a affiliate postbacks. In the result of this request, each postback will be one element / row. To avoid slow response times and limit the size of the payload, this endpoint is limited in what it actually returns.
The maximum number of postbacks that can be returned by this endpoint is : **1000**. If there are more than 1000 postbacks for the period / filters requested, they will not be returned. Please use the export streaming endpoint documented below which doesn’t have the same restriction.
Each request must contain :
* `from` and `to` dates in either the `YYYY-mm-DD HH:MM:SS` or the `YYYY-mm-DD` format
* `timezone_id` used for the request. Find all timezones [here](https://developers.everflow.io/docs/metadata/timezones/)
but can also contain optional query filters.
#### [Query Filters](https://developers.everflow.io/docs/network/reporting/affiliate_postback/#ededbbcfad)
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":[\
{\
"resource_type": "offer",\
"filter_id_value": "15"\
},\
{\
"resource_type": "offer",\
"filter_id_value": "18"\
},\
{\
"resource_type": "affiliate",\
"filter_id_value": "7"\
}\
]
}
}
translate to “Pull all postback data for affiliate 7 on offers 15 and 18”.
#### [Filter Resource Types](https://developers.everflow.io/docs/network/reporting/affiliate_postback/#bbcadcddbb)
The `resource-type` used in the filters and exclusions can take the following values : `offer`, `affiliate` and `delivery_status`
The `delivery_status` can either be `success` or `failure`
#### [Request Example](https://developers.everflow.io/docs/network/reporting/affiliate_postback/#bccbdcaedb)
##### cURL
curl --request POST \
--url https://api.eflow.team/v1/networks/reporting/affiliate/pixels \
--header 'content-type: application/json' \
--header 'X-Eflow-API-Key: ' \
--data ''
**Example 1** : Include postbacks for offer ID 11 that succeeded
{
"timezone_id": 90,
"from": "2024-02-07",
"to": "2024-02-08",
"query":{
"filters": [\
{\
"resource_type": "offer",\
"filter_id_value": "11"\
},\
{\
"resource_type": "delivery_status",\
"filter_id_value": "success"\
}\
]
}
}
##### Response
{
"pixels": [\
{\
"network_id": 1,\
"network_offer_id": 11,\
"network_offer_payout_revenue_id": 0,\
"affiliate_id": 7,\
"pixel_id": 132,\
"conversion_id": "a3371dd7b36849cbbfdd9c300b06fdb5",\
"transaction_id": "d5c6feef0d8f489fb91aa5cfb4d64f4e",\
"timestamp": 1707425899,\
"delivery_method": "postback",\
"pixel_level": "global",\
"pixel_status": "active",\
"pixel_type": "conversion",\
"payload": "https://httpbin.org/get?tid=d5c6feef0d8f489fb91aa5cfb4d64f4e",\
"is_success": true,\
"debug_information": "PostbackUrl: https://httpbin.org/get?tid=d5c6feef0d8f489fb91aa5cfb4d64f4e\nStatus: 200\nScheme: \nPath: \nAuthority: \nHeaders: Server: [gunicorn/19.9.0]",\
"last_attempt": 0,\
"failed_attempts": 0,\
"relationship": {\
"offer": {\
"network_offer_id": 11,\
"network_id": 1,\
"network_advertiser_id": 13,\
"network_offer_group_id": 0,\
"name": "Example Offer",\
"offer_status": "active",\
"network_tracking_domain_id": 134,\
"visibility": "public",\
"currency_id": "USD"\
},\
"affiliate": {\
"network_affiliate_id": 7,\
"network_id": 1,\
"name": "John Doe Inc.",\
"account_status": "active",\
"network_traffic_source_id": 0\
}\
} \
}\
]
}
* * *
### Affiliate Postback Export
POST `/v1/networks/reporting/affiliate/pixels/export`
The table export is basically identical to the endpoint documented above, except that it lets you “export” the data in CSV or JSON format and doesn’t limit you to 1000 postbacks.
Please note that when using the JSON format, the results will be [newlined delimited JSON](https://en.wikipedia.org/wiki/JSON_streaming)
.
You must add the `format` properly to the payloads from the regular table endpoint for requests to work on this endpoint. The `format` can be either :
* `csv`
* `json`
#### [Example](https://developers.everflow.io/docs/network/reporting/affiliate_postback/#cfbbbcbefa)
curl --request POST 'https://api.eflow.team/v1/networks/reporting/affiliate/pixels/export' \
--header 'X-Eflow-API-Key: ' \
--header 'Content-Type: application/json' \
--data '{
"timezone_id": 90,
"from": "2024-02-07",
"to": "2024-02-08",
"query":{
"filters": [\
{\
"resource_type": "offer",\
"filter_id_value": "11"\
},\
{\
"resource_type": "delivery_status",\
"filter_id_value": "success"\
}\
]
},
"format": "csv"
}'
---
# Deals | Everflow
Deals
=====
Operations related to deals
Deals are optional in Everflow but can exist at the offer level. There can be 0, 1 or more deals associated with any given offer.
The deals will only be accessible on offers on which you can currently run traffic (i.e. not blocked and not pending approval on the offer).
### The “Deals” Object
Though different versions of the deals object are returned by the endpoints documented here, it can be defined as such :
#### [Body Fields](https://developers.everflow.io/docs/affiliate/deals/#cffddccbdc)
network\_advertiser\_deal\_id int
The deal’s unique identifier
network\_id int
The identifier of the network associated with the deal
name string
The name of the deal as defined by the network
brand\_name string
The name of the brand the deal is associated with. This is currently optional.
deal\_type string
The deal type will be one of the following values : `coupon`, `freeshipping`, `category_coupon`, `category_sale`, `product_coupon`, `product_sale`, `rebates`, `clearance`, `sale`, `offer`, `shipping_offer`, `newcustomer`, `gift`, `dollar`, `percent`, `dod`, `apofreeshipping`, `totallyfreeshipping`, `mobile`, `printable`, `fmtc_exclusive`, `local`, `friends_family`, `revtrax`, `bogo`, `category` or `free_trial`
deal\_status string
The deal status will be one of the following values : `active`, `inactive` or `deleted`
deal\_categories string array
There must be at least one category (but there can be multiple) in the following values :
#### [Deal Categories](https://developers.everflow.io/docs/affiliate/deals/#dbcafabcde)
`alcohol-beer`, `alcohol-beer-home-brewing`, `alcohol-beer-liquor-spirits`, `alcohol-beer-wine`, `animals-pet-supplies`, `animals-pet-supplies-bird-supplies`, `animals-pet-supplies-cat-supplies`, `animals-pet-supplies-dog-supplies`, `animals-pet-supplies-horse-supplies`, `arts-entertainment`, `arts-entertainment-event-tickets`, `arts-entertainment-event-tickets-adult-entertainment`, `arts-entertainment-hobbies-creative-arts`, `arts-entertainment-party-supplies`, `auctions`, `b2b`, `b2b-advertising-marketing`, `b2b-construction`, `b2b-food-service`, `b2b-janitorial`, `b2b-medical`, `b2b-retail`, `b2b-signage`, `b2b-web-hosting-domains`, `b2b-work-safety`, `babies-kids`, `babies-kids-baby-health`, `babies-kids-baby-safety`, `Babies-kids-baby-toys-activity-equipment`, `babies-kids-car-seats-carriers-strollers`, `babies-kids-diapering`, `babies-kids-nursing-feeding`, `babies-kids-potty-training`, `charity`, `clothing-apparel`, `clothing-apparel-accessories`, `clothing-apparel-baby-kids`, `clothing-apparel-costumes`, `clothing-apparel-men`, `clothing-apparel-women`, `clothing-apparel-work-uniforms`, `computers-accessories`, `computers-accessories-accessories`, `computers-accessories-data-storage`, `computers-accessories-desktops`, `computers-accessories-input-devices`, `computers-accessories-laptops`, `computers-accessories-monitors`, `computers-accessories-networking-products`, `computers-accessories-print-copy-scan-fax`, `computers-accessories-servers`, `computers-accessories-software`, `computers-accessories-tablets`, `consumer-electronics`, `consumer-electronics-audio`, `consumer-electronics-batteries`, `consumer-electronics-camera-optics`, `consumer-electronics-drones`, `consumer-electronics-ereaders`, `consumer-electronics-electronics-accessories`, `consumer-electronics-gps`, `consumer-electronics-home-security-systems`, `consumer-electronics-projectors`, `consumer-electronics-smart-home-devices`, `consumer-electronics-smart-watches`, `consumer-electronics-telephony`, `consumer-electronics-video`, `consumer-electronics-video-game-consoles-games`, `consumer-electronics-video-players-recorders`, `consumer-services`, `consumer-services-box-subscriptions`, `consumer-services-dating`, `consumer-services-internet-services`, `consumer-services-photo-canvas-services`, `consumer-services-tarot-readings-psychics`, `covid-related`, `curbside-pickup`, `department-stores`, `education`, `education-college`, `education-online-courses`, `education-school-supplies`, `erotic`, `erotic-books-magazines`, `erotic-clothing`, `erotic-dvds`, `erotic-games`, `erotic-sex-toys`, `financial`, `financial-credit-cards`, `financial-id-protection`, `financial-insurance`, `financial-legal`, `financial-loans`, `financial-tax-services`, `food-gourmet`, `food-gourmet-food-beverage`, `food-gourmet-restaurants`, `gambling`, `gifts`, `gifts-flowers`, `gifts-gift-baskets`, `gifts-gift-certificates`, `gifts-greeting-cards-stationery`, `gifts-personalized-gifts`, `gifts-photo-gifts`, `green-living-ecofriendly`, `group-discount`, `group-discount-age-segment-discount`, `group-discount-alumni-discount`, `group-discount-corporate-discount`, `group-discount-first-responder-discount`, `group-discount-healthcare-worker-discount`, `group-discount-hero-discount`, `group-discount-military-discount`, `group-discount-student-discount`, `group-discount-teacher-discount`, `hardware`, `hardware-building-supplies`, `hardware-tools`, `health-beauty`, `health-beauty-beauty-cosmetics`, `health-beauty-contacts-glasses`, `health-beauty-diet-fitness`, `health-beauty-fragrance-cologne`, `health-beauty-health-care`, `health-beauty-health-care-cdb`, `health-beauty-personal-care`, `health-beauty-vitamins-supplements`, `holidays-occasions`, `holidays-occasions-4th-of-july`, `holidays-occasions-april-fools-day`, `holidays-occasions-australia-day`, `holidays-occasions-back-to-school`, `holidays-occasions-black-friday`, `holidays-occasions-black-friday-in-july`, `holidays-occasions-boxing-day`, `holidays-occasions-canada-day`, `holidays-occasions-chinese-new-year`, `holidays-occasions-christmas`, `holidays-occasions-christmas-in-july`, `holidays-occasions-cinco-de-mayo`, `holidays-occasions-columbus-day`, `holidays-occasions-cyber-monday`, `holidays-occasions-earth-day`, `holidays-occasions-easter`, `holidays-occasions-fathers-day`, `holidays-occasions-free-shipping-day`, `holidays-occasions-giving-tuesday`, `holidays-occasions-graduation`, `holidays-occasions-green-monday`, `holidays-occasions-halloween`, `holidays-occasions-hanukkah`, `holidays-occasions-labor-day`, `holidays-occasions-leap-day`, `holidays-occasions-mardi-gras`, `holidays-occasions-martin-luther-king-day`, `holidays-occasions-memorial-day`, `holidays-occasions-mothers-day`, `holidays-occasions-new-years`, `holidays-occasions-pink-ribbon-shop`, `holidays-occasions-presidents-day`, `holidays-occasions-pride-day`, `holidays-occasions-prom`, `holidays-occasions-singles-day`, `holidays-occasions-st-patricks-day`, `holidays-occasions-tax-day`, `holidays-occasions-thanksgiving`, `holidays-occasions-valentines-day`, `holidays-occasions-veterans-day`, `holidays-occasions-weddings`, `household`, `household-appliances`, `household-bed-bath`, `household-furniture`, `household-home-decor`, `household-kitchen-dining`, `household-lighting`, `household-rugs-flooring`, `household-storage-and-organization`, `household-supplies`, `household-yard-garden`, `kids`, `local-deals`, `local-deals-apparel`, `local-deals-automotive`, `local-deals-babies-kids`, `local-deals-beauty-spas`, `local-deals-cannabis`, `local-deals-computers-electronics`, `local-deals-education`, `local-deals-entertainment`, `local-deals-financial`, `local-deals-food-drink`, `local-deals-gifts`, `local-deals-health-wellness`, `local-deals-holiday`, `local-deals-home-services`, `local-deals-jewelry`, `local-deals-legal-services`, `local-deals-nightlife`, `local-deals-pets`, `local-deals-photography`, `local-deals-professional-services`, `local-deals-public-services`, `local-deals-real-estate`, `local-deals-shopping`, `local-deals-sports-recreation`, `local-deals-travel`, `luggage-bags`, `luggage-bags-backpacks`, `media`, `media-books-magazines`, `media-movies`, `media-music`, `mens`, `office`, `office-equipment`, `office-furniture`, `office-school-supplies`, `office-supplies`, `sporting-goods`, `sporting-goods-athletics`, `sporting-goods-dance-gymnastics`, `sporting-goods-exercise-fitness`, `sporting-goods-indoor-games`, `sporting-goods-lacrosse`, `sporting-goods-outdoor-recreation`, `tobacco`, `tobacco-cigars`, `tobacco-ecigarettes-vaporizers`, `toys-games`, `toys-games-card-games`, `toys-games-games`, `toys-games-outdoor-play-equipment`, `toys-games-puzzles`, `toys-games-toys`, `toys-games-video-games`, `travel`, `travel-air`, `travel-car-rental`, `travel-cruises`, `travel-hotel`, `travel-vacation-packages`, `vehicles-parts`, `vehicles-parts-motor-vehicle-electronics`, `vehicles-parts-motor-vehicle-parts`, `vehicles-parts-vehicle-insurance`, `vehicles-parts-vehicle-maintenance-care-decor`, `vehicles-parts-vehicle-safety-security`, `vehicles-parts-vehicle-storage-cargo`, `vehicles-parts-watercraft-parts-accessories`, `weapons`, `womens`
description string
Optional deal description
restrictions string
Optional restrictions on the deal (expressed as free text)
scope string
The deal scope can be one of the following : `entire_store`, `category` or `product`
coupon\_code string
An optional coupon code associated with the deal
coupon\_code\_discount\_percentage int
Only relevant if a coupon code is specified. The coupon code will either be a percentage discount or an amount discount but cannot be both
coupon\_code\_discount\_amount int
Only relevant if a coupon code is specified. The coupon code will either be a percentage discount or an amount discount but cannot be both
coupon\_code\_discount\_currency\_id string
Only relevant if a coupon code is specified. The currency specified here is associated with the `coupon_code_discount_amount`
threshold\_quantity int
An optional quantity required to trigger the deal. The threshold can be either an amount or a quantity but cannot be both.
threshold\_amount int
An optional amount required to trigger the deal. The threshold can be either an amount or a quantity but cannot be both.
threshold\_amount\_currency\_id string
Only relevant if a `threshold_amount` is specified. The currency specified here is associated with the `threshold_amount`
purchase\_limit\_quantity int
An optional quantity limit associated with the deal. The limit can be either an amount or a quantity but cannot be both.
purchase\_limit\_amount int
An optional amount limit associated with the deal. The limit can be either an amount or a quantity but cannot be both.
purchase\_limit\_amount\_currency\_id string
Only relevant if a `purchase_limit_amount` is specified. The currency specified here is associated with the `purchase_limit_amount`
date\_valid\_from int
Certain deals are only valid for a given period of time. An optional unix timestamp that expresses the date after which the deal becomes valid.
date\_valid\_to int
Certain deals are only valid for a given period of time. An optional unix timestamp that expresses the date after which the deal has ended.
date\_valid\_timezone\_id int
Only relevant if `date_valid_from` or `date_valid_to` are specified. Since both are expressed as unix timestamps via the API this field is not overly relevant in the API. However, it determines how the date is displayed in the UI and can be used as such here.
* * *
### Get Offer Deals
GET `/v1/affiliates/offers/:offerId/deals`
This endpoint allows you to fetch the deals associated with an offer if they exist.
Returns an empty array if no deals exist.
Note that the `date_valid_from` and `date_valid_to` fields are optional and expressed as unix timestamps. They will be set to `0` if they are not specified.
#### [Request Example](https://developers.everflow.io/docs/affiliate/deals/#accffcbcdb)
##### cURL
curl --request GET 'https://api.eflow.team/v1/offers//deals' \
--header 'X-Eflow-API-Key: ' \
--header 'content-type: application/json'
##### Response
{
"deals": [\
{\
"network_advertiser_deal_id": 1,\
"network_id": 1,\
"name": "Example Deal",\
"brand_name": "Some brand",\
"deal_type": "coupon",\
"deal_status": "active",\
"deal_categories": [\
"computers-accessories-tablets",\
"computers-accessories-software",\
"computers-accessories-servers"\
],\
"description": "The description of the deal",\
"restrictions": "Some Restrictions (in free text)",\
"scope": "entire_store",\
"coupon_code": "SUMMER23",\
"coupon_code_discount_percentage": 0,\
"coupon_code_discount_amount": 20,\
"coupon_code_discount_currency_id": "USD",\
"threshold_quantity": 0,\
"threshold_amount": 1000,\
"threshold_amount_currency_id": "USD",\
"purchase_limit_quantity": 0,\
"purchase_limit_amount": 0,\
"purchase_limit_amount_currency_id": "",\
"date_valid_from": 1690304400,\
"date_valid_to": 0,\
"date_valid_timezone_id": 80,\
"relationship": {},\
"time_saved": 1690302358,\
"time_created": 1690301385,\
"time_deleted": 0\
}\
]
}
* * *
### Get All Deals
POST `/v1/affiliates/deals`
This endpoint allows you to fetch all deals available, with an optional filter of the offer ids.
Returns an empty array if no deals exist.
#### Paging
This endpoint supports paging. Refer to our [User Guide](https://developers.everflow.io/docs/user-guide/paging/)
for usage.
#### [Body Params](https://developers.everflow.io/docs/affiliate/deals/#aabccdbadb)
filters object
[View Object Details Hide Object Details](https://developers.everflow.io/docs/affiliate/deals/#filters)
network\_offer\_ids int array
An optional array of offers IDs for which you would like the deals returned.
#### [Request Example](https://developers.everflow.io/docs/affiliate/deals/#bbedcfeadd)
##### cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/deals' \
--header 'X-Eflow-API-Key: ' \
--header 'content-type: application/json'
**Example 1** : Fetch all deals related to offers with IDs 1 and 2
{
"filters": {
"network_offer_ids": [1, 2]
}
}
##### Response
{
"deals": [\
{\
"network_advertiser_deal_id": 1,\
"network_id": 1,\
"name": "Example Deal",\
"brand_name": "Some brand",\
"deal_type": "coupon",\
"deal_status": "active",\
"deal_categories": [\
"computers-accessories-tablets",\
"computers-accessories-software",\
"computers-accessories-servers"\
],\
"description": "The description of the deal",\
"restrictions": "Some Restrictions (in free text)",\
"scope": "entire_store",\
"coupon_code": "SUMMER23",\
"coupon_code_discount_percentage": 0,\
"coupon_code_discount_amount": 20,\
"coupon_code_discount_currency_id": "USD",\
"threshold_quantity": 0,\
"threshold_amount": 1000,\
"threshold_amount_currency_id": "USD",\
"purchase_limit_quantity": 0,\
"purchase_limit_amount": 0,\
"purchase_limit_amount_currency_id": "",\
"date_valid_from": 1690304400,\
"date_valid_to": 0,\
"date_valid_timezone_id": 80,\
"has_products": true,\
"has_locations": true,\
"relationship": {\
"deal_resources": [\
{\
"network_advertiser_deal_resource_id": 2,\
"network_advertiser_deal_id": 1,\
"resource_type": "thumbnail",\
"html_code": "",\
"width": 0,\
"height": 0,\
"relationship": {\
"assets": [\
{\
"network_asset_id": 2,\
"content_type": "image/png",\
"filename": "thumb.png",\
"url": "http://usercontent.everflowclient.io/1/advertisers/1/deal/5/resources/thumb.png",\
"file_size": 11516,\
"image_width": 0,\
"image_height": 0,\
"optimized_thumbnail_url": ""\
}\
]\
}\
},\
{\
"network_advertiser_deal_resource_id": 1,\
"network_advertiser_deal_id": 1,\
"resource_type": "image",\
"html_code": "",\
"width": 0,\
"height": 0,\
"relationship": {\
"assets": [\
{\
"network_asset_id": 1,\
"content_type": "image/png",\
"filename": "slack-preview.png",\
"url": "http://usercontent-dev.everflowclient.io/1/advertisers/1/deal/5/resources/some-image.png",\
"file_size": 274508,\
"image_width": 0,\
"image_height": 0,\
"optimized_thumbnail_url": ""\
}\
]\
}\
}\
],\
"offers": [\
{\
"network_offer_id": 1,\
"network_id": 1,\
"name": "Example Offer",\
"offer_status": "active",\
"tracking_url": "http://www.tracking-link.test/9W598/2CTPL/",\
"redirect_tracking_url": "",\
"impression_tracking_url": ""\
},\
{\
"network_offer_id": 2,\
"network_id": 1,\
"name": "Other offer",\
"offer_status": "active",\
"tracking_url": "http://www.tracking-link.test/9W598/3QQG7/",\
"redirect_tracking_url": "",\
"impression_tracking_url": ""\
}\
],\
},\
"time_saved": 1694616132,\
"time_created": 1694616132,\
"time_deleted": 0\
}\
],
"paging": {
"page": 1,
"page_size": 50,
"total_count": 1
}
}
* * *
### Get Offer Deal by ID
GET `/v1/affiliates/offers/:offerId/deals/:dealId`
This endpoint allows you to fetch a specific offer deal.
Note that the `date_valid_from` and `date_valid_to` fields are optional and expressed as unix timestamps. They will be set to `0` if they are not specified.
#### Relationships
This endpoint supports the following additional relationships. Refer to our [User Guide](https://developers.everflow.io/docs/user-guide/relationships/)
for usage.
| Value | Description |
| --- | --- |
| locations | Includes the deal’s locations (if any) in the response |
| products | Includes the deal’s products (if any) in the response |
| resources | Includes the deal’s resources (if any) in the response |
| trackings | Includes the offer’s tracking link in the response |
#### [Request Example](https://developers.everflow.io/docs/affiliate/deals/#dabdbcbbca)
##### cURL
curl --request GET 'https://api.eflow.team/v1/offers//deals/?relationship=locations&relationship=resources&relationship=trackings' \
--header 'X-Eflow-API-Key: ' \
--header 'content-type: application/json'
##### Response
{
"network_advertiser_deal_id": 1,
"network_id": 1,
"name": "Example Deal",
"brand_name": "Some brand",
"deal_type": "coupon",
"deal_status": "active",
"deal_categories": [\
"computers-accessories-tablets",\
"computers-accessories-software",\
"computers-accessories-servers"\
],
"description": "Public Description",
"restrictions": "Restrictions (free text)",
"scope": "entire_store",
"coupon_code": "SUMMER23",
"coupon_code_discount_percentage": 0,
"coupon_code_discount_amount": 20,
"coupon_code_discount_currency_id": "USD",
"threshold_quantity": 0,
"threshold_amount": 1000,
"threshold_amount_currency_id": "USD",
"purchase_limit_quantity": 0,
"purchase_limit_amount": 0,
"purchase_limit_amount_currency_id": "",
"date_valid_from": 1690304400,
"date_valid_to": 0,
"date_valid_timezone_id": 80,
"relationship": {
"deal_locations": [\
{\
"network_advertiser_deal_location_id": 4,\
"network_advertiser_deal_id": 1,\
"business_name": "Example business",\
"street_adress": "",\
"extended_address": "",\
"city": "",\
"region_id": 0,\
"country_id": 0,\
"postal_code": "",\
"business_website": "www.example-biz.net"\
}\
],
"deal_products": [\
{\
"network_advertiser_deal_product_id": 6,\
"network_advertiser_deal_id": 1,\
"product_name": "Server",\
"product_url": "www.example.test/server",\
"before_discount_price": 549,\
"after_discount_price": 399,\
"retail_price": 599,\
"discount_percentage": 0,\
"price_currency_id": "USD"\
},\
{\
"network_advertiser_deal_product_id": 5,\
"network_advertiser_deal_id": 1,\
"product_name": "Monitor",\
"product_url": "www.example.test/monitor",\
"before_discount_price": 379,\
"after_discount_price": 299,\
"retail_price": 399,\
"discount_percentage": 0,\
"price_currency_id": "USD"\
}\
],
"deal_resources": [\
{\
"network_advertiser_deal_resource_id": 1,\
"network_advertiser_deal_id": 1,\
"resource_type": "image",\
"html_code": "",\
"width": 200,\
"height": 300,\
"relationship": {\
"assets": [\
{\
"network_asset_id": 2,\
"content_type": "image/jpeg",\
"filename": "d5a38e62-4da3-424f-a5d1-64e9b6c2f934.jpeg",\
"url": "http://usercontent.everflowclient.io/1/advertisers/1/deal/0/resources/d5a38e62-4da3-424f-a5d1-64e9b6c2f934.jpeg",\
"file_size": 574359,\
"image_width": 200,\
"image_height": 300,\
"optimized_thumbnail_url": ""\
}\
]\
}\
}\
],
"tracking_url": "http://www.servetrack.test/9W598/55M6S/"
},
"time_saved": 1690306387,
"time_created": 1690301385,
"time_deleted": 0
}
---
# Advertiser API | Everflow
Advertiser API
==============
Reference documentation for the Advertiser API
* * *
##### [Offers](https://developers.everflow.io/docs/advertiser/offers/)
Operations for offers
##### [Reporting](https://developers.everflow.io/docs/advertiser/reporting/)
Operations for reporting
---
# Traffic | Everflow
Traffic
=======
Operations for traffic
* * *
### Find All Blocked Offer Sources
GET `/v1/affiliates/trafficblocking`
This endpoint allows you to retrieve a list of all offer/sub combinations that are blocked.
Returns an empty array if no combination exist.
#### Filters
This endpoint supports basic filtering. Refer to [API filters](https://developers.everflow.io/docs/user-guide/api_filters/)
page for usage.
| Value | Description |
| --- | --- |
| network\_offer\_id | Filter based on the offer id |
| traffic\_blocking\_status | Filter based on the traffic blocking status |
| time\_created | Filter based on the creation time |
| time\_saved | Filter based on the last update time |
#### [Request Example](https://developers.everflow.io/docs/affiliate/traffic/#abcdbfbbcd)
##### cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/trafficblocking' \
--header 'X-Eflow-API-Key: ' \
--header 'content-type: application/json'
##### Response
{
"traffic_blocking": [\
{\
"network_offer_id": 0,\
"relationship": {\
"variables": {\
"total": 0,\
"entries": [\
{\
"comparison_method": "begins_with",\
"variable": "",\
"variable_value": ""\
}\
]\
}\
}\
}\
]
}
* * *
### Find All Traffic Controls
GET `/v1/affiliates/trafficcontrols`
This endpoint allows you to retrieve a list of all the traffic controls that are affecting your offers.
To retrieve the values, use the endpoint with the specific traffic control Id.
Returns an empty array if no traffic control exist.
#### [Request Example](https://developers.everflow.io/docs/affiliate/traffic/#becabcfeba)
##### cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/trafficcontrols' \
--header 'X-Eflow-API-Key: ' \
--header 'content-type: application/json'
##### Response
{
"traffic_controls": [\
{\
"network_traffic_control_id": 1,\
"status": "active",\
"is_apply_all_offers": true,\
"control_type": "blacklist",\
"date_valid_from": "",\
"date_valid_to": "",\
"comparison_method": "contains",\
"variables": [],\
"relationship": {}\
}\
]
}
* * *
### Find Traffic Control By ID
GET `/v1/affiliates/trafficcontrols/:controlId`
This endpoint allows you to retrieve a traffic control, by Id, that is affecting your offers.
Returns HTTP code 404 if the traffic control doesn’t exist.
#### Path Parameters
| Parameter | Description |
| --- | --- |
| controlId | The ID of the traffic control you want to fetch |
#### [Request Example](https://developers.everflow.io/docs/affiliate/traffic/#cbcddadcbe)
##### cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/trafficcontrols/' \
--header 'X-Eflow-API-Key: ' \
--header 'content-type: application/json'
##### Response
{
"traffic_controls": [\
{\
"network_traffic_control_id": 1,\
"status": "active",\
"is_apply_all_offers": true,\
"control_type": "blacklist",\
"date_valid_from": "",\
"date_valid_to": "",\
"comparison_method": "contains",\
"variables": [],\
"relationship": {}\
}\
]
}
* * *
### Find All Blocked Variables
POST `/v1/affiliates/blockedvariables`
This endpoint list all the variables that are blocking the traffic.
This endpoint includes the values that are blocked at the moment and the ones that were blocked during the selected time interval.
#### [Body Params](https://developers.everflow.io/docs/affiliate/traffic/#cdabbefaec)
network\_offer\_id int
The offer with block variables.
timezone\_id int
Refer to [Meta/Timezones](https://developers.everflow.io/docs/metadata/timezones/)
for supported timezones.
from string
YYYY-MM-DD or YYYY-MM-DD HH:mm:SS.
to string
YYYY-MM-DD or YYYY-MM-DD HH:mm:SS.
#### [Payload Example](https://developers.everflow.io/docs/affiliate/traffic/#cbafbddced)
{
"from": "",
"to": "",
"timezone_id": 90,
"network_offer_id": 1
}
#### [Request Example](https://developers.everflow.io/docs/affiliate/traffic/#ecfdcdccef)
##### cURL
curl --request POST \
--url 'https://api.eflow.team/v1/affiliates/blockedvariables' \
--header 'x-eflow-api-key: ' \
--header 'content-type: application/json' \
--data ''
##### Response
{
"variables": [\
{\
"variable": "source_id",\
"value": "test",\
"operator": "contains"\
}\
]
}
---
# API Keys | Everflow
API Keys
========
Operations for affiliate API Keys
Partners have one or multiple marketplace connections with different brands / networks. For each connection, an affiliate account exists on the brand / network’s Everflow account.
The endpoint documented here allows a partner to fetch all the affiliate API keys associated with their different connections (an affiliate API key will exist for each connection).
* * *
### Get All API keys
GET `/v1/partners/connections/apikeys/list`
This endpoint allows you to fetch the API keys associated with each connection that exsits.
The API keys returned here can then be used on the affiliate API to execute calls for a specific connection (or for all of them in a loop).
Although the endpoint returns keys for the affiliate API, a Marketplace API key must be used to _make_ the call
#### [Request Example](https://developers.everflow.io/docs/partner/api_keys/#fcdacfdcdc)
##### cURL
curl --request GET 'https://api.eflow.team/v1/partners/connections/apikeys/list' \
--header 'X-Eflow-API-Key: