Retrieve the status of a single fax.
POST Variables
Variable Name | Var Type | Type | Description |
action | String | Required | Must be “Get_FaxStatus” |
access_id | Integer | Required | Account Number |
access_pwd | String | Required | Password on the user’s account |
sFaxDetailsID | Integer | Required | 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 | Array of the fax properties as follows:
array( FileName => String(75), SentStatus => String(15), DateQueued => String, DateSent => String, EpochTime => String, ToFaxNumber => String(20), Pages => Integer, Duration => Integer, RemoteID => Integer, ErrorCode => String(75), Size => Integer, AccountCode => String, ) |
Note: If an error is found then the reason for the failure will be in the Result string |
Possible Values for “SentStatus”:
- In Progress
- Sent
- Failed
- Sending Email
- If you receive a result of “FaxDetailsID Not Found”. This means that the FaxDetailsID provided where not valid or the fax was not queued due to a conversion error. If you feel like you got this message in error, please contact Customer Support
The Date
- Queued and DateSent will reflect your account’s timezone settings
- EpochTime is a unix time stamp of the DateSent field
- https://en.wikipedia.org/wiki/Unix_time
- ErrorCode will be a string describing the error encountered. There is a wide range of possible errors, the most frequent of which are “Busy”, “No Answer”, and “No Remote Fax”.
Examples
PHP using cURL
-
<?php
-
‘action’ => ‘Get_FaxStatus’,
-
‘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 ();
-
}
-
?>