Update Site/Zone Targeting
Why Update Site/Zone Targeting?
You may find it useful to make updates and changes to an existing flight that has been targeted for a specific site or zone. The Update Site/Zone Targeting API endpoint enables you to update the details of site/zone targeting for a flight using the PUT verb to make changes to an existing site/zone targeting.
API Syntax
When using the Update Site/Zone Targeting API endpoint, it is important to understand the syntax required to make the request. Because the Kevel API is a RESTful API, there is a specific request format that must be followed to ensure the endpoint can process the request. The format is:
PUT https://api.kevel.co//v1/flight/{FlightID}/sitezonetargeting/{SiteZoneTargetingID}
Where:
PUT- the type of API request being made.https://api.kevel.co- the URL for the request.v1- the API version.flight- the API endpoint being called.FlightID- the ID associated with the flight.sitezonetargeting-SiteZoneTargetingID- the ID associated with the site/zone used for targeting.
📘
Clearing attribute values
To unset or clear an attribute, set its value to
NULL.
Attributes
FlightID
int32
required
The ID of the FlightSiteZoneTargetingID
int32
required
ID of the Site/Zone Targeting parameter. You can pull it through the Get Flight endpoint if don't have.SiteID
int32
ID of the SiteZoneID
int32
ID of the ZoneisExclude
boolean
Defaults to false
Whether you want to include or exclude
Response Format
{
"Id": 98765,
"FlightId": 12345,
"SiteId": 678,
"ZoneId": 910,
"IsExclude": false
}
Example Shell Command
curl -X PUT -H 'X-Adzerk-ApiKey:<APIKEY>' -H "Content-Type:application/json" "https://api.kevel.co/v1/flight/12345/sitezonetargeting/98765" --data-binary '{"FlightId":12345,"SiteId":678,"ZoneId":910,"IsExclude":false}'