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
- https://api.bigcommerce.com/stores/{store_hash}/v3
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 |
|
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
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.