getAllPrices
get
/ccagent/v1/prices/{id}
Get All Prices. Return the the list and sale price for the product or SKU. This Endpoint is clone of StoreFront endpoint and it can be used if application running on agent/admin server need access the product prices data configured for StoreFront. Takes X-CCAgentContext header which is a JSON object with 'shopperProfileId' as a property. If 'shopperProfileId' is not provided, it is considered as an anonymous profile.Additonally takes x-ccsite header to return the data specific to the site.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
string
Required:true
The product ID.
Query Parameters
- showInactiveSkus
-
Type:
boolean
If it is false inactive skus will not be considered for calculating price range.
Header Parameters
- x-ccsite
-
Type:
string
the site id on which the orders is laced
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Body
Root Schema : getAllPrices_response
- If the returned type is a product or default
-
Type:
object
If the returned type is a product or defaultAll prices information for the specified product - If the returned type is a sku.
-
Type:
object
If the returned type is a sku.List price and sale price information for the SKU.
Nested Schema : If the returned type is a product or default
Type:
object
All prices information for the specified product
- priceMax
-
Type:
number
The maximum price of a sku in the product. - priceMin
-
Type:
number
The minimum price of a sku in the product. - priceRange
-
Type:
boolean
Whether the price is a range. - skuPrices
-
Type:
array
skuPricesThe array of SKU data.
Nested Schema : If the returned type is a sku.
Type:
object
List price and sale price information for the SKU.
- list
-
Type:
number
The list price of the product (if type is selected as list). - sale
-
Type:
number
The sale price of the product (if type is selected as sale and sale price exists).
Nested Schema : items
Type:
object
- listPrice
-
Type:
number
The list price of the SKU(. - salePrice
-
Type:
number
The sale price of the SKU. - skuId
-
Type:
string
SKU ID.
Example application/json
{
"priceMin":596,
"priceMax":599,
"skuPrices":[
{
"salePrice":599,
"skuId":"camcordersku_1_1",
"listPrice":699.99
},
{
"salePrice":596,
"skuId":"camcordersku_1_2",
"listPrice":699.99
},
{
"salePrice":597,
"skuId":"camcordersku_1_3",
"listPrice":699.99
},
{
"salePrice":598,
"skuId":"camcordersku_1_4",
"listPrice":699.99
}
],
"links":[
{
"rel":"self",
"href":"http://localhost:8080/ccstore/v1/prices/camcorder_1"
}
],
"priceRange":true
}
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|
|------------------|------------------|
|30015|SiteId passed in x-ccsite header is currently inactive|
|30014|SiteId passed in x-ccsite header is invalid or the site was deleted|
|20031|Product Id prod10007 is invalid or non-existent.|
Body
Root Schema : errorModel
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - errors
-
Type:
array
errorsAn optional list of errors if multiple errors were encountered - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code - type
-
Type:
string
The URI to the HTTP state code definition
Nested Schema : errors
Nested Schema : items
Type:
object
- devMessage
-
Type:
string
An optional non-localized message containing technical information for developers - errorCode
-
Type:
string
The numerical code identifying the error - message
-
Type:
string
The localized message describing the error - moreInfo
-
Type:
string
An optional non-localized message with more information - o:errorPath
-
Type:
string
An optional machine readable description of where the error occurred - status
-
Type:
string
The HTTP status code
Examples
Sample Response Payload returned by endpoint:
{ "priceMin": 596, "priceMax": 599, "skuPrices": [ { "salePrice": 599, "skuId": "camcordersku_1_1", "listPrice": 699.99 }, { "salePrice": 596, "skuId": "camcordersku_1_2", "listPrice": 699.99 }, { "salePrice": 597, "skuId": "camcordersku_1_3", "listPrice": 699.99 }, { "salePrice": 598, "skuId": "camcordersku_1_4", "listPrice": 699.99 } ], "links": [{ "rel": "self", "href": "http://localhost:8080/ccstore/v1/prices/camcorder_1" }], "priceRange": true }