Raw On Hold Conversions Report
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
/v1/affiliates/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
andto
dates (format can beYYYY-mm-DD or YYYY-mm-DD hh:mm:ss
)- The
timezone_id
used for the request. Find all timezones here - 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 for usage.
Query Filters
Query filters allow you to limit the scope of the report returned by the API. You could create a filter to limit the reporting data to a single 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
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
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/onhold' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT PAYLOAD>'
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
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": 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
}
}
On Hold Conversion By ID
/v1/affiliates/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
cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/reporting/onhold/<32 char On Hold Conversion ID>' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
"on_hold_conversion_id": "f9d3fa7e86d241afbec4a6c6c3fe2580",
"network_id": 1,
"holding_period_end": 1661980244,
"status": "on_hold",
"conversion": {
"conversion_id": "",
"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"
}
}
}
}