price

This class provides RESTful services to retrieve entitled and range prices.

Handler Class:

com.ibm.commerce.rest.price.handler.PriceHandler

Method Summary

HTTP MethodPathDescription
GET/store/{storeId}/price?q={q}Finds entitled and range prices by a query. See each query for details on input and output.
GET/store/{storeId}/price?q=byCatalogEntryIdsGet the entitled and range prices for catalog entries by catalog entry ids.
GET/store/{storeId}/price?q=byPartNumbersGet the entitled and range prices for catalog entries by part numbers.
POST/store/{storeId}/priceFind prices in a store using a structure that allows multiple results in a single query.

Method Details

GET /store/{storeId}/price?q={q}

Finds entitled and range prices by a query. See each query for details on input and output.

Handler Method:

findByQuery

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
qThe query name.querystringtruefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.

GET /store/{storeId}/price?q=byCatalogEntryIds

Get the entitled and range prices for catalog entries by catalog entry ids.

Handler Method:

byCatalogEntryIds

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
qThe query name.querystringtruefalse
catalogEntryIdThe unique id of catalog entry.querystringtruetrue
contractIdThe unique id of the contract.querystringfalsefalse
quantityThe quantity of the catalog entry.querystringfalsefalse
uomThe unit of measurement of the quantity.querystringfalsefalse
dateThe date of the price.querystringfalsefalse
checkEntitlementWhether or not enable entitlement check when retrieving pricesquerystringfalsefalse
dynamicKitAsItemWhether or not treat dynamic kit as item when retrieving pricesquerystringfalsefalse
profileNameProfile name. Profiles determine the subset of data to be returned by a query.querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

price-price


Example

Request:
GET /wcs/resources/store/10001/price?q=byCatalogEntryIds&catalogEntryId=13011&contractId=10001&currency=CAD&quantity=1.0&uom=C62&date=2014-11-24T11:13:26EST&qCheckEntitlement=false
HTTP Status Code:

200

Response:
{
	"EntitledPrice": [
		{
			"UnitPrice": [
				{
					"price": {
						"currency": "CAD",
						"value": 22.35
					},
					"quantity": {
						"uom": "C62",
						"value": 1.0
					}
				}
			],
			"contractId": "10001",
			"partNumber": "HTA029_292001",
			"productId": "13011"
		}
	],
	"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/price?q=byCatalogEntryIds&catalogEntryId=13011&contractId=10001&currency=CAD&quantity=1.0&uom=C62&date=2014-11-24T11:13:26EST&qCheckEntitlement=false",
	"resourceName": "price"
}

GET /store/{storeId}/price?q=byPartNumbers

Get the entitled and range prices for catalog entries by part numbers.

Handler Method:

byPartNumbers

Secure Call Mandatory:

false

Partial Authentication Allowed:

false

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
qThe query name.querystringtruefalse
partNumberThe part number of the catalog entry.querystringtruetrue
contractIdThe unique id of the contract.querystringfalsefalse
quantityThe quantity of the catalog entry.querystringfalsefalse
uomThe unit of measurement of the quantity.querystringfalsefalse
dateThe date of the price.querystringfalsefalse
checkEntitlementWhether or not enable entitlement check when retrieving pricesquerystringfalsefalse
dynamicKitAsItemWhether or not treat dynamic kit as item when retrieving pricesquerystringfalsefalse
profileNameProfile name. Profiles determine the subset of data to be returned by a query.querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

price-price


Example

Request:
GET /wcs/resources/store/10001/price?q=byPartNumbers&partNumber=HTA029_292001&contractId=10001&currency=CAD&quantity=1.0&uom=C62&date=2014-11-24T11:13:26EST
HTTP Status Code:

200

Response:
{
	"EntitledPrice": [
		{
			"UnitPrice": [
				{
					"price": {
						"currency": "CAD",
						"value": 22.35
					},
					"quantity": {
						"uom": "C62",
						"value": 1.0
					}
				}
			],
			"contractId": "10001",
			"partNumber": "HTA029_292001",
			"productId": "13011"
		}
	],
	"resourceId": "http:\/\/localhost:80\/wcs\/resources\/store\/10001\/price?q=byPartNumbers&partNumber=HTA029_292001&contractId=10001&currency=CAD&quantity=1.0&uom=C62&date=2014-11-24T11:13:26EST",
	"resourceName": "price"
}

