|
Attempting to retrieve Document Ids from Get Entity Details API (/{entity_type}/{entity_id}) call does not return the DocumentId of the attachment.
Pre-requisites:
The feasible workaround to retrieve the DocumentIds is to use a custom viewTemplate on Analytical Reporting API by ProjectIds, then use External Approval API document end point to retrieve the document.
Get the Document Id from Analytical Reporting API:
Get the document data from External Approval API:
External Approval API allows the client application to request the details of an identified document, using the GET /{entity_type}/{entity_id} endpoint specific to the document type of interest. Tasks (that is DocumentTask class) are linked directly to one specific type of data which can be a document (like ContractAgreement, or regular Document), folder (WorkSpaceFolder class) or a workspace (ContractWorkspace class).
The current design for this API would only give you the details of the data that is directly linked to the task. So if it is directly linked to a document, then you would get the document details (like DocumentID) and if it is linked to a workspace then you would get the workspace details (header fields). Workspaces contain documents but since the task is linked to the workspace and not to the document (due to the nesting of objects) then you won’t get those document ID for workspace-linked tasks. The documentation is correct in that the API supports tasks linked to workspaces, but it only gives workspace header fields and not all the nested documents within a workspace.
From a design perspective, If you linked the task directly to the workspace, it means you do not need the user to review any specific document and only need the user to review the contract on a header-level perspective. If you need a user to review specific documents, then you could create tasks specifically linked to those documents.
Strategic Sourcing > Strategic Sourcing - REST API
Supplier Lifecycle & Performance > Supplier Lifecycle & Performance - Open API