Calculate Price
post
/rest/v19/pricing/actions/calculatePrice
This operation calculates the price of items using the CPQ pricing engine.
Note: Oracle CPQ 24D releases version 17 of Calculate Price REST API which has important differences from version 16. The Calculate Price version 17 REST API simplifies the request and response payloads and streamlines the support for multiple charges.
You should review the difference carefully before uptaking version 17. Refer to Calculate Price REST API (v16) to compare differences.
Note: Oracle CPQ 24D releases version 17 of Calculate Price REST API which has important differences from version 16. The Calculate Price version 17 REST API simplifies the request and response payloads and streamlines the support for multiple charges.
You should review the difference carefully before uptaking version 17. Refer to Calculate Price REST API (v16) to compare differences.
Request
Supported Media Types
- application/json
Root Schema : pricing-calculatePriceRequest
Type:
Show Source
object-
_buyingAccountId:
string
Title:
Buying Account IDBuying account ID. Default to the customer ID of the current transaction if attribute mapping is not defined. Pricing Engine uses this attribute to locate price agreements for a customer. -
_currencyCode(required):
string
Title:
Currency CodeThe currency code of the sales transaction. Default to the system currency preference (_system_current_document_currency_pref) of the commerce transaction if attribute mapping is not defined. -
_customerId:
string
Title:
Customer IDCustomer ID. Default to Customer ID (_customer_id) of the commerce transaction if attribute mapping is not defined. -
_priceAsOf:
string
Title:
Price As OfPrice as of date. When empty, the current timestamp at the pricing execution is used. -
enableWaterfall:
boolean
Title:
Return Enable WaterfallWhen enableWaterfall is true, calculationInfo output from an advanced price model will be stamped with the pricing rule, price model and running unit price. -
lines:
array Lines
Title:
LinesInput data for items(lines) to be priced. -
priceBookVarName:
string
Title:
Price Book Variable NameVariable name of the CPQ price book. Only applicable for customers who enable CPQ price books. -
returnAvailableAgreements:
boolean
Title:
Return Available Price AgreementsFlag to return the available agreements for the lines for the customer. -
returnAvailableRatePlans:
boolean
Title:
Return Available Rate PlansFlag to return the available rate plans for the lines.
Nested Schema : Lines
Type:
arrayTitle:
LinesInput data for items(lines) to be priced.
Show Source
Nested Schema : items
Type:
Show Source
object-
_bomItemVariableName:
string
Title:
Bom Item Variable NameVariable Name of the BOM item definition for a BOM item. It is empty for a part item. -
_itemIdentifier(required):
string
Title:
Item IdentifierAn item's unique identifier. This can be any identifier desired by the client. -
_linePriceAsOf:
string
Title:
Line Price As OfPrice as of date for a line. When empty, the header price as of date is used. -
_partNumber(required):
string
Title:
Part NumberPart number of a line item. -
_quantity:
integer
Title:
QuantityThe exploded line quantity used in Pricing Engine. For example, in a product hierarchy with 2 child products per root product and 3 grandchild parts per child product, this value will be '6' for the grandchild product when the root quantity is '1', and 12 when the root quantity is '2'. This attribute implicitly maps to the Quantity (_price_quantity) attribute in the quote line Price Attribute Set, but the default can be overridden by explicitly defining a different mapping. -
_requestedAgreementNumber:
string
Title:
Requested Agreement NumberThe price agreement that will be applied to the line if applicable. Note if the supplied agreement number is not applicable,then a default agreement will be applied. -
_requestedRatePlanNumber:
string
Title:
Requested Rate Plan NumberRequested Rate Plan Number. -
_serviceDuration:
integer
Title:
Service DurationThe duration to service a product, measured in the unit of Service Duration Period. Only applicable to a product that fulfills a service contract. -
_serviceDurationPeriod:
string
Title:
Service Duration PeriodThe time period unit in which a product is service, e.g., month or year. Only applicable to a product that fulfills a service contract.
Response
Supported Media Types
- application/json
Default Response
Root Schema : pricing
Type:
Show Source
object-
items:
array Priced Items
Title:
Priced ItemsItems with their price calculated.
Nested Schema : Priced Items
Type:
arrayTitle:
Priced ItemsItems with their price calculated.
Show Source
Nested Schema : itemPrice
Type:
Show Source
object-
_bomItemVariableName:
string
Title:
BOM Item Variable NameVariable Name of the CPQ BOM Item. -
_itemIdentifier:
string
Title:
Item IdentifierAn item's unique identifier. This matches the item's identifier from the request. -
_partNumber:
string
Title:
Part NumberPart Number of the CPQ product. -
appliedAgreementIntegrationId:
string
Title:
Price Agreement Integration IdThe integration ID of the applied Price Agreement. -
appliedAgreementName:
string
Title:
Price Agreement NameName of the Price Agreement applied to item. -
appliedAgreementNumber:
string
Title:
Price Agreement NumberUnique Variable Name of the Price Agreement applied to the item. -
appliedRatePlanIntegrationId:
string
Title:
Rate Plan Integration IdThe integration ID of the applied Pricing Rate Plan. -
appliedRatePlanLabel:
string
Title:
Rate Plan LabelName of the Pricing Rate Plan applied to item. -
appliedRatePlanNumber:
string
Title:
Rate Plan NumberUnique Variable Name of the Pricing Rate Plan applied to the item. -
availableAgreements:
array Available Price Agreements
Title:
Available Price AgreementsAvailable price agreements for each item. -
availableRatePlans:
array Available Rate Plans
Title:
Available Rate PlansAvailable rate plans info from each price model item, in order of execution during the price calculation. -
charges:
array All Charges
Title:
All ChargesCharges from all executed price models.
Nested Schema : Available Price Agreements
Type:
arrayTitle:
Available Price AgreementsAvailable price agreements for each item.
Show Source
-
Array of:
object availableAgreement
Title:
availableAgreementInstance of an available Price Agreement.
Nested Schema : Available Rate Plans
Type:
arrayTitle:
Available Rate PlansAvailable rate plans info from each price model item, in order of execution during the price calculation.
Show Source
-
Array of:
object availableRatePlan
Title:
availableRatePlanInstance of an available Rate Plan.
Nested Schema : All Charges
Type:
arrayTitle:
All ChargesCharges from all executed price models.
Show Source
-
Array of:
object Charge
Title:
Charge
Nested Schema : availableAgreement
Type:
objectTitle:
availableAgreementInstance of an available Price Agreement.
Show Source
-
integrationId:
string
Title:
integrationIdThe integration ID of the applicable Price agreement. -
name:
string
Title:
nameName of the Price agreement applicable to the item. -
number:
string
Title:
numberUnique Variable Name of the Price agreement applicable to the item.
Nested Schema : availableRatePlan
Type:
objectTitle:
availableRatePlanInstance of an available Rate Plan.
Show Source
-
integrationId:
string
Title:
integrationIdThe integration ID of the applicable Pricing Rate Plan. -
label:
string
Title:
labelName of the Pricing Rate Plan applicable to the item. -
number:
string
Title:
numberUnique Variable Name of the Pricing Rate Plan applicable to the item.
Nested Schema : Charge
Type:
objectTitle:
Show Source
Charge-
calculationInfo:
array All Calculation Info
Title:
All Calculation InfoCalculation info from each price model, in order of execution during the price calculation. -
chargeDefinition:
string
Title:
Charge DefinitionThe display label of the charge definition. -
chargeDefinitionCode:
string
Title:
Charge Definition CodeThe code of the charge definition. -
chargeDefIntegrationId:
string
Title:
Charge Definition Integration IDThe charge definition code in the integrated order management system. -
chargeKey:
string
Title:
Charge KeyThe unique identifier for this charge -
chargeType:
string
Title:
Charge TypeThe element of the product or service which carries a price for the customer. -
dynamicPricingType:
string
Title:
Dynamic Pricing TypeThe type of dynamic pricing used to define this charge: static, tiered, volume, rateCard, advanced. -
extendedAmount:
number
Title:
Extended List AmountThe extended price of a line item. This is the line unit price multiplied by the quantity. -
pricePeriod:
string
Title:
Price PeriodThe time period, frequency or recurrence with which the price or charge is levied. -
priceType:
string
Title:
Price TypeThe basis on which a price or charge is levied, whether one time, on a periodic basis or based on usage. -
rateCardName:
string
Title:
Rate CardDisplay label for the Rate Card applied in calculating this charge's price. -
rateCardStructure:
string
Title:
Rate Card StructureThe rate card used to calculate this charge's price. -
rateCardVariableName:
string
Title:
Rate Card Variable NameVariable Name for the Rate Card applied in calculating this charge's price. -
unitPrice:
number
Title:
Unit PriceThe unit price to be paid by the customer for this charge. -
usageUOM:
string
Title:
Usage UOMThe unit of measure of usage for usage charges, which generally differs from the unit of measure used for the parent product.
Nested Schema : All Calculation Info
Type:
arrayTitle:
All Calculation InfoCalculation info from each price model, in order of execution during the price calculation.
Show Source
-
Array of:
object Profile Calculation Info
Title:
Profile Calculation InfoAdditional information provided by a single price profile that contributed calculations to the final price.
Nested Schema : Profile Calculation Info
Type:
objectTitle:
Profile Calculation InfoAdditional information provided by a single price profile that contributed calculations to the final price.
Examples
The following example shows how to access a pricing information by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl -X POST -H "Authorization: Bearer <token>" -H "Accept: application/json" https://sitename.oracle.com/rest/v19/pricing/actions/calculatePrice
Request Body Sample
{
"_currencyCode": "USD",
"priceBookVarName": "_default_price_book",
"returnAvailableRatePlans": true,
"lines": [{
"_itemIdentifier": "1",
"_partNumber": "10KWhBattery",
"_quantity": 1
}
],
"enableWaterfall": true
}
Response Body Sample
{
"lines": [{
"_partNumber": "10KWhBattery",
"_itemIdentifier": "1",
"_bomItemVariableName": "",
"charges": [{
"unitPrice": 899,
"calculationInfo": [{
"_priceProfileVar": "_defaultPriceModel",
"_priceProfileName": "Base Price Model",
"_isAgreement": false,
"_pricingEngineRuleVar": "_defaultPricingRule",
"_pricingEngineRuleName": "Base Pricing Rule",
"_runningUnitPrice": 899
}
],
"chargeType": "ORA_SALE",
"priceType": "One Time",
"dynamicPricingType": "static",
"isProductPrice": true,
"chargeDefinitionCode": "ONE_TIME_SALES_PRICE",
"chargeDefIntegrationId": "QP_SALE_PRICE",
"chargeDefinition": "One-time Price"
}
]
}
]
}