> For the complete documentation index, see [llms.txt](https://developer.paddle.com/llms.txt).
>
> To search these docs, send a `GET` request to `https://paddle-docs-retrieval.kapa-paddle.workers.dev/?q=<question>` with a URL-encoded question. No authentication needed. It returns a JSON array of `{content, source_url}`, most relevant first.

# GET /discount-groups

**List discount groups**

Returns a paginated list of discount groups. Use the query parameters to page through results.

**Required permissions:** `discount.read`

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | array | optional | Return only the IDs specified. Use a comma-separated list to get multiple entities. |
| `after` | string | optional | Return entities after the specified Paddle ID when working with paginated endpoints. Used in the `meta.pagination.next` URL in responses for list operations. |
| `per_page` | integer | optional | Set how many entities are returned per page. Paddle returns the maximum number of results if a number greater than the maximum is requested. Check `meta.pagination.per_page` in the response to see how many were returned.

Default: `50`; Maximum: `200`. (Max: 200; default: `50`) |
| `order_by` | string | optional | Order returned entities by the specified field and direction (`[ASC]` or `[DESC]`). For example, `?order_by=id[ASC]`.

Valid fields for ordering: `created_at` and `id`. (default: `"id[DESC]"`) |

Values for `order_by`:

- `created_at[ASC]` — Order by `created_at`, ascending.
- `created_at[DESC]` — Order by `created_at`, descending.
- `id[ASC]` — Order by `id`, ascending.
- `id[DESC]` — Order by `id`, descending.

## Response (200)

- `data`: array (required)
  - `id`: string (required) — Unique Paddle ID for this discount group, prefixed with `dsg_`. (pattern: `^dsg_[a-z\d]{26}$`)
  - `name`: string (required) — Unique name of this discount group, typically something short and memorable for categorization. Not shown to customers. (Length: 1–500)
  - `status`: string (required) — Whether this entity can be used in Paddle.
    - `active` — Entity is active and can be used.
    - `archived` — Entity is archived, so can't be used.
  - `created_at`: string (date-time) (required) — RFC 3339 datetime string of when this entity was created. Set automatically by Paddle.
  - `updated_at`: string (date-time) (required) — RFC 3339 datetime string of when this entity was updated. Set automatically by Paddle.
  - `import_meta`: object | null (required) — Import information for this entity. `null` if this entity is not imported.
    - `external_id`: string | null — Reference or identifier for this entity from the provider where it was imported from. (Length: 1–200)
    - `imported_from`: string (required) — Name of the platform or provider where this entity was imported from. (Length: 1–200)
- `meta`: object (required) — Information about this response.
  - `request_id`: string (required) — Unique ID for the request relating to this response. Provide this when contacting Paddle support about a specific request.
  - `pagination`: object (required) — Keys used for working with paginated results.
    - `per_page`: integer (required) — Number of entities per page for this response. May differ from the number requested if the requested number is greater than the maximum.
    - `next`: string (uri) (required) — URL containing the query parameters of the original request, along with the `after` parameter that marks the starting point of the next page. Always returned, even if `has_more` is `false`.
    - `has_more`: boolean (required) — Whether this response has another page.
    - `estimated_total`: integer — Estimated number of entities for this response.

For datasets with 100,000 or fewer matches, returns the exact count. For datasets with more than 100,000 matches, returns `100001` to indicate that more than 100,000 entities match. Returns `-1` when counting is skipped or couldn't be calculated.

Use `has_more` and `next` to page through all results rather than relying on `estimated_total` for an exact count.

### Response example

```json
{
  "data": [
    {
      "id": "dsg_01gtf15svsqzgp9325ss4ebmwt",
      "name": "Black Friday 2024",
      "status": "active",
      "import_meta": null,
      "created_at": "2024-11-28T14:36:14.695Z",
      "updated_at": "2024-11-28T14:36:14.695Z"
    },
    {
      "id": "dsg_02gtf15svsqzgp9325ss4ebmwt",
      "name": "Cyber Monday 2024 Discounts",
      "status": "active",
      "import_meta": null,
      "created_at": "2024-01-01T16:48:04.473Z",
      "updated_at": "2024-01-01T16:48:04.473Z"
    }
  ],
  "meta": {
    "request_id": "d8f286a6-e049-4a6e-8fa8-a6f145ac3ecf",
    "pagination": {
      "per_page": 50,
      "next": "https://api.paddle.com/discount-groups?after=dsg_01gtf15svsqzgp9325ss4ebmwt",
      "has_more": false,
      "estimated_total": 2
    }
  }
}
```
