Deletes a specified queued fax which has not been processed
POST Variables
Variable Name | Var Type | Type | Description |
action | String | Required | Must be “Stop_Fax” |
access_id | Integer | Required | Account Number |
access_pwd | String | Required | Password on the user’s account |
sFaxDetailsID | Integer | Require* | FaxDetailsID returned from Queue_Fax |
sResponseFormat | String | Optional | “XML” or “JSON” – Default is JSON |
Returned Variables (JSON or XML Encoded)
Status | string | “Success” or “Failed” |
Result | string | See below for possible values |
Note: If an error is found then the reason for the failure will be in the Result string |
This function is used for removing a fax from the queue once it has been scheduled. Please note that depending on where the fax is in the process, it is possible to have some pages sent by the time the fax is stopped.
Possible results are:
Status = Success:
- Result:
- “Fax cancelled but partially sent” – fax was successfully cancelled but
whatever was in the fax buffer will have been sent. - “Fax Cancelled” – the fax was successfully cancelled without any pages being
sent.
- “Fax cancelled but partially sent” – fax was successfully cancelled but
Status = Failed
- Result:
- “Fax transmission completed” – the fax has been sent and the transaction is
complete - “Unable to Cancel Fax” – Fax in the process of conversion and cannot be
cancelled at this time – you can try again in 10 seconds. - “File not found – Please try again” – Fax could not be found at this time – you can try again in 5 seconds.
- “Fax transmission completed” – the fax has been sent and the transaction is
Examples
PHP using cURL
-
<?php
-
‘action’ => ‘Stop_Fax’,
-
‘access_id’ => ‘12345’,
-
‘access_pwd’ => ‘myPassword’,
-
‘sFaxDetailsID’ => ‘12345678’,
-
);
-
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’ => ‘12345678’,
-
));
-
}
-
catch (Exception $e) { //display error when exception is thrown
-
}
-
if ( $srFax->getRequestStatus () ) {
-
} else {
-
echo “ERROR: “ . $srFax->getRequestResponse ();
-
}
-
?>