Skip to main content
DELETE
/
cart
/
{productId}
/
{variantId}
Remove cart variant
curl --request DELETE \
  --url https://store.salesive.com/api/v1/cart/{productId}/{variantId} \
  --header 'Authorization: Bearer <token>' \
  --header 'x-shop-id: <api-key>'
{
  "status": 123,
  "success": true,
  "message": "<string>",
  "data": {
    "_id": "<string>",
    "user": "<string>",
    "shop": "<string>",
    "items": [
      {
        "name": "<string>",
        "image": "<string>",
        "price": 123,
        "quantity": 2,
        "product": {
          "_id": "<string>",
          "id": "<string>",
          "name": "<string>",
          "images": [
            "<string>"
          ],
          "price": 123,
          "promoPrice": 123,
          "sku": "<string>",
          "parentProductId": "<string>",
          "variantAttributes": {}
        },
        "variant": "<string>",
        "sku": "<string>",
        "variantAttributes": {}
      }
    ],
    "totalPrice": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  }
}

Request

DELETE /cart/68e5bb463a1fc56a8ac150bf/68e5c1303a1fc56a8ac151e2
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}

Path parameters

ParameterTypeDescription
productIdstringProduct identifier that owns the variant line item.
variantIdstringVariant identifier to remove within the product.

Headers

HeaderTypeDescription
AuthorizationstringProvide the customer token as Bearer <jwt>.
x-shop-idstringIdentify the shop that owns the cart.

Successful response

{
  "status": 200,
  "success": true,
  "message": "Cart item removed",
  "data": {
    "_id": "68f98d77c8502e9619569c24",
    "items": [],
    "totalPrice": 0
  }
}

Error response

{
  "status": 404,
  "success": false,
  "message": "Cart item not found",
  "data": {}
}

Authorizations

Authorization
string
header
required

JWT issued by the Salesive Store API for authenticated shoppers.

x-shop-id
string
header
required

Optional storefront identifier sent as a header to scope responses to a specific shop. Try It requests remember this value once provided.

Headers

x-shop-id
string

Optional identifier that scopes responses to a specific storefront when the referer cannot be inferred.

Path Parameters

productId
string
required

Product identifier for the cart item.

variantId
string
required

Variant identifier for the cart item.

Response

Cart variant removed successfully.

status
integer
required

HTTP status code returned by the API.

success
boolean
required

Indicates whether the request succeeded.

message
string
required

Human-readable response message.

data
object
required