API documentation GET /offers/{id}/cap
Get information about the budget and capping for the given offer.
GET https://demo.trafficmanager.com/api/v1/offers/{id}/cap
Authentication:
The request must be authenticated with the following HTTP headers:x-api-key
: Your API key, found in the Security pagex-user-id
: Your User ID, found in the Security page
If the HTTP headers are not passed, but you are logged in to the TrafficManager panel, the current user is used instead (so you can easily preview or download the data using your browser)
GET Parameters:
- Required:
id
: offer ID
Returned values:
The response is a JSON object that can contain the following fields.
Each field will be present only if the offer has a cap for that parameter.
Each field will be present only if the offer has a cap for that parameter.
spentToday
: total payout for today, only if the offer has adailyBudget
setspentTotal
: total payout for the offer, only if the offer has atotalBudget
setconvToday
: total conversions for today, only if the offer has adailyCap
setconvTotal
: total conversions for the offer, only if the offer has atotalCap
setconvUserToday
: total conversions for today for the current user, if the offer has acapMode
set toconversions
.
If the offer has a cap mode set topayout
, this is the payout paid today today to the current user.
If the offer has a cap mode set tocost
, this is the amount spent today by the advertiser today for the current user.settings
: object with the following fields:capMode
: cap mode (can beconversions
,payout
orcost
)cap
:- if
capMode
isconversions
, this is the maximum number of daily conversions allowed for the current user - if
capMode
ispayout
, this is the maximum daily payout allowed for the current user - if
capMode
iscost
, this is the maximum daily amount spent allowed for the current user
- if
dailyCap
: maximum number of daily conversions allowed for the offer, across all affiliatestotalCap
: maximum number of conversions allowed for the offer, across all affiliatesdailyBudget
: maximum daily budget allowed for the offer, across all affiliatestotalBudget
: maximum total budget allowed for the offer, across all affiliates
Request example
GET https://demo.trafficmanager.com/api/v1/offers/35/cap
Response example
This is the equivalent of the following information in the offer page:
Daily budget (All network) | 100.00 € Payout today: 32.00 € |
Total budget (All network) | 500.00 € Total payout: 128.00 € |
Daily cap (All network) | 10 conv. Conversions today: 7 |
Total cap (All network) | 100 conv. Total conversions: 15 |
Daily cap per user | 2 Conversions / day Conversions today: 1 |
{ "status": 200, "data": { "spentToday": "32.00", "spentTotal": "128.00", "convToday": "7", "convTotal": "15", "convUserToday": "1.000000", "settings": { "capMode": "conversions", "cap": 2, "dailyCap": 10, "totalCap": 100, "dailyBudget": 100, "totalBudget": 500 } } }
Error codes:
404
: Offer not found403
: User does not have access to the offer