This document describes how to get a list of affiliates, a list of available destination links and a list of pixel definitions, update affiliate details, build a tracking link for affiliates via API.
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.
You can pass additional query parameters to filter the results:
//Filter by affiliate status"aff_status_id": number[];//Set false to skip and true to include balance calculations"without_money": boolean;
Note that this request impacts your setup performance because every time it's calculating the current balance of every affiliate. You can pass without_money=true in the filter to avoid the performance hit if you don't need balance data.
Note that API returns up to 999 records. If you have more data, you can pass "range=[1000, 1999]" in the URL as GET parameter in order to get next 1000 records.
Example of a filtered request:
Example of response:
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.
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)
Manage promo codes
The operator can use the HTTP API to manage promo codes for affiliates.
The API key is the same as described here.
Get a list of promo codes
Use the HTTP GET method to get a list of promo codes.
You can pass optional query parameters to filter the results:
Example of a filtered request:
Example of response:
Get a single promo code by ID
Use the HTTP GET method with the promo code ID in the URL:
The response will contain a single promo code object with the same structure as described above.
Create a new promo code
Use the HTTP POST method to create a new promo code.
Full list of request body fields below:
Important to know:
The following fields are mandatory: "promocode", "affiliate_id", "deal_id", "status"
The "promocode" must be unique. If a promo code with the same name already exists, the API will return an error: "The promocode with this name already exists. Please use a different promocode."
The "deal_id| must be a valid deal for the specified "affiliate_id" . If the deal does not belong to the affiliate, the API will return an error: "Invalid deal for selected affiliate".
Update an existing promo code
Use the HTTP PUT method with the promo code ID in the URL.
You only need to include the fields you want to update. All fields from the create request are supported except affiliate_id and deal_id , which cannot be changed independently without the other (both must be provided together for re-validation).
Full list of supported properties:
Example of an API call for deactivation of promo code:
{
"affiliate_name": "JohnB",
"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
"parent_affiliate_id": 35427,
// set the ID of the parent
"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 protected]",
"avatar_image_url": "",
"two_fa_enabled": false,
// enabled/disable 2FA verification
"api_access_enabled": true,
// enable/disable access for affiliate via API
"extra_role_ids": 103,104,122,
"first_name": "John",
"last_name": "Malkovich",
"phone_number": "123",
"skype": "john",
"contact_fb": "https://fb.me/123123",
"contact_wa": "",
"contact_vk": "",
"contact_telegram": "",
"contact_discord": "",
"language": "FR",
// set the preferred communication language
"payment_method_id": 3,
"payment_method_details": {
"skrill_email": "[email protected]",
}
"payment_threshold_oper_currency": 1000,
// set the payment method and payment method details of the affiliate as listed below
"brand_ids": [333],
//associate affiliate with one or more of your brands; has simply informational purpose
}
[
{
// 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,
}
]
//Search by promo code name (case-insensitive). Use `@` prefix to search by ID, e.g. `@123`
"q": string;
//Filter by status. `true` for active, `false` for inactive
"status": boolean;
[
{
// unique ID of the promo code
"id": 150,
"promocode_id": 150,
// the promo code string
"promocode": "WELCOME2026",
// internal description (visible only for operator)
"description_internal": "Welcome bonus for new signups",
// public description (visible to affiliates)
"description_public": "Get 100% bonus on first deposit",
// operator ID
"operator_id": 2354,
// affiliate ID to whom this promo code belongs
"affiliate_id": 166368,
// affiliate name
"affiliate_name": "AffPartner",
// deal ID assigned to this promo code
"deal_id": 93195,
// deal group name
"deal_group_name": "Default deal",
// start date from which the promo code is valid (ISO 8601)
"start_date": "2026-01-01T00:00:00.000Z",
// end date until which the promo code is valid (ISO 8601), null if no expiry
"end_date": "2026-12-31T23:59:59.000Z",
// status of the promo code
// true - active
// false - inactive
"status": true,
// back office username of the creator
"username": "admin",
// creation timestamp
"create_date": "2026-01-15T10:30:00.000Z",
// last update timestamp
"update_date": "2026-02-01T14:20:00.000Z"
}
]
{
"promocode": string; //The promo code string. Must be unique per operator.
"affiliate_id": number; // ID of the affiliate to whom this promo code belongs.
"deal_id": number; //ID of the deal assigned to this promo code. Must be a valid deal for the specified affiliate.
"status": boolean; // `true` for active, `false` for inactive.
"description_internal": string; // Internal description visible only for the operator.
"description_public": string //Public description visible to affiliate.
"start_date": string // Start date from which the promo code is valid (ISO 8601).
"end_date": string //End date until which the promo code is valid (ISO 8601).
}
{
// The promo code string.
"promocode": string;
// ID of the affiliate
"affiliate_id": number;
// ID of the deal. If provided with "affiliate_id", the deal will be validated against the affiliate.
"deal_id": number;
// "true" for active, "false" for inactive.
"status": boolean;
// Internal description
"description_internal": string;
// Public description
"description_public": string
// Start date (ISO 8601).
"start_date": string
// End date (ISO 8601).
"end_date": string
}