Skip to content

List Licences

Licence Type

List Licences API returns the list of licences for a specific account.

Request

Endpoint

GET /v4/account/{account_id}/licences

Path Parameters

Name                       Description Type Examples
*{account_id} Provided identifier of the account. string

Header Parameters

Name                          Description Type Examples                         
*x-api-key Provided API key {x_api_key} that allows authentication. string
*Authorization Provided token {jwt_bearer} that allows authorization. string Bearer {jwt_bearer}

Query Parameters

Name Description Type Default Examples
resource_id Filter licences by associated $.results[*].resource.id string VTH4JuXB19fjk3ueS8Ab1B
licence_type Filter licences by $.results[*].licence_type string BASIC
PRO
PREMIUM
ADDON
associated Filter licences by associated (or not associated) to a resource. boolean true
false
page Requested page number for paginated results. int 1
page_size Requested page size for paginated results in the range [1, 100]. int 25
Example
curl -X GET 'https://api.datappeal.io/v4/account/{account_id}/licences?page_size=8' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \

Response

Status

Status Description
200 Licences data has been successfully returned.

Body

Licences

Field Description Type
*results Paginated list of licences for the specified account. array[Licence]
paging Response pagination. Paging
Licence
Field Description Type Examples
*id Hashed identifier of the licence. string TaCHzVBE4T1kddekrMTf1v
*licence_type Identifies the type of the licence. string BASIC
PRO
PREMIUM
ADDON
licence_feature Specifies the feature added by the add-on, only for "licence_type": "ADDON". string RATES
feature_detail Indicates a feature specific detail, may be valorized only when "licence_feature" is not null. string
resource Identifies the resource associated with the licence;
"resource": null indicates a spare licence which is available to be associated.
AssociatedResource
AssociatedResource
Field Description Type Examples
*id Hashed identifier of the associated resource, e.g. a {poi_id}. string EujqFHQra7ypyuBEgyFiXw
*name Description of the resource. string Circus Maximus
Paging
Field Description Type
last A relative URI to the last page. string
first A relative URI to the first page. string
prev A relative URI to the previous page. string
next A relative URI to the next page. string
current A relative URI to the current page. string
pages A set of relative URIs calculated around the current page. Page
elements All indexes shown on the current page. array[int]
total The number of all elements that API can retrieve. int
size The selected page size. int
Page
Field Description Type
number Number of the page. int
uri URI of the page. string
Example
{
  "results": [
    {
      "id": "Rk9FHzP2K1Hzq6kuvSJQZq",
      "licence_type": "PRO",
      "licence_feature": null,
      "feature_detail": null,
      "resource": {
        "id": "VTH4JuXB19fjk3ueS8Ab1B",
        "name": "Annex Rinascente Milano"
      }
    },
    {
      "id": "MbSKe3NvurBPFKHcCKUTXK",
      "licence_type": "PRO",
      "licence_feature": null,
      "feature_detail": null,
      "resource": {
        "id": "HF8xjSQW4W43NGr56denSh",
        "name": "Circus Maximus"
      }
    },
    {
      "id": "WGvdGMiPCH3MXtVSXYwe1x",
      "licence_type": "PRO",
      "licence_feature": null,
      "feature_detail": null,
      "resource": {
        "id": "XXeUNbmtYZTsH7UGvNfXWo",
        "name": "Astoria Palace Hotel"
      }
    },
    {
      "id": "27vih4ZViet7PFX8WFjHBt",
      "licence_type": "PRO",
      "licence_feature": null,
      "feature_detail": null,
      "resource": {
        "id": "4qteE39mdoK9n1iDh55nmJ",
        "name": "All'antico Vinaio"
      }
    },
    {
      "id": "F3gAm6eJQE6Rq22WHoxQda",
      "licence_type": "ADDON",
      "licence_feature": "RATES",
      "feature_detail": null,
      "resource": null
    },
    {
      "id": "EkJkRmh7QMr38DgpNc6F82",
      "licence_type": "ADDON",
      "licence_feature": "RATES",
      "feature_detail": null,
      "resource": null
    },
    {
      "id": "Ara4zng3HcB5pEUvvKFFHG",
      "licence_type": "ADDON",
      "licence_feature": "RATES",
      "feature_detail": null,
      "resource": {
        "id": "XXeUNbmtYZTsH7UGvNfXWo",
        "name": "Astoria Palace Hotel"
      }
    },
    {
      "id": "Wk4WBVzUJDagozPquuyw7r",
      "licence_type": "ADDON",
      "licence_feature": "RATES",
      "feature_detail": null,
      "resource": null
    }
  ],
  "paging": {
    "last": "/7139/licences?page=2&page_size=8",
    "first": "/7139/licences?page=1&page_size=8",
    "prev": null,
    "next": "/7139/licences?page=2&page_size=8",
    "current": "/7139/licences?page=1&page_size=8",
    "pages": [
      {
        "number": 1,
        "uri": "/7139/licences?page=1&page_size=8"
      },
      {
        "number": 2,
        "uri": "/7139/licences?page=2&page_size=8"
      }
    ],
    "elements": [
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8
    ],
    "total": 12,
    "size": 8
  }
}