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

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

Use the POST /contractWorkspaces/{contractId}/contractLineItemDocuments/{id}/state endpoint to publish the CLID associated with a procurement contract workspace.
POST {{runtime_url}}/contractWorkspaces/CW12345/contractLineItemDocuments/Doc12345678/state?user=myUser&passwordAdapter=myPassword&realm=mySite
{
  "action": "publish"
}
 
where
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.
The Contract Line Items Document Publish API returns the job ID and a message indicating the status of the request.
{
    "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.