Delete Advertisers

📘

To delete an Advertiser, use the Update Advertisers endpoint and set isDeleted to true

const Adzerk = require('@adzerk/management-sdk');
const apiKey = process.env.ADZERK_API_KEY;

async function deleteAdvertiser() {
  let specifications = await Adzerk.fetchSpecifications();
  let client = await Adzerk.buildClient({apiKey, specifications, logger});

  let advertiser = await client.run("advertiser", "update", {id: 989963, isDeleted: true});
  console.log(advertiser);
}

deleteAdvertiser();
require "adzerk"

def delete_advertiser()
    client = Adzerk::Client.new(ENV["ADZERK_API_KEY"])
    advertiser_id = 12345
    pp client.advertisers.delete(advertiser_id)
end
delete_advertiser()