Custom Payout & Revenues

Operations for custom payout and revenues

Find All

GET /v1/networks/custom/payoutrevenue

Filters

This endpoint supports basic filtering. Refer to API filters page for usage.

Value Description
network_offer_id Filter based on the offer id
time_created Filter based on the creation time
time_saved Filter based on the last update time

cURL
curl --request GET 'https://api.eflow.team/v1/networks/custom/payoutrevenue' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'content-type: application/json' 
Response
 {
    "custom_payout_revenue_settings": [
    {
        "network_custom_payout_revenue_setting_id": 0,
        "network_id": 0,
        "is_apply_all_affiliates": true,
        "network_affiliate_ids": null,
        "network_offer_id": 0,
        "name": "",
        "network_offer_payout_revenue_id": 0,
        "description": "",
        "public_description": "",
        "custom_setting_status": "active",
        "is_custom_payout_enabled": false,
        "payout_amount": 0,
        "payout_percentage": 0,
        "payout_type": "blank",
        "is_custom_revenue_enabled": true,
        "revenue_amount": 0,
        "revenue_percentage": 0,
        "revenue_type": "rpa",
        "is_postback_disabled": false,
        "date_valid_from": "",
        "date_valid_to": "",
        "time_created": 1594403766,
        "time_saved": 1594403766,
        "relationship":
        {
            "affiliates":
            {
                "total": 0,
                "entries": []
            },
            "offer":
            {
                "network_offer_id": 0,
                "network_id": 0,
                "network_advertiser_id": 0,
                "network_offer_group_id": 0,
                "name": "",
                "offer_status": "active",
                "network_tracking_domain_id": 0,
                "visibility": "public",
                "currency_id": "USD"
            },
            "payout_revenue":
            {
                "network_offer_payout_revenue_id": 0,
                "network_id": 0,
                "network_offer_id": 0,
                "entry_name": "",
                "payout_type": "cpa",
                "payout_amount": 0,
                "payout_percentage": 0,
                "revenue_type": "rpa",
                "revenue_amount": 0,
                "revenue_percentage": 0,
                "is_default": true,
                "is_private": false,
                "is_postback_disabled": false,
                "is_enforce_caps": true,
                "time_created": 1594390711,
                "global_advertiser_event_id": 0,
                "is_must_approve_conversion": false,
                "is_allow_duplicate_conversion": true,
                "is_email_attribution_default_event": false,
                "remote_offer_resource":
                {
                    "network_offer_id": 0,
                    "network_id": 0,
                    "resource_type": "",
                    "remote_resource_id": "",
                    "resource_id": 0,
                    "last_value_md5": "",
                    "json_config": "",
                    "json_data": "",
                    "time_created": 0,
                    "time_saved": 0
                }
            },
            "currency_id": "USD"
        }
    }],
    "paging":
     {
         "page": 1,
         "page_size": 50,
         "total_count": 54
     }
 }

Find By ID

GET /v1/networks/custom/payoutrevenue/:settingId

Relationships

This endpoint supports the following additional relationships. Refer to our User Guide for usage.

This endpoint supports additional relationships. You can ask for them using the relationship query parameter. Multiple relationships can be supplied repeating the relationship query parameter.

Value Description
variables Includes the custom payout & revenue’s variables information
targeting Includes the custom payout & revenue’s targeting information

Path Parameters

Parameter Description
settingId The ID of a network custom setting

