The HTTP GET method can be used to get a list of all affiliates in the system. The filter by aff_status_id is limiting response only to approved affiliates.
Note that this request impacts your setup performance because every time it's calculating the current balance of every affiliate.
Note that API returns up to 1000 records, if you have more data, you can pass "range=[1000, 2000]" in the URL as GET parameter in order to get next 1000 records.
The field "default_deal_info" represent basic details of the latest version of the default deal for each affiliate. The deal_type_id field represents a bit mask of the deal type, as defined below
The field extra_role_ids represents permissions to the additional measurements that are visible for the affiliate or access to the "Registrations report". Possible values are:
{
"comments": "Comments visible and editable by the affiliate",
"company": "Company name",
"country": "BG",
"web_site_url": "https://mysite.com",
"comments_from_operator": "Comment that will be visible only for operator",
"aff_status_id": 2,
// one of the statuses as listed above, AffiliateStatus
"ext_affiliate_id": "some_id_in_external_system",
"no_carry_over": true,
// to enabled/disabled NO NEGATIVE CARRY OVER
"manager_id": 123,
// set the ID of the manager
"custom_prop_155": 33,
// update "Custom tag" with ID 155, by setting tag with ID 33.
// see the IDs for your setup in the BackOffice in "Custom tags" section
"bo_user_email": "email_of_affiliate@myaffiliatesite.com",
"two_fa_enabled": false,
// enabled/disable 2FA verification
"api_access_enabled": true,
// enable/disable access for affiliate via API
"first_name": "John",
"last_name": "Malkovich",
"phone_number": "123",
"skype": "john",
"contact_fb": "https://fb.me/123123",
"contact_vk": "",
"contact_telegram": "",
"contact_discord": "",
// set the preferred communication language
"language": "FR",
// set the payment method and payment method details of the affiliate as listed below
"payment_method_id": 3;
"payment_method_details": {
"skrill_email": "user@skrill.com"
}
}
[
{
// unique ID of the pixel definition in the system
"id": 2887,
// type of the trigger
// 1 - Lead created
// 2 - Lead qualified
// 3 - FTD made
// 4 - Qualified FTD made
"pixel_trigger_type_id": 1,
// type of the pixel delivery
// 1 - server-to-server HTTP call
// 2 - Client image
// 3 - Client iframe
// 4 - Client JavaScript
"pixel_type_id": 1,
// the name of the definition
"pixel_name": "Name of the pixel definition",
// URL for the call back with placeholders that will be replaced
"pixel": "https://api.casino.com/?deal_id={{deal_id}}",
// affiliate id to whom this pixel belongs
"affiliate_id": 166368,
// deal ID on which this pixel will be triggered.
// -1 means will be triggered for all deals of affiliate
"deal_id": -1,
// status of pixel definition
// 1 - active
// 2 - inactive
"pixel_status": 1,
}
]