---
title: "Pages a software product's licenses, their keys shortened to their last characters."
---

> 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}/products/{product}/licenses`

## Authentication

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

## Path parameters

- `store` (`listLicenses.path.store`; string, required) — The store's id.
- `product` (`listLicenses.path.product`; string, required) — An id, or `slug:<slug>`.
  - minLength 1

## Query parameters

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

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Pages a software product's licenses, their keys shortened to their last characters.

#### Example

```json
{
  "items": [
    {
      "activations": {
        "count": 0,
        "limit": 0
      },
      "key_ending": "string",
      "tier": {
        "id": "string",
        "name": "string",
        "rank": 0
      },
      "customer": {
        "id": "string",
        "name": "string",
        "email": "string",
        "phone": "string",
        "erased": true
      },
      "id": "string",
      "product_id": "string",
      "customer_id": "string",
      "source": "string",
      "status": "string",
      "expires_at": "string",
      "reason": "string",
      "has_access": true,
      "activation_limit": 0,
      "uses": 0,
      "metadata": {
        "property1": true,
        "property2": true
      },
      "created_at": "string",
      "disabled_at": "string",
      "disabled_reason": "string",
      "replaced_by": "string",
      "last_verified_at": "string"
    }
  ],
  "cursor": "string",
  "total": 0,
  "facets": {
    "property1": {
      "property1": 0,
      "property2": 0
    },
    "property2": {
      "property1": 0,
      "property2": 0
    }
  }
}
```

- `items` (`listLicenses.response.200.items`; array<object>, required)
  - `activations` (`listLicenses.response.200.items.activations`; object, required) — The devices it counts now and the most it may hold, its own limit, else its tier's, else its product's; `limit` null when nothing limits it.
    - `count` (`listLicenses.response.200.items.activations.count`; number, required)
    - `limit` (`listLicenses.response.200.items.activations.limit`; any of, required)
      - any of: `number`, `null`
  - `key_ending` (`listLicenses.response.200.items.key_ending`; string, required) — The key's last characters, so a support reply can name it; `getLicense` answers it whole.
  - `tier` (`listLicenses.response.200.items.tier`; any of, required) — The tier its access opens, else the one it last opened; null for access with no tier.
    - any of: `object`, `null`
  - `customer` (`listLicenses.response.200.items.customer`; any of, required)
    - any of: `object`, `null`
  - `id` (`listLicenses.response.200.items.id`; string, required)
  - `product_id` (`listLicenses.response.200.items.product_id`; string, required)
  - `customer_id` (`listLicenses.response.200.items.customer_id`; string, required)
  - `source` (`listLicenses.response.200.items.source`; string, required)
  - `status` (`listLicenses.response.200.items.status`; string, required) — Where it stands now: `active`, `expired`, `revoked`, `disabled` or `replaced`.
  - `expires_at` (`listLicenses.response.200.items.expires_at`; any of, required) — When access ends; null while it never does.
    - any of: `string`, `null`
  - `reason` (`listLicenses.response.200.items.reason`; any of, required) — Why it reads its status: `replaced`, `disabled`, `lapse`, `refund` or `revoke`; null while active, or before any access began.
    - any of: `string`, `null`
  - `has_access` (`listLicenses.response.200.items.has_access`; boolean, required) — Whether its holder has access now, whatever its status; false before access begins.
  - `activation_limit` (`listLicenses.response.200.items.activation_limit`; any of, required)
    - any of: `number`, `null`
  - `uses` (`listLicenses.response.200.items.uses`; number, required)
  - `metadata` (`listLicenses.response.200.items.metadata`; map<any of>, required)
  - `created_at` (`listLicenses.response.200.items.created_at`; any of, required)
    - any of: `string`, `null`
  - `disabled_at` (`listLicenses.response.200.items.disabled_at`; any of, required)
    - any of: `string`, `null`
  - `disabled_reason` (`listLicenses.response.200.items.disabled_reason`; any of, required)
    - any of: `string`, `null`
  - `replaced_by` (`listLicenses.response.200.items.replaced_by`; any of, required)
    - any of: `string`, `null`
  - `last_verified_at` (`listLicenses.response.200.items.last_verified_at`; any of, required)
    - any of: `string`, `null`
- `cursor` (`listLicenses.response.200.cursor`; any of, required)
  - any of: `string`, `null`
- `total` (`listLicenses.response.200.total`; number, optional)
- `facets` (`listLicenses.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` (`listLicenses.response.default.type`; string, required)
  - format `uri`
- `title` (`listLicenses.response.default.title`; string, required)
- `status` (`listLicenses.response.default.status`; integer, required)
- `detail` (`listLicenses.response.default.detail`; string, required)
- `code` (`listLicenses.response.default.code`; string, optional)
- `context` (`listLicenses.response.default.context`; object, optional)
- `reached_core` (`listLicenses.response.default.reached_core`; boolean, optional)
- `core_answer` (`listLicenses.response.default.core_answer`; string, optional)


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