CashflowGroup::createCashflowGroup Method

Creates a cashflow (payout and revenue) group along with constituent rules and affiliates for which it applies.

NameTypeDescription
NetworkId UrlNetwork ID
NetworkToken StringNetwork token
Target StringThis calls action target
Method StringThis calls action method
name StringGroup name
descriptionStringGroup description
affiliate_ids_json StringA JSON-encoded array of affiliate IDs to restrict the group to.
rules_json StringA JSON-encoded array of new cashflow Rule definitions to create for this group

Formatting JSON Fields

The rules_json field is formatted as an array of objects, where each object is a cashflow rule. Rule objects must contain the following keys:

  • field: The field to perform the operator on. Acceptable fields are the same as those in the HasOffers platform:
    • advanced_targeting_rule
    • aff_sub1
    • aff_sub2
    • aff_sub3
    • aff_sub4
    • aff_sub5
    • adv_sub1
    • adv_sub2
    • adv_sub3
    • adv_sub4
    • adv_sub5
    • country
    • source
  • operator: The method of determining whether the rule applies to the field or not. Acceptable operators are the same as those in the HasOffers platform:
    • IS
    • STARTS_WITH
    • CONTAINS
    • ENDS_WITH
  • value: The value to compare against after the operator is applied on the field.
  • negate: Whether or not to negate the operator. For example, "negate" values of "0" and "1" with the operator "CONTAINS" result in the semantic equivalents of "CONTAINS" and "DOES_NOT_CONTAIN", respectively.

The affiliate_ids_json field is formatted as an array of strings, where each string is the affiliate ID of an affiliate to which the cashflow group applies. To make the cashflow group apply to all affiliates, pass an empty array to this field.

Example JSON Values

Matches Aff Sub 2 is AFF_SUB_2_VALUE, for all affiliates

rules_json: [{"field":"aff_sub2","operator":"IN","value":["AFF_SUB_2_VALUE"],"negate":0}]
affiliate_ids_json: []

Matches Countries either Germany, Austria, Switzerland, for Affiliates 2, 4 & 6

rules_json: [{"field":"country","operator":"IN","value":["DE", "AT", "CH"],"negate":0}]
affiliate_ids_json: ["2","4","6"]

Matches Aff Sub 2 is AFF_SUB_2_VALUE, does not match Countries Germany, Austria, Switzerland, for Affiliates 2, 4 & 6

rules_json: [{"field":"aff_sub2","operator":"IN","value":["AFF_SUB_2_VALUE"],"negate":0}, {"field":"country","operator":"IN","value":["DE", "AT", "CH"],"negate":1}]
affiliate_ids_json: ["2","4","6"]

Matches advanced_targeting_rule 79, for all affiliates

rules_json: [{"field":"advanced_targeting_rule","operator":"IN","value":[79],"negate":0}]
affiliate_ids_json: []

POST Response Notes

Returns the ID of the newly created group as an integer

API Call Builder

Javascript is required to use the API Call Builder.
Have a Question? Please contact [email protected] for technical support.