Must use a PUT method to run the campaign cap API. The campaign cap API will allow you to modify the cap set for a campaign. Values are case sensitive.
Able to use XML or JSON by including the following in the headers:
- content-type:application/xml for xml
- content-type:application/json for json
Base URL
/v2/Campaigns/Cap
Parameters
CampaignId - Required. Must be a valid CID for a campaign in your account. Example: 123456
AffiliateId - Required if you're creating an affiliate cap. Must be a valid AFID for an affiliate assigned to the campaign. Example: 123456
EnableCapEmailNotifications - Enables the cap notification email. True or false, default is false.
CapEmailAddress - List of emails to send the cap threshold email to. Must be a valid email address.
CapId - Required if you're modifying a cap. Valid cap ID of a campaign or campaign/affiliate cap. If creating a new cap, leave out or set to 0.
CapType - Must be avalid cap type. JSON: 1 = Per Day, 2 = Per Week, 3 = Per Month, 4 = Total. XML: Daily, Weekly, Monthly, Total.
Enabled - Enables the campaign or campaign/affiliate cap.
CapValue - Required. The number of conversions of amount of revenue for the cap. Must be a whole number greater than 0.
IsRevenue - Specifies if the cap is a conversion or revenue cap. True = revenue cap, false = conversion cap, default is false.
EmailNotificationThreshold - Required if EnableCapEmailNotifications is set to true. The percentage when a cap notification email will sent to notify a user or affiliate that the cap is about to be met. Must be a whole number greater than 0.
Example URL
https://api.linktrust.com/v2/Campaigns/Cap
Example XML
<CampaignCapConfig>
<CampaignId>123456</CampaignId>
<EnableCapEmailNotifications>false</EnableCapEmailNotifications>
<CapEmailAddress>test@test.com</CapEmailAddress>
<Caps>
<CampaignCap>
<CapId>152</CapId>
<CampaignId>123456</CampaignId>
<CapType>Total</CapType>
<Enabled>false</Enabled>
<CapValue>20</CapValue>
<IsRevenue>false</IsRevenue>
<EmailNotificationThreshold>80</EmailNotificationThreshold>
</CampaignCap>
<CampaignCap>
<CapId>363</CapId>
<CampaignId>123456</CampaignId>
<CapType>Total</CapType>
<Enabled>false</Enabled>
<CapValue>20</CapValue>
<IsRevenue>false</IsRevenue>
<EmailNotificationThreshold>80</EmailNotificationThreshold>
</CampaignCap>
<CampaignCap>
<CapId>84</CapId>
<CampaignId>123456</CampaignId>
<CapType>Total</CapType>
<Enabled>false</Enabled>
<CapValue>20</CapValue>
<IsRevenue>false</IsRevenue>
<EmailNotificationThreshold>80</EmailNotificationThreshold>
</CampaignCap>
<CampaignCap>
<CampaignId>123456</CampaignId>
<CapType>Total</CapType>
<Enabled>false</Enabled>
<CapValue>20</CapValue>
<IsRevenue>false</IsRevenue>
<EmailNotificationThreshold>80</EmailNotificationThreshold>
</CampaignCap>
</Caps>
</CampaignCapConfig>
Example JSON
{
"CampaignId": 123456,
"AffiliateId": 123456,
"EnableCapEmailNotifications": true,
"CapEmailAddress": "0@jam.com;1@jam.com;2@jam.com",
"Caps": [
{
"CapId": 345,
"CapType": 1,
"Enabled": true,
"CapValue": 30,
"IsRevenue": true,
"EmailNotificationThreshold": 25
},
{
"CapId": ,
"CapType": 3,
"Enabled": true,
"CapValue": 30,
"IsRevenue": true,
"EmailNotificationThreshold": 25
},
{
"CapId": 123,
"CapType": 2,
"Enabled": true,
"CapValue": 30,
"IsRevenue": false,
"EmailNotificationThreshold": 30
}
]
}
You can request a demo to see LinkTrust up close and experience how it can help you, or start your free 14-day trial now.
Need help with this feature or have questions? You can contact our support team at support@linktrust.com