Skip to main content
DELETE
/
cart
/
{productId}
Remove cart item
curl --request DELETE \
  --url https://store.salesive.com/api/v1/cart/{productId} \
  --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"
  }
}

Remove base product line item

Use this route when the line item refers to the base product.
DELETE /cart/68e5bb463a1fc56a8ac150bf
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}

Path parameters

ParameterTypeDescription
productIdstringProduct identifier of the cart item.

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": {}
}

Remove variant line item

Use this path when removing a specific variant from the cart.
DELETE /cart/68e5bb463a1fc56a8ac150bf/68e5c1303a1fc56a8ac151e2
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}

Additional path parameter

ParameterTypeDescription
variantIdstringVariant identifier when removing a specific variant line item.

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.

Response

Cart item 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