Retrieving a Document
To retrieve a specific document, call the page RecipDocument.aspx, with the following XML stream:
<?xml version="1.0"?> <DOCUMENT_REQUEST> <LOGIN_INFO> <CLIENT_ID/> <CLIENT_PWD/> <USER_ID/> <USER_PWD/> </LOGIN_INFO> <PACKAGE_KEY/> </DOCUMENT_REQUEST>
Complete the <LOGIN_INFO> node according to the previous instructions.
In the <PACKAGE_KEY> node, supply the <PACKAGE_KEY> node from the <DOCUMENT_LIST_RESPONSE> <DOCUMENT_LIST> <FIDUCIARY> <DOCUMENT> that represents the document you want to retrieve.
The page will return a XML stream that has the PDF document in encoded binary format. This is the PDF node. When the calling program receives the XML, it can then process this data as appropriate for the application. This could be saving the file or displaying it directly via Adobe Acrobat.
<?xml version="1.0"?> <DOCUMENT_RESPONSE> <REQUEST_STATUS> <STATUS_CODE/> <STATUS_MSG/> </REQUEST_STATUS> <PACKAGE_PDF_RESPONSE> <FAST_TAX_ACCOUNT_ID/> <TRUST_ACCOUNT_ID/> <TAX_YEAR/> <RECIP_TAX_ID/> <PACKAGE_KEY/> <PDF xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"/> </PACKAGE_PDF_RESPONSE> </DOCUMENT_RESPONSE>
The binary form of the PDF document can be retrieved by accessing the TYPEDVALUE of the PDF element. For example:
xmlObj.documentElement.selectSingleNode(“PACKAGE_PDF_RESPONSE/PDF”).nodeTypedValue
The <REQUEST_STATUS> node indicates whether an error occurred. The table shows a list of the contents for <STATUS_CODE> and associated <STATUS_MSG>. Error codes starting with FT-RD or FT-ID or FT-GD are applicable to the recipient list request.
The node <PACKAGE_PDF_RESPONSE> contains the requested document. Nodes <FAST_TAX_ACCOUNT_ID>, <TRUST_ACCOUNT_ID>, <TAX_YEAR>, <RECIP_TAX_ID>, and <PACKAGE_KEY> are informational to be used for verification. Node <PDF> contains the document in PDF format.
If the request fails, the <PACKAGE_PDF_RESPONSE> node is empty.