Python Fax - Get Detailed Information About Submitted Faxes

Download the Python fax code samples and library.

The FaxQuery method, which provides more advanced querying capabilities than FaxStatus (for more details, see Side-by-side Comparison of Web Service Methods), can be used to retrieve information about one or more submitted faxes with Python.

In the Python fax snippet below, FaxQuery is used to provide detailed information for a number of transmitted faxes:

"""
A simple script to check the status of a few fax transmissions
using the InterFAX FaxQuery SOAP API call.
"""
from interfax import client
 
print 'Testing FaxQuery...'
c = client.InterFaxClient('USERNAME','PASSWORD') # Enter your Interfax username/password here
 
result = c.faxQuery( 'LT', 999999999, 10)
print '   FaxQuery returned with code %d and %d items' % ( result[0], len(result[1]) )
 
# Print details for each item.
for currItem in result[1]:
    print currItem
    print "\nparentTxId: %d\ntxId: %d\nsubmitTime: %s\npostponeTime: %s\ncompletionTime: %s\nuserId: %s\ncontact: %s\njobId: %s\ndestinationFax: %s\nreplyEmail: %s\nremoteCSID: %s\npagesSent: %s\nstatus: %d\nduration: %d\nsubject: %s\npagesSubmitted: %d\nsenderCSID: %s\npriority: %d\nunits: %d\ncostPerUnit: %d\npageSize: %s\npageOrientation: %s\npageResolution: %s\nrenderingQuality: %s\npageHeader: %s\nretriesToPerform: %d\ntrialsPerformed: %d" % currItem