Calculate Price

post

/rest/v7/pricing/actions/calculatePrice

The Calculate Price REST API allows an external application to query CPQ Cloud for pricing information. CPQ Cloud executes contract rules and relevant profiles to calculate and return the final list price.

Request

Body ()
Root Schema : pricing-calculatePriceRequest
Type: object
Show Source
Nested Schema : Header Attribute Values
Type: object
Title: Header Attribute Values
Values of pricing attributes at the header level.
Show Source
Nested Schema : Items
Type: array
Title: Items
Input data for items to be priced.
Show Source
Nested Schema : items
Type: object
Show Source
Nested Schema : Item Attribute Values
Type: object
Title: Item Attribute Values
Values of pricing attributes at the item level for a specific item.
Show Source
Back to Top

Response

Default Response

Body ()
Root Schema : pricing
Type: object
Show Source
Nested Schema : Priced Items
Type: array
Title: Priced Items
Items with their price calculated.
Show Source
Nested Schema : itemPrice
Type: object
Show Source
Nested Schema : All Calculation Info
Type: array
Title: All Calculation Info
Calculation info from each price profile, in order of execution during the price calculation.
Show Source
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.
Back to Top

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 -i -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" -H "Accept: application/json"
https://sitename.oracle.com/rest/v7/pricing/actions/calculatePrice

Request Body Sample

{
	"currencyCode": "USD",
	"priceBookVarName": "_default_price_book",
	"customerId": "accountX",
	"headerAttributeValues": {
		"myPricingType": "recurring",
		...
	},
	"items": [{
			"itemIdentifier": "2",
			"partNumber": "part1",
			"itemAttributeValues": {
				"myUsage": 15.2,
				...
			}
		}, {
			"itemIdentifier": "3",
			"partNumber": "part1",
			"itemAttributeValues": {
				"myUsage": 80,
				...
			}
		}, {
			"itemIdentifier": "4",
			"partNumber": "part2"
		}
	]
}

Response Body Sample

{
	"items": [{
			"itemIdentifier": "2",
			"partNumber": "part1",
			"unitPrice": 2.34,
			"calculationInfo": [{
					...
				}, ...]
		}, {
			"itemIdentifier": "3",
			"partNumber": "part1",
			"unitPrice": 5.67,
			"calculationInfo": [{
					...
				}, ...]
		}, {
			"itemIdentifier": "4",
			"partNumber": "part2",
			"unitPrice": 80.00,
			"calculationInfo": [{
					...
				}, ...]
		}
	]
}
Back to Top