cURL
curl --request GET --url 'https://api.eflow.team/v1/networks/custom/payoutrevenue/<INSERT SETTING ID>' \
--header 'x-eflow-api-key: <INSERT API KEY>' \
--header 'content-type: application/json' 
Response
 {
        "network_custom_payout_revenue_setting_id": 0,
        "network_id": 0,
        "is_apply_all_affiliates": true,
        "network_affiliate_ids": null,
        "network_offer_id": 0,
        "name": "",
        "network_offer_payout_revenue_id": 0,
        "description": "",
        "public_description": "",
        "custom_setting_status": "active",
        "is_custom_payout_enabled": false,
        "payout_amount": 0,
        "payout_percentage": 0,
        "payout_type": "blank",
        "is_custom_revenue_enabled": true,
        "revenue_amount": 0,
        "revenue_percentage": 0,
        "revenue_type": "rpa",
        "is_postback_disabled": false,
        "date_valid_from": "",
        "date_valid_to": "",
        "time_created": 1594403766,
        "time_saved": 1594403766,
        "relationship":
        {
            "affiliates":
            {
                "total": 0,
                "entries": []
            },
            "offer":
            {
                "network_offer_id": 0,
                "network_id": 0,
                "network_advertiser_id": 0,
                "network_offer_group_id": 0,
                "name": "",
                "offer_status": "active",
                "network_tracking_domain_id": 0,
                "visibility": "public",
                "currency_id": "USD"
            },
            "payout_revenue":
            {
                "network_offer_payout_revenue_id": 0,
                "network_id": 0,
                "network_offer_id": 0,
                "entry_name": "",
                "payout_type": "cpa",
                "payout_amount": 0,
                "payout_percentage": 0,
                "revenue_type": "rpa",
                "revenue_amount": 0,
                "revenue_percentage": 0,
                "is_default": true,
                "is_private": false,
                "is_postback_disabled": false,
                "is_enforce_caps": true,
                "time_created": 1594390711,
                "global_advertiser_event_id": 0,
                "is_must_approve_conversion": false,
                "is_allow_duplicate_conversion": true,
                "is_email_attribution_default_event": false,
                "remote_offer_resource":
                {
                    "network_offer_id": 0,
                    "network_id": 0,
                    "resource_type": "",
                    "remote_resource_id": "",
                    "resource_id": 0,
                    "last_value_md5": "",
                    "json_config": "",
                    "json_data": "",
                    "time_created": 0,
                    "time_saved": 0
                }
            },
            "currency_id": "USD"
        }
    }

Create

POST /v1/networks/custom/payoutrevenue

network_offer_payout_revenue_id int

If it applies to the base conversion, the value should be 0. Otherwise, must be the unique Id of the event.

network_offer_id int

The offer id.

is_apply_all_affiliates boolean

Decides whether this custom payout revenue setting applies to all affiliates (include ones who have yet to be created).

network_affiliate_ids array[int]

Required only if is_apply_all_affiliates = false. Allows you to select only specific affiliate for this custom payout.

name string
description string

An optional description that will only be visible for network users.

public_description string

An optional description that will be visible to affiliates. Note that if the custom payout revenue completely overrides the base payout revenue settings (meaning that it isn’t regulated by dates, targeting or variables rules) then it will not be seen as a “custom payout” setting for the affiliate and the public description will not be visible.

custom_setting_status string

The custom setting status. Can be either active or inactive

is_custom_payout_enabled boolean

You must at least enable one of: is_custom_payout_enabled, is_custom_revenue_enabled.

is_custom_revenue_enabled boolean

You must at least enable one of: is_custom_payout_enabled, is_custom_revenue_enabled.

payout_amount double
payout_percentage int
payout_type string

Allowed values: blank, cpc, cpa, cpm, cps, cpa_cps, prv, null_value.

revenue_amount double
revenue_percentage int
revenue_type string

Allowed values: blank, rpc, rpa, rpm, rps, rpa_rps.

is_postback_disabled boolean
date_valid_from string
date_valid_to string
ruleset object

List of rules for the payout/revenue. See the ruleset object.

variables object array
variable string
variable_value string
comparison_method string

Allowed values: exact_match, contains, begins_with, ends_with, does_not_contain, does_not_match.

The custom payout revenue setting created by the payload only applies to a single affiliate, over a specific period of time on the base covnersion and only kicks in for traffic coming from the US with a sub1=google.

{
    "network_offer_id": 72,
    "network_offer_payout_revenue_id": 0,
    "name": "Custom Setting Name",
    "custom_setting_status": "active",
    "date_valid_from": "2021-05-01",
    "date_valid_to": "2021-05-31",
    "is_custom_revenue_enabled": true,
    "revenue_type": "rpa",
    "revenue_amount": 2,
    "revenue_percentage": null,
    "is_custom_payout_enabled": true,
    "payout_type": "cpa",
    "payout_amount": 1,
    "payout_percentage": null,
    "is_apply_all_affiliates": false,
    "is_postback_disabled": false,
    "network_affiliate_ids": [
        27
    ],
    "variables": [
        {
            "variable_value": "google",
            "variable": "sub1",
            "comparison_method": "exact_match"
        }
    ],
    "ruleset": {
        "countries": [
            {
                "country_id": 227,
                "match_type": "exact",
                "targeting_type": "include"
            }
        ]
    }
}

cURL
curl --request POST \
  --url 'https://api.eflow.team/v1/networks/custom/payoutrevenue' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
  --data '<INSERT PAYLOAD>'
