▪️More API methods
The default API URL is https://boapi.smartico.ai/ but depending on your setup it could be different. Check for the exact URL in the 'Settings' section.
Working with affiliates' profiles
Get a list of all affiliates
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.
curl --location --globoff 'https://boapi.smartico.ai/api/af2_aff_op?aff_status_id%22%3A%5B2%5D%7D' \
--header 'authorization: your-private-api-key'
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.
Example of response
[
{
"id": 35425,
"affiliate_id": 35425,
"affiliate_name": "Robby Ron",
"country": null,
"company": null,
"web_site_url": null,
"comments": null,
"comments_from_operator": null,
"visibility": null,
"aff_status_id": 2,
"operator_id": 2354,
"brand_ids": [333,334],
"parent_affiliate_id": null,
"create_date": "2022-03-10T18:32:50.573Z",
"update_date": "2023-04-24T11:32:35.804Z",
"create_by": 2342,
"bo_user_id": 3423,
"ext_affiliate_id": null,
"payment_method_name": "Wire Transfer",
"payment_method_id": 1,
"payment_method_details": {
"bank_name": "International Bank",
"beneficary": "Somewhone",
"swift_code": "XX123",
"back_country": "XX",
"account_number": "XX123-41231-55"
},
"payment_threshold_oper_currency": null,
"bo_label_id": 3111,
"label_name": "MONYY RON / 35425",
"no_carry_over": false,
"no_carry_over_was_set": false,
"sub_affiliate_url": "https://aff.theaffiliateplatform.com/?paff=35425&mgr=2342",
"same_manager_url": "https://aff.theaffiliateplatform.com/?mgr=2342",
"aff_status_name": "Approved",
"last_login_date": "2023-05-09T06:03:47.083Z",
"username": "mega_affiliate",
"bo_user_email": "[email protected]",
"avatar_image_url": null,
"two_fa_enabled": false,
"api_access_enabled": true,
"first_name": "Monyy",
"last_name": "Ron",
"phone_number": "",
"skype": "",
"contact_fb": "",
"contact_vk": "",
"contact_telegram": "",
"enabled_for_login": true,
"language": "EN",
"operator_currency": "EUR",
"manager_id": 2342,
"manager_username": "smr",
"parent_affiliate_name": null,
"commissions_total": 30769.788354,
"balance": 23890.833624,
"payments": 23729.22,
"adjustments": 16850.26527,
"sub_affiliate_fee": null,
"sub_cpa_fee": 0,
"sub_commission_cut_percent": 5,
"extra_role_ids": [
100
],
"default_deal_info": {
"deal_group_name": "CPA + REV",
"deal_type_id": 6,
"cpa_amount": 30,
"rev_share_percentage": 20,
"cpl_amount": null
},
}
]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:
Possible statuses of affiliate (aff_status_id)
Update affiliate details
You should do a PUT API call with the ID of the Affiliate that you want to update in the URL.
You can include only fields that you want to update, e.g. example of updating just the first name of the affiliate
In case API returns the following code:
"You cannot change parent affiliate as soon as it was set and approved and affiliate earned commission" ,
you have to also pass 'parent_affiliate_id' and 'manager_id' in the update, with the same values as before.
Full list of supported properties
Possible payment methods (payment_method_id)
Possible payment method details (payment_method_details):
Build a tracking link for an affiliate
The operator can use the HTTP POST method to build a tracking link for specific affilite_id and specific destination link_id.
The API key is the same as described here
Get available destination links
The operator can use the HTTP GET method to get a list of destination links.
The API key is the same as described here
Example of response:
Manage pixel definitions (postbacks)
The operator can use the HTTP GET method to manage pixel definitions for the affiliate.
The API key is the same as described here
To get a list of pixel definitions for the specific affiliate:
Example of response:
To create a new pixel definition
To update existing pixel definition (pay attention that the ID of the definition should be passed in the URL, 2888 in our example)
Last updated
Was this helpful?