Home > @vsf-enterprise/sapcc-api > Endpoints > createCart

Endpoints.createCart() method

Creates a new cart or restores an anonymous cart as a user's cart (if an old Cart Id is given in the request).

Signature:

createCart(context: SapccIntegrationContext, props?: CreateCartProps): Promise<Cart>;

Parameters

Parameter Type Description
context SapccIntegrationContext An auto-generated value prepended to the method as a first parameter.
props CreateCartProps An object which contains necessary properties for creating cart.

Returns:

Promise<Cart>