Skip to content

List Competitors

Licence Type

List Competitors API request returns the list of the competitors for specific resource.

Request

Endpoint

GET /v4/account/{account_id}/{resource_type}/{resource_id}/competitors

Path Parameters

Name                       Description Type Examples
*{account_id} Provided identifier of the account. string
*{resource_type} Identifier of the type of the resource to associate the competitor to. string poi
*{resource_id} Identifier of the resource to associate the competitor to.
Value obtainable from $.results[*].resource.id field of List Licences Response Body.
string XXeUNbmtYZTsH7UGvNfXWo
Supported values for {resource_type}
  • poi

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
page The page number shown in the response. int 1
page_size The size of each page in the response in the range [1, 100]. int 25
Example
curl -X GET 'https://api.datappeal.io/v4/licence/account/{account_id}/poi/HF8xjSQW4W43NGr56denSh/competitors' \
-H 'x-api-key: {x_api_key}' \
-H 'Authorization: Bearer {jwt_bearer}' \

Response

Status

Status Description
200 List Competitors data has been successfully returned.

Body

Competitors

Field Description Type
*results Paginated list of competitors for the specified {account_id}. array[Competitor]
paging Response pagination Paging
Competitor
Field Description Type Examples
*id Hashed identifier of the competitor. string UiCazu2MtzMGeXagvnxXi6
*resource_type Identifies the type of resource of the competitor. string poi
*name Description of the competitor. string Santa Claus Village
*address Textual address of the competitor along with its spatial coordinates. Address
Address
Field Description Type Examples
*fullAddress Textual address. string Joulumaantie 1, 96930 Rovaniemi, Finland
*latitude Latitude expressed in the range [-90, 90]. decimal 66.54362
*longitude Longitude expressed in the range [-180, 180]. decimal 25.847197
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": "UiCazu2MtzMGeXagvnxXi6",
            "type": "poi",
            "name": "Santa Claus Village",
            "address": {
                "fullAddress": "Joulumaantie 1, 96930 Rovaniemi, Finland",
                "latitude": 66.54362,
                "longitude": 25.847197
            }
        },
        {
            "id": "55aRjEydEKfNRgzpx66dW4",
            "type": "poi",
            "name": "Tower Bridge",
            "address": {
                "fullAddress": "Tower Bridge, Tower Bridge Rd, London SE1 2UP, UK",
                "latitude": 51.505455,
                "longitude": -0.0753565
            }
        },
        {
            "id": "6sXHdm39xxDwYCUjtK867T",
            "type": "poi",
            "name": "Parthenon",
            "address": {
                "fullAddress": "Dionysiou Areopagitou 1, Athina 117 42, Greece",
                "latitude": 37.971527,
                "longitude": 23.726717
            }
        },
        {
            "id": "TUUV97E33YwzaGWCNwUVg9",
            "type": "poi",
            "name": "Berlin Wall Memorial",
            "address": {
                "fullAddress": "Berlin Wall Memorial, Bernauer Str. 111, 13355 Berlin, Germany",
                "latitude": 52.535053,
                "longitude": 13.39019
            }
        },
        {
            "id": "UdmS1Jpa7RdLqTVLntyDSk",
            "type": "poi",
            "name": "Wet'n'Wild Gold Coast",
            "address": {
                "fullAddress": "Pacific Mwy, Oxenford QLD 4210, Australia",
                "latitude": -27.91475,
                "longitude": 153.31757
            }
        }
    ],
    "paging": {
        "last": "/34/poi/HF8xjSQW4W43NGr56denSh/competitor?page=1&page_size=25",
        "first": "/34/poi/HF8xjSQW4W43NGr56denSh/competitor?page=1&page_size=25",
        "prev": null,
        "next": null,
        "current": "/34/poi/HF8xjSQW4W43NGr56denSh/competitor?page=1&page_size=25",
        "pages": [
            {
                "number": 1,
                "uri": "/34/poi/HF8xjSQW4W43NGr56denSh/competitor?page=1&page_size=25"
            }
        ],
        "elements": [
            1,
            2,
            3,
            4,
            5
        ],
        "total": 5,
        "size": 25
    }
}