Skip to content

Remove an item from a cart

DELETE
/carts/{url_key}/order_items/{order_item_id}
curl --request DELETE \
--url https://acme.mykreezalid.com/front_api/v1/carts/k3v9q2m8x1c7z5b4n6t0p2r8s1d3f7/order_items/4242

Removes one item of the cart, whatever its quantity, with its add-ons. Works without a token for a guest cart; a member’s cart only accepts that member’s token. When you send a token and the cart is a guest cart, the cart (and the guest’s other carts and orders) is attached to the signed-in member first.

url_key
required
string

The cart’s url_key, returned when the cart is created.

Example

k3v9q2m8x1c7z5b4n6t0p2r8s1d3f7
order_item_id
required
integer

Id of one of the cart’s items (orders[].order_items[].id in GET /carts/{url_key}).

Example

4242

The item was removed.

Media typeapplication/json

Outcome of a cart change: status is success when it was applied, failed or error when it was not.

object
status

Outcome body of the cart endpoints that report status and message.

string
message

Human-readable outcome.

string

Example

{
"status": "success",
"message": "Listing updated successfully"
}

The item does not exist, does not belong to this cart, or could not be removed (status is failed).

Media typeapplication/json

Outcome of a cart change: status is success when it was applied, failed or error when it was not.

object
status

Outcome body of the cart endpoints that report status and message.

string
message

Human-readable outcome.

string

Example

{
"status": "success",
"message": "Listing updated successfully"
}

The cart belongs to a member and the request is not made by that member.

Media typeapplication/json

Error body returned by several cart endpoints.

object
success

Error body of the cart endpoints that report success and error.

boolean
error

Human-readable reason.

string

Example

{
"success": false,
"error": "Cart not found"
}

No open cart has this key: it does not exist or is closed.

Media typeapplication/json

Error body returned by several cart endpoints.

object
success

Error body of the cart endpoints that report success and error.

boolean
error

Human-readable reason.

string

Example

{
"success": false,
"error": "Cart not found"
}