commercetools icon

commercetools

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

Actions671

Discount Code → Delete DiscountCode by ID

AI-generated

Summary

Delete a discount code in commercetools by specifying its unique ID and version number.

Inputs

  • Discount Code ID (required) — The unique identifier of the discount code to delete.
  • Version (required) — The current version number of the discount code, required to handle concurrency and ensure you delete the correct version.

Output shape

a single JSON object representing the deleted discount code or an error if deletion fails

The operation requires version parameter as a query parameter for deletion. Errors are returned in a consistent error envelope. If the discount code does not exist or the version is incorrect, the API will return an error.

Examples

Example 1: Deleting a discount code with ID 'abc123' and version 1

Set 'Discount Code ID' to 'abc123' and 'Version' to 1 to delete this discount code.

Links

Discussion