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": 1,
    "network_id": 1,
    "is_apply_all_affiliates": true,
    "network_affiliate_ids": null,
    "network_offer_id": 2,
    "name": "Example Custom Setting",
    "network_offer_payout_revenue_id": 0,
    "description": "Example of a custom setting that applies on the base conversion, to all affiliates but specific to one offer URL",
    "custom_setting_status": "active",
    "is_custom_payout_enabled": true,
    "payout_amount": 3,
    "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": "",
    "date_valid_to": "",
    "public_description": "Public Description Visible to partners",
    "is_apply_specific_offer_urls": true,
    "currency_id": "USD",
    "network_offer_url_ids": [
        1
    ],
    "time_created": 1683066721,
    "time_saved": 1683066721,
    "relationship": {
      "affiliates": {
        "total": 0,
        "entries": []
      },
      "offer": {
        "network_offer_id": 2,
        "network_id": 1,
        "network_advertiser_id": 13,
        "network_offer_group_id": 5,
        "name": "Custom Setting Offer",
        "offer_status": "active",
        "network_tracking_domain_id": 1,
        "visibility": "public",
        "currency_id": "USD"
      },
      "payout_revenue": {
        "network_offer_payout_revenue_id": 2,
        "network_id": 1,
        "network_offer_id": 2,
        "entry_name": "",
        "payout_type": "cpa",
        "payout_amount": 0.8,
        "payout_percentage": 0,
        "revenue_type": "rpa",
        "revenue_amount": 1,
        "revenue_percentage": 0,
        "is_default": true,
        "is_private": false,
        "is_postback_disabled": false,
        "is_enforce_caps": true,
        "time_created": 1683039591,
        "global_advertiser_event_id": 0,
        "is_must_approve_conversion": false,
        "is_allow_duplicate_conversion": true,
        "is_email_attribution_default_event": false
      }
    }
  }]
}

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": 1,
  "network_id": 1,
  "is_apply_all_affiliates": true,
  "network_affiliate_ids": null,
  "network_offer_id": 2,
  "name": "Example Custom Setting",
  "network_offer_payout_revenue_id": 0,
  "description": "Applies to base conversion, to all affiliates but specific to an offer URL",
  "custom_setting_status": "active",
  "is_custom_payout_enabled": true,
  "payout_amount": 3,
  "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": "",
  "date_valid_to": "",
  "public_description": "",
  "is_apply_specific_offer_urls": true,
  "currency_id": "USD",
  "network_offer_url_ids": [
    1
  ],
  "time_created": 1683066721,
  "time_saved": 1683066721,
  "relationship": {
    "affiliates": {
      "total": 0,
      "entries": []
    },
    "offer": {
      "network_offer_id": 2,
      "network_id": 1,
      "network_advertiser_id": 13,
      "network_offer_group_id": 5,
      "name": "Custom Setting Test",
      "offer_status": "active",
      "network_tracking_domain_id": 1,
      "visibility": "public",
      "currency_id": "USD"
    },
    "payout_revenue": {
      "network_offer_payout_revenue_id": 2,
      "network_id": 1,
      "network_offer_id": 2,
      "entry_name": "",
      "payout_type": "cpa",
      "payout_amount": 0.8,
      "payout_percentage": 0,
      "revenue_type": "rpa",
      "revenue_amount": 1,
      "revenue_percentage": 0,
      "is_default": true,
      "is_private": false,
      "is_postback_disabled": false,
      "is_enforce_caps": true,
      "time_created": 1683039591,
      "global_advertiser_event_id": 0,
      "is_must_approve_conversion": false,
      "is_allow_duplicate_conversion": true,
      "is_email_attribution_default_event": false
    }
  }
}

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_amount double

Only relevant for a payout_type expressed in absolute values (cpa, cpa_cps, cpm, cpc)

payout_percentage int

Only relevant for a payout_type expressed in percentage (cps, cpa_cps, prv)

payout_type string

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

revenue_amount double

Only relevant for a revenue_type expressed in absolute values (rpa, rpa_rps, rpm, rpc)

