---
title: "Lists the customers holding access now whose address a domain, an address or a pattern would ban, with the grants giving it, so they can be revoked too."
---

> 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 › customer

`GET /v1/stores/{store}/customer_bans/matches`

## Authentication

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

## Path parameters

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

## Query parameters

- `value` (`matchCustomerBan.query.value`; string, required) — The domain (a leading `@` dropped), the address, or the pattern: literals, `.`, classes, `\d \w \s`, groups, `|` and repeats up to 100, in lowercase, refused when it can't be matched safely.
  - minLength 1; maxLength 254
- `kind` (`matchCustomerBan.query.kind`; string, required) — What the ban names: `domain` (an address's domain and its subdomains), `email` (one exact address) or `pattern` (matched whole on the lowercased address).
  - one of `"email"`, `"domain"`, `"pattern"`

## Code samples

### cURL

```bash
curl --request GET \
  --url 'https://api.sherpo.io/merchant/v1/stores/<store>/customer_bans/matches?value=string&kind=email' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/customer_bans/matches?value=string&kind=email';
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>/customer_bans/matches?value=string&kind=email"

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

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

print(response.text)
```

## Responses

### 200

Lists the customers holding access now whose address a domain, an address or a pattern would ban, with the grants giving it, so they can be revoked too.

#### Example

```json
{
  "customers": [
    {
      "id": "string",
      "display_name": "string",
      "emails": [
        "string"
      ],
      "grants": [
        {
          "id": "string",
          "product_id": "string"
        }
      ],
      "more_grants": true
    }
  ],
  "complete": true
}
```

- `customers` (`matchCustomerBan.response.200.customers`; array<object>, required)
  - `id` (`matchCustomerBan.response.200.customers.id`; string, required)
  - `display_name` (`matchCustomerBan.response.200.customers.display_name`; any of, required)
    - any of: `string`, `null`
  - `emails` (`matchCustomerBan.response.200.customers.emails`; array<string>, required) — The customer's addresses the ban names.
  - `grants` (`matchCustomerBan.response.200.customers.grants`; array<object>, required) — The grants giving the customer access now, the first 50 by id.
    - `id` (`matchCustomerBan.response.200.customers.grants.id`; string, required)
    - `product_id` (`matchCustomerBan.response.200.customers.grants.product_id`; string, required)
  - `more_grants` (`matchCustomerBan.response.200.customers.more_grants`; boolean, required) — Whether the customer holds more grants than listed.
- `complete` (`matchCustomerBan.response.200.complete`; boolean, required) — False when more customers may match than were read: one past 100 of them, or reading stopped at 20,000 addresses.

### 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` (`matchCustomerBan.response.default.type`; string, required)
  - format `uri`
- `title` (`matchCustomerBan.response.default.title`; string, required)
- `status` (`matchCustomerBan.response.default.status`; integer, required)
- `detail` (`matchCustomerBan.response.default.detail`; string, required)
- `code` (`matchCustomerBan.response.default.code`; string, optional)
- `context` (`matchCustomerBan.response.default.context`; object, optional)
- `reached_core` (`matchCustomerBan.response.default.reached_core`; boolean, optional)
- `core_answer` (`matchCustomerBan.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/merchant-api/reference/match-customer-ban/index.md
