Poq.SDK.Node

Home > @poq/sdk-sfcc > IBasketsClient > patchBasketsByIDItemsByID

IBasketsClient.patchBasketsByIDItemsByID() method

Updates an item in a basket. The following values in the request body are considered by the server: product_id: a valid product id. The purpose of this value is to exchange a variation of a variation product. shipment_id: a valid shipment id. The purpose of this value is to move a product item to another shipment. quantity: a number between 0 and 999. The purpose of this value is to change quantity of the product item. If quantity is 0, the product item is removed. option_items/option_value_id: a valid option value id. The purpose of this value is to exchange an option value for an option item of an option product. This is only possible if the product item is an option product. To change option values a collection of option items to be changed need to be provided in property option_items. Those option_items need to contain option_id and option_value_id. The provided values must be valid for the option product that this product item represents. Otherwise InvalidProductOptionItemException or InvalidProductOptionValueItemException will be thrown. custom properties c_<CUSTOM_NAME>: a value corresponding to the type defined for custom attribute <CUSTOM_NAME> of ProductLineItem. The purpose of this value is to add or change the value of a custom attribute defined for ProductLineItem.

Signature:

patchBasketsByIDItemsByID(basketId: string, itemId: string, body: ProductItem, options?: RequestOptions): Promise<PoqResponse<Basket>>;

Parameters

Parameter Type Description
basketId string the id of the basket to be modified
itemId string the it of the item to be updated
body ProductItem  
options RequestOptions (Optional) Override http request option.

Returns:

Promise<PoqResponse<Basket>>