Poq.SDK.Node

Home > @poq/sdk-sfcc > CartService > addToCart

CartService.addToCart() method

Method adds item to cart.

Signature:

addToCart(authInfo: AuthInfo, customerId: string, appIdentifier: string, poqUserId: string, addToCartPayload: AddToCartRequest, isGuest: boolean, locale?: string): Promise<PoqResponse<AddToCartResponse>>;

Parameters

Parameter Type Description
authInfo AuthInfo The auth info to make request (credentials or token).
customerId string The customer id.
appIdentifier string The unique guid v4 app identifier.
poqUserId string The unique identifier of the poq user.
addToCartPayload AddToCartRequest Specifies cart elements to add
isGuest boolean The flag indicates whether user is guest.
locale string (Optional) The indicator carries information about locale.

Returns:

Promise<PoqResponse<AddToCartResponse>>

The AddToCartResponse.