PricingResource

The PricingResource provides read only access to the Pricing Delegate. It allows you to inject pricing and availability into given items.

Data Model Objects

  • SCItem

Customization Points

ClassMethodDescription
com.ptc.sc.services.plugins.PricingDelegate injectPricingToCartItems The list of items passed into the POST call are given their prices and availability through the injectPricingToCartItems method.

The following resources are applicable:

POST /pricing/items

Takes a list of items and adds pricing and availability to each item. It also adds the total price for the list into the response's metadata. If there is no pricing delegate then the list will be returned with no changes.

Request Body

media type data type description
application/vnd.ptc.sc+json SCList (JSON) The list of items to add pricing and availability to

Response Codes

code condition
400 Returned when the content doesn't contain data or some of the data is not an SCItem
415 Returned if the Content-Type is not application/vnd.ptc.sc+json;version=1.

Response Body

media type data type
application/vnd.ptc.sc+json SCList (JSON)

POST /pricing/item

Adds pricing and availability to item. It also If there is no pricing delegate then the item will be returned with no changes.

Request Body

media type data type description
application/vnd.ptc.sc+json SCItem (JSON) The item to add pricing and availability to

Response Codes

code condition
400 Returned when the content doesn't contain data of SCItem
415 Returned if the Content-Type is not application/vnd.ptc.sc+json;version=1.

Response Body

media type data type
application/vnd.ptc.sc+json SCItem (JSON)

POST /pricing/groups

Takes a list of groups of items and adds pricing and availability to each item. It also adds the total price for each group in their metadata and adds the total price for the entire list into the response's metadata. If there is no pricing delegate then the list will be returned with no changes.

Request Body

media type data type description
application/vnd.ptc.sc+json SCListCollection (JSON) The list of groups of items to add pricing and availability to

Response Codes

code condition
400 Returned when the content doesn't contain data or some of the data is not an SCItem
415 Returned if the Content-Type is not application/vnd.ptc.sc+json;version=1.

Response Body

media type data type
application/vnd.ptc.sc+json SCListCollection (JSON)