Discard a purchase cart (tenant:purchase-cart:write)
DELETE /api/trade/v1/purchase-carts/{id}
Module: Trade · operationId: discardPurchaseCart · Tag: Purchasing · Auth: access token (Authorization: Bearer <accessToken>)
The cart becomes discarded; its recommendations are open again and its lines stay as history.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string (uuid) | yes |
Responses
- 204 Discarded
- 401 No valid session or bearer token (no body).
- 403 Missing permission, no active tenant in the token, or a missing CSRF token on a cookie write. (
application/json) - 404 Not found in the tenant. (
application/json) - 409 The cart does not allow it (
code):cart_not_open(ordered or discarded),recommendation_not_open,line_ordered(the line is on a purchase order),nothing_to_order,no_proposal(optimize first),proposal_stale/cart_changed(optimize again),accept_in_progress(an optimization, accept or order of the cart is running; retry shortly),drop_ship_no_address(a drop-ship order has no delivery address). (application/json)
Example request
curl -X DELETE 'https://api.mbcom.cloud/api/trade/v1/purchase-carts/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
-H "Authorization: Bearer $ACCESS_TOKEN"