Send batch

Submit one or more documents for batch-faxing to multiple recipients.

The submitted document(s) need(s) to be of a (of a supported file type). For a list of supported MIME types, see the helper method GET /outbound/help/mediatype.

POST /outbound/batches?list={string|object}[&postponeTime={datetime}&retriesToPerform={number}&csid={string}&pageHeader={string}&reference={string}&replyAddress={email}&pageSize={a4|letter|legal|b4}&fitToPage={scale|noscale}&pageOrientation={portrait|landscape}&resolution={fine|standard}&rendering={grayscale|bw}]

Note: The maximum length of a URL is 2000 characters

Arguments

Name (bold if mandatory) Type Comments Default value
list String One of the following two options:

  1. The id of a previously-uploaded addressbook. To determine the id, retrieve a list of all available addressbooks.
  2. A stringified object, containing an array of pairs of fax number and contact name. The object can be JSON-formatted or XML-formatted, as per the following examples:
    
    [
      {"faxNumber": "00168547852", "contact": "Erik Pascua"},
      {"faxNumber": "00184757852", "contact": "Karina Catto"},
      {"faxNumber": "00169847524", "contact": "Hugh Hochman"},
      {"faxNumber": "00189688525", "contact": "Guy Capo"}
    ]
    

    or:

    <ArrayOfDestination>
    <Destination>
    <faxNumber>00168547852</faxNumber>
    <contact>Erik Pascua</contact>
    </Destination>
    <Destination>
    <faxNumber>00184757852</faxNumber>
    <contact>Karina Catto</contact>
    </Destination>
    <Destination>
    <faxNumber>00169847524</faxNumber>
    <contact>Hugh Hochman</contact>
    </Destination>
    <Destination>
    <faxNumber>00189688525</faxNumber>
    <contact>Guy Capo</contact>
    </Destination>
    </ArrayOfDestination>
    

As with every other URL parameter, this value needs to be URL-encoded.

postponeTime DateTime Time to schedule the transmission. No postponement
retriesToPerform Number Number of transmission attempts to perform, in case of fax transmission failure. Taken from control panel settings
csid String (up to 20 characters) Sender CSID. Taken from control panel settings
pageHeader String The fax header text to insert at the top of the page. Enter a string template to send a fax with a dynamically-populated header. For placeholder documentation, see your online settings under Preferences -> Outgoing -> Header Properties. For example, in the string To: {To} From: {From} Pages: {TotalPages}the placeholders {To}, {From}, and {Pages} will be populated by their respective values.
Enter N to override any control panel settings.
Taken from control panel settings
reference String (up to 60 characters) Provide your internal ID to a document. This parameter can be obtained by status query, but is not included in the transmitted fax message. Null
replyAddress Email E-mail address to which feedback messages will be sent. Taken from control panel settings
pageSize String A4LetterLegal, or B4. Taken from control panel settings
fitToPage String Scale or Noscale. Scale (enlarge or reduce) an image file to the given page size. Taken from control panel settings
pageOrientation String Portrait or Landscape. Taken from control panel settings
resolution String Standard or Fine. Documents rendered as fine may be more readable but take longer to transmit (and may therefore be more costly). Taken from control panel settings
rendering String Standard (optimized for black & white) or Fine (optimized for grayscale). Determines the rendering mode. Standard is recommended for textual, black & white documents, while Fine is better for grayscale text and for images. Taken from control panel settings

Request content

For instructions on how to attach the document(s) you wish to fax, see the explanation under Send (single) fax.

Response Headers

If successful, a 201 CREATED status is returned and the HTTP Location header contains the URI of the newly-created batch resource, e.g. Location: https://rest.interfax.net/outbound/batches/854759652.

Sample Calls

cURL

Send batch to multiple recipients


curl "https://rest.interfax.net/outbound/batches?list=%5B%7B%22faxNumber%22%3A%220097235488004%22%2C%22contact%22%3A%22Erik%20Pascua%22%7D%2C%7B%22faxNumber%22%3A%220097235488004%22%2C%22contact%22%3A%22Karina%20Catto%22%7D%2C%7B%22faxNumber%22%3A%220097235488004%22%2C%22contact%22%3A%22Hugh%20Hochman%22%7D%2C%7B%22faxNumber%22%3A%220097235488004%22%2C%22contact%22%3A%22Guy%20Capo%22%7D%5D" ^
	-u username:password ^
	--data-binary "@sampledoc.pdf" ^
	-H "Content-Type: application/pdf"

Send batch to an existing address book


"curl "https://rest.interfax.net/outbound/batches?list=list_name" ^"
	-u username:password ^
	--data-binary "@sampledoc.pdf" ^
	-H "Content-Type: application/pdf" ^

Send batch to array of fax numbers and contact names


url "https://rest.interfax.net/outbound/batches?list=%3CArrayOfDestination%3E%3CDestination%3E%3CfaxNumber%3E00168547852%3C%2FfaxNumber%3E%3Ccontact%3EErik%20Pascua%3C%2Fcontact%3E%3C%2FDestination%3E%3CDestination%3E%3CfaxNumber%3E00184757852%3C%2FfaxNumber%3E%3Ccontact%3EKarina%20Catto%3C%2Fcontact%3E%3C%2FDestination%3E%3CDestination%3E%3CfaxNumber%3E00169847524%3C%2FfaxNumber%3E%3Ccontact%3EHugh%20Hochman%3C%2Fcontact%3E%3C%2FDestination%3E%3CDestination%3E%3CfaxNumber%3E00189688525%3C%2FfaxNumber%3E%3Ccontact%3EGuy%20Capo%3C%2Fcontact%3E%3C%2FDestination%3E%3C%2FArrayOfDestination%3E" ^
	-u username:password ^
	--data-binary "@sampledoc.pdf" ^
	-H "Content-Type: application/pdf"