Deletes specified received or sent faxes
POST Variables
Variable Name | Var Type | Type | Description |
action | String | Required | Must be “Delete_Fax” |
access_id | Integer | Required | Account Number |
access_pwd | String | Required | Password on the user’s account |
sFaxFileName_x | String | Required* | sFaxFileName returned from Get_Fax_Inbox or Get_Fax_Outbox. You are able to provide an unlimited number of fax file names by replacing the “x” with a sequential number |
sFaxDetailsID_x | String | Required* | sFaxDetailsID of the fax – the ID is located after the “|” (pipe) character of the sFaxFileName. You are able to provide an unlimited number of fax ID’s by replacing the “x” with a sequential number |
sDirection | String | Required | “IN” or “OUT” for inbound or outbound fax |
sSubUserID | Integer | Optional | The account number of a sub account, if you want to use a master account to delete a sub account’s fax |
sResponseFormat | String | Optional | “XML” or “JSON” – Default is JSON |
*NOTE: Either the sFaxFileName or the sFaxDetailsID must be supplied
Returned Variables (JSON or XML Encoded)
Status | string | “Success” or “Failed” |
Result | string | Empty String |
Note: If an error is found then the reason for the failure will be in the Result string |
Examples
PHP using cURL
-
<?php
-
‘action’ => ‘Delete_Fax’,
-
‘access_id’ => ‘12345’,
-
‘access_pwd’ => ‘myPassword’,
-
‘sFaxDetailsID_1’ => ‘12345678’,
-
‘sFaxDetailsID_2’ => ‘87654321’,
-
‘sDirection’ => ‘OUT’,
-
);
-
CURLOPT_POST => 1,
-
CURLOPT_HEADER => 0,
-
CURLOPT_URL => “https://secure.srfax.com/SRF_SecWebSvc.php”,
-
CURLOPT_FRESH_CONNECT => 1,
-
CURLOPT_RETURNTRANSFER => 1,
-
CURLOPT_FORBID_REUSE => 1,
-
CURLOPT_TIMEOUT => 60,
-
CURLOPT_SSL_VERIFYPEER => false,
-
CURLOPT_SSL_VERIFYHOST => 2,
-
);
-
}
-
else {
-
}
-
?>
PHP using SRFax Object
-
<?php
-
require_once (“srFax_class.php”);
-
$accountID = “12345”;
-
$accountPassword = “myPassword”;
-
// instantiate object with Account ID and Password
-
$srFax = new srFax ( $accountID, $accountPassword );
-
try {
-
‘sFaxDetailsID_1’ => ‘12345678’,
-
‘sFaxDetailsID_2’ => ‘87654321’,
-
‘sDirection’ => ‘OUT’,
-
));
-
}
-
catch (Exception $e) { //display error when exception is thrown
-
}
-
if ( $srFax->getRequestStatus () ) {
-
} else {
-
echo “ERROR: “ . $srFax->getRequestResponse ();
-
}
-
?>