deleteCartItems
Deletes items from an existing shopping cart. This mutation resets selected shipping method of updated stores, and user will need to select shipping method again. If a cart becomes empty our API won’t delete the cart itself. You can continue using it to add more items as needed.
Arguments
The input
object contains the unique identifier (ID
) for the cart and the items that need to be deleted.
Set to false
by default.
If set to true
, the buyerIdentity
field will be fetched in the response.
Set to true
by default.
If set to true
, the cartLines
field will be fetched in the response.
Set to true
by default.
If set to true
, the offers
field will be fetched in the response.
Set to false
by default.
If set to true
, the shippingMethods
field will be fetched in the response.
Returns
Any requested field from the CartResponse
object.
Usage
import { RyeClient, Marketplace } from "@rye-api/rye-sdk";
const ryeClient = new RyeClient("<AUTH_HEADER>", "<SHOPPER_IP>");
const result = await ryeClient.deleteCartItems({
input: {
id: "<CART_ID>",
items: {
shopifyProducts: [
{
variantId: "44346795295022",
},
],
},
},
});
Was this page helpful?