Delete banners via API

If you wish to delete banners via php API, you need to know the IDs of the particular banners. 
 
<?php
include 'PapApi.class.php';
$session = new Pap_Api_Session("http://URL_TO_PAP/scripts/server.php");

if(!$session->login("merchant@example.com","demo")) {
  die("Cannot login. Message: ". $session->getMessage());
}


$bannerIDs = array('38a9d2c8','bb1723b8','e6c99e22'); //delete banners identified by those banner IDs

$request = new Gpf_Rpc_FormRequest("Pap_Merchants_Banner_BannerForm", "deleteRows", $session);

$request->addParam('ids', new Gpf_Rpc_Array($bannerIDs));

try {
  $request->sendNow();
} catch(Exception $e) {
  die("API call error: ".$e->getMessage());
}

$response = $request->getStdResponse();

if ($response->success == 'Y') {
  echo 'Success: ' . $response->infoMessage;
} else {
  echo 'Unsuccess: ' . $response->errorMessage;
}
?>