Python Fax - Cancel Pending Fax
The CancelFax method demonstrated in this sample allows you to cancel a previously-submitted outbound fax with Python. The Python fax snippet below cancels a fax and checks if the cancellation was successful.
Using CancelFax with Python only effects faxes waiting to be sent (with the status codes: -1 Preprocessing, -2 Ready, or -3 Pending Retry), and not faxes that are being actively transmitted.
""" A simple script cancel a fax using the InterFAX CancelFax SOAP API call. """ from interfax import client print 'Testing CancelFax...' c = client.InterFaxClient('USERNAME','PASSWORD') # Enter your Interfax username/password here result = c.cancelFax( 123456789 ) # Enter the TransactionID of transaction to cancel. print ' CancelFax returned with code %d' % result