Read Document

The ReadDocument API is used to read a document in OCS.io.

API Overview

Parameters Required for Reading Document

The following table lists and describes the parameters required to read a document through the ReadDocument API:

Parameter Description

documentRefId

ID (Ref ID) of the Document. Either 'documentRefId' or 'documentNo' must be provided.

documentNo

Number of the Document as generated by RM. Either 'documentRefId' or 'documentNo' must be provided.

Detailed API documentation and endpoint specifics are available here.

Request Validations

The following validations are performed when reading a document:

  • Document must exist in the system.

  • Document Type associated with the Document must be configured in the way, that documents of that type are stored in the system.

Read Document Example

Here is a cURL example for the ReadDocument API:

curl -X GET 'https://api.ocs.io/v1/rm/documents/read-document?documentRefId=<document_ref_id>'

The outcome of the API call is as follows:

  • The document with Ref ID <document_ref_id> is retrieved.