commercetools icon

commercetools

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

Actions671

Discount-group → Create DiscountGroup

AI-generated

Summary

Create a new Discount Group in commercetools by specifying its key, localized name, localized description, sort order, and active status.

Inputs

  • Key (required) — Unique identifier for the Discount Group.
  • Name (required) — Localized name of the Discount Group in JSON format (e.g., { "en": "" }).
  • Description (required) — Localized description of the Discount Group in JSON format (e.g., { "en": "" }).
  • Sort Order (required) — String that specifies the position of the Discount Group in a sorted list.
  • Is Active (required) — Boolean flag to set if the Discount Group is active.

Output shape

a single JSON object representing the newly created Discount Group as returned by the commercetools API

The output contains the full Discount Group object created, including server-generated fields such as id and version. Errors in creation will throw API errors unless 'Continue On Fail' is enabled.

Examples

Example 1: Creating a new active Discount Group named "Holiday Specials" in English with a specific sort order.

Set Key to 'holiday-specials', Name to {"en": "Holiday Specials"}, Description to {"en": "Discounts for holiday season"}, Sort Order to '0.5', and Is Active to true.

Links

Discussion