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 ID
Buying 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 Code
The 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 ID
Customer ID. Default to Customer ID (_customer_id) of the commerce transaction if attribute mapping is not defined. -
_priceAsOf:
string
Title:
Price As Of
Price as of date. When empty, the current timestamp at the pricing execution is used. -
enableWaterfall:
boolean
Title:
Return Enable Waterfall
When 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:
Lines
Input data for items(lines) to be priced. -
priceBookVarName:
string
Title:
Price Book Variable Name
Variable name of the CPQ price book. Only applicable for customers who enable CPQ price books. -
returnAvailableAgreements:
boolean
Title:
Return Available Price Agreements
Flag to return the available agreements for the lines for the customer. -
returnAvailableRatePlans:
boolean
Title:
Return Available Rate Plans
Flag to return the available rate plans for the lines.
Nested Schema : Lines
Type:
array
Title:
Lines
Input data for items(lines) to be priced.
Show Source
Nested Schema : items
Type:
Show Source
object
-
_bomItemVariableName:
string
Title:
Bom Item Variable Name
Variable Name of the BOM item definition for a BOM item. It is empty for a part item. -
_itemIdentifier(required):
string
Title:
Item Identifier
An item's unique identifier. This can be any identifier desired by the client. -
_linePriceAsOf:
string
Title:
Line Price As Of
Price as of date for a line. When empty, the header price as of date is used. -
_partNumber(required):
string
Title:
Part Number
Part number of a line item. -
_quantity:
integer
Title:
Quantity
The 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 Number
The 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 Number
Requested Rate Plan Number. -
_serviceDuration:
integer
Title:
Service Duration
The 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 Period
The 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 Items
Items with their price calculated.
Nested Schema : Priced Items
Type:
array
Title:
Priced Items
Items with their price calculated.
Show Source
Nested Schema : itemPrice
Type:
Show Source
object
-
_bomItemVariableName:
string
Title:
BOM Item Variable Name
Variable Name of the CPQ BOM Item. -
_itemIdentifier:
string
Title:
Item Identifier
An item's unique identifier. This matches the item's identifier from the request. -
_partNumber:
string
Title:
Part Number
Part Number of the CPQ product. -
appliedAgreementIntegrationId:
string
Title:
Price Agreement Integration Id
The integration ID of the applied Price Agreement. -
appliedAgreementName:
string
Title:
Price Agreement Name
Name of the Price Agreement applied to item. -
appliedAgreementNumber:
string
Title:
Price Agreement Number
Unique Variable Name of the Price Agreement applied to the item. -
appliedRatePlanIntegrationId:
string
Title:
Rate Plan Integration Id
The integration ID of the applied Pricing Rate Plan. -
appliedRatePlanLabel:
string
Title:
Rate Plan Label
Name of the Pricing Rate Plan applied to item. -
appliedRatePlanNumber:
string
Title:
Rate Plan Number
Unique Variable Name of the Pricing Rate Plan applied to the item. -
availableAgreements:
array Available Price Agreements
Title:
Available Price Agreements
Available price agreements for each item. -
availableRatePlans:
array Available Rate Plans
Title:
Available Rate Plans
Available rate plans info from each price model item, in order of execution during the price calculation. -
charges:
array All Charges
Title:
All Charges
Charges from all executed price models.
Nested Schema : Available Price Agreements
Type:
array
Title:
Available Price Agreements
Available price agreements for each item.
Show Source
-
Array of:
object availableAgreement
Title:
availableAgreement
Instance of an available Price Agreement.
Nested Schema : Available Rate Plans
Type:
array
Title:
Available Rate Plans
Available rate plans info from each price model item, in order of execution during the price calculation.
Show Source
-
Array of:
object availableRatePlan
Title:
availableRatePlan
Instance of an available Rate Plan.
Nested Schema : All Charges
Type:
array
Title:
All Charges
Charges from all executed price models.
Show Source
-
Array of:
object Charge
Title:
Charge
Nested Schema : availableAgreement
Type:
object
Title:
availableAgreement
Instance of an available Price Agreement.
Show Source
-
integrationId:
string
Title:
integrationId
The integration ID of the applicable Price agreement. -
name:
string
Title:
name
Name of the Price agreement applicable to the item. -
number:
string
Title:
number
Unique Variable Name of the Price agreement applicable to the item.
Nested Schema : availableRatePlan
Type:
object
Title:
availableRatePlan
Instance of an available Rate Plan.
Show Source
-
integrationId:
string
Title:
integrationId
The integration ID of the applicable Pricing Rate Plan. -
label:
string
Title:
label
Name of the Pricing Rate Plan applicable to the item. -
number:
string
Title:
number
Unique Variable Name of the Pricing Rate Plan applicable to the item.
Nested Schema : Charge
Type:
object
Title:
Show Source
Charge
-
calculationInfo:
array All Calculation Info
Title:
All Calculation Info
Calculation info from each price model, in order of execution during the price calculation. -
chargeDefinition:
string
Title:
Charge Definition
The display label of the charge definition. -
chargeDefinitionCode:
string
Title:
Charge Definition Code
The code of the charge definition. -
chargeDefIntegrationId:
string
Title:
Charge Definition Integration ID
The charge definition code in the integrated order management system. -
chargeKey:
string
Title:
Charge Key
The unique identifier for this charge -
chargeType:
string
Title:
Charge Type
The element of the product or service which carries a price for the customer. -
dynamicPricingType:
string
Title:
Dynamic Pricing Type
The type of dynamic pricing used to define this charge: static, tiered, volume, rateCard, advanced. -
extendedAmount:
number
Title:
Extended List Amount
The extended price of a line item. This is the line unit price multiplied by the quantity. -
pricePeriod:
string
Title:
Price Period
The time period, frequency or recurrence with which the price or charge is levied. -
priceType:
string
Title:
Price Type
The basis on which a price or charge is levied, whether one time, on a periodic basis or based on usage. -
rateCardName:
string
Title:
Rate Card
Display label for the Rate Card applied in calculating this charge's price. -
rateCardStructure:
string
Title:
Rate Card Structure
The rate card used to calculate this charge's price. -
rateCardVariableName:
string
Title:
Rate Card Variable Name
Variable Name for the Rate Card applied in calculating this charge's price. -
unitPrice:
number
Title:
Unit Price
The unit price to be paid by the customer for this charge. -
usageUOM:
string
Title:
Usage UOM
The 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:
array
Title:
All Calculation Info
Calculation info from each price model, in order of execution during the price calculation.
Show Source
-
Array of:
object Profile Calculation Info
Title:
Profile Calculation Info
Additional information provided by a single price profile that contributed calculations to the final price.
Nested Schema : Profile Calculation Info
Type:
object
Title:
Profile Calculation Info
Additional 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" } ] } ] }