Poq.SDK.Node

Home > @poq/sdk > CheckoutService > addCartItem

CheckoutService.addCartItem() method

Adds an item to a user’s cart.

Signature:

addCartItem(appIdentifier: string, poqUserId: string, cartParams: AddToCartRequest, mergeByCustomData?: boolean): Promise<PoqResponse<AddToCartResponse>>;

Parameters

Parameter Type Description
appIdentifier string The unique guid v4 app identifier.
poqUserId string The unique identifier of the poq user.
cartParams AddToCartRequest Specifies cart params
mergeByCustomData boolean (Optional) Adds as a separate cart item if the custom data is different to an existing item with the same variant id.

Returns:

Promise<PoqResponse<AddToCartResponse>>

The created Cart.