Changing the State of a Document in a Contract Workspace
This topic explains how you can use the Project Document Management State Change API to modify the state of documents such as Main Agreement, Contract Addendum, and standard documents in a contract workspace.
Prerequisites
-
To create an application and request access to use the SAP Ariba APIs relevant to this feature, you must have access to the SAP Ariba Developer Portal. For details refer to Steps to Start Using the SAP Ariba APIs in Help for the SAP Ariba Developer Portal.
-
All queries made to this API must be authenticated using OAuth authentication. For details refer to SAP Ariba Developer Portal Authentication in Help for the SAP Ariba Developer Portal.
-
Ensure that the user whose credentials are passed in the API call is a project owner or a team member.
Context
|
Document Type |
Current State |
New State |
|---|---|---|
|
Draft |
Publish |
|
Publish |
Finalize |
|
|
Finalize |
MakeDraft |
|
|
Standard documents |
Draft |
Publish |
Procedure
POST {{runtime_url}}/projectDocuments/documentID/state?user=username&passwordAdapter=PasswordAdapterName&realm=realm
Request body:
{
"action": "action"
}
- username is the name of the user whose credentials are used to authenticate the API request.
- passwordadapter is the password adapter used to authenticate the user specified in user.
- realm is the name of your site.
- documentID is the ID of the document for which you want to modify the state.
- Publish
- Finalize
- MakeDraft
-
204 to indicate successful state change.
-
400 to indicate a bad request.
-
401 to indicate an unauthorized request.
-
403 to indicate a forbidden request.
-
404 to indicate that the specified document was not found.