GetVersionTextOnlyContent API

Returns the plain-text alternative content stored alongside a specific version of a document. This text-only content is a separately stored artifact in the document warehouse — it is only present if it has been explicitly set (for example, by a conversion process or via SetVersionTextOnlyContent). Passing 0 for the version number retrieves the latest version's content, equivalent to calling GetDocumentTextOnlyContent.

Endpoint

/srv.asmx/GetVersionTextOnlyContent

Methods

Parameters

Parameter Type Required Description
AuthenticationTicket string Yes Authentication ticket obtained from AuthenticateUser.
Path string Yes Full infoRouter path to the document (e.g. /Finance/Reports/Q1-Report.pdf), or a short document ID path (~D{id} or ~D{id}.ext).
VersionNumber int Yes Internal version number of the version whose text-only content to retrieve. Pass 0 to retrieve the latest version. See note below for the internal version number format.

Internal version number format: infoRouter stores version numbers internally as multiples of 1,000,000. Version 1 = 1000000, version 2 = 2000000, version 3 = 3000000, and so on. The user-visible version label (e.g. "3") maps to 3000000. Values between 1 and 999999 are explicitly rejected. Use GetDocumentVersions to obtain the correct internal version number for a given version label.

User-visible version VersionNumber value
1 1000000
2 2000000
3 3000000
Latest (any) 0

Response

Success Response

On success, the plain text content is returned as the body of the <response> element (not inside a child element):

<response success="true" error="">This is the plain text content of version 2000000 of the document.
It may span multiple lines and represents the text-only
alternative stored in the document warehouse for that version.</response>
Attribute Description
success "true" on success.
error Empty string on success.
(element body) The plain text content of the specified version. May be an empty string if text-only content has never been set for this version.

Error Response

<response success="false" error="There is no published version for this document." />

Required Permissions

The calling user must have at least read access to the document and the specified version.


Example

GET Request — specific version

GET /srv.asmx/GetVersionTextOnlyContent
  ?AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
  &Path=/Finance/Reports/Q1-2024-Report.pdf
  &VersionNumber=2000000
HTTP/1.1

GET Request — latest version (VersionNumber=0)

GET /srv.asmx/GetVersionTextOnlyContent
  ?AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
  &Path=/Finance/Reports/Q1-2024-Report.pdf
  &VersionNumber=0
HTTP/1.1

POST Request

POST /srv.asmx/GetVersionTextOnlyContent HTTP/1.1
Content-Type: application/x-www-form-urlencoded

AuthenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&Path=/Finance/Reports/Q1-2024-Report.pdf
&VersionNumber=2000000

SOAP Request

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:tns="http://tempuri.org/">
  <soap:Body>
    <tns:GetVersionTextOnlyContent>
      <tns:AuthenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:AuthenticationTicket>
      <tns:Path>/Finance/Reports/Q1-2024-Report.pdf</tns:Path>
      <tns:VersionNumber>2000000</tns:VersionNumber>
    </tns:GetVersionTextOnlyContent>
  </soap:Body>
</soap:Envelope>

Notes



Error Codes

Error Description
[900] Authentication failed Invalid or missing authentication ticket.
[901] Session expired or Invalid ticket The ticket has expired or does not exist.
Document not found The specified path does not resolve to an existing document.
Invalid version number VersionNumber is between 1 and 999999 (not a valid internal version number).
No published version The document has no published version.
Document is offline The document is marked as offline and its content is unavailable.
URL or shortcut URL documents and shortcuts do not have text-only content.
Access denied The user does not have read access to the document or the specified version.
SystemError:... An unexpected server-side error occurred.

For detailed documentation visit: https://support.inforouter.com/api-docs/GetVersionTextOnlyContent