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
Root Schema : updatePrices_request
Type:
Show Source
object
-
items(optional):
array items
List of Prices
Example:
{
"items":[
{
"productId":"prod10013",
"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"
},
{
"priceListId":"examplePriceListGroupId_listPrices",
"skuId":"sku10041",
"listPrice":50
}
]
}
Nested Schema : items
Type:
Show Source
object
-
listPrice(optional):
number
Price of the price item
-
priceListId:
string
The price list id of the price item
-
productId(optional):
string
Product id of the price item
-
skuId(optional):
string
Sku id of the price item
-
volumePrice(optional):
object volumePrice
Volume price of the price item
Nested Schema : volumePrice
Type:
object
Volume price of the price item
Show Source
-
pricingScheme(optional):
object pricingScheme
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : pricingScheme
Type:
object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
-
levels:
array levels
Price levels array for volume price
-
numLevels(optional):
number
Number of levels in the volume price
Nested Schema : items
Type:
Show Source
object
-
levelMaximum(optional):
number
minimum quantity for price level
-
levelMinimum:
number
minimum quantity for price level
-
price:
number
price value for price level
Response
Supported Media Types
- application/json
200 Response
The following model is returned if the operation succeeds.
Root Schema : updatePrices_response
Type:
Show Source
object
-
items(optional):
array items
List of Prices
Nested Schema : items
Type:
Show Source
object
-
listPrice(optional):
number
Price of the price item
-
priceListId(optional):
string
The price list id of the price item
-
productId(optional):
string
Product id of the price item
-
skuId(optional):
string
Sku id of the price item
-
volumePrice(optional):
object volumePrice
Volume price of the price item
Nested Schema : volumePrice
Type:
object
Volume price of the price item
Show Source
-
pricingScheme(optional):
object pricingScheme
Pricing scheme can be either tieredPrice or bulkPrice
Nested Schema : pricingScheme
Type:
object
Pricing scheme can be either tieredPrice or bulkPrice
Show Source
-
levels(optional):
array levels
Price levels array for volume price
-
numLevels(optional):
number
Number of levels in the volume price
Nested Schema : items
Type:
Show Source
object
-
levelMaximum(optional):
number
minimum quantity for price level
-
levelMinimum(optional):
number
minimum quantity for price level
-
price(optional):
number
price value for price level
Example Response (application/json)
{
"items":[
{
"productId":"prod10013",
"priceListId":"examplePriceListGroupId_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":"examplePriceListGroupId_listPrices",
"skuId":"sku10040"
},
{
"priceListId":"examplePriceListGroupId_listPrices",
"skuId":"sku10041",
"listPrice":50
}
]
}
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|
|------------------|------------------|
|25002|Missing required property: productId|
|25002|No item found for the following type and ID: product, prod10013|
|25003|Missing required property: skuId|
|25003|No item found for the following type and ID: skuId, sku10040|
|25005|Missing required property: priceList|
|25005|No item found for the following type and ID: priceList, examplePriceListGroupId_listPrices|
|25008|SKU sku10041 has 2 parent products.|
|25009|Error setting price|
|25020|Both simple price and volume price can not be set for price item.|
|100170|Either one of the product ID or sku ID is required.|
|100171|Price list ID is required.|
|100172|List price or Volume price is required.|
|100175|Not a valid input format for the data.|
|100176|Input items to be updated exceeded the max limit 250.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
errors(optional):
array errors
An optional list of errors if multiple errors were encountered
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code
-
type(optional):
string
The URI to the HTTP state code definition
Nested Schema : errors
Type:
array
An optional list of errors if multiple errors were encountered
Show Source
Nested Schema : items
Type:
Show Source
object
-
devMessage(optional):
string
An optional non-localized message containing technical information for developers
-
errorCode(optional):
string
The numerical code identifying the error
-
message(optional):
string
The localized message describing the error
-
moreInfo(optional):
string
An optional non-localized message with more information
-
o:errorPath(optional):
string
An optional machine readable description of where the error occurred
-
status(optional):
string
The HTTP status code