Submits a fax job, in order to send one or more documents to one or more recipients.
POST fw/Apps/StoneFax/WebAPI/Faxes/Outbound
None
The request body is a multipart/form-data containing a part that describes the submit information and as many parts as the attachments you want to send along the fax.
The submit information part must be as follows:
Name | Type | Required | Description | Default | Example |
---|---|---|---|---|---|
subject | string | optional | The subject of the fax | null | "The fax subject" |
coverPageName | string | optional | The name of the cover page to use (not including the COV file extension). If specified, it must match the name of an existing cove page. If the specified coverpage does not exists, the fax will be sent without any coverpage. |
null | "BusinessCover" |
recipients | Recipient[] | required | The recipients of the fax. It must contain at least one recipient. See below for the Recipient data structure details. | [] | |
sendAsUsername | string | optional |
The username to use as the fax sender.
If not specified, the sender will be the user invoking this method. |
null | "userToImpersonate" |
notifyByEmail | bool | optional | True if you want to receive email notifications about the transmission status. False otherwise | false | true |
notificationEmailAddress | string | optional | Use this parameter to specify a recipient email address for the transmission report email, different from the sending user email address. If not specified, the sending user email address will be used. This parameter is ignored if notifyByEmail=FALSE |
null | "mailfornotifications@domain.com" |
speedyDirectoryName | string | optional |
The name of an existing Speedy directory. Such contacts will be additional recipients respect to the ones specified by the Recipients[] array. |
null | "directory1" |
body | string | optional | The fax body (plain text). If null or empty, then the rest of the multipart body must contain at least one valid attachment. | null | "The fax body" |
Name | Type | Required | Description | Default | Example |
---|---|---|---|---|---|
firstName | string | optional | Recipient's first name | null | "John" |
lastName | string | optional | Recipient's last name | null | "Doe" |
faxNumber | string | required | Recipient's fax number | null | "123456" |
Fax has been submitted and is being processed.
Name | Type | Description |
---|---|---|
ids | string[] | The submitted job ids (one per recipient) |
Name | Type | Description |
---|---|---|
reason | BadRequestReason | The reason why the request has been rejected |
Value | Descritpion |
---|---|
SyntaxError | The JSON part contains a syntax error and cannot be parsed |
InvalidRecipients | No recipients provided, or at least one of the recipients has no fax number |
InvalidAttachments | The attachments supplied are invalid |
InvalidDirectoryName | There is no such Speedy directory having the given name |
InvalidUsername | There is no such user having the given username |
This example sends a fax only containing a body (i.e. without attachments) to two recipients, enabling email notifications:
POST fw/Apps/StoneFax/WebAPI/Faxes/Outbound
Request body:
The response body is:
This other example sends a fax only with a body and an attachment to one recipient, enabling email notifications:
POST fw/Apps/StoneFax/WebAPI/Faxes/Outbound
Request body:
The response body is:
If you need to send a fax with two or more attachments, all you have to do is add one form part for each additional attachment you need to send. In this example we send a fax with a body and two attachments:
POST fw/Apps/StoneFax/WebAPI/Faxes/Outbound
Request body:
The response body is: