This class provides RESTful services to retrieve entitled and range prices.
com.ibm.commerce.rest.price.handler.PriceHandler
HTTP Method | Path | Description |
---|---|---|
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=byCatalogEntryIds | Get the entitled and range prices for catalog entries by catalog entry ids. |
GET | /store/{storeId}/price?q=byPartNumbers | Get the entitled and range prices for catalog entries by part numbers. |
POST | /store/{storeId}/price | Find prices in a store using a structure that allows multiple results in a single query. |
Finds entitled and range prices by a query. See each query for details on input and output.
findByQuery
false
false
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
q | The query name. | query | string | true | false |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
500 | Internal server error. Additional details will be contained on the server logs. |
Get the entitled and range prices for catalog entries by catalog entry ids.
byCatalogEntryIds
false
false
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
q | The query name. | query | string | true | false |
catalogEntryId | The unique id of catalog entry. | query | string | true | true |
contractId | The unique id of the contract. | query | string | false | false |
quantity | The quantity of the catalog entry. | query | string | false | false |
uom | The unit of measurement of the quantity. | query | string | false | false |
date | The date of the price. | query | string | false | false |
checkEntitlement | Whether or not enable entitlement check when retrieving prices | query | string | false | false |
dynamicKitAsItem | Whether or not treat dynamic kit as item when retrieving prices | query | string | false | false |
profileName | Profile name. Profiles determine the subset of data to be returned by a query. | query | string | false | false |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
500 | Internal server error. Additional details will be contained on the server logs. |
GET /wcs/resources/store/10001/price?q=byCatalogEntryIds&catalogEntryId=13011&contractId=10001¤cy=CAD&quantity=1.0&uom=C62&date=2014-11-24T11:13:26EST&qCheckEntitlement=false
200
{ "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¤cy=CAD&quantity=1.0&uom=C62&date=2014-11-24T11:13:26EST&qCheckEntitlement=false", "resourceName": "price" }
Get the entitled and range prices for catalog entries by part numbers.
byPartNumbers
false
false
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
q | The query name. | query | string | true | false |
partNumber | The part number of the catalog entry. | query | string | true | true |
contractId | The unique id of the contract. | query | string | false | false |
quantity | The quantity of the catalog entry. | query | string | false | false |
uom | The unit of measurement of the quantity. | query | string | false | false |
date | The date of the price. | query | string | false | false |
checkEntitlement | Whether or not enable entitlement check when retrieving prices | query | string | false | false |
dynamicKitAsItem | Whether or not treat dynamic kit as item when retrieving prices | query | string | false | false |
profileName | Profile name. Profiles determine the subset of data to be returned by a query. | query | string | false | false |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
500 | Internal server error. Additional details will be contained on the server logs. |
GET /wcs/resources/store/10001/price?q=byPartNumbers&partNumber=HTA029_292001&contractId=10001¤cy=CAD&quantity=1.0&uom=C62&date=2014-11-24T11:13:26EST
200
{ "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¤cy=CAD&quantity=1.0&uom=C62&date=2014-11-24T11:13:26EST", "resourceName": "price" }
Find prices in a store using a structure that allows multiple results in a single query.
findPricesByQuery
false
true
Name | Description | Parameter Type | Data Type | Required | Allow Multiple |
---|---|---|---|---|---|
storeId | The store identifier. | path | string | true | N/A |
profile | Setting 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. | query | string | false | false |
body | The request body for a price query. | body | com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest | true | N/A |
catalogId | The catalog identifier. If none is specified, the store default catalog shall be used. | query | string | false | false |
HTTP Status Code | Description |
---|---|
200 | The requested completed successfully. |
400 | Bad request. Some of the inputs provided to the request aren't valid. |
401 | Not authenticated. The user session isn't valid. |
403 | The user isn't authorized to perform the specified request. |
404 | The specified resource couldn't be found. |
500 | Internal server error. Additional details will be contained on the server logs. |
POST /wcs/resources/store/10001/price?currency=USD&profile=range
{ "query": { "contractIds": [ "10001" ], "name": "byProductID", "products": [ { "productId": "11016", "quantities": [ { "quantity": 7.0, "uom": "C62" } ] } ] } }
200
{ "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" }
Name | Data Type | Required |
---|---|---|
value | string | false |
currency | string | false |
Name | Data Type | Required |
---|---|---|
value | string | false |
uom | string | false |
Price request.
Name | Data Type | Required |
---|---|---|
query | com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Query | true |
Product information.
Name | Data Type | Required |
---|---|---|
dates | string array | false |
contractIds | string array | false |
quantities | com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Quantity array | false |
productId | string | false |
partNumber | string | false |
currencies | string array | false |
Quantity information.
Name | Data Type | Required |
---|---|---|
uom | string | true |
quantity | string | true |
Query information.
Name | Data Type | Required |
---|---|---|
products | com.ibm.commerce.rest.price.handler.PriceHandler$PriceRequest$Product array | true |
dates | string array | false |
contractIds | string array | false |
name | string | true |
Name | Data Type | Required |
---|---|---|
recordSetTotal | string | false |
EntitledPrice | price-price_item array | false |
recordSetComplete | string | false |
recordSetStartNumber | string | false |
recordSetCount | string | false |
Name | Data Type | Required |
---|---|---|
userDataField | price-price_item.userDataField array | false |
UnitPrice | price-price_item.UnitPrice array | false |
productId | string | false |
partNumber | string | true |
RangePrice | price-price_item.RangePrice array | false |
contractId | string | false |
Name | Data Type | Required |
---|---|---|
currency | string | false |
minimumQuantity | com.ibm.commerce.foundation.common.datatypes.QuantityType | true |
maximumQuantity | com.ibm.commerce.foundation.common.datatypes.QuantityType | false |
priceInRange | com.ibm.commerce.foundation.common.datatypes.MonetaryAmountType | true |
Name | Data Type | Required |
---|---|---|
price | com.ibm.commerce.foundation.common.datatypes.MonetaryAmountType | false |
quantity | com.ibm.commerce.foundation.common.datatypes.QuantityType | false |
Name | Data Type | Required |
---|---|---|
value | string | false |
key | string | true |