Retrieve a list of faxes received for a specified period of time
POST Variables
| Variable Name | Var Type | Type | Description | 
| action | String | Required | Must be “Get_Fax_Inbox” | 
| access_id | Integer | Required | Account Number | 
| access_pwd | String | Required | Password on the user’s account | 
| sResponseFormat | String | Optional | “XML” or “JSON” – Default is JSON | 
| sPeriod | String | Optional | “ALL” or “RANGE” if not provided defaults to “ALL” | 
| sStartDate | String | Optional | Only required if “RANGE” is specified in sPeriod – date format must be “YYYYMMDD” | 
| sEndDate | String | Optional | Only required if “RANGE” is specified in sPeriod – date format must be “YYYYMMDD” | 
| sViewedStatus | String | Optional | “UNREAD” – Only show faxes that have not been read“READ” – Only show faxes that have been read
 “ALL” – Show all faxes irrespective of Viewed Status (DEFAULT)  | 
| sIncludeSubUsers | String | Optional | Set to “Y” if you want to include faxes received by a sub user of the account as well | 
Notes:
- If you want to use “sIncludeSubUsers”, you will need to use the access_id and access_pwd of the Master Account
 
Returned Variables (JSON or XML Encoded)
| Status | string | “Success” or “Failed” | 
| Result | string | Array of the fax properties as follows:
Array[#]->array( FileName => String(75), ReceiveStatus => String(15), Date => String, EpochTime => String, CallerID => String(40) RemoteID => String(40) Pages => Integer, Size => Integer, ViewedStatus => String(1) ) If sIncludeSubUsers is set to “Y” then two additional variables are returned in the array: User_ID => Integer, User_FaxNumber => String(55),  | 
| Note: If an error is found then the reason for the failure will be in the Result string | ||
Notes:
- Both Date and Epoch Time are adjusted to your date/timezone settings
 - Epoch Time is a unix time stamp of the Date field:
- https://en.wikipedia.org/wiki/Unix_time
 
 
Examples
PHP using cURL
- 
<?php
 - 
‘action’ => ‘Get_Fax_Inbox’,
 - 
‘access_id’ => ‘12345’,
 - 
‘access_pwd’ => ‘myPassword’,
 - 
‘sPeriod’ => ‘RANGE’,
 - 
‘sStartDate’ => ‘20150301’,
 - 
‘sEndDate’ => ‘20150331’
 - 
);
 - 
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 {
 - 
‘sPeriod’ => ‘RANGE’,
 - 
‘sStartDate’ => ‘20150301’,
 - 
‘sEndDate’ => ‘20150331’,
 - 
));
 - 
}
 - 
catch (Exception $e) { //display error when exception is thrown
 - 
}
 - 
if ( $srFax->getRequestStatus () ) {
 - 
} else {
 - 
echo “ERROR: “ . $srFax->getRequestResponse ();
 - 
}
 - 
?>