POST /store/{storeId}/price

Find prices in a store using a structure that allows multiple results in a single query.

Handler Method:

findPricesByQuery

Secure Call Mandatory:

false

Partial Authentication Allowed:

true

Parameters:
NameDescriptionParameter TypeData TypeRequiredAllow Multiple
storeIdThe store identifier.pathstringtrueN/A
profileSetting the 'profile' to 'default' or not specifying the 'profile' will result in normal prices being returned. A 'profile' value of 'range' will return the normal prices, and in addition, will return a list of range prices, which includes the minimum and maximum quantities as well as the price for each range.querystringfalsefalse
bodyThe request body for a price query.bodycom.ibm.commerce.rest.price.handler.PriceHandler$PriceRequesttrueN/A
catalogIdThe catalog identifier. If none is specified, the store default catalog shall be used.querystringfalsefalse
HTTP Status Codes:
HTTP Status CodeDescription
200The requested completed successfully.
400Bad request. Some of the inputs provided to the request aren't valid.
401Not authenticated. The user session isn't valid.
403The user isn't authorized to perform the specified request.
404The specified resource couldn't be found.
500Internal server error. Additional details will be contained on the server logs.
Response Data Type:

price-price


Example

Request:
POST /wcs/resources/store/10001/price?currency=USD&profile=range
Body:
{
	"query": {
		"contractIds": [
			"10001"
		],
		"name": "byProductID",
		"products": [
			{
				"productId": "11016",
				"quantities": [
					{
						"quantity": 7.0,
						"uom": "C62"
					}
				]
			}
		]
	}
}
HTTP Status Code:

200

Response:
{
	"EntitledPrice": [
		{
			"RangePrice": [
				{
					"currency": "USD",
					"maximumQuantity": {
						"uom": "C62",
						"value": 5.0
					},
					"minimumQuantity": {
						"uom": "C62",
						"value": 1.0
					},
					"priceInRange": {
						"currency": "USD",
						"value": 60.00
					}
				},
				{
					"currency": "USD",
					"minimumQuantity": {
						"uom": "C62",
						"value": 6.0
					},
					"priceInRange": {
						"currency": "USD",
						"value": 50.00
					}
				}
			],
			"UnitPrice": [
				{
					"price": {
						"currency": "USD",
						"value": 50.00
					},
					"quantity": {
						"uom": "C62",
						"value": 7.0
					}
				}
			],
			"contractId": "10001",
			"partNumber": "WCL004_041404",
			"productId": "11016"
		}
	],
	"resourceId": "https:\/\/localhost:443\/wcs\/resources\/store\/10001\/price?currency=USD&profile=range",
	"resourceName": "price"
}

Data Type Details

com.ibm.commerce.foundation.common.datatypes.MonetaryAmountType

Properties:
NameData TypeRequired
valuestringfalse
currencystringfalse

com.ibm.commerce.foundation.common.datatypes.QuantityType

Properties:
NameData TypeRequired
valuestringfalse
uomstringfalse

com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest

Price request.

Properties:
NameData TypeRequired
querycom.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Querytrue

com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Product

Product information.

Properties:
NameData TypeRequired
datesstring arrayfalse
contractIdsstring arrayfalse
quantitiescom.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Quantity arrayfalse
productIdstringfalse
partNumberstringfalse
currenciesstring arrayfalse

com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Quantity

Quantity information.

Properties:
NameData TypeRequired
uomstringtrue
quantitystringtrue

com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Query

Query information.

Properties:
NameData TypeRequired
productscom.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Product arraytrue
datesstring arrayfalse
contractIdsstring arrayfalse
namestringtrue

price-price

Properties:
NameData TypeRequired
recordSetTotalstringfalse
EntitledPriceprice-price_item arrayfalse
recordSetCompletestringfalse
recordSetStartNumberstringfalse
recordSetCountstringfalse

price-price_item

Properties:
NameData TypeRequired
userDataFieldprice-price_item.userDataField arrayfalse
UnitPriceprice-price_item.UnitPrice arrayfalse
productIdstringfalse
partNumberstringtrue
RangePriceprice-price_item.RangePrice arrayfalse
contractIdstringfalse

price-price_item.RangePrice

price-price_item.UnitPrice

price-price_item.userDataField

Properties:
NameData TypeRequired
valuestringfalse
keystringtrue