getAllPrices
get
/ccstore/v1/prices/{id}
Get All Prices. Return the the list, sale and complex prices for the product or SKU. Optionally takes the x-ccasset-language header to get translated content in another language.
Request
Supported Media Types
- application/json
Path Parameters
- id
-
Type:
stringRequired:trueThe product ID.
Query Parameters
- skuId
-
Type:
stringThe sku ID. If null, price for the product is returned.- type
Type:stringThe type of price. Should be either of list or sale.
Header Parameters
- X-CCAsset-Language
-
Type:
stringThe asset language of the request
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:
objectIf the returned type is a product or defaultAdditional Properties Allowed:Result object having product related information. - If the returned type is a sku.
-
Type:
objectIf the returned type is a sku.Additional Properties Allowed:Result object having SKU related information.
Nested Schema : If the returned type is a product or default
Type:
objectResult object having product related information.
- list
-
Type:
numberThe list price of the product. - priceRange
-
Type:
booleanWhether the price is a range. - skuPrices
-
Type:
arrayskuPricesAdditional Properties Allowed:The array of SKU data.
Nested Schema : If the returned type is a sku.
Type:
objectResult object having SKU related information.
- list
-
Type:
numberThe list price of the product (if type is selected as list). - sale
-
Type:
numberThe sale price of the product (if type is selected as sale and sale price exists).
Nested Schema : skuPrices
Nested Schema : items
Type:
object- complexPrice
-
Type:
objectcomplexPriceAdditional Properties Allowed:The complex price of the SKU. - listPrice
-
Type:
numberThe list price of the SKU. - salePrice
-
Type:
numberThe sale price of the SKU. - skuId
-
Type:
stringSKU ID.
Nested Schema : complexPrice
Type:
objectThe complex price of the SKU.
- levels
-
Type:
arraylevelsAdditional Properties Allowed:Price levels of the Complex price.
Nested Schema : levels
Nested Schema : items
Type:
object- levelMaximum
-
Type:
numberThe maximum quantity associated with this level. - levelMinimum
-
Type:
numberThe minimum quantity associated with this level. - price
-
Type:
numberThe price associated with this level.
Example application/json
{
"skuPrices":[
{
"salePrice":null,
"bulkPrice":{
"numLevels":4,
"levels":[
{
"price":19.99,
"levelMinimum":1,
"levelMaximum":10
},
{
"price":16.25,
"levelMinimum":11,
"levelMaximum":20
},
{
"price":12.35,
"levelMinimum":21,
"levelMaximum":30
},
{
"price":10.25,
"levelMinimum":31
}
]
},
"skuId":"sku30081",
"listPrice":19.99
},
{
"tieredPrice":{
"numLevels":4,
"levels":[
{
"price":19.99,
"levelMinimum":1,
"levelMaximum":10
},
{
"price":16.25,
"levelMinimum":11,
"levelMaximum":20
},
{
"price":12.35,
"levelMinimum":21,
"levelMaximum":30
},
{
"price":10.25,
"levelMinimum":31
}
]
},
"salePrice":null,
"skuId":"sku30083",
"listPrice":19.99
},
{
"salePrice":null,
"bulkPrice":{
"numLevels":4,
"levels":[
{
"price":19.99,
"levelMinimum":1,
"levelMaximum":10
},
{
"price":16.25,
"levelMinimum":11,
"levelMaximum":20
},
{
"price":12.35,
"levelMinimum":21,
"levelMaximum":30
},
{
"price":10.25,
"levelMinimum":31
}
]
},
"skuId":"sku30085",
"listPrice":19.99
},
{
"salePrice":null,
"skuId":"sku30087",
"listPrice":19.99
},
{
"salePrice":null,
"skuId":"sku30089",
"listPrice":19.99
},
{
"salePrice":null,
"skuId":"sku30091",
"listPrice":19.99
},
{
"salePrice":null,
"skuId":"sku30093",
"listPrice":19.99
},
{
"salePrice":null,
"skuId":"sku30095",
"listPrice":19.99
},
{
"salePrice":null,
"skuId":"sku30097",
"listPrice":19.99
},
{
"salePrice":null,
"skuId":"sku30099",
"listPrice":19.99
},
{
"salePrice":null,
"skuId":"sku30101",
"listPrice":19.99
},
{
"salePrice":null,
"skuId":"sku30103",
"listPrice":19.99
}
],
"links":[
{
"rel":"self",
"href":"http://localhost:8080/ccstore/v1/prices/prod10007"
}
],
"list":19.99,
"priceRange":false
}
Default Response
The error response
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 Response Payload returned by endpoint:
{
"skuPrices": [
{
"salePrice": null,
"bulkPrice": {
"numLevels": 4,
"levels": [
{
"price": 19.99,
"levelMinimum": 1,
"levelMaximum": 10
},
{
"price": 16.25,
"levelMinimum": 11,
"levelMaximum": 20
},
{
"price": 12.35,
"levelMinimum": 21,
"levelMaximum": 30
},
{
"price": 10.25,
"levelMinimum": 31
}
]
},
"skuId": "sku30081",
"listPrice": 19.99
},
{
"tieredPrice": {
"numLevels": 4,
"levels": [
{
"price": 19.99,
"levelMinimum": 1,
"levelMaximum": 10
},
{
"price": 16.25,
"levelMinimum": 11,
"levelMaximum": 20
},
{
"price": 12.35,
"levelMinimum": 21,
"levelMaximum": 30
},
{
"price": 10.25,
"levelMinimum": 31
}
]
},
"salePrice": null,
"skuId": "sku30083",
"listPrice": 19.99
},
{
"salePrice": null,
"bulkPrice": {
"numLevels": 4,
"levels": [
{
"price": 19.99,
"levelMinimum": 1,
"levelMaximum": 10
},
{
"price": 16.25,
"levelMinimum": 11,
"levelMaximum": 20
},
{
"price": 12.35,
"levelMinimum": 21,
"levelMaximum": 30
},
{
"price": 10.25,
"levelMinimum": 31
}
]
},
"skuId": "sku30085",
"listPrice": 19.99
},
{
"salePrice": null,
"skuId": "sku30087",
"listPrice": 19.99
},
{
"salePrice": null,
"skuId": "sku30089",
"listPrice": 19.99
},
{
"salePrice": null,
"skuId": "sku30091",
"listPrice": 19.99
},
{
"salePrice": null,
"skuId": "sku30093",
"listPrice": 19.99
},
{
"salePrice": null,
"skuId": "sku30095",
"listPrice": 19.99
},
{
"salePrice": null,
"skuId": "sku30097",
"listPrice": 19.99
},
{
"salePrice": null,
"skuId": "sku30099",
"listPrice": 19.99
},
{
"salePrice": null,
"skuId": "sku30101",
"listPrice": 19.99
},
{
"salePrice": null,
"skuId": "sku30103",
"listPrice": 19.99
}
],
"links": [{
"rel": "self",
"href": "http://localhost:8080/ccstore/v1/prices/prod10007"
}],
"list": 19.99,
"priceRange": false
}