# Licenses model

The iSHARE Framework contains the concept of [Licenses](https://framework.ishare.eu/detailed-descriptions/functional/licenses) to allow an Entitled Party to explicitly specify what a Service Consumer is allowed to do with the consumption of a service or with received data. "Licenses" is an attribute which is included in the specifications for the [/delegation endpoint](/version-2.2/authorisation-registry-role/delegation-endpoint.md) (providing delegation evidence) and the [/delegationPolicy endpoint](/version-2.2/authorisation-registry-role/delegation-policy.md) (to request the creation of delegation policies). The licenses attribute can be utilised to define one or more licenses that apply to the outcome of a service (data) consumption. The following scenarios are recognised.

## Single license

Only one license applies. This can be achieved by including one license identifier in the licenses attribute. The following example explains how.

### Example: the received service (data) output may be used for internal use only

```json
{
    "licenses": [
        "https://licenses.ishare.eu/general-internal-use/1.0"
    ]
}
```

## Multiple licenses

Multiple licenses apply. To determine how the licenses relate to each other, it is possible to use the logical operators allOf and anyOf.

* This model allows for infinite nesting
* Best practice is to group licenses from the same category together

The following examples explain how this can be applied.

### Example: the received service (data) output may be used internally or to service an Entitled Party

```json
{
  "licenses": [
    {
      "anyOf": [
        "https://licenses.ishare.eu/general-internal-use/1.0",
        "https://licenses.ishare.eu/general-use-to-service-entitled-party/1.0"
      ]
    }
  ]
}
```

### Example: the received service (data) output may be used internally in the Netherlands or Belgium

```json
{
  "licenses": [
    {
      "allOf": [
        "https://licenses.ishare.eu/general-non-commercial-use/1.0",
        {
          "anyOf": [
            "https://licenses.ishare.eu/country/nl/1.0",
            "https://licenses.ishare.eu/country/be/1.0"
          ]
        }
      ]
    }
  ]
}

```

### Example: the received service (data) output may be reshared with iSHARE adhering parties in the Netherlands or Belgium that are ISO27001 certified

```json
{
  "licenses": [
    {
      "allOf": [
        "https://licenses.ishare.eu/general/resharing-with-adhering-parties/1.0",
        {
          "allOf": [
            {
              "anyOf": [
                "https://licenses.ishare.eu/country/nl",
                "https://licenses.ishare.eu/country/be"
              ]
            },
            "https://licenses.ishare.eu/certification-iso-27001/1.0"
          ]
        }
      ]
    }
  ]
}

```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://dev.ishare.eu/version-2.2/licenses-model.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
