# Discount Groups

## GraphQL partial SDLs

This is a graphql reference page. In the llms.txt variant, those components link to the shared partial SDL key list instead of trying to resolve inline GraphQL reference content.

Fetch all available partial SDL keys first:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:returnTypesList
```

Then fetch the one or more relevant partial SDL with a key from that list by calling the same endpoint with a schema ID:

```text
GET https://docs.commercetools.com/apis/rest/content/by-id?id=ctp:gql-sphere:schema:<key>
```

The response body is a JSON object keyed by the requested content ID. For example, the key-list request returns a `ctp:gql-sphere:returnTypesList` field and a schema request returns a `ctp:gql-sphere:schema:<key>` field.

**Queries and mutations for managing Discount Groups in the platform.**

## Queries

### Query Discount Groups

[fetch SDL for query discountGroups](#graphql-partial-sdls).

### Get Discount Group

[fetch SDL for query discountGroup](#graphql-partial-sdls).

## Mutations

### Create Discount Group

[fetch SDL for mutation createDiscountGroup](#graphql-partial-sdls).

### Update Discount Group

[fetch SDL for mutation updateDiscountGroup](#graphql-partial-sdls).

### Delete Discount Group

[fetch SDL for mutation deleteDiscountGroup](#graphql-partial-sdls).

## Output types

### DiscountGroup

[fetch SDL for type DiscountGroup](#graphql-partial-sdls).

### Discount Group Query Result

[fetch SDL for type DiscountGroupQueryResult](#graphql-partial-sdls).

## Input types

### DiscountGroupDraft

[fetch SDL for type DiscountGroupDraft](#graphql-partial-sdls).

### DiscountGroupUpdateAction

[fetch SDL for type DiscountGroupUpdateAction](#graphql-partial-sdls).

### Update actions

#### Set Key

[fetch SDL for type SetDiscountGroupKey](#graphql-partial-sdls).

#### Set Sort Order

[fetch SDL for type SetDiscountGroupSortOrder](#graphql-partial-sdls).

#### Set Name

[fetch SDL for type SetDiscountGroupName](#graphql-partial-sdls).

#### Set Is Active

[fetch SDL for type SetDiscountGroupIsActive](#graphql-partial-sdls).

#### Set Description

[fetch SDL for type SetDiscountGroupDescription](#graphql-partial-sdls).

## Related pages

- [Search documentation and API specs](/search.md)