Permanently deletes one or more capping objects, identified by pairs of capping ID and capping type.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/capping/delete.do
Permanently deletes one or more capping objects, identified by pairs of capping ID and capping type. Each element in the ids array must be a colon-separated string in the format 'capping_id:capping_type' (e.g. '123:CAMPAIGN_FREQUENCY', '456:PLACEMENT_CLICKS'). The capping type is required because capping IDs are only unique within one capping type. Requires UPDATE permission on the entity each capping belongs to, and MANAGE_INVENTORY_CAPPING (placement cappings) or MANAGE_CAPPING_AND_LIMITATIONS (the others) enabled; when one id is refused, nothing is deleted.
Form Params
idsarray<string>required
Array of colon-separated 'capping_id:capping_type' pairs to delete (e.g. '123:CAMPAIGN_FREQUENCY', '456:PLACEMENT_CLICKS')
123:CAMPAIGN_FREQUENCY
Responses
200
Cappings deleted successfully
400
An id is not in the id:TYPE format, or names an unknown capping type; the message says which
401
Authentication error
403
The caller may not change the entity one of the cappings belongs to
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/capping/delete.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["ids"] = "123:CAMPAIGN_FREQUENCY" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());