---
title: "Pages the grants of access to customers."
---

> 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}/grants`

## Authentication

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

## Path parameters

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

## Query parameters

- `filter` (`listGrants.query.filter`; object, optional) — `filter[<field>]=<value>` is an equality, `filter[<field>][<op>]=<value>` names the operator; `in` repeats the parameter.
- `sort` (`listGrants.query.sort`; string, optional)
  - one of `"valid_from"`
- `direction` (`listGrants.query.direction`; string, optional)
  - one of `"asc"`, `"desc"`
- `limit` (`listGrants.query.limit`; integer, optional)
  - min 1; max 100
- `cursor` (`listGrants.query.cursor`; string, optional)
  - maxLength 8192
- `count` (`listGrants.query.count`; boolean, optional)
- `facets` (`listGrants.query.facets`; array<string>, optional)

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.sherpo.io/merchant/v1/stores/<store>/grants';
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>/grants"

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

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

print(response.text)
```

## Responses

### 200

Pages the grants of access to customers.

#### Example

```json
{
  "items": [
    {
      "token_id": "string",
      "customer": {
        "id": "string",
        "name": "string",
        "email": "string",
        "phone": "string",
        "erased": true
      },
      "product": {
        "id": "string",
        "slug": "string",
        "path": "string",
        "url": "string",
        "title": "string",
        "category": "string",
        "deleted": true
      },
      "tier": {
        "id": "string",
        "name": "string"
      },
      "id": "string",
      "customer_id": "string",
      "product_id": "string",
      "tier_id": "string",
      "source_kind": "string",
      "source_ref": "string",
      "grant_reason": "string",
      "settlement_id": "string",
      "valid_from": "string",
      "ends_at": "string",
      "end_reason": "string",
      "status": "string",
      "revocable": true,
      "granted_by": "string",
      "occurred_at": "string",
      "recorded_at": "string"
    }
  ],
  "cursor": "string",
  "total": 0,
  "facets": {
    "property1": {
      "property1": 0,
      "property2": 0
    },
    "property2": {
      "property1": 0,
      "property2": 0
    }
  }
}
```

- `items` (`listGrants.response.200.items`; array<object>, required)
  - `token_id` (`listGrants.response.200.items.token_id`; any of, required)
    - any of: `string`, `null`
  - `customer` (`listGrants.response.200.items.customer`; any of, required)
    - any of: `object`, `null`
  - `product` (`listGrants.response.200.items.product`; any of, required)
    - any of: `object`, `null`
  - `tier` (`listGrants.response.200.items.tier`; any of, required)
    - any of: `object`, `null`
  - `id` (`listGrants.response.200.items.id`; string, required)
  - `customer_id` (`listGrants.response.200.items.customer_id`; string, required)
  - `product_id` (`listGrants.response.200.items.product_id`; string, required)
  - `tier_id` (`listGrants.response.200.items.tier_id`; any of, required)
    - any of: `string`, `null`
  - `source_kind` (`listGrants.response.200.items.source_kind`; string, required)
  - `source_ref` (`listGrants.response.200.items.source_ref`; any of, required)
    - any of: `string`, `null`
  - `grant_reason` (`listGrants.response.200.items.grant_reason`; any of, required)
    - any of: `string`, `null`
  - `settlement_id` (`listGrants.response.200.items.settlement_id`; any of, required)
    - any of: `string`, `null`
  - `valid_from` (`listGrants.response.200.items.valid_from`; any of, required)
    - any of: `string`, `null`
  - `ends_at` (`listGrants.response.200.items.ends_at`; any of, required)
    - any of: `string`, `null`
  - `end_reason` (`listGrants.response.200.items.end_reason`; any of, required)
    - any of: `string`, `null`
  - `status` (`listGrants.response.200.items.status`; string, required) — Where it stands now: not begun, standing, or how it ended.
  - `revocable` (`listGrants.response.200.items.revocable`; boolean, required) — Whether `revokeGrant` may still end it.
  - `granted_by` (`listGrants.response.200.items.granted_by`; any of, required)
    - any of: `string`, `null`
  - `occurred_at` (`listGrants.response.200.items.occurred_at`; any of, required)
    - any of: `string`, `null`
  - `recorded_at` (`listGrants.response.200.items.recorded_at`; any of, required)
    - any of: `string`, `null`
- `cursor` (`listGrants.response.200.cursor`; any of, required)
  - any of: `string`, `null`
- `total` (`listGrants.response.200.total`; number, optional)
- `facets` (`listGrants.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` (`listGrants.response.default.type`; string, required)
  - format `uri`
- `title` (`listGrants.response.default.title`; string, required)
- `status` (`listGrants.response.default.status`; integer, required)
- `detail` (`listGrants.response.default.detail`; string, required)
- `code` (`listGrants.response.default.code`; string, optional)
- `context` (`listGrants.response.default.context`; object, optional)
- `reached_core` (`listGrants.response.default.reached_core`; boolean, optional)
- `core_answer` (`listGrants.response.default.core_answer`; string, optional)


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