commercetools icon

commercetools

Interact with the commercetools API. Operations are auto-generated from the official Postman collection.

Actions671

Associate Cart → Delete Cart in BusinessUnit by ID as Associate

AI-generated

Summary

Delete a cart within a specified commercetools business unit by its ID as a specific associate, using the cart's version for concurrency control.

Inputs

  • Associate Cart Key (required) — Key identifying the associate cart resource.
  • Cart ID (required) — The unique identifier of the cart to be deleted.
  • Associate ID (required) — Identifier of the associate performing the deletion within the business unit.
  • Version (required) — The current version of the cart; required for the delete operation to ensure concurrency control.

Output shape

a JSON object representing the deleted cart resource or an error object upon failure

The operation returns the deleted cart's JSON data. It requires the correct version for the deletion to succeed and uses authenticated commercetools OAuth2 credentials. Errors during execution will be returned as NodeApiError exceptions or captured in output if 'continueOnFail' is enabled.

Examples

Example 1: Deleting a cart by ID within a business unit as a specific associate

Provide valid Associate Cart Key, Cart ID, Associate ID, and the cart version number to delete the cart resource successfully.

Links

Discussion