▪️Deals management API
Creating new deals for affiliates
You can use the HTTP POST method to build deals for specified affiliate_id. The API key to access the end-point is the same as described here
Example of POST body in JSON:
curl --location 'https://boapi.smartico.ai/api/af2_deals_op' \
--header 'authorization: your-api-key' \
--header 'Content-Type: application/json' \
--data '{
"affiliate_id": 64257, // required
"deal_type_id": 6, // required
"deal_group_name": "CPA + REV & FTD Qualifier", //required
"cpa_amount": 10,
"qua_cpa_ftd": 30,
"rev_share_percentage": 25
}'The platform supports the following deals:
export enum AffDealType {
// Pure deals
CPL = 1,
CPA = 2,
RevShare_NetPL = 4,
RevShare_NetDeposit = 8,
// Hybrid deals
CPL_CPA = 3,
CPL_RevShare_NetPL = 5,
CPA_RevShare_NetPL = 6,
CPL_RevShare_NetDeposit = 9,
CPA_RevShare_NetDeposit = 10,
}Supported fields in POST body:
For hybrid deals, you can use a combination of parameters. For example, for CPA + RevShare_NetPL deal, the required fields will be cpa_amount and rev_share_percentage.
Example of the call that creates a CPA + RevShare_NetPL deal with
CPA amount of: 10
Rev share percentage: 25
CPA FTD Qualifier: 30
Such a deal will correspond to the following configurations made from the TAP backoffice:

Set default deal for affiliate
You can use the HTTP POST method to set a default deal for the affiliate. Example of the call:
Example of the response:
Getting a list of deals for the affiliate
You can use the HTTP GET method to get a list of all deals for the affiliate
You need to pass affiliate_id; as a response, you will get a list of all deals, including the sub-deals. Example of the response
If you are interested only in the root level deals, you will need to take only deals with level_id: 1
Last updated
Was this helpful?