Home > @vsf-enterprise/sap-commerce-webservices-sdk > CartsApi

CartsApi class

CartsApi - object-oriented interface CartsApi {BaseAPI}

Signature:

export declare class CartsApi extends BaseAPI 

Extends: BaseAPI

Methods

Method Modifiers Description
createCart(baseSiteId, userId, fields, oldCartId, toMergeCartGuid, options) Creates a new cart or restores an anonymous cart as a user's cart (if an old Cart Id is given in the request). Creates or restore a cart for a user.
createCartDeliveryAddress(baseSiteId, cartId, userId, address, fields, options) Creates an address and assigns it to the cart as the delivery address. Creates a delivery address for the cart.
createCartEntry(baseSiteId, cartId, userId, entry, fields, options) Adds a product to the cart. Adds a product to the cart.
createCartPaymentDetails(baseSiteId, cartId, userId, paymentDetails, fields, options) Defines the details of a new credit card, and assigns this payment option to the cart. Defines and assigns details of a new credit card payment to the cart.
doApplyCartPromotion(baseSiteId, cartId, promotionId, userId, options) Enables a promotion for the order based on the promotionId defined for the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine. Enables promotions based on the promotionsId of the cart.
doApplyCartVoucher(baseSiteId, cartId, userId, voucherId, options) Applies a voucher based on the voucherId defined for the cart. Applies a voucher based on the voucherId defined for the cart.
getCart(baseSiteId, cartId, userId, fields, options) Returns the cart with a given identifier. Get a cart with a given identifier.
getCartDeliveryMode(baseSiteId, cartId, userId, fields, options) Returns the delivery mode selected for the cart. Get the delivery mode selected for the cart.
getCartDeliveryModes(baseSiteId, cartId, userId, fields, options) Returns all delivery modes supported for the current base store and cart delivery address. A delivery address must be set for the cart, otherwise an empty list will be returned. Get all delivery modes for the current store and delivery address.
getCartEntries(baseSiteId, cartId, userId, fields, options) Returns cart entries. Get cart entries.
getCartEntry(baseSiteId, cartId, entryNumber, userId, fields, options) Returns the details of the cart entries. Get the details of the cart entries.
getCartPromotion(baseSiteId, cartId, promotionId, userId, fields, options) Returns information about a promotion (with a specific promotionId), that has been applied on the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine. Get information about promotion applied on cart.
getCartPromotions(baseSiteId, cartId, userId, fields, options) Returns information about the promotions applied on the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine. Get information about promotions applied on cart.
getCarts(baseSiteId, userId, currentPage, fields, pageSize, savedCartsOnly, sort, options) Lists all customer carts. Get all customer carts.
getCartVouchers(baseSiteId, cartId, userId, fields, options) Returns a list of vouchers applied to the cart. Get a list of vouchers applied to the cart.
removeCart(baseSiteId, cartId, userId, options) Deletes a cart with a given cart id. Deletes a cart with a given cart id.
removeCartDeliveryAddress(baseSiteId, cartId, userId, options) Deletes the delivery address from the cart. Deletes the delivery address from the cart.
removeCartDeliveryMode(baseSiteId, cartId, userId, options) Deletes the delivery mode from the cart. Deletes the delivery mode from the cart.
removeCartEntry(baseSiteId, cartId, entryNumber, userId, options) Deletes cart entry. Deletes cart entry.
removeCartPromotion(baseSiteId, cartId, promotionId, userId, options) Disables the promotion for the order based on the promotionId defined for the cart. Requests pertaining to promotions have been developed for the previous version of promotions and vouchers, and as a result, some of them are currently not compatible with the new promotions engine. Disables the promotion based on the promotionsId of the cart.
removeCartVoucher(baseSiteId, cartId, userId, voucherId, options) Deletes a voucher based on the voucherId defined for the current cart. Deletes a voucher defined for the current cart.
replaceCartDeliveryAddress(addressId, baseSiteId, cartId, userId, options) Sets a delivery address for the cart. The address country must be placed among the delivery countries of the current base store. Sets a delivery address for the cart.
replaceCartDeliveryMode(baseSiteId, cartId, deliveryModeId, userId, options) Sets the delivery mode with a given identifier for the cart. Sets the delivery mode for a cart.
replaceCartEntry(baseSiteId, cartId, entryNumber, userId, entry, fields, options) Updates the quantity of a single cart entry and the details of the store where the cart entry will be picked up. Attributes not provided in request will be defined again (set to null or default) Set quantity and store details of a cart entry.
replaceCartGuestUser(baseSiteId, cartId, email, userId, options) Assigns an email to the cart. This step is required to make a guest checkout. Assigns an email to the cart.
replaceCartPaymentDetails(baseSiteId, cartId, paymentDetailsId, userId, options) Sets credit card payment details for the cart. Sets credit card payment details for the cart.
updateCartEntry(baseSiteId, cartId, entryNumber, userId, entry, fields, options) Updates the quantity of a single cart entry and the details of the store where the cart entry will be picked up. Update quantity and store details of a cart entry.