Design And Development:FaxIt Nice:XML-RPC:FaxItNice
From 350 Nice
getFaxItCreditPurchases( void ) : struct[]
Retrieves a pre determined list of allowable FaxIt Credit purchases a user may make
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- FaxItCreditPurchaseId : int Purchase item id
- USDAmount : double Amount of purchase in USD
- USDBonus : double Bonus given if user purchases this amount
purchaseFaxItCredit( args : struct ) : struct
Purchases an amount of FaxIt Credit using a credit card. FaxItCreditPurchaseId must be a valid id returned from a previous call to getFaxItCreditPurchases
Required Arguments
- Username : string Username
- Password : string Password
- FaxItCreditPurchaseId : int Purchase item id
- CCFName : tring First name on credit card
- CCLName : string Last name on credit card
- CCNumber : string Credit card number (digits only)
- CCExpirationDate : date Credit card expiration date
- CVC : int Card Verification Code
- StreetAddress : string Billing street address of credit card
- City : string City of credit card billing address
- State : string 2 letter state code for credit card billing address
- ZipCode : string Billing zip code of credit card
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- USDBalance : float New balance expressed in USD.
getSupportedFileExtensions( void ) : struct
Retrieves lists of supported file extensions for sending faxes.
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- ConversionExtensions : string[] List of extensions that are supported but have to be converted
- PreferredExtensions : string[] List of extensions that do not have to be converted
getSupportedCountries( void ) : struct[]
Retrieves a list of countries supported for sending faxes.
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- CountryId : int Country PK in FaxItNice db
- Country : string Country name
- CountryCode : string Country dialing prefix FaxIt Nice XML RPC Phase 1 confidential
getFaxStatusCodes( void ) : struct[]
Retrieves a list of status codes for faxes within the system.
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- FaxStatusId : char Internal status code
- Description : string Human readable representation of this status
getFaxItCreditBalance( args : struct ) : struct
Retrieves a users FaxIt Credit balance (Watch out! It may be negative).
Required Arguments
- Username : string User login name
- Password : string User password
Returns
- Status : boolean Success/fail
- Error : string Error message if fail
- USDBalance : float Balance expressed in USD.
prepareFax( args : struct ) : struct
Prepares up to N files for faxing.
- FileN should be SCP’d to client home directory (DO NOT USE A SUB DIRECTORY) prior to calling this RPC. The file name should be prefixed with "~scpusername/"
- Ensure FileN is uploaded with group read permissions or the call will fail with an error while moving the file.
- Client SCP username & password are distinct from but may be the same as the XML RPC username and password.
Required Arguments
- NumFiles : int # of files uploaded forpreparation (N)
- File0 : string First file name to convert (and concatenate if more than 1)
- FileN : string Nth file name
Returns
- Status : boolean Success/fail
- Error : string Error message specifying what happened if the preparation fails. Otherwise non existent.
- HTTPPreparedFile : string HTTP Location of file in TIFF format for user to preview
- PreparedFile : string FS Location of file in TIFF format for client to use when fax is to be sent or pricing is retrieved
calculateFaxCost( args : struct ) : struct
Retrieves the cost to send a fax that was prepared earlier with a call to prepareFax. The username and password may be omitted if the user wishes to use a credit card to pay for a once off fax (phase 2 API).
Required Arguments
- Username : string User login name if wishing to use FaxIt Credit to send the fax
- Password : string User password
- CountryId : int Country Id fax will be sent to
- FaxNumber : string Fax number
- PreparedFile : string FS Location of tiff file from previous call to prepareFax.
Returns
- Status : boolean Success/fail
- Error : string Error message
- HTTPPreparedFile : string HTTP Location of file in TIFF format for user to preview
- PreparedFile : string FS Location of file in TIFF format for client to use when fax is to be sent
- USDPrice : float Cost of fax in USD
- PagesUploaded : int # pages counted in the file
sendFaxUsingFaxItCredit( args : struct ) : struct
Sends a previously prepared fax and charges the transaction to the users FaxIt Credit account.
- PreviewFile must be a valid filename + path returned from a previous call to prepareFax.
- ReceiverName cannot contain an @ symbol
- String parameters for the cover page are passed through a regular expression filter to remove unwanted characters regexp [^a-zA-Z0-9_.\s]
Required Arguments
- Username : string User login name
- Password : string User password
- PreviewFile : string FS location of file to fax
- CountryId : int Country Id receiving the fax
- FaxNumber : string Fax number to send to
- ReceiverName : string Receiver name
- Subject : string Subject
- SenderEmail : string Sender’s email address
Optional Arguments
- ReceiverEmail : string Receiver’s email address
- CoverPageComments : string Comments for cover page
- DisableAutoCoverPage : boolean Disable auto cover page generation
- DontActuallySendFax : boolean Can be used to make the script do everything except actually queue the fax for sending. Handy for testing this RPC so you don’t fill up the fax queue on the server (Will only work on a development server)
Returns
- Status : boolean Success/fail
- Error : string Error message
- FaxItNiceJobId : int FaxIt Nice order number to be used with subsequent queries
getFaxItNiceJob( args : struct ) : struct
Retrieves the status of a fax previously submitted to the system. HTTPFile may be an empty string if the file is no longer available for viewing.
Required Arguments
- Username : string Username
- Password : string Password
- FaxItNiceJobId : int Order # to query
Returns
- Status : boolean Success/fail
- Error : string Error message
- FaxItNiceJobId : int Order #
- StatusId : int StatusId of order
- Date : string Date order was created
- DateCreated : string Date order was created
- LastUpdated : string Date last checked
- ReceiverName : string Name of receiver of fax
- CountryId : int Country Id of where this fax
- FaxNumber : string Number fax was sent to
- Subject : string Subject
- SenderEmail : string Email address of sender
- ReceiverEmail : string Email address of receiver
- CoverPageComments : string Comments on the cover page
- Notified : boolean Notification sent by email
- HTTPFile : string HTTP addr for download
- USDPricePaid : float Price paid in USD
- PagesUploaded : int # pages uploaded
- PagesSent : int # pages already sent
- PagesTotal : int # pages total
- TimesQueued : int # times queued
- DialsAttempted : int # times dialed
- DialsMax : int Max dial attemps
- FaxStatusId : char StatusId of fax
- FaxStatusDescription : string Message for fax status
- FaxStatusMsg : string Additional message about fax status
getFaxLimits( void ) : struct
Certain limits may be imposed on order sent through the 350 Nice XML web services. This RPC allows the client to determine these limits dynamically
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- MaxPages : int Maximum number of pages that can be sent in one fax
- MaxFileSizeBytes : long Maximum size of each uploaded file in bytes, 0 denotes no limit
- MaxFaxItCreditRetry : int Maximum times a FaxIt Credit order can be retried if it fails
- DialsPerQueue : int # Times the system will dial each time a fax is queued
- NR_ChangeFaxNumber : float Amount that becomes non refundable if the user retries and changes the fax number
- NR_EachRetry : float Amount that becomes non-refundable each time a user retries
getPricingInfo( args : struct ) : struct
Retrieves pricing information for faxing to a specific country. N returned will be the same as MaxPages returned from getFaxLimits
Required Arguments
- CountryId : int Country Id receiving the fax
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- 1Page_FaxItCredit : float FaxIt Credit price for a 1 page fax
- 1Page_OnceOff : float Once off price for a 1 page fax ...
- NPage_ : ItCredi ']:float FaxIt Credit price for an N page fax
- NPage_OnceOff : float Once off price for an N page fax
registerUser( args : struct ) : struct
Allows a client to register a new user within the 350 Nice centralized member database. The new user must first agree to the Terms and Conditions returned from the getTermsAndConditions RPC
Required Arguments
- Username : string Desired username
- Password : string Password
- Name : string Full name of user
- Email : string Primary email address
- ReferralMedium : string Client referral tracker
Optional Arguments
- PromoCode : string Promotion code
- BusinessName : string Company name for user
- PrimaryPhone : string Primary phone number for user
- PrimaryFax : string Primary fax number for user
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
requeueFaxAllowed( args : struct ) : struct
This RPC is a pre validation method which allows the client to determine if the order is eligible to be retried or not.
Required Arguments
- FaxItNiceJobId : int Order to retry
- Username : string Username
- Password : ' string Password
Returns
- Status : boolean eligible/ineligible
- Error : string Message if ineligible
requeueFax( args : struct ) : struct
Validates if the order is eligible to be requeued and if so re-adds it to the queue, otherwise returns an error specifying why the order is not eligible to be requeued
Required Arguments
- FaxItNiceJobId : int Order to retry
- Username : string Username
- Password : string Password
Optional Arguments
- FaxNumber : string If user wishes to retry the fax to a different number.
- DontActuallySendFax : boolean Can be used to make the script do everything except actually queue the fax for sending. Handy for testing this RPC so you don’t fill up the fax queue on the server (Will only work on a development server)
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
refundFaxAllowed( args : struct ) : struct
This RPC is a pre validation method which allows a client to determine whether an order is eligible for a refund or not.
Required Arguments
- FaxItNiceJobId : int Order to retry
- Username : string Username
- Password : string Password
Returns
- Status : boolean eligible/ineligible
- Error : string Message if ineligible
- USDEligibleRefund : float Eligible refund amount
refundFax( args : struct ) : struct
Validates if the order is eligible for a refund and if so processes the refund accordingly, otherwise returns an error specifying why the order is not eligible to be refunded.
- Username and Password are required if the order is owned by a registered user
- SenderEmail is required if Username and Password are omitted FaxIt Nice XML RPC Phase 2 confidential
Required Arguments
- FaxItNiceJobId : int Order to retry
- Username : string Username
- Password : string Password
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
getMySentFaxesIds( args : struct ) : struct
Retrieves the complete list of order numbers that a user owns
- DO NOT call getMySentFaxesBatch with the complete list returned from this method because the call will timeout if the user has a lot of fax orders. Split the returned ids up into batches of about 50
Required Arguments
- Username : string Username
- Password : string Password
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- FaxItNiceJobId : int[] Order numbers the user owns
getMySentFaxesBatch( args : struct ) : struct[]
Retrieves details for the requested orders a user has sent using FaxIt Nice.
- DO NOT call this method with the complete list returned from getMySentFaxesIds because the call will timeout if the user has a lot of fax orders. Split the returned ids up into batches of about 50
- If user has not sent any faxes, returns a struct[] of length 1, with Status = 1 and no other fields.
Required Arguments
- Username : string Username
- Password : string Password
- FaxItNiceJobId : int[] List of order numbers to retrieve
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- FaxItNiceJobId : int Order #
- Date : date Order Date
- ReceiverName : string Receiver’s name
- FaxNumber : string Fax number
- CountryId : int Country
- Subject : string Subject
- FaxStatusId : float Fax Status
- HTTPFile : boolean Location of file to download over HTTP (empty if unavailable)
- RequeueFaxAllowed : boolean Requeue status
- RefundFaxAllowed : boolean Refund status
uploadFile( args : struct ) : struct
Uploads a file to the shared cache file location for later usage in preparing a fax for delivery
Required Arguments
- B64FileContent : string Base64 encoded file contents
- FileName : string The name of the file including its extension and excluding all path information
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- UploadedFile : string Filename as stored on server, use this for further processing requests to FaxIt Nice
- HTTPUploadedFile : string Location of file to download over HTTP
convertToTIFF( args : struct ) : struct / convertToPDF( args : struct ) : struct
Uploads a file to the shared cache file location for later usage in preparing a fax for delivery
Required Arguments
- NumFiles : int Number of files to be processed
- File0 : string First file to convert (and concatenate if more than 1).
- FileN : string Nth file name
Returns
- Status : boolean Flag indicating success/fail
- Error : string Error message if failure
- ConvertedFile : string Filename to send back to FaxIt Nice for further processing
- HTTPConvertedFile : string Location of file to download over HTTP
- NumPages : int Number of pages in the converted file
- B64FileContent : string Base64 encoded contents of converted file
