Publishing Contract Line Items Document by Using the Contract Line Items Document Publish API
Use this procedure to publish a contract line items document (CLID) from a procurement contracts workspace in SAP Ariba Contracts by using the Contract Line Items Document Publish API.
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.
-
Users who manage the procurement contract workspace information must be members of the Contract Administrator group.
-
You must have the ID of the contract workspace where the CLID that you want to publish exists.
-
You must have the ID of the CLID that you want to publish.
Context
The Contract Line Items Document Publish API enables you to publish a CLID in a procurement contract workspace by using the POST /contractWorkspaces/{contractId}/contractLineItemDocuments/{id}/state endpoint.
Procedure
POST {{runtime_url}}/contractWorkspaces/CW12345/contractLineItemDocuments/Doc12345678/state?user=myUser&passwordAdapter=myPassword&realm=mySite
{
"action": "publish"
}
- contractId
- is the ID of the procurement contract workspace.
- id
- is the CLID identifier.
- User
- is the ID of the user on whose behalf the API call is invoked.
- passwordAdapter
- is the password for authenticating the user on whose behalf the request was initiated.
- Realm
- is the SAP Ariba Contracts site to which the API request is sent.
- action
- is the action you want to perform. While publishing the CLID, specify the action as publish.
{
"jobId": "AAAAA1234Aaa",
"message": "Job submitted successfully. Use jobId to get status and result of the job."
}
where
- jobId
- indicates the job ID after the API request is submitted successfully. Using the GET /jobs/{jobId} endpoint, you can get the status of an asynchronous job request. For more information about getting the status of an asynchronous job request, refer to Getting the Status of an Asynchronous Job Using the Asynchronous Requests Management API. Using the GET /jobs/{jobId}/errors endpoint, you can download the error file for a failed job request. For more information about downloading the error file for a failed job request, refer to Downloading the Error File of a Failed Job Request Using the Asynchronous Requests Management API.
- message
- contains the message indicating the request status.
To troubleshoot your queries to the Contract Line Items Document Publish API, refer to Error Messages Returned by the Contract Workspace Management APIs.