Custom Scrub Rates (Throttle)

Operations for custom scrub rates (throttle)

Find Custom Scrub Rate (Throttle) Settings

POST /v1/networks/custom/scrubratetable

This endpoint allows to fetch custom scrub rate (throttle) settings. Different filters can be used to narrow down the set of settings returned by the endpoint. You can, for example, use the filters to return only the settings associated with a specific affiliate ID.

Note that this endpoint does not return every detail of each custom scrub rate (throttle) setting. For example it will not return the specific variables associate with a setting (if specified). To get those, use the Find by ID endpoint documented below.

Paging

This endpoint supports paging. Refer to our User Guide for usage.

search_terms object array

Search terms are optional but can be used to look for specific words.

search_type string

The name of the field used for search. Can be name, offer or affiliate

value string

The value to search.

filters object

Filters are also completely optional but are usually used to narrow down the set of settings returned. They can be used individually or combined in a single request.

custom_setting_status string

Filter on the status of the custom scrub rate (throttle) setting. Possible values are active or inactive

network_affiliate_ids int array

Return only the settings associated with the specified affiliate IDs.

network_offer_ids int array

Return only the settings associated with the specified offer IDs.

scrub_rate_status string

Filter on how the setting affects the conversions it targets. Possible values are pending and rejected

cURL
curl --request POST 'https://api.eflow.team/v1/networks/custom/scrubratetable' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT BODY HERE>'

Example 1 : Find all active custom scrub rate (throttle) settings

{
  "search_terms": [],
  "filters":
  {
    "custom_setting_status": "active"
  }
}

Example 2 : Find all active custom scrub rate (throttle) settings that affect affiliate ID 7 and that contain the word “summer”

{
  "search_terms":
  [
    {
      "search_type": "name",
      "value": "summer"
    }
  ],
  "filters":
  {
    "custom_setting_status": "active",
    "network_affiliate_ids": [ 7 ]
  }
}
Response
{
  "custom_scrub_rate_settings":
  [
    {
      "network_custom_scrub_rate_setting_id": 4,
      "network_id": 1,
      "network_affiliate_id": 7,
      "network_offer_id": 8,
      "custom_setting_status": "active",
      "name": "Custom Scrub Example",
      "scrub_rate_status": "pending",
      "scrub_rate_percentage": 20,
      "time_created": 1684245710,
      "time_saved": 1684245752,
      "relationship":
      {
        "affiliate":
        {
          "network_affiliate_id": 7,
          "network_id": 1,
          "name": "Example Affiliate Inc.",
          "account_status": "active"
        },
        "offer":
        {
          "network_offer_id": 8,
          "network_id": 1,
          "network_advertiser_id": 13,
          "network_offer_group_id": 0,
          "name": "Example offer with custom scrub",
          "offer_status": "active",
          "network_tracking_domain_id": 1,
          "visibility": "public",
          "currency_id": "USD"
        },
        "ruleset":
        {
          "network_id": 1,
          "network_ruleset_id": 71,
          "time_created": 1684245752,
          "time_saved": 1684245752,
          "platforms": [],
          "device_types": [],
          "os_versions": [],
          "browsers": [],
          "languages": [],
          "countries": [],
          "regions": [],
          "cities": [],
          "dmas": [],
          "mobile_carriers": [],
          "connection_types": [],
          "ips": [],
          "is_block_proxy": false,
          "is_use_day_parting": false,
          "day_parting_apply_to": "user_timezone",
          "day_parting_timezone_id": 0,
          "days_parting": [ ],
          "isps": [],
          "brands": [],
          "postal_codes": []
        }
      }
    }
  ],
  "paging":
  {
    "page": 1,
    "page_size": 100,
    "total_count": 1
  }
}

Find By ID

GET /v1/networks/custom/scrubrate/:settingId

Path Parameters

Parameter Description
settingId The ID of the custom scrub rate (throttle) setting

Relationships

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

Value Description
variables Include the variables the setting affects (if any)
targeting Includes the setting’s sepcific targeting settings (if any)

