Home > @vsf-enterprise/epcc-api > CartEndpoints > addProductToCart

# CartEndpoints.addProductToCart() method

Adds product to the cart.

Signature:

addProductToCart(context: ElasticPathIntegrationContext, params: AddProductToCartParams): Promise<CartItem[]>;

# Parameters

Parameter Type Description
context ElasticPathIntegrationContext An auto-generated value prepended to the method as a first parameter.
params AddProductToCartParams An object which contains necessary properties for adding a product to the cart.

Returns:

Promise<CartItem[]>