revenue_percentage int

Only relevant for a revenue_type expressed on percentage (rps, rpa_rps)

revenue_type string

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

is_postback_disabled boolean

Determines whether partner postbacks will fire when this custom setting kicks in

date_valid_from string

Optional date before which the custom setting will not apply

date_valid_to string

Optional date after which the custom setting will not apply

is_apply_specific_offer_urls boolean

Optionally specify a list of offer URL ids on which this custom setting applies

network_offer_url_ids int array

Only relevant if is_apply_specific_offer_urls is true

ruleset object

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

variables object array

Required for SKU/price per product offers

variable string

When creating a custom setting for SKU/price per product offers you will need to use the variable sku. To read more about SKU/ price per product offers and how they work click here.

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,
    "is_apply_specific_offer_urls": false,
    "network_affiliate_ids": [
        7
    ],
    "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": 4,
    "network_id": 1,
    "is_apply_all_affiliates": false,
    "network_affiliate_ids": [
        7
    ],
    "network_offer_id": 72,
    "name": "Custom Setting Name",
    "network_offer_payout_revenue_id": 0,
    "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",
    "public_description": "",
    "is_apply_specific_offer_urls": false,
    "network_offer_url_ids": null,
    "time_created": 1683067514,
    "time_saved": 1683067514,
    "relationship": {
        "affiliates": {
            "total": 1,
            "entries": [
                {
                    "network_affiliate_id": 7,
                    "network_id": 1,
                    "name": "Partner Inc.",
                    "account_status": "active",
                    "network_employee_id": 1,
                    "internal_notes": "",
                    "has_notifications": false,
                    "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": 1683039591,
                    "time_saved": 1683039591,
                    "referrer_id": 0
                }
            ]
        },
        "offer": {
            "network_offer_id": 72,
            "network_id": 1,
            "network_advertiser_id": 39,
            "network_offer_group_id": 0,
            "name": "Candy Crush Example",
            "offer_status": "pending",
            "network_tracking_domain_id": 1,
            "visibility": "public",
            "currency_id": "USD"
        },
        "payout_revenue": {
            "network_offer_payout_revenue_id": 72,
            "network_id": 1,
            "network_offer_id": 72,
            "entry_name": "",
            "payout_type": "cpa",
            "payout_amount": 0.8,
            "payout_percentage": 0,
            "revenue_type": "rpa",
            "revenue_amount": 1,
            "revenue_percentage": 0,
            "is_default": true,
            "is_private": false,
            "is_postback_disabled": false,
            "is_enforce_caps": true,
            "time_created": 1683039591,
            "global_advertiser_event_id": 0,
            "is_must_approve_conversion": false,
            "is_allow_duplicate_conversion": true,
            "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

Only relevant for a payout_type expressed in absolute values (cpa, cpa_cps, cpm, cpc)

payout_percentage int

Only relevant for a payout_type expressed in percentage (cps, cpa_cps, prv)

payout_type string

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

revenue_amount double

Only relevant for a revenue_type expressed in absolute values (rpa, rpa_rps, rpm, rpc)

revenue_percentage int

Only relevant for a revenue_type expressed on percentage (rps, rpa_rps)

revenue_type string

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

is_postback_disabled boolean

Determines whether partner postbacks will fire when this custom setting kicks in

date_valid_from string

Optional date before which the custom setting will not apply

date_valid_to string

Optional date after which the custom setting will not apply

is_apply_specific_offer_urls boolean

Optionally specify a list of offer URL ids on which this custom setting applies

network_offer_url_ids int array

Only relevant if is_apply_specific_offer_urls is true

ruleset object

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

variables object array

Required for SKU/price per product offers

variable string

When creating a custom setting for SKU/price per product offers you will need to use the variable sku. To read more about SKU/ price per product offers and how they work click here.

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,
    "is_apply_specific_offer_urls": false,
    "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": "",
    "is_apply_specific_offer_urls": false,
    "network_offer_url_ids": null,
    "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
}