cURL
curl --request GET --url 'https://api.eflow.team/v1/networks/custom/scrubrate/<INSERT SETTING ID>' \
--header 'x-eflow-api-key: <INSERT API KEY>' \
--header 'content-type: application/json' 
Response
{
  "network_custom_scrub_rate_setting_id": 4,
  "network_id": 1,
  "network_affiliate_id": 7,
  "network_offer_id": 8,
  "custom_setting_status": "active",
  "name": "Example Custom Scrub Setting",
  "scrub_rate_status": "pending",
  "scrub_rate_percentage": 25,
  "time_created": 1684245710,
  "time_saved": 1684261331,
  "relationship":
  {
    "affiliate":
    {
      "network_affiliate_id": 7,
      "network_id": 1,
      "name": "Example Affiliate 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": 1683750489,
      "referrer_id": 0
    },
    "offer":
    {
      "network_offer_id": 8,
      "network_id": 1,
      "network_advertiser_id": 13,
      "network_offer_group_id": 0,
      "name": "Example offer with scrub setting",
      "offer_status": "active",
      "network_tracking_domain_id": 1,
      "visibility": "public",
      "currency_id": "USD"
    },
    "ruleset":
    {
      "network_id": 1,
      "network_ruleset_id": 72,
      "time_created": 1684261331,
      "time_saved": 1684261331,
      "platforms": [],
      "device_types": [],
      "os_versions": [],
      "browsers": [],
      "languages": [],
      "countries":
      [
        {
          "network_id": 1,
          "network_targeting_country_id": 17,
          "country_id": 227,
          "label": "United States",
          "country_code": "US",
          "targeting_type": "include",
          "match_type": "exact"
        }
      ],
      "regions": [],
      "cities": [],
      "dmas": [],
      "mobile_carriers": [],
      "connection_types": [],
      "ips": [],
      "is_block_proxy": false,
      "is_use_day_parting": false,
      "day_parting_apply_to": "user_timezone",
      "day_parting_timezone_id": 0,
      "days_parting": [],
      "isps": [],
      "brands": [],
      "postal_codes": []
    },
    "variables":
    {
      "total": 1,
      "entries":
      [
        {
          "network_custom_scrub_rate_setting_variable_id": 4,
          "network_custom_scrub_rate_setting_id": 4,
          "comparison_method": "exact_match",
          "variable": "sub1",
          "variable_value": "bad_source"
        }
      ]
    }
  }
}

Create

Create a custom scrub rate (throttle) setting associated with a partner / offer couple.

POST /v1/networks/custom/scrubrate

network_affiliate_id int

The affiliate id.

network_offer_id int

The offer id.

custom_setting_status string

The custom setting status. Can be either active or inactive

name string

The custom cap setting name.

scrub_rate_status string

The scrub rate status. Can be one of the following values: rejected or pending

scrub_rate_percentage int

The scrub rate percentage (this is the percentage of conversion that will be affected by the setting). Note that if you specify e.g. 25%, it means that each conversion has a 25% chance of being scrubbed, not necessarily that exactly 25% will be scrubbed (although with a big enough quantity it will be the case).

variables object array

Optional list of variables that must match for the setting to apply

comparison_method string

The type of comparison to use. Can be one of the following values: begins_with, ends_with, exact_match, contains

variable string

The scrub rate variable. Can be sub1, sub2, sub3, sub4, sub5 and source_id

variable_value string

The value to use for comparison.

ruleset object

Optional additional targeting rules for determining when the setting is used. See the ruleset object.

{
  "network_custom_scrub_rate_setting_id": 4,
  "network_id": 1,
  "network_affiliate_id": 7,
  "network_offer_id": 8,
  "custom_setting_status": "active",
  "name": "Custom Scrub Setting",
  "scrub_rate_status": "pending",
  "scrub_rate_percentage": 25,
  "time_created": 1684245710,
  "time_saved": 1684261331,
  "variables":
  [
    {
      "network_custom_scrub_rate_setting_variable_id": 4,
      "network_custom_scrub_rate_setting_id": 4,
      "comparison_method": "exact_match",
      "variable": "sub1",
      "variable_value": "bad_source"
    }
  ]
}

cURL
curl --request POST \
  --url 'https://api.eflow.team/v1/networks/custom/scrubrate' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
  --data '<INSERT PAYLOAD>'
