Replace traffic modifier
Traffic Modifier
Overview
A traffic modifier that multiplies the targeted Ad Requests by a constant amount.
If this Traffic Modifier is active during a forecast, a MODTRF warning will be triggered.
JSON Schema
- trafficModifierId:
string(required)- The JSON object with the traffic modifier.
- Id:
string(required)- Unique identifier of the Traffic Modifier.
- StartDate:
date-time(required)- Start date for the traffic modifier, as
yyyy-mm-dd'T'HH:mm:SSoryyyy-mm-dd(default time of00:00:00).
- Start date for the traffic modifier, as
- EndDate:
date-time(required)- End date for the traffic modifier, as
yyyy-mm-dd'T'HH:mm:SSoryyyy-mm-dd(default time of23:59:59).
- End date for the traffic modifier, as
- TimeZone:
string- Defaults to UTC
- The time zone of the modifier's start and end dates. Additionally, the rule is evaluated in the modifier's time zone.
- Rule:
string- The rule used to filter the Ad Requests (Zerkel query). The traffic modifier will only be applied to Ad Requests who conform to this rule.
- Type:
string(enum, required)- Allowed:
adRequestMultiplier
- Allowed:
- Multiplier:
number(required)- How many times to multiply traffic in the range.
Response Codes
- 200 Normal response, containing the updated JSON object with the traffic modifier, if it existed before.
- 400 The entity in the body is invalid.
- 404 The entity doesn't exist.
Example Request
curl --request PUT \
--url https://api.kevel.co/v1/forecaster/modifiers/traffic/trafficModifierId \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"TimeZone": "UTC",
"Type": "adRequestMultiplier"
}
'```
### Example Response
```json
{
"Id": "e123e48",
"StartDate": "2024-09-03T00:00:00",
"EndDate": "2024-09-04T23:59:59",
"TimeZone": "UTC",
"Rule": "$location.countryCode = \"GB\"",
"Type": "adRequestMultiplier",
"Multiplier": 2
}