Response
{
    "network_custom_payout_revenue_setting_id": 795,
    "network_id": 1,
    "is_apply_all_affiliates": false,
    "network_affiliate_ids": [
        27
    ],
    "network_offer_id": 72,
    "name": "Custom Setting Name",
    "network_offer_payout_revenue_id": 0,
    "description": "",
    "public_description": "",
    "custom_setting_status": "active",
    "is_custom_payout_enabled": true,
    "payout_amount": 1,
    "payout_percentage": 0,
    "payout_type": "cpa",
    "is_custom_revenue_enabled": true,
    "revenue_amount": 2,
    "revenue_percentage": 0,
    "revenue_type": "rpa",
    "is_postback_disabled": false,
    "date_valid_from": "2021-05-01",
    "date_valid_to": "2021-05-31",
    "time_created": 1621961782,
    "time_saved": 1621961782,
    "relationship": {
        "affiliates": {
            "total": 1,
            "entries": [
                {
                    "network_affiliate_id": 27,
                    "network_id": 1,
                    "name": "Affiliate 27",
                    "account_status": "active",
                    "network_employee_id": 1,
                    "internal_notes": "",
                    "has_notifications": true,
                    "network_traffic_source_id": 0,
                    "account_executive_id": 0,
                    "adress_id": 0,
                    "default_currency_id": "USD",
                    "is_contact_address_enabled": false,
                    "enable_media_cost_tracking_links": true,
                    "time_created": 1496373361,
                    "time_saved": 1603208221,
                    "referrer_id": 0
                }
            ]
        },
        "offer": {
            "network_offer_id": 72,
            "network_id": 1,
            "network_advertiser_id": 10,
            "network_offer_group_id": 0,
            "name": "Offer Name",
            "offer_status": "active",
            "network_tracking_domain_id": 1,
            "visibility": "public",
            "currency_id": "USD"
        },
        "payout_revenue": {
            "network_offer_payout_revenue_id": 149,
            "network_id": 1,
            "network_offer_id": 72,
            "entry_name": "",
            "payout_type": "cpa",
            "payout_amount": 1,
            "payout_percentage": 0,
            "revenue_type": "rpa_rps",
            "revenue_amount": 1,
            "revenue_percentage": 1,
            "is_default": true,
            "is_private": false,
            "is_postback_disabled": false,
            "is_enforce_caps": true,
            "time_created": 1499908546,
            "global_advertiser_event_id": 0,
            "is_must_approve_conversion": false,
            "is_allow_duplicate_conversion": false,
            "is_email_attribution_default_event": false
        },
        "currency_id": "USD"
    }
}

Update

PUT /v1/networks/custom/payoutrevenue/:settingId

network_offer_payout_revenue_id int

If it applies to the base conversion, the value should be 0. Otherwise, must be the unique Id of the event.

network_offer_id int

The offer id.

is_apply_all_affiliates boolean

Decides whether this custom payout revenue setting applies to all affiliates (include ones who have yet to be created).

network_affiliate_ids array[int]

Required only if is_apply_all_affiliates = false. Allows you to select only specific affiliate for this custom payout.

name string
description string

An optional description that will only be visible for network users.

public_description string

An optional description that will be visible to affiliates. Note that if the custom payout revenue completely overrides the base payout revenue settings (meaning that it isn’t regulated by dates, targeting or variables rules) then it will not be seen as a “custom payout” setting for the affiliate and the public description will not be visible.

custom_setting_status string

The custom setting status. Can be either active or inactive

is_custom_payout_enabled boolean

You must at least enable one of: is_custom_payout_enabled, is_custom_revenue_enabled.

is_custom_revenue_enabled boolean

You must at least enable one of: is_custom_payout_enabled, is_custom_revenue_enabled.

payout_amount double
payout_percentage int
payout_type string

Allowed values: blank, cpc, cpa, cpm, cps, cpa_cps, prv, null_value.

revenue_amount double
revenue_percentage int
revenue_type string

Allowed values: blank, rpc, rpa, rpm, rps, rpa_rps.

is_postback_disabled boolean
date_valid_from string
date_valid_to string
ruleset object

List of rules for the payout/revenue. See the ruleset object.

variables object array
variable string
variable_value string
comparison_method string

Allowed values: exact_match, contains, begins_with, ends_with, does_not_contain, does_not_match.

This will update a custom payout revenue setting that applies to all affiliates, on all traffic coming from iOS devices with a sub1=google.

