Calculate Price
post
/ccstore/v1/prices/actions/calculate
Calculates the prices for given Products from external systems.
Request
Supported Media Types
- application/json
Root Schema : calculatePrice_request
Type:
Show Source
object
-
additionalFields:
array additionalFields
CPQ properties that are required in the response.
-
items(required):
array items
-
returnAvailableAgreements:
boolean
-
returnAvailableRatePlans:
boolean
Nested Schema : additionalFields
Type:
array
CPQ properties that are required in the response.
Show Source
-
Array of:
string
CPQ property
Response
Supported Media Types
- application/json
200 Response
Following model is returned when operation succeeds.
Root Schema : calculatePrice_response
Type:
Show Source
object
-
items:
array items
-
lastPriced:
string
Requested Timestamp of when these items are priced.
Nested Schema : items
Type:
Show Source
object
-
agreementId:
string
Applied agreement number
-
agreementName:
string
Applied agreement name
-
amount:
number
Total Amount w.r.t to quantity.
-
availableAgreements:
object availableAgreements
List of all available agreements for the given item
-
availableRatePlans:
object availableRatePlans
List of all available rate plans for the given item
-
catRefId:
string
sku id or catalog ref id
-
charges:
array charges
List of various charges assigned to the item
-
quantity:
number
quantity of this item
-
ratePlanId:
string
Applied rate plan number
-
ratePlanName:
string
Applied rate plan name
-
unitPrice:
number
unit price of the item
Nested Schema : availableAgreements
Type:
object
List of all available agreements for the given item
Show Source
-
id:
string
id of the agreement
-
name:
string
Name of the agreement
Nested Schema : availableRatePlans
Type:
object
List of all available rate plans for the given item
Show Source
-
id:
string
id of the rate plan
-
integrationId:
string
integrationId of the rate plan
-
name:
string
Name of the rate plan
Nested Schema : items
Type:
Show Source
object
-
amount:
number
Total Amount w.r.t to quantity.
-
chargeCode:
string
Charge code
-
chargeType:
string
Type of the charge
-
dynamicPricingType:
string
dynamic pricing type i.e., tiered or volume or static.
-
frequency:
string
recurring frequency for this charge. Applicable only for recurring charges.
-
integrationId:
string
Integration id for this charge
-
isProductPrice:
boolean
This property tells which charge among others is Product price
-
name:
string
Name of the charge
-
priceType:
string
Price type for this charge. i.e., one-time, recurring or usage
-
rates:
object rates
-
unitOfMeasure:
string
Unit of Measure. Applicable for only Usage based charges.
-
unitPrice:
number
unit price of the item
Nested Schema : rates
Type:
Show Source
object
-
data:
array data
Array of rate tiers
-
name:
string
Display name of the rate card
-
schema:
object schema
-
type:
string
Type of the rate card
-
variableName:
string
Variable name for the rate card
Nested Schema : schema
Type:
Show Source
object
-
columns:
array columns
Column definitions for the rate card
-
lookupData:
array lookupData
Lookup data for the schema
Nested Schema : items
Type:
Show Source
object
-
dynamic_property_key:
string
This property's name and value will be retrieved from an external system, so will be dynamically set.
Nested Schema : items
Type:
Show Source
object
-
dataType:
string
Data type of the column
-
name:
string
Display name of the column
-
translations:
array translations
Translation data for internationalization
-
variableName:
string
Variable name for the column
Nested Schema : items
Type:
Show Source
object
-
dynamic_property_key:
string
This property's name and value will be retrieved from an external system, so will be dynamically set.
Nested Schema : items
Type:
Show Source
object
-
dynamic_property_key:
string
This property's name and value will be retrieved from an external system, so will be dynamically set.
Example Response (application/json)
{
"items":[
{
"unitPrice":125,
"charges":[
{
"unitPrice":100,
"amount":200,
"isProductPrice":true,
"chargeType":"ORA_SALE",
"priceType":"One Time"
},
{
"unitPrice":20,
"amount":40,
"isProductPrice":false,
"chargeType":"ORA_SALE",
"priceType":"Recurring",
"frequency":"Per Month"
},
{
"unitOfMeasure":"gb",
"isProductPrice":false,
"rates":{
"schema":{
"lookupData":[
],
"columns":[
{
"variableName":"from",
"translations":[
],
"dataType":"Integer",
"name":"Usage From"
},
{
"variableName":"to",
"translations":[
],
"dataType":"Integer",
"name":"Usage To"
},
{
"variableName":"rate",
"translations":[
],
"dataType":"Currency",
"name":"Rate"
}
]
},
"variableName":"supremoRemoteAccessRateCard",
"data":[
{
"rate":{
"currency":"USD",
"value":0.9
},
"from":0,
"to":100
},
{
"rate":{
"currency":"USD",
"value":0.8
},
"from":100,
"to":1000
},
{
"rate":{
"currency":"USD",
"value":0.5
},
"from":1000
}
],
"name":"Supremo Remote Access Rate Card",
"type":"rateCard"
},
"chargeType":"ORA_SALE",
"priceType":"Usage",
"dynamicPricingType":"rateCard",
"frequency":"Per Month"
},
{
"unitPrice":25,
"amount":50,
"isProductPrice":false,
"chargeType":"activationFee_c",
"priceType":"One Time"
}
],
"amount":250,
"quantity":2,
"availableRatePlans":[
{
"name":"Rate Plan A",
"id":"ratePlanA"
},
{
"name":"Rate Plan B",
"id":"ratePlanB"
},
{
"name":"Rate Plan C",
"id":"ratePlanC"
},
{
"name":"Rate Plan D",
"id":"ratePlanD"
}
],
"ratePlanName":"Rate Plan A",
"ratePlanId":"ratePlanA",
"catRefId":"partA"
}
]
}
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|
|------------------|------------------|
|46001|Pricing Integration with {0} is not enabled. Please contact your administrator.|
|46002|We are experiencing technical difficulties calculating your price right now. Please try again later or contact your customer support or administrator for assistance.|
|46003|Missing required input property: {0}|
|46004|Invalid catRefId {0}.|
|46005|Item quantity cannot be negative.|
Root Schema : errorModel
Type:
Show Source
object
-
devMessage:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
errors:
array errors
An optional list of errors if multiple errors were encountered
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code
-
type:
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:
string
An optional non-localized message containing technical information for developers
-
errorCode:
string
The numerical code identifying the error
-
message:
string
The localized message describing the error
-
moreInfo:
string
An optional non-localized message with more information
-
o:errorPath:
string
An optional machine readable description of where the error occurred
-
status:
string
The HTTP status code