CallFire has a new API!
We are proud to announce the launch of our API 2.0! Learn more about our streamlined, transactional and broadcast APIs. This version of the API documentation will remain available for reference only. There will be no new development, only bug fixes. We highly recommend upgrading to our newer and more sophisticated documentation.
Delete subscription to stop receiving CallFire notification events at the registered URI postback endpoint.
Request Parameters
Parameter | Demo Value | Description | Data Type |
---|---|---|---|
DeleteSubscription | Delete Subscription identified by unique ID | object | |
Id | Unique ID of resource | long |
* indicates choice value, bolded parameters are required
<?php
/**
* You'll need your login/password pair when you create the SOAP client.
* Don't use the fake login/password provided here; it's just for show and won't work.
*/
$wsdl = "http://callfire.com/api/1.1/wsdl/callfire-service-http-soap12.wsdl";
$client = new SoapClient($wsdl, array(
'soap_version' => SOAP_1_2,
'login' => 'YourLoginId',
'password' => 'YourPassword'));
/**
* DeleteSubscription. Delete existing subscription.
*/
$request = new stdclass();
$request->Id = 2; // required
$client->DeleteSubscription($request);
// No Response.
// If need to delete multiple subscriptions then need to loop through list.
// Let's assume we have $client defined from the first example:
$subscriptions = $client->querySubscriptions();
foreach ($subscriptions as $subscription) {
$request = new stdclass();
$request->Id = $subscription->Id;
echo "Deleting $id...\n";
$client->deleteSubscription($request);
}
?>