FaxQuery

Description

The FaxQuery method searches for the outgoing fax items based on the search criteria provided with an operator as Verb and data to look for in the VerbData parameter. It will return the number of items mentioned in the MaxItems parameter if the result code value is 0, that is, OK.

Note that this method is rate-limited, as defined under System Limitations

Formal Definition

https://ws.interfax.net/dfs.asmx?op=FaxQuery

Input

Name Type Comments
Username String The name of the user authenticating to the API
Password String The password for the username
Verb String Any of the following operators:
PARENT – Retrieve ALL items in a batch
GT  – Transactions with an ID greater than the given Transaction ID
GE  – Transactions with an ID greater than or equal to the given Transaction ID
LT  – Transactions with an ID smaller than the given Transaction ID
LE  – Transactions with an ID smaller than or equal to the given Transaction ID
EQ  – Transactions with an ID equal to the given Transaction ID
BETWEEN  – Transactions with an ID greater than or equal to transactionid1 and smaller than or equal to transactionid2.
IN  – Transactions in list
ACTIVE – Leave VerbData empty to retrieve ALL incomplete (active) items
VerbData String When the Verb is PARENT , GT  , GE  , LT  , LE   or EQ  , VerbData must be one TransactionID.
When the Verb is IN  , the VerbData must be one or more Transaction IDs as a comma separated string.
When the Verb is  BETWEEN  , the VerbData must have two different Transaction IDs as a comma separated string, where the second number is greater than the first number to make it a valid range.
When the Verb is ACTIVE , leave VerbData empty to retrieve ALL incomplete (active) items.
MaxItems Integer Maximum number of FaxItem elements to be returned. Use -1 for no limit. But note that no more transactions will be returned than the value defined in System Limitations.
ResultCode Integer Parameter to hold the returned ResultCode

Output

Name Type Comments
ResultCode Integer The result code of the operation: 0 for success, otherwise an error code indicating what went wrong. See Error Codes, below. All errors are listed in Appendix A. Note that this refers to the success/failure of placing a query, NOT to the result of fax transmission.
FaxItems Array of FaxItemEx An array of FaxItemEx objects, each representing details about individual faxes.
ParentTransactionID Integer In case of a Broadcast – the ID of the 1st item
TransactionID Integer
SubmitTime DateTime Time when the transaction was originally submitted by the client
PostponeTime DateTime Time to which fax was scheduled for transmission. Returns '0000-00-00' if not postponed
CompletionTime DateTime End time of last of all transmission attempts
UserID String
Contact String The text which was inserted into the Contacts property upon submission of the fax (available in select submission methods only).
JobID String Reserved for future use
DestinationFax String The fax number in a canonical format (see Appendix B)
ReplyEmail String The email address to which a confirmation message is to be sent
RemoteCSID String Receiving party CSID (up to 20 characters).
PagesSent Short Number of successfully sent pages.
Status Integer Fax status. 0= OK; greater than 0 = Error (See Interfax Error Codes)
Duration Integer Transmission time in seconds.
Subject String Original value as submitted.
PagesSubmitted Short Number of pages originally submitted.
SenderCSID String CSID of calling party
Priority Short Priority assigned to the fax
Units Decimal Number of units to be billed (pages or tenths of minutes)
CostPerUnit Decimal Monetary units, in account currency. Multiply this by ‘Units’ to get the cost of the fax.
PageSize String A4LetterLegal, or B4
PageOrientation String Portrait or Landscape
PageResolution String Standard or Fine
RenderingQuality String Standard (optimize for black & white) or Fine (optimize for greyscale)
PageHeader String Header overlaid on fax
RetriesToPerform Short Retry attempts requested
TrialsPerformed Short Retry attempts actually performed

Error Codes

Value Description
-150 Internal System Error. An exception occurred at any point in the execution of the web service method.
-666 The user is configured in another switch group
-677 The user does not have any TX service registered
-1003 Authentication error: the user cannot be authenticated when either the username or the password is incorrect OR any other last error occurred when authenticating the user.
-1011 Too many data requests from the Username. (The maximum frequency of polling for fax status is defined under “System Limitations“.)
-1030 Invalid Verb or VerbData
-2003 The request from the IP of the machine is not in a valid IP address range