Response
{
  "network_custom_scrub_rate_setting_id": 4,
  "network_id": 1,
  "network_affiliate_id": 7,
  "network_offer_id": 8,
  "custom_setting_status": "active",
  "name": "Custom Scrub Rate Exmple",
  "scrub_rate_status": "pending",
  "scrub_rate_percentage": 25,
  "time_created": 1684245710,
  "time_saved": 1684263714,
  "relationship":
  {
    "affiliate":
    {
      "network_affiliate_id": 7,
      "network_id": 1,
      "name": "Example Affiliate 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": 1683750489,
      "referrer_id": 0
    },
    "offer":
    {
      "network_offer_id": 8,
      "network_id": 1,
      "network_advertiser_id": 13,
      "network_offer_group_id": 0,
      "name": "Example Offer With Scrub",
      "offer_status": "active",
      "network_tracking_domain_id": 1,
      "visibility": "public",
      "currency_id": "USD"
    }
  }
}

Update

Update an existing custom scrub rate (throttle) setting.

PUT /v1/networks/custom/scrubrate/:settingId

network_affiliate_id int

The affiliate id.

network_offer_id int

The offer id.

custom_setting_status string

The custom setting status. Can be either active or inactive

name string

The custom cap setting name.

scrub_rate_status string

The scrub rate status. Can be one of the following values: rejected or pending

scrub_rate_percentage int

The scrub rate percentage (this is the percentage of conversion that will be affected by the setting). Note that if you specify e.g. 25%, it means that each conversion has a 25% chance of being scrubbed, not necessarily that exactly 25% will be scrubbed (although with a big enough quantity it will be the case).

variables object array

Optional list of variables that must match for the setting to apply

comparison_method string

The type of comparison to use. Can be one of the following values: begins_with, ends_with, exact_match, contains

variable string

The scrub rate variable. Can be sub1, sub2, sub3, sub4, sub5 and source_id

variable_value string

The value to use for comparison.

ruleset object

Optional additional targeting rules for determining when the setting is used. See the ruleset object.

{
    "network_custom_scrub_rate_setting_id": 4,
    "network_id": 1,
    "network_affiliate_id": 7,
    "network_offer_id": 8,
    "custom_setting_status": "active",
    "name": "Updated Custom Scrub Setting",
    "scrub_rate_status": "pending",
    "scrub_rate_percentage": 30,
    "time_created": 1684245710,
    "time_saved": 1684261331,
    "variables":
    [
        {
            "network_custom_scrub_rate_setting_variable_id": 4,
            "network_custom_scrub_rate_setting_id": 4,
            "comparison_method": "exact_match",
            "variable": "sub1",
            "variable_value": "updated_bad_source"
        }
    ]
}

cURL
curl --request POST \
  --url 'https://api.eflow.team/v1/networks/custom/scrubrate/<INSERT SETTING ID>' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
  --data '<INSERT PAYLOAD>'
Response
{
  "network_custom_scrub_rate_setting_id": 4,
  "network_id": 1,
  "network_affiliate_id": 7,
  "network_offer_id": 8,
  "custom_setting_status": "active",
  "name": "Custom Scrub Rate Exmple",
  "scrub_rate_status": "pending",
  "scrub_rate_percentage": 25,
  "time_created": 1684245710,
  "time_saved": 1684263714,
  "relationship":
  {
    "affiliate":
    {
      "network_affiliate_id": 7,
      "network_id": 1,
      "name": "Example Affiliate 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": 1683750489,
      "referrer_id": 0
    },
    "offer":
    {
      "network_offer_id": 8,
      "network_id": 1,
      "network_advertiser_id": 13,
      "network_offer_group_id": 0,
      "name": "Example Offer With Scrub",
      "offer_status": "active",
      "network_tracking_domain_id": 1,
      "visibility": "public",
      "currency_id": "USD"
    }
  }
}

Delete

Delete an existing custom scrub rate (throttle) setting.

DELETE /v1/networks/custom/scrubrate/: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/scrubrate/<INSERT SETTING ID>' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
Response
{
  "result": true
}