Function
Note the distinction between this and GET/fax/messages that returns a list of fax messages for a mailbox.
The GET/fax/message method returns the file attachment of a particular fax document for the specified mailbox (phone line) parameter. The file is displayed as an Asci string, encoded in Base64 format.
The response has the following fields of information:
- name - the name of the file of the fax document. This is usually a PDF file and is different than the name in the request.
- data - A long Asci string which is the file attachment of the fax document encoded in Base64 format.
Parameters
All parameters go in the header.
Parameter | Type | Operation |
mailbox | string | The mailbox (phone line) from which the fax document is requested. |
file | string | The name of the file (fax document) for which the details are requested. It is different than the name in the response. You obtain this file name from the get/fax/messages method. |
dir | string | The directory from which to obtain the fax document in the selected mailbox. The value can be either INBOX or SENT. Default is INBOX. |
Example
To get the file of a fax document for mailbox 12741550 in the SENT directory named "1484376960_1_13474367740_16466991356" use the following syntax:
HTTPS method: GET
webserv.telebroad.com/api/teleconsole/rest/fax/message?mailbox=12741550&dir=SENT&file=1484376960_1_13474367740_16466991356
Response:
The returned data field may be dozens of pages long. Shown here is a truncated version.
{
"error":null,
"result":
[{"name":"1484376960_1_13474367740_
16466991356.pdf",
"data":"JVBERi0xLjQKJeHp69MKMiAwIG9iago8PC9U
eXBlIC9DYXRhbG9nCi9QYWdlcyAxIDAgUgo+PgplbmRvYm
oKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAw
IFIKL1Jlc291cmNlcyA8PC9Qcm9jU2V0cyBbL1BERiAvVGV4d
CAvSW1hZ2VCIC9JbWFnZUMgL0ltYWdlSV0KL0V4dEdTdGF0ZSA
8PC9HMCA0IDAgUgo+PgovRm9udCA8PC9GMCA1IDAgUgo+Pgo+Pgov
TWVkaWFCb3ggWzAgMCA1OTUgODQxXQovQ29udGVudHMgNiAwIFIKP
j4KZW5kb2JqCjYgMCBvYmoKPDwvTGVuZ3RoIDQ1NTAKPj4gc3d
fkhsih
.
.
.
RyZWFtC"
}
}]
}