{
    "network_custom_payout_revenue_setting_id": 795,
    "network_id": 1,
    "name": "Updated Setting Name",
    "description": "",
    "public_description": "",
    "network_offer_id": 95,
    "network_offer_payout_revenue_id": 196,
    "custom_setting_status": "active",
    "is_custom_payout_enabled": true,
    "payout_amount": null,
    "payout_percentage": 20,
    "payout_type": "cps",
    "is_custom_revenue_enabled": true,
    "revenue_amount": null,
    "revenue_percentage": 30,
    "revenue_type": "rps",
    "is_postback_disabled": false,
    "is_apply_all_affiliates": true,
    "network_affiliate_ids": [],
    "date_valid_from": "",
    "date_valid_to": "",
    "ruleset": {
        "platforms": [
            {
                "platform_id": 2,
                "match_type": "exact",
                "targeting_type": "include"
            }
        ]
    },
    "variables": [
        {
            "variable_value": "google",
            "variable": "sub1",
            "comparison_method": "exact_match"
        }
    ],
    "currency_id": "USD"
}

cURL
curl --request PUT \
  --url 'https://api.eflow.team/v1/networks/custom/payoutrevenue/<INSERT SETTING ID>' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
  --data '<INSERT PAYLOAD>'
Response
{
    "network_custom_payout_revenue_setting_id": 795,
    "network_id": 1,
    "is_apply_all_affiliates": true,
    "network_affiliate_ids": null,
    "network_offer_id": 95,
    "name": "Updated Setting Name",
    "network_offer_payout_revenue_id": 196,
    "description": "",
    "public_description": "",
    "custom_setting_status": "active",
    "is_custom_payout_enabled": true,
    "payout_amount": 0,
    "payout_percentage": 20,
    "payout_type": "cps",
    "is_custom_revenue_enabled": true,
    "revenue_amount": 0,
    "revenue_percentage": 30,
    "revenue_type": "rps",
    "is_postback_disabled": false,
    "date_valid_from": "",
    "date_valid_to": "",
    "time_created": 1621961782,
    "time_saved": 1621962574,
    "relationship": {
        "affiliates": {
            "total": 0,
            "entries": []
        },
        "offer": {
            "network_offer_id": 95,
            "network_id": 1,
            "network_advertiser_id": 1,
            "network_offer_group_id": 0,
            "name": "Offer Name",
            "offer_status": "active",
            "network_tracking_domain_id": 1,
            "visibility": "require_approval",
            "currency_id": "USD"
        },
        "payout_revenue": {
            "network_offer_payout_revenue_id": 196,
            "network_id": 1,
            "network_offer_id": 95,
            "entry_name": "additional event 1",
            "payout_type": "null_value",
            "payout_amount": 0,
            "payout_percentage": 0,
            "revenue_type": "rpa",
            "revenue_amount": 1,
            "revenue_percentage": 0,
            "is_default": false,
            "is_private": true,
            "is_postback_disabled": true,
            "is_enforce_caps": false,
            "time_created": 1512498727,
            "global_advertiser_event_id": 0,
            "is_must_approve_conversion": false,
            "is_allow_duplicate_conversion": true,
            "is_email_attribution_default_event": false
        },
        "currency_id": "USD"
    }
}

Delete

DELETE /v1/networks/custom/payoutrevenue/:settingId

Path Parameters

Parameter Description
settingId The ID of a network custom setting

cURL
curl --request DELETE \
  --url 'https://api.eflow.team/v1/networks/custom/payoutrevenue/<INSERT SETTING ID>' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
Response
{
  "result": true
}

Patch

PATCH /v1/networks/custom/payoutrevenue

network_custom_payout_revenue_setting_ids array[int]

List of network custom payout/revenue setting ids separated by comas.

fields array[object]

List of fields to update.

field_type string

Allowed values: custom_setting_status, date_valid_from, date_valid_to, description, is_apply_all_affiliates, is_custom_payout_enabled, is_custom_revenue_enabled, name, network_affiliate_ids, network_offer_id, payout_amount, payout_percentage, payout_type, revenue_amount, revenue_percentage, revenue_type, is_postback_disabled, variables, ruleset_platforms, ruleset_device_types, ruleset_os_versions, ruleset_browsers, ruleset_languages, ruleset_countries, ruleset_regions, ruleset_cities, ruleset_dmas, ruleset_mobile_carriers, ruleset_isps, ruleset_connection_types, ruleset_ips, ruleset_is_block_proxy.

field_value dynamic

WARNING: dynamic value, please see endpoint docs

{
  "network_custom_payout_revenue_setting_ids": [
    0
  ],
  "fields": [
    {
      "field_type": "custom_setting_status",
      "field_value": ""
    }
  ]
}

cURL
curl --request PATCH \
  --url 'https://api.eflow.team/v1/networks/custom/payoutrevenue' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
  --data '<INSERT PAYLOAD>'
Response
{
  "result": true
}