SendFax
This is the simplest method to fax an attached file.
Formal definition
https://ws.interfax.net/dfs.asmx?op=Sendfax
Input
| Name | Type | Comments |
|---|---|---|
| Username | String | The name of the user authenticating to the API |
| Password | String | The password for the Username |
| FaxNumber | String | The destination fax number in standard international notation e.g. +44-207-3456789 |
| FileData | base64Binary | Binary data of the document. Note: Your development environment may automatically pick up this property’s data type and implicitly encode it in base64 without you needing to do so explicitly. For example, PHP5 does this. |
| FileType | String | The file type of the submitted file, e.g. TXT, HTML, DOC, PDF, etc. Can be any one of the file types supported by InterFAX. (If TXT, the character set is taken from control panel setting Preferences -> Outgoing -> Default text charset encoding.) When the Filetype parameter is empty, the API method assumes the file type is TXT. |
Output
| Name | Type | Comments |
|---|---|---|
| SendfaxResult | Long | In case of successful submission – the value contains a Transaction ID. In case of a failure, a negative value is returned; see the Error Codes below. See Web service return codes for a full list of return codes. |
Error codes
| Value | Description |
|---|---|
| -111 | Designated fax number does not match |
| -112 | FaxNumber parameter is null or empty |
| -123 | FileData parameter is null or the length of data byte array is 0 |
| -150 | An exception occurs at any point in the execution of the web service method |
| -310 | The logged in user in context is not a primary user |
| -666 | The logged in user is configured in another switch group |
| -677 | The logged in user does not have any TX service registered |
| -1002 | The list of file types and document sizes do not match |
| -1003 | The logged in user cannot be authenticated when either the username or the password is incorrect |
| -1004 | The Filetype parameter is empty |
| -1007 | The length of FileData parameter is empty after extracting bytes in UTF8 format from the data parameter as string |
| -1008 | The total size and data passed in do not match |
| -1010 | The Filetype parameter contains “/AB” & “/PB” switches making them ambiguous |
| -1011 | Too many data requests from the Username |
| -1059 | The list of file types separated by semi-colon “;” is greater than the maximum allowed attachments configured |
| -2003 | The request from the IP of the machine is not in a valid IP address range |