---
title: "Pages the customer's grants of access."
---

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

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

## Authentication

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

## Path parameters

- `store` (`listGrants.path.store`; string, required) — A hostname of the store.

## 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)

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Pages the customer's grants of access.

#### Example

```json
{
  "total": 0,
  "items": [
    {
      "tier": {
        "id": "string",
        "product_id": "string",
        "rank": 0,
        "name": "string"
      },
      "id": "string",
      "product_id": "string",
      "tier_id": "string",
      "source_kind": "string",
      "valid_from": "string",
      "ends_at": "string",
      "end_reason": "string",
      "status": "string"
    }
  ],
  "cursor": "string"
}
```

- `items` (`listGrants.response.200.items`; array<object>, required)
  - `tier` (`listGrants.response.200.items.tier`; any of, required)
    - any of: `object`, `null`
  - `id` (`listGrants.response.200.items.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)
  - `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.
- `cursor` (`listGrants.response.200.cursor`; any of, required)
  - any of: `string`, `null`
- `total` (`listGrants.response.200.total`; number, optional)

### default

A problem; see https://api.sherpo.io/customer/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/customer-api/reference/list-grants/index.md
