> For the complete documentation index, see [llms.txt](https://docs.licensespring.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.licensespring.com/management-api/license/list-licenses.md).

# List Licenses

**URL** : `/api/v1/licenses/`

**Method** : `GET`

#### Query parameters

**Ordering**

* `order_by` - Which attribute to order the list by.
  * default ordering is ascending, can be made descending by prefixing the attribute name with `-`
  * Example: `order_by=created_at`
  * Example: `order_by=-created_at`

**Pagination**

Default pagination is 20 results per page.

* `limit` - Number of results to return per page.
  * Example: `limit=20`
* `offset` - The initial index from which to return the results.
  * Example: `offset=21`

**Filtering**

The results can be filtered by various attributes on license or related to the license.

If available, additional suffixes can be appended to attributes which further define the filter:

1. `__startswith` - string value is a starting substring of the attribute
2. `__icontains` - string value is a substring of the attribute (case insensitive)

Possible filters:

* `id__in` - Comma separated list of ids.
  * Example: `id__in=1593781774572379,1597395059215709,1597395059216729`
* `license_key`
* `license_key__startswith`
* `license_key__icontains`
* `order__store_id`
* `order__store_id__startswith`
* `order__store_id__icontains`
* `company`
* `customer_id`
* `customer_email`
* `customer_email__icontains`
* `customer_company_name__icontains`
* `customer__reference__icontains`
* `customer_name__icontains`
* `product_id`
* `product_name__icontains`
* `note__icontains`
* `license_users__id`
* `license_users__true_email`
* `license_users__true_email__icontains`
* `product_features__id`
* `license_key__isnull`
* `is_any_floating`
* `validity_period__gt`
* `validity_period__gte`
* `validity_period__lt`
* `validity_period__lte`
* `time_activated__gt`
* `time_activated__gte`
* `time_activated__lt`
* `time_activated__lte`
* `time_activated__date__gt`
* `time_activated__date__gte`
* `time_activated__date__lt`
* `time_activated__date__lte`
* `updated_at__gt`
* `updated_at__gte`
* `updated_at__lt`
* `updated_at__lte`
* `updated_at__date__gt`
* `updated_at__date__gte`
* `updated_at__date__lt`
* `updated_at__date__lte`
* `enabled`
* `manager__true_email`
* `manager__true_email__icontains`
* `customer__account`
* `customer__account__name`
* `customer__account__name__icontains`
* `customer__account__code`
* `customer__account__code__icontains`
* `customer__account__description`
* `customer__account__description__icontains`
* `customer__account__phone`
* `customer__account__phone__icontains`
* `customer__account__address`
* `customer__account__address__icontains`
* `customer__account__email`
* `customer__account__email__icontains`
* `customer__account__reference`
* `customer__account__reference__icontains`
* `subscription_id`
* `license_template__code`
* `license_template__code__icontains`
* `license_user_group`
* `is_in_overage`
* `consumption_pool`

#### Success Response

**Code** : `200 OK`

**Content examples** :

```json
{
    "count": 54,
    "next": "http://saas.licensespring.com/api/v1/licenses/?limit=20&offset=20",
    "previous": null,
    "results": [
        {
            "id": 1593781720493289,
            "status": "Inactive",
            "floating_in_use_devices": 0,
            "customer": {
                "id": 620,
                "total_orders": 14,
                "total_licenses": 45,
                "labels": [
                    {
                        "id": 3,
                        "label_id": 8,
                        "label": "Customer",
                        "color": "#ff9f43"
                    },
                    {
                        "id": 53,
                        "label_id": 34,
                        "label": "Loyal",
                        "color": "#3a0cd4"
                    }
                ],
                "email": "tc@tc.com",
                "first_name": "",
                "last_name": "",
                "company_name": "",
                "phone": "",
                "reference": "",
                "address": "",
                "postcode": "",
                "city": "",
                "country": "",
                "state": "",
                "clabels_all": "customerloyal",
                "cognito_user_pool_id": "",
                "metadata": {},
                "company": 277,
                "license_user": null,
                "clabels": [
                    8,
                    34
                ]
            },
            "product_features": [
                {
                    "id": 1596179495925542,
                    "product_feature": {
                        "id": 173,
                        "created_at": "2020-09-14T11:17:43Z",
                        "updated_at": "2020-09-14T11:17:43Z",
                        "name": "Feature 3",
                        "code": "f3",
                        "is_deleted": false,
                        "feature_type": "consumption",
                        "max_consumption": 2,
                        "allow_overages": false,
                        "max_overages": 0,
                        "reset_consumption": false,
                        "consumption_period": null,
                        "metadata": {}
                    },
                    "max_consumption": 30,
                    "total_consumptions": 0,
                    "expiry_date": null,
                    "allow_overages": false,
                    "max_overages": 99,
                    "reset_consumption": false,
                    "consumption_period": null,
                    "metadata": {},
                }
            ],
            "product_custom_fields": [],
            "license_users": [
                {
                    "id": 1240,
                    "last_login": null,
                    "email": "example@email.com|uss1",
                    "true_email": "example@email.com",
                    "created_at": "2020-08-12T08:52:32Z",
                    "updated_at": "2020-08-12T09:01:24Z",
                    "is_admin": {},
                    "is_active": true,
                    "is_staff": false,
                    "first_name": "John",
                    "last_name": "Doe",
                    "phone_number": "00385913109161",
                    "subscribed_to_email": false,
                    "acquired_consent": null,
                    "is_manager": false,
                    "initial_password": "4q3dg7!_",
                    "is_initial_password": true
                }
            ],
            "order_store_id": "d2d2dce02c844d4492c9d48758aa143a",
            "active_up_to_date_devices": 0,
            "total_active_devices": 0,
            "product": {
                "id": 1584723961091234,
                "product_name": "mch"
            },
            "created_at": "2020-07-03T13:08:40Z",
            "updated_at": "2020-10-15T13:40:26Z",
            "license_key": null,
            "active": false,
            "enabled": true,
            "time_activated": "2020-10-10T14:42:16Z",
            "time_disabled": "2020-08-14T07:26:27Z",
            "max_activations": 6,
            "times_activated": 0,
            "valid_duration": null,
            "validity_period": "2020-09-30",
            "license_type": "perpetual",
            "enable_maintenance_period": true,
            "maintenance_duration": "3m",
            "maintenance_period": "2021-01-10",
            "is_trial": true,
            "max_consumptions": 0,
            "total_consumptions": 0,
            "subscription_id": null,
            "last_check": null,
            "prevent_vm": true,
            "allow_overages": false,
            "max_overages": 0,
            "reset_consumption": false,
            "consumption_period": null,
            "trial_days": 0,
            "is_floating": false,
            "is_floating_cloud": true,
            "floating_users": 1,
            "note": null,
            "max_license_users": 0,
            "transfer_count": 0,
            "floating_timeout": null,
            "max_transfers": 0,
            "had_previous_consumptions": false,
            "is_air_gapped": false,
            "can_borrow": false,
            "max_borrow_time": 0,
            "is_bundle": false,
            "metadata": {},
            "order": 1593781720493279,
            "order_item": 1593781720493299,
            "disabled_user": null,
            "last_activation_device": null,
            "consumption_pool": null
        },
        ...
    ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.licensespring.com/management-api/license/list-licenses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
