commercetools icon

commercetools

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

Actions671

Discount-group → Query DiscountGroups

AI-generated

Summary

Query DiscountGroups by applying optional filters to retrieve matching discount group data from the commercetools API.

Inputs

  • expand — Specifies which references to expand in the returned objects.
  • sort — Defines the sorting order of the results.
  • limit — Limits the number of DiscountGroups returned.
  • offset — Skips the specified number of DiscountGroups for pagination.
  • withTotal — Indicates whether to include the total count of matching DiscountGroups.
  • where — Applies filtering conditions using a filter expression to narrow down the DiscountGroups.

Output shape

a list of DiscountGroup objects with optional expanded references and pagination metadata

The response includes the queried DiscountGroups according to the provided filters. The data shape corresponds to the commercetools API response for discount group queries; pagination is supported via 'limit' and 'offset' inputs. Errors throw a NodeApiError unless 'Continue On Fail' is enabled.

Examples

Example 1: Retrieve up to 10 DiscountGroups sorted by name ascending, including total count.

Set 'limit' to '10', 'sort' to 'name asc', and 'withTotal' to 'true' in Filters.

Links

Discussion