campaignUnschedule()

Campaign delivery time is unscheduled. Campaign is saved as a draft and is not delivered.

campaignUnschedule(string $cid) : boolean
Input parameters
  • cid - campaign ID
Information obtained
  • true, if unscheduling has succeeded. Otherwise, an error message is returned.

Examples

mgapi_campaignUnschedule.php
campaignUnschedule($cid);
 
header("Content-Type: text/plain");
if ($api->errorCode) {
    echo "Unable to load campaignUnschedule()!\n";
    echo "\tCode=" . $api->errorCode . "\n";
    echo "\tMsg=" . $api->errorMessage . "\n";
} else {
    echo "Campaign Unscheduled!\n";
}
xml-rpc_campaignUnschedule.php
  new xmlrpcval($apikey),
                    'cid' => new xmlrpcval($campaignId)
                ),
                'struct');
$f = new xmlrpcmsg('campaignUnschedule', array($v));
$c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80);
$c->setDebug($debug);
$r = &$c->send($f);
 
header("Content-Type: text/plain");
if (!$r->faultCode()) {
    $retval = php_xmlrpc_decode($r->value());
    echo "Campaign Unscheduled!\n";
} else {
    echo "Unable to run campaignUnschedule()!\n";
    echo "\tCode=" . $r->faultCode() . "\n";
    echo "\tMsg=" . $r->faultString() . "\n";
}
mgapi_campaignUnschedule.py
from lib.config import * #contains apikey
from lib.MGAPI import MGAPI
 
# This Example shows how to ping using the MGAPI.php class and do some basic error checking.
 
api = MGAPI(apikey)
cid = campaignId
 
retval = api.campaignUnschedule(cid)
if api.errorCode:
    print "Unable to load campaignUnschedule()!"
    print "\tCode=", api.errorCode
    print "\tMsg=", api.errorMessage
else:
    print "Campaign Unscheduled!"

© 2010-2017 Mailigen. All rights reserved.