---
title: "Pages the customer's licenses of a software product, the live one and the ones it replaced, newest first, each with its key and status."
---

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

`GET /v1/stores/{store}/products/{product}/licenses`

## Authentication

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

## Path parameters

- `store` (`listLicenses.path.store`; string, required) — A hostname of the store.
- `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)
  - one of `"created"`
- `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)

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

Pages the customer's licenses of a software product, the live one and the ones it replaced, newest first, each with its key and status.

#### Example

```json
{
  "total": 0,
  "items": [
    {
      "id": "string",
      "product_id": "string",
      "key": "string",
      "status": "string",
      "expires_at": "string",
      "activation_limit": 0,
      "activations": {
        "count": 0,
        "limit": 0
      },
      "replaced_by": "string",
      "created_at": "string"
    }
  ],
  "cursor": "string"
}
```

- `items` (`listLicenses.response.200.items`; array<object>, required)
  - `id` (`listLicenses.response.200.items.id`; string, required)
  - `product_id` (`listLicenses.response.200.items.product_id`; string, required)
  - `key` (`listLicenses.response.200.items.key`; any of, required) — The key the customer enters in the software; null to staff acting as the customer.
    - any of: `string`, `null`
  - `status` (`listLicenses.response.200.items.status`; string, required)
  - `expires_at` (`listLicenses.response.200.items.expires_at`; any of, required) — When access ends, or ended; null for lifetime access.
    - any of: `string`, `null`
  - `activation_limit` (`listLicenses.response.200.items.activation_limit`; any of, required) — How many devices it activates at once: its own limit, else its tier's, else its product's; null for no limit.
    - any of: `number`, `null`
  - `activations` (`listLicenses.response.200.items.activations`; object, required) — The devices it counts now and the most it may hold.
    - `count` (`listLicenses.response.200.items.activations.count`; number, required)
    - `limit` (`listLicenses.response.200.items.activations.limit`; any of, required)
      - any of: `number`, `null`
  - `replaced_by` (`listLicenses.response.200.items.replaced_by`; any of, required) — The license whose key took this one's place; null until it is replaced.
    - any of: `string`, `null`
  - `created_at` (`listLicenses.response.200.items.created_at`; string, required)
- `cursor` (`listLicenses.response.200.cursor`; any of, required)
  - any of: `string`, `null`
- `total` (`listLicenses.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` (`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/customer-api/reference/list-licenses/index.md
