getTransactionDocument()

DocumentReferenceType getTransactionDocument(string transactionNumber)

This method provides the ability to access rendered versions, such as PDF and XLS, of transactions such as Invoices and Payments.

Parameters

transactionNumber
Format: string
Purpose: Specifies the number of the document to be rendered, for example, invoice number.

Results

This method returns a DocumentReferenceType XML document containing a URL from which you can download the requested document. The URL is valid for 24 hours after it is generated by Smile.

The document will be rendered using the default stationery.

This method and the URL both use basic authentication. You must use the same credentials to access the URL and you did to call the method.

There are no messages defined by this method.

Example: A returned DocumentRefereneType XML document

This example shows a DocumentReferenceType XML document with URL to the rendered document file.

<DocumentReference xmlns="http://xml.inomial.com/smile/2.xsd">
  <DocumentURL>http://test.example.com/api-downloads/documents/9BA2CFEC-1FF2-4BF6-9CEE-CC55ECFCECDA</DocumentURL>
  <Expiry>2013-05-31T00:00:00.000+10:00</Expiry>
  <ReferenceID>9BA2CFEC-1FF2-4BF6-9CEE-CC55ECFCECDA</ReferenceID>
</DocumentReference>

Faults

NoSuchItemException

This fault is returned when the specified transaction number does not exist, cannot be retrieved, or the caller does not have permission to retrieve the transaction.

NoDefaultStationeryException

This fault is returned when the specified transaction number does not have a default stationery on the given account.

AccountTransactionException

This fault is returned when an unexpected error occurs when fetching the transaction to test access requirements.

Java client syntax

java -cp build/smilewsv2-client.jar [options] com.inomial.smile.client.v2.examples.GetTransactionDocument transactionNumber
transactionNumber
Purpose: Specifies the transaction number of the transaction to retrieve.
Note: For more information about the Java client and the options it accepts, see Java client syntax.