Delete Flights

📘

To delete a Flight, use the Update Flight endpoint and set isDeleted to true

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

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

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

deleteFlight();
require "adzerk"

def delete_flight()
    client = Adzerk::Client.new(ENV["ADZERK_API_KEY"])
    flight_id = 12345
    pp client.flights.delete(flight_id)
end
delete_flight()