updatePrices
put
/ccadmin/v1/prices
Update Prices. Updates a list of prices or creates a new price item if there isn't one.
Request
Supported Media Types
- application/json
Body Parameter
Root Schema : updatePrices_request
{
"items":[
{
"productId":"prod10014",
"priceListId":"listPrices",
"listPrice":50
},
{
"productId":"prod10014",
"volumePrice":{
"bulkPrice":{
"numLevels":3,
"levels":[
{
"price":19,
"levelMaximum":5,
"levelMinimum":1
},
{
"price":12.35,
"levelMaximum":30,
"levelMinimum":21
},
{
"price":10.25,
"levelMinimum":31
}
]
}
},
"priceListId":"listPrices",
"skuId":"sku10040"
}
]
}
- items
-
Type:
arrayitemsAdditional Properties Allowed:List of Prices
Nested Schema : items
Nested Schema : items
Type:
object- listPrice
-
Type:
numberPrice of the price item - priceListId
-
Type:
stringRequired:trueThe price list id of the price item - productId
-
Type:
stringRequired:trueProduct id of the price item - skuId
-
Type:
stringSku id of the price item - volumePrice
-
Type:
objectvolumePriceAdditional Properties Allowed:Volume price of the price item
Nested Schema : volumePrice
Type:
objectVolume price of the price item
- pricingScheme
-
Type:
objectpricingSchemeAdditional Properties Allowed:Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : pricingScheme
Type:
objectPricing scheme can be either tieredPrice or bulkPrice
- levels
-
Type:
arraylevelsRequired:trueAdditional Properties Allowed:Price levels array for volume price - numLevels
-
Type:
numberNumber of levels in the volume price
Nested Schema : levels
Nested Schema : items
Type:
object- levelMaximum
-
Type:
numberminimum quantity for price level - levelMinimum
-
Type:
numberRequired:trueminimum quantity for price level - price
-
Type:
numberRequired:trueprice value for price level
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : updatePrices_response
- items
-
Type:
arrayitemsAdditional Properties Allowed:List of Prices
Nested Schema : items
Nested Schema : items
Type:
object- listPrice
-
Type:
numberPrice of the price item - priceListId
-
Type:
stringThe price list id of the price item - productId
-
Type:
stringProduct id of the price item - skuId
-
Type:
stringSku id of the price item - volumePrice
-
Type:
objectvolumePriceAdditional Properties Allowed:Volume price of the price item
Nested Schema : volumePrice
Type:
objectVolume price of the price item
- pricingScheme
-
Type:
objectpricingSchemeAdditional Properties Allowed:Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : pricingScheme
Type:
objectPricing scheme can be either tieredPrice or bulkPrice
- levels
-
Type:
arraylevelsAdditional Properties Allowed:Price levels array for volume price - numLevels
-
Type:
numberNumber of levels in the volume price
Nested Schema : levels
Nested Schema : items
Type:
object- levelMaximum
-
Type:
numberminimum quantity for price level - levelMinimum
-
Type:
numberminimum quantity for price level - price
-
Type:
numberprice value for price level
Example application/json
{
"items":[
{
"productId":"prod10014",
"priceListId":"listPrices",
"listPrice":50
},
{
"productId":"prod10014",
"volumePrice":{
"bulkPrice":{
"numLevels":3,
"levels":[
{
"price":19,
"levelMaximum":5,
"levelMinimum":1
},
{
"price":12.35,
"levelMaximum":30,
"levelMinimum":21
},
{
"price":10.25,
"levelMinimum":31
}
]
}
},
"priceListId":"listPrices",
"skuId":"sku10040"
}
]
}
Default Response
The error response.
The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud:
|Error Code|Description|
|------------------|------------------|
|100173|Input data is missing.|
|100174|Invalid input data.|
|100175|Not a valid input format for the data.|
|100176|Input items to be updated exceeded the max limit 25.|
Body
Root Schema : errorModel
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Request:
{"items": [
{
"productId": "prod10014",
"priceListId": "listPrices",
"listPrice": 50
},
{
"productId": "prod10014",
"volumePrice": {"bulkPrice": {
"numLevels": 3,
"levels": [
{
"price": 19,
"levelMaximum": 5,
"levelMinimum": 1
},
{
"price": 12.35,
"levelMaximum": 30,
"levelMinimum": 21
},
{
"price": 10.25,
"levelMinimum": 31
}
]
}},
"priceListId": "listPrices",
"skuId": "sku10040"
}
]}
Sample Response Payload returned by endpoint:
{"items": [
{
"productId": "prod10014",
"priceListId": "listPrices",
"listPrice": 50
},
{
"productId": "prod10014",
"volumePrice": {"bulkPrice": {
"numLevels": 3,
"levels": [
{
"price": 19,
"levelMaximum": 5,
"levelMinimum": 1
},
{
"price": 12.35,
"levelMaximum": 30,
"levelMinimum": 21
},
{
"price": 10.25,
"levelMinimum": 31
}
]
}},
"priceListId": "listPrices",
"skuId": "sku10040"
}
]}