Viewing documents

Viewing documents

After you have imported your received messages and made sure that the business documents are correctly processed, you can view the documents in their original raw form or formatted using a style sheet. Anonymous access is possible. You can view outbound documents in the same manner.

The same call (GET /messages/display/:id) is used to view both formatted and raw documents. No authorization is needed to make this request. The call requires a unique document reference identifier that is fetched together with the message information by using the GET /messages/:mid call. The document reference identifier is stored as the referenceId property.

By default, XML documents retrieved this way are converted to HTML when a style sheet is available. To view raw documents, the value of the optional ct parameter in the GET /messages/display/:id call must be set to raw.

The call also lets users convert the document to another format. This is done by setting the ct parameter to one of these options: pdf, png, jpg, gif, or tif.

The identifier used for fetching the document has the following format: {messageIdentifier(GUID)}:{partyIdentifierType}:{partyIdentifier}:{documentIndexNumber}:{passcode}. The passcode is an automatically generated token that is used for granting anonymous access to the document.

For example, if the document reference identifier has this value 5f272652dc144b1289c8a8d66dd9e0bb:KT:1111118899:2:e2rpq8r7lb, this means that the document is contained in the message whose GUID is 5f272652-dc14-4b12-89c8-a8d66dd9e0bb. The message is owned by a party whose identifier is KT:1111118899, while the document is the second attachment that the message contains besides the core processing document. Documents are indexed using a zero-based index, and the first element is always the core processing document. The final element of the identifier is the passcode.