Changing a Contract Using the Contract Compliance API
Use this procedure to change a contract using the Contract Compliance API.
Context
Procedure
- A user identifies the search criteria for the contract to be changed..
- The client application requests header details of contracts that match the search criteria using the GET /contracts endpoint as follows:
GET {{runtime_URL}}/contracts?$filter={searchcriteria}{searchcriteria} contains the search query.
The response includes the header details of all contracts that match the search criteria.
- To request for header details of a specific contract, the client application passes its ID into the GET /contracts/{contractId} end point as follows:
GET {{runtime_URL}}/contracts/{contractId}{contractId} contains the ID of the contract.
The response includes the header details of the specified contract.
- To request for line item details of a specific contract, the client application passes its ID into the GET /contracts/{contractId}/lineitems end point as follows:
GET {{runtime_URL}}/contracts/{contractId}/lineitems{contractId} contains the ID of the contract.
The response includes the line item details of the specified contract.
- Optional: To update the header details of the contract request, the client application imports updated details using the PATCH /contractRequests/{contractRequestId} endpoint as follows:
POST {{runtime_URL}}/contractRequests/{{contractRequestId}}?realm={{realm}} Request Body: { "PreviousVersion":"CR230" }The procurement solution creates a new version of the contrat request with the updated header details and responds with it's ID ({contractRequestId})
- Optional: To update the line item details of the contract request, the client application imports details using the PATCH /contractRequests/{contractRequestId}/lineitems endpoint as follows:
POST {{runtime_URL}}/contractRequests/{{contractRequestId}}lineitems?realm={{realm}}The procurement solution updates the contract request line item details and responds with it's ID ({contractRequestId})
- Optional: To update pricing terms, the client application uses one or more of the following endpoints as required:
-
PUT /contractRequests/{contractRequestId}/lineitems/{numberInCollection}/discountedPricing
-
PUT /contractRequests/{contractRequestId}/lineitems/{numberInCollection}/tieredPricing
-
PUT /contractRequests/{contractRequestId}/lineitems/{numberInCollection}/termBasedPricing
-
PUT /contractRequests/{contractRequestId}/lineitems/{numberInCollection}/formulaPricing
-
PUT /contractRequests/{contractRequestId}/lineitems/{numberInCollection}/rangePricing
-
PUT /contractRequests/{contractRequestId}/lineitems/{numberInCollection}/advancedPricing
-
- Optional: To delete imported pricing terms, the client application uses the DELETE /contractRequests/{contractRequestId}/lineitems/{numberInCollection}/pricingTerms endpoint as follows:
DELETE {{runtime_URL}}/contractRequests/{{contractRequestId}}/lineitems/2/tieredPricing?realm={{realm}} - Optional: To delete line items from the contract request, the client application uses the DELETE /contractRequests/{contractRequestId}/lineitems endpoint as follows:
DELETE /contractRequests/{contractRequestId}/lineitems Request Body: { "LineItems": [3,4] } - A user approves the updated version of the contract request in the procurement solution's user interface.
A new version of the contract is created after the changed contract request is fully approved.