DELETE /carts/{cartId}/items/{itemId}

Deletes a Cart line item.

Notes

Removing the last line_item in the Cart deletes the Cart.

To prevent lost updates due to concurrent requests overriding changes made by others, it is recommended to enable optimistic concurrency control by including the version field in the request payload. If the provided version does not match the version on the server, a conflict error will be returned, which the client can handle accordingly.

Servers

Path parameters

Name Type Required Description
cartId String Yes

The identifier of a specific cart.

itemId String Yes

Request headers

Name Type Required Description
Accept String Yes

The MIME type of the response body.

Default value: "application/json"

Content-Type String Yes The media type of the request body.

Default value: "application/json"

Query parameters

Name Type Required Description
include[] Array No
  • redirect_urls: Create a direct link to a cart. This can be used for the /POST request for carts.
  • line_items.physical_items.options: The cart returns an abbreviated result. Use this to return physical items product options. To return the extended cart object, use in a /POST request.
  • line_items.digital_items.options: The cart returns an abbreviated result. Use this to return digital items product options. To return the extended cart object, use in a /POST request.
  • promotions.banners: Returns a list of eligible banners.

Request body fields

Name Type Required Description
version Integer No

The cart version that you expect to apply the updates. If the provided version doesn't match the current cart version, you will receive a conflict error. This field is optional; if not provided, optimistic concurrency control will not apply.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.