Skip to content

Affiliate Offers export

Exports the commission offers assigned to your affiliates as a GZIP-compressed NDJSON file — one JSON object per line — including each offer's CPA / RevShare payout rules and brand visibility.

Request example

curl -X POST https://affiliatecontrol-api.com/external/exports/affiliate-offers \
  -H "x-access-key: ak_example123" \
  -H "x-secret-key: sk_example456" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_url": "https://example.com/hook"
  }'

Parameters:

  • webhook_url (String): URL notified when the file is ready.

Response:

{ "id": "export-id-here" }

Output fields

Each line of the file is a JSON object with the following fields:

Field Type Description
id string Offer ID (UUID).
incrementing_id number SID — sequential numeric offer ID.
affiliate_id string Affiliate ID (owner of the offer).
name string Name.
payout_rules array of objects Payout rules (see below).
scheduled_changes_effective_timestamp string (datetime) | null Scheduled changes effective timestamp — when pending changes take effect, or null.
has_scheduled_changes boolean Has scheduled changes.
brand_visibility enum Brand visibility: all or only_selected.
visible_brands array of strings Visible brands — site IDs where the offer is visible; empty when brand_visibility is all.
cataloged_affiliate_offer_id string | null Cataloged affiliate offer ID (linked catalog offer).
cataloged_affiliate_offer_description string | null Cataloged affiliate offer description.
catalog_category_name string | null Catalog category name.
created_at / updated_at string (datetime) Created at / Updated at.

payout_rules structure

payout_rules is an array of rule objects. Each rule has a settings block (CPA and/or RevShare) and a filters block that scopes when the rule applies:

[
  {
    "settings": {
      "cpa": [
        {
          "amount": 50,
          "currency_code": "USD",
          "cap_players_count": 100,
          "cap_period_seconds": 2592000,
          "hold_seconds": 1209600,
          "conditions": []
        }
      ],
      "rev_share": {
        "sport_levels": [{ "percent": 30, "ftd_count": 0 }],
        "casino_levels": [{ "percent": 40, "ftd_count": 0 }]
      }
    },
    "filters": {
      "country_code": ["DE", "AT"],
      "subid_1": ["promo-spring"]
    }
  }
]

Rule object — each element of payout_rules:

Field Type Description
settings object Payout settings (CPA and/or RevShare).
filters object Scopes when the rule applies.

settings:

Field Type Description
cpa array of objects | null CPA payout tiers, or null when the rule has no CPA.
rev_share object | null RevShare configuration, or null when the rule has no RevShare.

settings.cpa[] — each CPA tier:

Field Type Description
amount number CPA payout amount per qualified player.
currency_code string | null Currency of amount.
cap_players_count number Max number of players paid within the cap period (0 = no cap).
cap_period_seconds number Length of the cap window, in seconds.
hold_seconds number Hold period before a payout is confirmed, in seconds.
conditions array of objects Advanced CPA qualification conditions the player must meet before the payout applies; empty array = none.

settings.rev_share:

Field Type Description
sport_levels array of objects RevShare tiers for sports betting.
casino_levels array of objects RevShare tiers for casino.

RevShare level (sport_levels[] / casino_levels[]):

Field Type Description
percent number RevShare percentage for this tier.
ftd_count number FTD count at which this tier starts to apply.

filters — all keys optional; a missing key means "no restriction on that dimension":

Field Type Description
country_code array of strings Restrict the rule to these ISO 3166-1 alpha-2 country codes.
subid_1subid_5 array of strings Restrict the rule to these SubID values.