Update Price Models
patch
/rest/v16/pricingSetup/models
Use this endpoint to update or delete price models.
Request
Supported Media Types
- application/json
Root Schema : PricingJsonPatch
Type:
Show Source
object
-
operations:
array Patch Operations
Title:
Patch Operations
The array of Json Patch operations.
Nested Schema : Patch Operations
Type:
array
Title:
Patch Operations
The array of Json Patch operations.
Show Source
Nested Schema : PricingJsonPatchOperation
Type:
Show Source
object
-
op:
string()
Title:
Op
Allowed Values:[ "add", "remove", "replace" ]
The operation to be performed. -
path:
string()
Title:
Path
The JSON Pointer string for "path" property. -
value:
object Value
Title:
Value
The target value.
Nested Schema : Value
Type:
object
Title:
Value
The target value.
Response
204 Response
Success
Examples
The following examples show how to update or delete price models in Pricing Engine by submitting a PATCH request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl - X PATCH - i - H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" - H "Content-type: application/json" https://sitename.oracle.com/rest/v16/pricingSetup/models
Request Body Sample
There are three operations included in this example:
- Add the new Volume Discount Pricing model 'volumeDiscountPricing'
- Replace the 'configSMS' description
- Remove the 'test' model
[{ "op": "add", "path": "/", "value": { "name": "Volume Discount Pricing", "variableName": "volumeDiscountPricing", "dynamicPricingType": "volume", "valueType": "discountAmount", "description": "This price model provides a volume discount." } }, { "op": "replace", "path": "/configSMS", "value": { "description": "This price model applies discounts based upon the low or medium text messaging services." } }, { "op": "remove", "path": "/test" } ]