---
title: "Pages the store's discounts."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.sherpo.io/llms.txt
> Use this file to discover all available pages before exploring further.

Path: Sherpo merchant API › discount

`GET /v1/stores/{store}/discounts`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `discount:read`

## Path parameters

- `store` (`listDiscounts.path.store`; string, required) — The store's id.

## Query parameters

- `filter` (`listDiscounts.query.filter`; object, optional) — `filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.
- `sort` (`listDiscounts.query.sort`; string, optional) — Sorted by code, rows without a value come last either way.
  - one of `"created"`, `"code"`
- `direction` (`listDiscounts.query.direction`; string, optional)
  - one of `"asc"`, `"desc"`
- `limit` (`listDiscounts.query.limit`; integer, optional)
  - min 1; max 100
- `cursor` (`listDiscounts.query.cursor`; string, optional)
  - maxLength 8192
- `count` (`listDiscounts.query.count`; boolean, optional)
- `search` (`listDiscounts.query.search`; string, optional)
  - minLength 1; maxLength 200
- `facets` (`listDiscounts.query.facets`; array<string>, optional)

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/discounts' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/discounts';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/merchant/v1/stores/<store>/discounts"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

Pages the store's discounts.

#### Example

```json
{
  "items": [
    {
      "scopes": {
        "items": [
          {
            "id": "string",
            "kind": "string",
            "product_id": "string",
            "tier_id": "string",
            "price_id": "string"
          }
        ],
        "total": 0
      },
      "id": "string",
      "code": "string",
      "name": "string",
      "applies": "string",
      "status": "string",
      "amount_off": 0,
      "percent_off": 0,
      "currency": "string",
      "exponent": 0,
      "floor_amount": 0,
      "cap_amount": 0,
      "floor_percent": 0,
      "priority": 0,
      "supply_total": 0,
      "supply_consumed": 0,
      "supply_per_customer": 0,
      "starts_at": "string",
      "ends_at": "string",
      "archived_at": "string",
      "created_at": "string"
    }
  ],
  "cursor": "string",
  "total": 0,
  "facets": {
    "property1": {
      "property1": 0,
      "property2": 0
    },
    "property2": {
      "property1": 0,
      "property2": 0
    }
  }
}
```

- `items` (`listDiscounts.response.200.items`; array<object>, required)
  - `scopes` (`listDiscounts.response.200.items.scopes`; object, required)
    - `items` (`listDiscounts.response.200.items.scopes.items`; array<object>, required)
      - `id` (`listDiscounts.response.200.items.scopes.items.id`; string, required)
      - `kind` (`listDiscounts.response.200.items.scopes.items.kind`; string, required)
      - `product_id` (`listDiscounts.response.200.items.scopes.items.product_id`; any of, required)
        - any of: `string`, `null`
      - `tier_id` (`listDiscounts.response.200.items.scopes.items.tier_id`; any of, required)
        - any of: `string`, `null`
      - `price_id` (`listDiscounts.response.200.items.scopes.items.price_id`; any of, required)
        - any of: `string`, `null`
    - `total` (`listDiscounts.response.200.items.scopes.total`; number, required)
  - `id` (`listDiscounts.response.200.items.id`; string, required)
  - `code` (`listDiscounts.response.200.items.code`; any of, required)
    - any of: `string`, `null`
  - `name` (`listDiscounts.response.200.items.name`; any of, required)
    - any of: `string`, `null`
  - `applies` (`listDiscounts.response.200.items.applies`; string, required)
  - `status` (`listDiscounts.response.200.items.status`; string, required)
  - `amount_off` (`listDiscounts.response.200.items.amount_off`; number, required)
  - `percent_off` (`listDiscounts.response.200.items.percent_off`; number, required)
  - `currency` (`listDiscounts.response.200.items.currency`; any of, required)
    - any of: `string`, `null`
  - `exponent` (`listDiscounts.response.200.items.exponent`; any of, required)
    - any of: `number`, `null`
  - `floor_amount` (`listDiscounts.response.200.items.floor_amount`; any of, required)
    - any of: `number`, `null`
  - `cap_amount` (`listDiscounts.response.200.items.cap_amount`; any of, required)
    - any of: `number`, `null`
  - `floor_percent` (`listDiscounts.response.200.items.floor_percent`; any of, required)
    - any of: `number`, `null`
  - `priority` (`listDiscounts.response.200.items.priority`; number, required)
  - `supply_total` (`listDiscounts.response.200.items.supply_total`; any of, required)
    - any of: `number`, `null`
  - `supply_consumed` (`listDiscounts.response.200.items.supply_consumed`; number, required)
  - `supply_per_customer` (`listDiscounts.response.200.items.supply_per_customer`; any of, required)
    - any of: `number`, `null`
  - `starts_at` (`listDiscounts.response.200.items.starts_at`; any of, required)
    - any of: `string`, `null`
  - `ends_at` (`listDiscounts.response.200.items.ends_at`; any of, required)
    - any of: `string`, `null`
  - `archived_at` (`listDiscounts.response.200.items.archived_at`; any of, required)
    - any of: `string`, `null`
  - `created_at` (`listDiscounts.response.200.items.created_at`; any of, required)
    - any of: `string`, `null`
- `cursor` (`listDiscounts.response.200.cursor`; any of, required)
  - any of: `string`, `null`
- `total` (`listDiscounts.response.200.total`; number, optional)
- `facets` (`listDiscounts.response.200.facets`; map<map<number>>, optional)

### default

A problem; see https://api.sherpo.io/merchant/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`listDiscounts.response.default.type`; string, required)
  - format `uri`
- `title` (`listDiscounts.response.default.title`; string, required)
- `status` (`listDiscounts.response.default.status`; integer, required)
- `detail` (`listDiscounts.response.default.detail`; string, required)
- `code` (`listDiscounts.response.default.code`; string, optional)
- `context` (`listDiscounts.response.default.context`; object, optional)
- `reached_core` (`listDiscounts.response.default.reached_core`; boolean, optional)
- `core_answer` (`listDiscounts.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/list-discounts/index.md
