NAV
shell

Introduction

Welcome to the Civitist API documentation, a series of notes and instructions that outline the Civitist MVP API version 1.0.

The Civitist API is organized around REST. Our API has predictable resource-oriented URLs, accepts form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.

Use your off-the-shelf HTTP client or favorite REST client (we recommend Insomnia) to play around with API operations.

Environments

Currently, Civitist is deployed to staging environment only. Production is coming soon.

Environment Base URL
Staging https://civitist.wequbit.com

OAuth2 Client Credentials

All OAuth2 requests are executed on behalf of "OAuth2 Client". You may think of it as "Facebook App", which has own ID and Secret and is used to execute Facebook APIs.

Each environment has its own database, so client ids are different. Please find appropriate client IDs and secrets below.

Staging OAuth2 Client Credentials

Client Client ID Client Secret
Client Credentials 9278ad10-68b2-4dfb-8c79-5eb2851fa414 m0TyfGSZedYEbSWyLAG8dutAUhnPx9FgTmWNxFOO
Password Credentials 9278ad6d-f09f-4ba1-9408-f201894a8ddf znSdclz0zWzf0Rct3QvAw1fOBZfMmuXZ9vRSOJYj

Production OAuth2 Client Credentials

Coming soon...

Next step: head up to Authentication to learn how to authenticate with Civitist systems and sign your requests.

Authentication

The Civitist API uses OAuth2 to authenticate requests. We support two authentication grant types:

Access tokens issued during OAuth2 authentication have expiration times. API consumer is advised to keep track on those expiration dates and refresh tokens when needed.

The API operations specifications will list what grant type are required for each request.

To sign a request, simply include issued access token in the Auhtorization HTTP header in the format Authorization: [token_type] [access_token].

Client Credentials Grant Type

curl --request POST --url /api/oauth/token
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "grant_type=client_credentials"
    --data "client_id=[client_id]"
    --data "client_secret=[client_secret]"
    --data "scope=*"

The result of this operation would be issued access token.

{
  "token_type": "Bearer",
  "expires_in": 1296000,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI4ZjBiNWRlMi0wMDdjLTQ5MTQtOGQ1MS1mN2U0Y2VhYWZiNDYiLCJqdGkiOiIyNzM3MmEzNjQwMDgwYTQ0ZGZiNTEwZWVlNzllNmE3NmQ0MTdlNjc5NWUxNzgzYmQ2MmY4M2RmOGMwNDU0MmI4ZDEwMzVlMDRmOWZhZTE5NCIsImlhdCI6MTU3Mjc5MTQwNywibmJmIjoxNTcyNzkxNDA3LCJleHAiOjE1NzQwODc0MDcsInN1YiI6IiIsInNjb3BlcyI6WyIqIl19.Fag-kpZzTc-pPg0aF8IvERiT1NYDII9ehaQoc-9Vwi7DSUZqcvJ2_Sfckus8eJPcRtVKe3F45ii5W6PSj8KKo8MhADHFhJtTlMYb4JTeE2Ru5rms1irBWdJ_IlUUmpS7wrCp96agrMcnp54vJFDSzFszpJW2Z8388McS7Ko62MNsG5pXaW3CtqVaqQbxV-OJL43MVYIg9NukT7yBxlJnu7qUB4cIVUrCsql1frBL3BVHu0GKiXjMfBjuLNEunfCFLa9GPY1OnQAyjCMUdJsxUFOmCd3JVteHbybvpMpLeQ5Ooo0yhnX2umMEFx7wVadqCdHZoJuAeO_VrnXR_1p7fm3GKQuIGC9EliMU4nNLzL2Zt__4sIOe6pb35cnMMSg3HKFmTdybkrSKEW7BF16VeAbpwhPbnHyQo8ttVVkrmGWzEgKMZE58cREnlHVo5e6MOFXnbaQefOPTYX5Kub8Bdfqy54citBbElT7WKoFyLc5ix8MzCzFHoEpZK2jPPkhNdk8Xebvdi1MJVczVZSejRxifug3mDdHdCjWDCrCkyKIxkb9kWGrgv-b2JXqdvxhuROjL4hzjG2O_HKHb2IMYpp2mO4_ltSR3D_BldN2wwPra-yHmoC3W6a55Ch4kiihrqWZCGLMErNKjExNw7LkDQOKdRaSyHJU55P7460ftleA"
}

Issue OAuth2 client_credentials access tokens.

Request Signature

POST /api/oauth/token

Security

No signature required.

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
grant_type Yes Grant type used to issue access token.
client_id Yes Client ID used to issue access token.
client_secret Yes Client Secret used to issue access token.
scope Yes Scope(s) to include into access token.

Password Grant Type

curl --request POST --url /api/oauth/token
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "grant_type=password"
    --data "client_id=[client_id]"
    --data "client_secret=[client_secret]"
    --data "scope=*"
    --data "username=[username]"
    --data "password=[password]"

The result of this operation would be issued access token.

{
  "token_type": "Bearer",
  "expires_in": 1296000,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiI4ZjBiNWRjYi03M2U5LTQwMDYtYTU4MC1iNWUzYmZiYzQyMjEiLCJqdGkiOiI2OTc0MTlmYjM5MGM0NTBkMTQzOGIyYTc2MjIxYjZiN2JhNTlkOTNhNThiMzQwZmE5MWUxMTExOGVmYTdkMDNhOTEzZWFmZGQzNGFmZTUyYSIsImlhdCI6MTU3Mjc5MTQwOSwibmJmIjoxNTcyNzkxNDA5LCJleHAiOjE1NzQwODc0MDksInN1YiI6IjhmMGI2MDRlLWY5YjMtNGRmMC1iNzVlLWM2NWUxNWM2ZWRjMiIsInNjb3BlcyI6WyIqIl19.IUuTP7uvxAABBvICsxgw-HFoIlaSJ-JrkPg963t5I5WCdnXccWWkoNA9xVFhdnb380-z0E6EEAyU3pg3bnYcqgiC6ynm-Z-EUxXe0E5H6OCdRJqH3lmDT-YnY1-USw6lFXA_P7OPhwoernlSbMikxhCABCp2w4AdEBCxCM-Up3-quHQIRxUG9tP_8X9pq7qrHp4stiNU9PJQyDCIyAkQ3mhP7L8zoAmFj6nRT4C9nYXx218vFFvOA_Nf2DUdtCYi0sPRaddRoIhIn2Fib4xqttzkxfdZUIQc4yXj7b_p00J8HN3P9_Mkg5IOrHByrTigD0mmp1D8HFauieuZ8OK2oq3vgbgCzs6dq3JC3Ad-2vfctAMZGgRxk8Aig-a3E1AWpCM-8gIcTUYbRT_8o5yCA-1BTD6q8mmw08YeXhwbx9a0i2BM-R3mtXD0vSLJyirC-ZEyGMLHBikjUrVc91uYPYNW3OgU75Ai0hbKQgHmsMpDGdsEru1LDM01wIMtXaGlWwVfLsndtMsH8WeJqyswkw2mIU8JkjhTKH6UZLbWuKoHDG5p2u3Uh7-ZWjNdMC0Nf5TSYu9AhVLbembN13gdrj4xTH3tBBDcVT_g0MfwxKgQcLtBy8aVePBQI9fFI0IbKoSF2dGNHA0VFhsxIq1-q6tgMKezCrv3vNATQD52R9A",
  "refresh_token": "def502000f19e2a88bfe7c6461e8c7eec6e521a6dc69019d4f8abbadc94a6698fe4297a68487117524fd2a656949af74bbd1f76b616a1aaff0d0172003d69e873a03f1f538b8395b9694b2767e096051495c28b375801d6c114e0bfe41219e56b0dab014b3e9ba63dd51434c25a36fa2f28e432ee8d49a6e58853869268f2b1fef4c51065c4036524af56f118b2781719c8c06f048a5346764c73dc2b15438beaa3e1c3a2b0bafbf78a0d8d1596748b5801bc928064df4e82e6c629b6423150e1efcd94bb463dc6a0ab2e5025d16d11e7c9912b914ea619be1b87b5f1727c6dc5ea4217e6943faa1ce6d9ba26a07b6849df2aa0bbd4de210af3dc8f8b52a2412e8808ff7ecb81e6425ebc1b6de48f52b1b04939da8e804b6215e66676001a341c02ac200bbe67406507fb177b9987dec38f227c97c4e739caf0ba648849bbe3f473e992fdd5ee9b3c40f866d80bf2b08bd269e9371a80c77105e5edfa603430071b36c6c2a7ae89c8c1ca6cd053bf1f5a6ebe478ee4c35a9196cec9330e59f1b49cdf5d2bbace08d7b287d9125ab900ed3783fe44fc02bda2f58722a6ab10a2c072d5d9bd79ceb40e6c6c6c1"
}

Issue OAuth2 client_credentials access tokens. When using password grant type, a refresh token would be issued along with access code.

You may use refresh token to issue new access token at any time it is valid for.

Request Signature

POST /api/oauth/token

Security

No signature required.

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
grant_type Yes Grant type used to issue access token.
client_id Yes Client ID used to issue access token.
client_secret Yes Client Secret used to issue access token.
scope Yes Scope(s) to include into access token.
username Yes Username of the authenticating user.
password Yes Password of the authenticating user.

Refresh Token Grant Type

curl --request POST --url /api/oauth/token
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "grant_type=refresh_token"
    --data "client_id=[client_id]"
    --data "client_secret=[client_secret]"
    --data "scope=*"
    --data "refresh_token=[refresh_token]"

The result of this operation would be issued access token.

{
  "token_type": "Bearer",
  "expires_in": 1296000,
  "access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6ImJkNDU2MjJjNjIxMjI4NmYxMDNjODc0NDk5NDFkYmRkNTBjNTY3Njc1ZmE0NTI5YjEzNzQ4MjJjYjc0YTY3M2IzMjZkNzlhNWRlNmMzZjcxIn0.eyJhdWQiOiI4ZWY1MDZhYy04NmYxLTQ5OWUtODQ2NS1hMjczYmZkNTdlMjEiLCJqdGkiOiJiZDQ1NjIyYzYyMTIyODZmMTAzYzg3NDQ5OTQxZGJkZDUwYzU2NzY3NWZhNDUyOWIxMzc0ODIyY2I3NGE2NzNiMzI2ZDc5YTVkZTZjM2Y3MSIsImlhdCI6MTU3MTgzNTMwNiwibmJmIjoxNTcxODM1MzA2LCJleHAiOjE1NzMxMzEzMDYsInN1YiI6IjhlZjUyNDc0LTdlOGItNGYxMy1iZmY4LTA3MTg2ZDdjZjhjZSIsInNjb3BlcyI6WyIqIl19.k_AIKlboJoKXZTznyBHxc0ziLfm7AFBO7GWtfBAySuJy6bHSu2o5dwUfsWJb6savG-uN4-N0h-Qe7hn0R4Qh8hcOjpDuvMtNoATjG_fMpGNJ1X3XePb81a6PPl87BjzB2scYi_wg3x0Lil2qMhcIEbMyldFoIkFm2uOXylAeAAhk_mLsCAAeRUloRD7-NABKESmt61dlea1_XKEB1HdvAWA0BXf7aVfIq7UNaFc2eAdD6J1AHFYNDUfDlnsNQTabTOdViC4iBkHmScvWvO0Rpkuqw0iAhAMTGy-fWTneNNpAUEdpLds2i716VKnrCLs3zyjT0WArrxbCcKDLWF9-dPbFM5Tvn3uFiAT7DOJia-rs-Rx7UhmnFFI-dlf8-ZydiuML1lGAbKUP5ZkKE67ZJwhwwlXTJGq_czHc-I3tx1zlNeE4DV8ypgqn4s9K7RTuNSyGvm5g0ayXgOcSjSANVhEknEDqPSlhO46P86v6-0Stqh8CtPJGBJwrEHT8VqiJdTm5WPzZ3RKCrvZQQYXStT31_nNgWzqEyOInLHRzHZUITkIH9488U5E5kUGJ4Ip4HEGY-VqnKlhvt0qIfMOOD8hjkU8INmCWfZKVVeQEpQ0DL2DPFjCAOHtVgTqnr_xz2Ku9ZCDyFKbga7-wVmRRBnYoYOsxJmgLXBzciMagaKc",
  "refresh_token": "def502009ad0123a7ca83ef8c872b6932c2cfef2f9bc833cbf4d3d2e7055b64c07de0fd4c5d5c9a04f2c317b0043f8ed41ab606c06e380378b15c988775e79020d32c87e80e4ae482649a1e4b226507c41bf5be7956b6b1292a7925d284f7575b12ae3f88ccaba87a3dbbb04afee6053e302b6e1b89ac1a5fcd29e3fad18dba79474bafccb34abe715c714f7f95ed49f83f232cfc055b976107b3ef6f05912b0b427a513ec7405723ea6455d96156979fbe0391f1e4653bea44afa0203b034cdd3048ff7e4b704055165b6f6113aedaea75693f02906f68470a6a1d89c7f513d185891e7fbdc27c0ee4e5b7c665b6de7ba76e2d35435157b8dc907bc54da8cfda449590514b4d6947d37cf2f2a0e9f915669d566db279044c23b024282e8853a1e8f7779c5e3e36ce7d7cb227557f7ef1176fcaa27992aba1521aca21e487d41efa18bf5621cce6eea5624e402fc42b10891a10fbcc53862e2cf9c55d692cb2ba413e8cda4b7c42478edf72d3803250258697f812d629c288dc30230245e6306c29d2b81932657d3a90d7a2a0dc698a946a1bd349a0bd2e40079cc88bc46de2bb82032b80df62faae1781ade"
}

Exchange refresh token for a new access token with extended expiry time.

Request Signature

POST /api/oauth/token

Security

No signature required.

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
grant_type Yes Grant type used to issue access token.
client_id Yes Client ID used to issue access token.
client_secret Yes Client Secret used to issue access token.
scope Yes Scope(s) to include into access token.
refresh_token Yes Refresh token you got when user authenticated using "password" grant type.

Next step: head up to Errors to learn how to handle errors.

Errors

Civitist uses conventional HTTP response codes to indicate the success or failure of an API request.

The Civitist API uses the following error codes:

Error Code Meaning
400 Bad Request -- Your request is invalid.
401 Unauthorized -- Your request is unauthorized. Usually indicates a problem with access token.
403 Forbidden -- You're not authorized to execute given request. Usually indicates a problem with permissions.
404 Not Found -- The specified resource couldn't be found. Usually indicates either problem with URL or record with provided ID was not found.
405 Method Not Allowed -- You have submitted request with wrong HTTP verb.
406 Not Acceptable -- You requested a format that isn't supported.
409 Conflict -- You requested conflicting change on a resource.
422 Unprocessable Entity -- Your request failed validation. Check the data you send us and the format.
500 Internal Server Error -- We had an internal problem with our server. These are rare.

Spatial

The are collection of methods to help build spatial functions in the clients apps. Civitist uses Spherical Mercator projection and calculates tiles based on it.

The algorithm makes tiles always square and unique-indexed. API consumer must use generated tiles to gather user votes/feedback, as it is essential all Civitist systems use same reference when it comes to tiles, coordinates and data attached to each tile.

The algorithm operates all over the world, but limited to [-85.051129, 85.051129] latitude ranges.

Grid for a Bounding Box

curl --request GET --url /api/spatial/mercator/grid/bounding-box.geojson
    --header "Authorization: [token_type] [access_token]"
    --data "left=[left]"
    --data "bottom=[bottom]"
    --data "right=[right]"
    --data "top=[top]"

The result of this operation would be valid GeoJSON document. Examples are too massive to embed in documentation, please see gist

Generate tiles grid for a bounding box. Learn more about Bounding Boxes and Quad Tiles.

Unlike other API operations, this operation will produce GeoJSON format, ready to be embedded in any supporting map provider.

Request Signature

GET /api/spatial/mercator/grid/bounding-box.geojson

Security

OAuth2 Client Credentials Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
left Yes Bounding box left (min longitude) bound.
bottom Yes Bounding box bottom (min latitude) bound.
right Yes Bounding box right (max longitude) bound.
top Yes Bounding box top (max latitude) bound.
Body Parameters

No body parameters.

Grid for a Buffer

curl --request GET --url /api/spatial/mercator/grid/buffer.geojson
    --header "Authorization: [token_type] [access_token]"
    --data "longitude=[longitude]"
    --data "latitude=[latitude]"
    --data "distance=[distance]"

The result of this operation would be valid GeoJSON document. Examples are too massive to embed in documentation, please see gist

Generate tiles grid for a center point and a buffer distance. This operation is useful to generate map tiles prior to map rendering, which allows smoother UX. Learn more about Bounding Boxes and Quad Tiles.

Unlike other API operations, this operation will produce GeoJSON format, ready to be embedded in any supporting map provider.

Request Signature

GET /api/spatial/mercator/grid/buffer.geojson

Security

OAuth2 Client Credentials Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
longitude Yes Central point longitude.
latitude Yes Central point latitude.
distance Yes Buffer distance in meters.
Body Parameters

No body parameters.

User Management

These are collection of methods to build sign-up, sign-in and password reset functions.

Get Current User

curl --request GET --url /api/user/me
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a user model.

{
  "response": {
    "id": "0123...",
    "display_name": "User",
    "is_verified": true,
    "email": "user@domain.dev",
    "language_code": "en",
    "gender": "male",
    "birth_year": 2000,
    "transport_types": [
      "bus",
      "car"
    ],
    "education": "high_school",
    "work_status": "self_employed",
    "political_views": "center",
    "annual_income": "125k..250k",
    "intro": "Intro text",
    "address": {
      "country_code": "au",
      "state": "nt",
      "city": "Darwin",
      "street": "Street 1",
      "postal_code": "00001"
    },
    "stats": {
      "votes": 32,
      "suggestions": 5,
      "reactions": 2
    },
    "user_meter": 666,
    "rank": 61,
    "my_hood_voted_categories_count": 2,
"files": [ { "id": "0123....ac36", "scope": "photo", "links": { "sizes": { "original": { "view": "/api/file/0123....ac36/view", "download": "/api/file/0123....ac36/download" }, "default": { "view": "/api/file/0123....ac36/view/default", "download": "/api/file/0123....ac36/download/default" } } } } ], "created_at": "2021-01-01 00:00:00", "updated_at": "2021-01-01 00:00:00" } }

You can use this operation to fetch user details connected to access token.

Request Signature

GET /api/user/me

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Get Sign-up Literals

curl --request GET --url /api/user/create?language_code=da
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of enumerations.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "genderOptions": {
      "male": "Mand",
      "female": "Kvinde",
      "non_binary": "Ikke-binær"
    },
    "languageCodeOptions": {
        "dk": "Dansk",
        "en": "Engelsk"
    },
"transportTypeOptions": { "foot": "Gåben", "bike": "Cykel", "electric_scooter": "Elektrisk scooter", "car": "Bil", "motorcycle": "Motorcykel", "bus": "Bus", "metro_light_rail": "Metro / Letbane", "train": "Tog", "wheelchair": "Kørestol" }, "educationOptions": { "none": "Ingen", "primary_school": "Folkeskole", "high_school": "Gymnasiel el. lign.", "industrial": "Erhvervsfaglig el. lign.", "bachelor": "Bachelorniveau", "candidate": "Kandidat", "doctor_of_philosophy": "PhD" }, "workStatusOptions": { "student": "Studerende", "unemployed": "Arbejdssøgende", "employee": "Lønmodtager", "self_employed": "Selvstændig", "early_retirement": "Førtidspensionist / efterløn", "pension": "Pernsioneret", "other": "Andet" }, "politicalViewsOptions": { "left": "Til venstre", "center_left": "Centrum-venstre", "center": "I centrum", "center_right": "Centrum-højre", "right": "Til højre" }, "annualIncomeOptions": { "..125k": "0 - 125.000", "125k..250k": "125 - 250.000", "250k..400k": "250 - 400.000", "400k..550k": "400 - 550.000", "550k..700k": "550 - 700.000", "700k..1000k": "700 - 1 mio.", "1000k..": "Over 1 mio." } } }

Civitist sign-up procedure involves number of enumerations (gender, occupation, education level, etc). You may get those enumerations using this operation.

Request Signature

GET /api/user/create?language_code={language_code}

Security

OAuth2 Client Credentials Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
language_code No Available language, default - "en"
Body Parameters

No body parameters.

Delete User

curl --request POST --url /api/user/delete
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "approve=1"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

After deletion, the user will be renamed to "Deleted account", email will be changed to "deleted_r4nd0m-str1n9@citychange.domain", and the password will be changed to random, thus all his actions will be saved, but the author will be displayed as "Deleted account".

Request Signature

POST /api/user/delete

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
approve Yes Mark of approvement from user.

Edit User Information

curl --request POST --url /api/user/edit
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "display_name=[display_name]"
    --form "language_code=[language_code]"
    --form "gender=[gender]"
    --form "birth_year=[birth_year]"
    --form "transport_types[[transport_types]"
    --form "transport_types[[transport_types]"
    --form "education=[education]"
    --form "work_status=[work_status]"
    --form "political_views=[political_views]"
    --form "annual_income=[annual_income]"
    --form "intro=[intro]"
    --form "photo@/path/to/file"
    --form "address[country_code]=[country_code]"
    --form "address[state]=[state]"
    --form "address[city]=[city]"
    --form "address[street]=[street]"
    --form "address[postal_code]=[postal_code]"
    --form "address[location][longitude]=[longitude]"
    --form "address[location][latitude]=[latitude]"

The result of this operation would be a user model.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "display_name": "Paul O'Reilly",
    "email": "paul@wequbit.com",
    "language_code": "da",
    "gender": "male",
    "birth_year": 1990,
    "transport_types": [
      "car",
      "bus"
    ],
    "education": "candidate",
    "work_status": "self_employed",
    "political_views": "center",
    "annual_income": "_..125k",
    "intro": "Hello, my name is Paul and I love beautiful cities!",
    "id": "8f0b604e-f9b3-4df0-b75e-c65e15c6edc2",
    "updated_at": "2019-11-03 14:10:32",
    "created_at": "2019-11-03 14:10:32",
    "file_photo": {
      "id": "8f0b604f-0f6c-4116-a4e3-956f868b7ec4",
      "scope": "photo",
      "links": {
          "sizes": {
              "original": {
                  "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view",
                  "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download"
              },
              "default": {
                  "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view/default",
                  "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download/default"
              }
          }
      }
    },
    "address": {
      "id": "8f0b604f-1855-4d65-96a1-af86f575474e",
      "country_code": "ua",
      "state": "Zaporozhskaya Oblast",
      "city": "Zaporozhye",
      "street": "Lenina avenue 122",
      "postal_code": "69006",
      "phone": null,
      "created_at": "2019-11-03 14:10:32",
      "updated_at": "2019-11-03 14:10:32"
    }
  }
}
Request Signature

POST /api/user/edit

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
display_name No User display name. Max length 255.
language_code No Available language, default - "en".
gender No User gender. Use value from enumeration.
birth_year No User birth year. Min 1900.
transport_types No Array of user transport types. Use values from enumeration.
education No User higher education level. Use value from enumeration.
work_status No User current work status. Use value from enumeration.
political_views No User political views. Use value from enumeration.
annual_income No User annual income. Use value from enumeration.
intro No User free-form intro text.
photo No Binary stream of user photo.
address.country_code No User country ISO2 code.
address.state No User state. Max length 255.
address.city No User city. Max length 255.
address.street No User street address. Max length 255.
address.postal_code No User postal code. Max length 255.
address.phone No User free-form phone number. Max length 255.
address.location.longitude Yes User address centroid location longitude.
address.location.latitude Yes User address centroid location latitude.

Get Current User Activities

curl --request GET --url /api/user/me/activity/{page}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of activities.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": [
        {
            "type": "vote_posted",
            "user": { USER_OBJECT },
            "centroid": [
                -0.37018775939941,
                39.4660832958
            ],
            "address": { ADDRESS_OBJECT },
            "action_date": "2021-05-07 11:13:57",
            "activity_id": "935f8d6a-...",
            "vote": {
                "user_id": "9304d2d1-...",
                "value": 2,
                "parameters_value": 1,
                "parameters": [
                    {
                        "id": "9278ab77-...",
                        "label": "Skønhed",
                        "value": 2
                    },
                    {
                        "id": "9278ab77-...",
                        "label": "Grønt",
                        "value": 0
                    }
                ],
                "quad_keys": [
                    "0331111312313100322310",
                    "0331111312313100322311",
                ],
                "vote_id": "f954c9b6-b107-4f8a-bee7-2b2fe8bc8118",
                "created_at": "2021-05-07 11:13:57",
                "updated_at": "2021-05-07 11:17:29",
                "parameters_comments": [
                    {
                        "id": "935f8e3e-...",
                        "comment": "Tile Grønt parameter comment",
                        "parameter_id": "9278ab77-...",
                        "is_liked": false,
                        "likes_count": 0,
                        "files": [{ FILE_OBJECT }]
                    },
                    {
                        "id": "935f8e6f-...",
                        "comment": "Tile Parkering parameter comment",
                        "parameter_id": "9278ab77-...",
                        "is_liked": false,
                        "likes_count": 0,
                        "files": [{ FILE_OBJECT }]
                    }
                ],
                "general_comments": [
                    {
                        "id": "935f8ead-...",
                        "comment": "Tile GENERAL comment",
                        "is_liked": false,
                        "likes_count": 0,
                        "files": [{ FILE_OBJECT }]
                    }
                ]
            },
            "vote_type": "tile",
            "comments_total": 6
        },
        {
            "type": "suggestion_posted",
            "user": { USER_OBJECT },
            "centroid": [
                12.566771507263,
                55.682738199181
            ],
            "address": { ADDRESS_OBJECT },
            "action_date": "2021-04-08 06:20:03",
            "activity_id": "9324cdc5-...",
            "suggestion": {
                "id": "923033bb-...",
                "user_id": "111111-...",
                "category_id": "8f0b5dba-...",
                "quad_keys": [
                    "1202100011123331121303"
                ],
                "title": "Developer suggestion",
                "description": "Developer suggestion",
                "created_at": "2020-12-07 16:07:20",
                "updated_at": "2020-12-07 16:07:20",
                "rating": 0,
                "votes_count": {
                    "total": 0,
                    "negative": 0,
                    "neutral": 0,
                    "positive": 0
                },
                "comments_count": 0,
                "is_follower": false,
                "followers_count": 0,
                "my_vote": -1,
                "is_liked": false,
                "likes_count": 0,
                "files": [{ FILE_OBJECT }]
                "user": { USER_OBJECT }
            },
            "suggestion_likes": 0,
            "suggestion_comments": 0
        },
        {
            "type": "comment_posted",
            "user": { USER_OBJECT },
            "centroid": [
                -0.36765575408936,
                39.466116426503
            ],
            "address": { ADDRESS_OBJECT },
            "action_date": "2021-04-02 13:19:14",
            "activity_id": "931951c6-...",
            "comment": {
                "id": "931951c6-...",
                "user_id": "92ee8d08-...",
                "suggestion_id": "92ee92fa-...",
                "comment": "Suggetion comment",
                "created_at": "2021-04-02 13:19:14",
                "updated_at": "2021-04-02 13:19:14",
                "is_liked": false,
                "likes_count": 0,
                "files": [{ FILE_OBJECT }]
            },
            "comment_type": "suggestion"
        },
{ "type": "like_posted", "user": { USER_OBJECT }, "centroid": [ 12.566771507263, 55.683802746837 ], "address": { ADDRESS_OBJECT }, "action_date": "2020-12-07 16:09:22", "activity_id": "931927ec-...",
"like": { "id": "92303476-...", "created_at": "2020-12-07 16:09:22", "updated_at": "2020-12-07 16:09:22" }, "target": { "id": "927e7bbc-817d-4df3-aeb6-5b8cdbce3bdf", "user_id": "927e706a-...", "parameter_id": "9278ab77-...", "quad_keys": [ "1202100011310100210220" ], "comment": "Test Comment", "value": 1, "created_at": "2021-01-15 13:03:14", "updated_at": "2021-01-15 13:03:20", "is_liked": true, "likes_count": 1, "files": [{ FILE_OBJECT }] "user": { USER_OBJECT } },
"like_type": "tile_comment" }, { "type": "like_posted", "user": { USER_OBJECT }, "centroid": [ -0.36688327789307, 39.466480862918 ], "address": { ADDRESS_OBJECT }, "action_date": "2021-04-01 14:03:35", "activity_id": "93175ea7-...", "like": { "id": "93175ea7-...", "created_at": "2021-04-01 14:03:35", "updated_at": "2021-04-01 14:03:35" }, "target": { "id": "92f6b3e9-...", "user_id": "92ee8d08-...", "suggestion_id": "92e73231-...", "comment": "Suggetion comment", "created_at": "2021-03-16 08:19:40", "updated_at": "2021-03-16 08:19:40", "is_liked": true, "likes_count": 1, "files": [{ FILE_OBJECT }], "user": { USER_OBJECT }, "suggestion": { "id": "92e73231-...", "user_id": "927aab66-...", "category_id": "9278ab77-...", "quad_keys": [ "0331111312313101221330", "0331111312313101221322" ], "title": "It’s another suggestion", "description": "Lorem ipsum dolor sit amet...", "created_at": "2021-03-08 14:19:31", "updated_at": "2021-03-08 14:19:31", "rating": 100, "votes_count": { "total": 1, "negative": 0, "neutral": 0, "positive": 1 }, "comments_count": 5, "is_follower": false, "followers_count": 1, "is_liked": false, "likes_count": 0, "files": [{ FILE_OBJECT }], "user": { FILE_OBJECT } } }, "like_type": "suggestion_comment" }, ... ] }

You can use this operation to fetch user details connected to access token.

Request Signature

GET /api/user/me/activity/{page}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
page Page number from 1 - latest activity.
Query Parameters

No query parameters.

Body Parameters

No body parameters.

Get Current User Actions

curl --request GET --url /api/user/me/actions
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of user actions.

{
    "response": {
        "vote": {
            "tile": null,
            "suggestion": {
                "type": "vote_posted",
                "user": {
                    "id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                    "display_name": "vadim",
                    "email": "vadim@site.com",
                    "gender": "male",
                    "birth_year": 2000,
                    "transport_types": [
                        "bus"
                    ],
                    "education": "none",
                    "work_status": "employee",
                    "political_views": null,
                    "annual_income": null,
                    "intro": null,
                    "created_at": "2020-12-24 15:26:07",
                    "updated_at": "2020-12-24 15:26:07"
                },
                "centroid": [
                    12.560591697693,
                    55.681576841418
                ],
                "address": {
                    "country_code": "au",
                    "state": "nt",
                    "city": "Darwin",
                    "street": "Evolution street 1",
                    "postal_code": "00001"
                },
                "action_date": "2020-12-28T14:57:34.000000Z",
                "activity_id": "925a5974-cbfa-444b-a2c5-f17273e6a534",
                "vote": {
                    "id": "925a5973-940b-40c7-93d2-ae85bbb6bba1",
                    "user_id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                    "suggestion_id": "8f298648-db8e-4b6a-9ef7-45cf34e1cbf8",
                    "value": 1,
                    "created_at": "2020-12-28 14:57:34",
                    "updated_at": "2020-12-28 14:57:34",
                    "suggestion": {
                        "id": "8f298648-db8e-4b6a-9ef7-45cf34e1cbf8",
                        "user_id": "8f1ecbb6-cd5e-4772-b4f5-042f1a87391f",
                        "category_id": "8f0b5dba-cfbd-4ee7-9e34-d281bb7ddb5a",
                        "quad_keys": [
                            "1202100011123330302303"
                        ],
                        "title": "mvvm",
                        "description": "Hvor Hjortøgade møder Skarøgade er der en mærkelig plads, der ikke rigtig kan bruges til noget. Jeg kunne tænke mig, at der blev opsat nogle picnic-bænke, så beboerne kan mødes her om sommeren. Fliser i stedet for grus ville også gøre området bedre.",
                        "created_at": "2019-11-18 13:51:33",
                        "updated_at": "2019-11-18 13:54:58",
                        "rating": 17,
                        "votes_count": {
                            "total": 3,
                            "negative": 2,
                            "neutral": 1,
                            "positive": 0
                        },
                        "comments_count": 10,
                        "is_follower": false,
                        "followers_count": 0,
                        "is_liked": false,
                        "likes_count": 0
                    }
                },
                "vote_comments": 10,
                "vote_type": "suggestion"
            },
            "parameters": null
        },
        "comment": {
            "tile": {
                "type": "comment_posted",
                "user": {
                    "id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                    "display_name": "vadim",
                    "email": "vadim@site.com",
                    "gender": "male",
                    "birth_year": 2000,
                    "transport_types": [
                        "bus"
                    ],
                    "education": "none",
                    "work_status": "employee",
                    "political_views": null,
                    "annual_income": null,
                    "intro": null,
                    "created_at": "2020-12-24 15:26:07",
                    "updated_at": "2020-12-24 15:26:07"
                },
                "centroid": [
                    12.511668205261,
                    41.879498870408
                ],
                "address": {
                    "country_code": "au",
                    "state": "nt",
                    "city": "Darwin",
                    "street": "Evolution street 1",
                    "postal_code": "00001"
                },
                "action_date": "2020-12-28T14:54:32.000000Z",
                "activity_id": "925a585d-e144-4a8f-88bd-b58ea42cfef9",
                "comment": {
                    "id": "925a585d-dc2f-4ecc-9da6-2e8bc2487977",
                    "user_id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                    "parameter_id": null,
                    "quad_keys": [
                        "1202322211300303301211"
                    ],
                    "comment": "message :D",
                    "created_at": "2020-12-28 14:54:32",
                    "updated_at": "2020-12-28 14:54:32",
                    "is_liked": true,
                    "likes_count": 1
                },
                "comment_type": "tile"
            },
            "suggestion": {
                "type": "comment_posted",
                "user": {
                    "id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                    "display_name": "vadim",
                    "email": "vadim@site.com",
                    "gender": "male",
                    "birth_year": 2000,
                    "transport_types": [
                        "bus"
                    ],
                    "education": "none",
                    "work_status": "employee",
                    "political_views": null,
                    "annual_income": null,
                    "intro": null,
                    "created_at": "2020-12-24 15:26:07",
                    "updated_at": "2020-12-24 15:26:07"
                },
                "centroid": [
                    -0.36756992340088,
                    39.46770668059
                ],
                "address": {
                    "country_code": "au",
                    "state": "nt",
                    "city": "Darwin",
                    "street": "Evolution street 1",
                    "postal_code": "00001"
                },
                "action_date": "2020-12-28T14:55:54.000000Z",
                "activity_id": "925a58da-eb04-4471-ad53-1479fc43a48d",
                "comment": {
                    "id": "925a58da-e7bb-4917-be25-51fbd69ab7d6",
                    "user_id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                    "suggestion_id": "8fe32995-b3a8-4ce1-bbcb-de301de8f236",
                    "comment": "message :D",
                    "created_at": "2020-12-28 14:55:54",
                    "updated_at": "2020-12-28 14:55:54",
                    "is_liked": true,
                    "likes_count": 1,
                    "suggestion": {
                        "id": "8fe32995-b3a8-4ce1-bbcb-de301de8f236",
                        "user_id": "8f57a155-d676-4059-9056-544b6c32f72b",
                        "category_id": "8f0b5dba-d2f8-4f7c-86e9-cd372b50c5cf",
                        "quad_keys": [
                            "0331111312313101200301"
                        ],
                        "title": "bl",
                        "description": "Hvor Hjortøgade møder Skarøgade er der en mærkelig plads, der ikke rigtig kan bruges til noget. Jeg kunne tænke mig, at der blev opsat nogle picnic-bænke, så beboerne kan mødes her om sommeren. Fliser i stedet for grus ville også gøre området bedre.",
                        "created_at": "2020-02-18 20:36:20",
                        "updated_at": "2020-02-18 20:36:20",
                        "rating": 0,
                        "votes_count": {
                            "total": 2,
                            "negative": 2,
                            "neutral": 0,
                            "positive": 0
                        },
                        "comments_count": 1,
                        "is_follower": false,
                        "followers_count": 0,
                        "is_liked": false,
                        "likes_count": 0
                    }
                },
                "comment_type": "suggestion"
            }
        },
        "like": {
            "tile_comment": {
                "type": "like_posted",
                "user": {
                    "id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                    "display_name": "vadim",
                    "email": "vadim@site.com",
                    "gender": "male",
                    "birth_year": 2000,
                    "transport_types": [
                        "bus"
                    ],
                    "education": "none",
                    "work_status": "employee",
                    "political_views": null,
                    "annual_income": null,
                    "intro": null,
                    "created_at": "2020-12-24 15:26:07",
                    "updated_at": "2020-12-24 15:26:07"
                },
                "centroid": [
                    12.59174823761,
                    55.675624341425
                ],
                "address": {
                    "country_code": "au",
                    "state": "nt",
                    "city": "Darwin",
                    "street": "Evolution street 1",
                    "postal_code": "00001"
                },
                "action_date": "2020-12-28T14:55:09.000000Z",
                "activity_id": "925a5895-9a0f-46be-ac43-c7d49e08fdaa",
                "like": {
                    "id": "925a5895-9776-492b-8520-15fc3a57d3e2",
                    "created_at": "2020-12-28 14:55:09",
                    "updated_at": "2020-12-28 14:55:09"
                },
                "like_type": "tile_comment"
            },
            "suggestion_comment": {
                "type": "like_posted",
                "user": {
                    "id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                    "display_name": "vadim",
                    "email": "vadim@site.com",
                    "gender": "male",
                    "birth_year": 2000,
                    "transport_types": [
                        "bus"
                    ],
                    "education": "none",
                    "work_status": "employee",
                    "political_views": null,
                    "annual_income": null,
                    "intro": null,
                    "created_at": "2020-12-24 15:26:07",
                    "updated_at": "2020-12-24 15:26:07"
                },
                "centroid": [
                    12.59174823761,
                    55.675624341425
                ],
                "address": {
                    "country_code": "au",
                    "state": "nt",
                    "city": "Darwin",
                    "street": "Evolution street 1",
                    "postal_code": "00001"
                },
                "action_date": "2020-12-28T14:56:43.000000Z",
                "activity_id": "925a5925-8070-49bd-b865-a7c9b36a9acc",
                "like": {
                    "id": "925a5925-7e29-427e-99d1-bb1724f49fac",
                    "created_at": "2020-12-28 14:56:43",
                    "updated_at": "2020-12-28 14:56:43"
                },
                "like_type": "suggestion_comment"
            }
        },
        "suggestion": {
            "type": "suggestion_posted",
            "user": {
                "id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                "display_name": "vadim",
                "email": "vadim@site.com",
                "gender": "male",
                "birth_year": 2000,
                "transport_types": [
                    "bus"
                ],
                "education": "none",
                "work_status": "employee",
                "political_views": null,
                "annual_income": null,
                "intro": null,
                "created_at": "2020-12-24 15:26:07",
                "updated_at": "2020-12-24 15:26:07"
            },
            "centroid": [
                -0.36731243133545,
                39.466248949065
            ],
            "address": {
                "country_code": "au",
                "state": "nt",
                "city": "Darwin",
                "street": "Evolution street 1",
                "postal_code": "00001"
            },
            "action_date": "2020-12-24T16:12:50.000000Z",
            "activity_id": "9252686e-7d8a-4900-91bd-b7c0f51b388f",
            "suggestion": {
                "id": "9252686e-78fa-4832-bddb-abe6f22b2ae8",
                "user_id": "925257b9-a39f-4f78-ac71-df6d4130f5ee",
                "category_id": "8f0b5dba-cad8-43ea-98f0-981b9950b873",
                "quad_keys": [
                    "0331111312313101223020"
                ],
                "title": "title",
                "description": "description",
                "created_at": "2020-12-24 16:12:50",
                "updated_at": "2020-12-24 16:12:50",
                "rating": 0,
                "votes_count": {
                    "total": 0,
                    "negative": 0,
                    "neutral": 0,
                    "positive": 0
                },
                "comments_count": 2,
                "is_follower": false,
                "followers_count": 1,
                "is_liked": false,
                "likes_count": 0
            },
            "suggestion_likes": 0,
            "suggestion_comments": 2
        },
        "rating": null
    }
}
Request Signature

GET /api/user/me/actions

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Get Current User Feed

curl --request GET --url /api/user/me/feed/{page}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of feed.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": [
         {
            "type": "rating_changed",
            "user": { USER_OBJECT },
            "centroid": [
                -0.37018775939941,
                39.4660832958
            ],
            "address": { ADDRESS_OBJECT },
            "action_date": "2021-04-27T13:12:56.000000Z",
            "activity_id": "934ba096-",
            "rating": {
                "id": "934b9a1f-",
                "user_id": "92ee8d08-",
                "rating_average_current": 25,
                "rating_average_previous": 0,
                "quad_keys": [
                    "0331111312313100322313"
                ],
                "created_at": "2021-04-27 13:12:56",
                "updated_at": "2021-04-27 13:31:00",
                "vote_id": "00966fc4-...",
                "general_vote": 2
} }, { "type": "vote_posted", "user": { USER_OBJECT }, "centroid": [ -0.36765575408936, 39.465917642187 ], "address": { ADDRESS_OBJECT }, "action_date": "2021-04-16T11:59:33.000000Z", "activity_id": "93355f10-...", "vote": { "user_id": "9304d2d1-...", "suggestion_id": "93233a7b-...", "value": 1, "quad_keys": [ "0331111312313101222322" ], "created_at": "2021-04-16 11:59:33", "updated_at": "2021-04-16 11:59:33", "suggestion": { "id": "93233a7b-...", "user_id": "92fb35bd-...", "category_id": "9278ab77-...", "quad_keys": [ "0331111312313101222322" ], "title": "Suggestion title", "description": "Description for Suggestion", "created_at": "2021-04-07 11:32:23", "updated_at": "2021-04-07 11:32:23", "rating": 17, "votes_count": { "total": 3, "negative": 2, "neutral": 1, "positive": 0 }, "comments_count": 0, "is_follower": true, "followers_count": 1, "my_vote": 0, "is_liked": false, "likes_count": 0 } }, "vote_comments": 0, "vote_type": "suggestion" }, { "type": "vote_posted", "user": { USER_OBJECT }, "centroid": [ -0.37018775939941, 39.4660832958 ], "address": { ADDRESS_OBJECT }, "action_date": "2021-05-07 11:13:57", "activity_id": "935f8d6a-...", "vote": { "user_id": "9304d2d1-...", "value": 2, "parameters_value": 1, "parameters": [ { "id": "9278ab77-...", "label": "Grønt" }, { "id": "9278ab77-...", "label": "Parkering" } ], "quad_keys": [ "0331111312313100322310", "0331111312313100322311", ], "created_at": "2021-05-07 11:13:57", "updated_at": "2021-05-07 11:17:29", "parameters_comments": [ { "id": "935f8e3e-...", "comment": "Tile Grønt parameter comment", "parameter_id": "9278ab77-...", "is_liked": false, "likes_count": 0, "files": [{ FILE_OBJECT }] }, { "id": "935f8e6f-...", "comment": "Tile Parkering parameter comment", "parameter_id": "9278ab77-...", "is_liked": false, "likes_count": 0, "files": [{ FILE_OBJECT }] } ], "general_comment": { "id": "935f8ead-...", "comment": "Tile GENERAL comment", "is_liked": false, "likes_count": 0, "files": [{ FILE_OBJECT }] } }, "vote_type": "tile" }, { "type": "comment_posted", "user": { USER_OBJECT }, "centroid": [ -0.36671161651611, 39.466547123883 ], "address": { ADDRESS_OBJECT }, "action_date": "2021-03-09T11:39:59.000000Z", "activity_id": "92e8e6a9-...", "comment": { "id": "92e8e6a9-...", "user_id": "00000000-...", "suggestion_id": "92901359-...", "comment": "Suggestion comment", "created_at": "2021-03-09 11:39:59", "updated_at": "2021-03-09 11:39:59", "is_liked": false, "likes_count": 0, "files": [{ FILE_OBJECT }] }, "comment_type": "suggestion" },
{ "type": "like_posted", "user": { USER_OBJECT }, "centroid": [ 12.566771507263, 55.683802746837 ], "address": { ADDRESS_OBJECT }, "action_date": "2021-03-08T16:01:16.000000Z", "activity_id": "92e7411e-...",
"like": { "id": "92443ed5-94dc-4917-9149-c09e227efff6", "created_at": "2020-12-17 15:14:56", "updated_at": "2020-12-17 15:14:56" }, "target": { "id": "93192755-...", "user_id": "9304d2d1-...", "parameter_id": null, "quad_keys": [ "1202322211300303220203" ], "comment": "Tile comment", "value": 1, "created_at": "2021-01-01 11:20:33", "updated_at": "2021-01-01 11:20:33", "is_liked": true, "likes_count": 1, "files": [{ FILE_OBJECT }], "user": { USER_OBJECT } },
"like_type": "tile_comment" }, { "type": "like_posted", "user": { USER_OBJECT }, "centroid": [ -0.36465167999268, 39.467275990339 ], "address": { ADDRESS_OBJECT }, "action_date": "2021-05-07 06:13:58", "activity_id": "935f2222-...", "like": { "id": "935f2222-...", "created_at": "2021-05-07 06:13:58", "updated_at": "2021-05-07 06:13:58" }, "target": { "id": "935f1f74-...", "user_id": "9304d2d1-...", "suggestion_id": "935f1a13-...", "comment": "Suggestion comment", "created_at": "2021-05-07 06:06:29", "updated_at": "2021-05-07 06:06:29", "is_liked": false, "likes_count": 1, "files": [{ FILE_OBJECT }], "user": { USER_OBJECT }, "suggestion": { "id": "935f1a13-...", "user_id": "935df9fe-...", "category_id": "9278ab77-...", "quad_keys": [ "0331111312313101302131", "0331111312313101302133" ], "title": "Suggestion title", "description": "Description for Suggestion", "created_at": "2021-05-07 05:51:26", "updated_at": "2021-05-07 05:51:26", "rating": 100, "votes_count": { "total": 1, "negative": 0, "neutral": 0, "positive": 1 }, "comments_count": 2, "is_follower": false, "followers_count": 1, "my_vote": 1, "is_liked": false, "likes_count": 0, "files": [{ FILE_OBJECT }], "user": { USER_OBJECT } } }, "like_type": "suggestion_comment" },
{ "type": "suggestion_posted", "user": { USER_OBJECT }, "centroid": [ -0.36688327789307, 39.466480862918 ], "address": { ADDRESS_OBJECT }, "action_date": "2020-10-07T15:19:31.000000Z", "activity_id": "92e73231-...", "suggestion": { "id": "92e73231-...", "user_id": "00000000-...", "category_id": "9278ab77-...", "quad_keys": [ "0331111312313101221330", "0331111312313101221322" ], "title": "Suggestion title", "description": "Suggestion description", "created_at": "2020-07-24 11:16:55", "updated_at": "2020-10-27 11:44:53", "rating": 0, "votes_count": { "total": 1, "negative": 0, "neutral": 0, "positive": 1 }, "comments_count": 1, "is_follower": true, "followers_count": 1, "my_vote": 2, "is_liked": false, "likes_count": 0, "files": [{ FILE_OBJECT }], "user": { USER_OBJECT } }, "suggestion_likes": 0, "suggestion_comments": 1 }, ...

] }

You can use this operation to fetch user details connected to access token.

Request Signature

GET /api/user/me/feed/{page}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
page Page number from 1 - latest activity.
Query Parameters

No query parameters.

Body Parameters

No body parameters.

Get Current User Follow

curl --request GET --url /api/user/me/follow/{page}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of followed tiles and suggestions.

{
    "response": [
        {
            "type": "suggestion_follow",
            "mark_read_id": "0a0a0a0a-...",
            "address": { ADDRESS_OBJECT },
            "suggestion": {
                "id": "92d8fade-...",
                "category_id": "8f0b5dba-...",
                "quad_keys": [
                    "0331111312313101221330"
                ],
                "title": "Test title for Tampa",
                "description": "Description for Tamps",
                "created_at": "2021-03-01 13:43:14",
                "updated_at": "2021-03-01 13:43:14",
                "user": { USER_OBJECT },
                "rating": 0,
                "votes_count": {
                    "total": 0,
                    "negative": 0,
                    "neutral": 0,
                    "positive": 0
                },
                "comments_count": 2,
                "is_follower": true,
                "followers_count": 1,
                "my_vote": 0,
                "is_liked": false,
                "likes_count": 0,
                "comments": [
                    {
                        "id": "8f2ab02f-...",
                        "suggestion_id": "8f298648-...",
                        "comment": "yhj",
                        "created_at": "2019-11-19 03:44:32",
                        "updated_at": "2019-11-19 03:44:32",
                        "user": { USER_OBJECT },
                        "is_liked": false,
                        "likes_count": 0,
                        "files": [{ FILE_OBJECT }]
                    },
                    {
                        "id": "8f2ab030-...",
                        "suggestion_id": "8f298648-...",
                        "comment": "yhj",
                        "created_at": "2019-11-19 03:44:33",
                        "updated_at": "2019-11-19 03:44:33",
                        "user": { USER_OBJECT },
                        "is_liked": false,
                        "likes_count": 0
                        "files": [{ FILE_OBJECT }]
                    }
                ]
            },
            "files": [{ FILE_OBJECT }],
            "new_comments": [],
            "new_votes": [
                {
                    "value": 2,
                    "user_id": "935df9fe-...",
                    "updated_at": "2021-06-04T07:28:32.000000Z"
                },
            "last_activity": "2021-03-01T13:43:14.000000Z"
        },
        {
            "type": "tile_follow",
            "mark_read_id": "0a0a0a0a-...",
            "address": { ADDRESS_OBJECT },
            "quad_keys": [
                "0331111312313101230202"
            ],
            "user": { USER_OBJECT },
            "new_comments": [],
            "comments_count": 2,
            "last_activity": "2021-02-24T09:42:30.000000Z",
            "vote_id": "935df0d5-..",
            "vote_value": 2,
            "rating": 68
        }
    ]
}

mark_read_id - The ID for mark as read for the corresponding API call.

For suggestion_follow: POST /api/user/me/follow/suggestion/{mark_read_id}/read

For tile_follow: POST /api/user/me/follow/tile/{mark_read_id}/read

Request Signature

GET /api/user/me/follow/{page}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
page Page number from 1 - latest activity.
Query Parameters

No query parameters.

Body Parameters

No body parameters.

Get a list of tiles with interactions

curl --request GET --url /api/user/me/  /tile
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of Tile votes.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "data": {
            "0331111312313100323300": {
                "my_vote": 2,
                "my_suggestion": true,
                "other_suggestion": true
            },
            "0331111312313100323301": {
                "my_vote": 2,
                "my_suggestion": true
            },
            "0331111312313100322302": {
                "my_vote": 0
            }
        }
    }
}

Get a list of tiles with interactions. Tiles with user votes and self and other suggestion info.

Request Signature

GET /api/user/me/tile

Security

OAuth2 Password Access Token

Query Parameters
Parameter Required? Description
quadKeys[0] No An quadKey of top left tile
quadKeys[1] No An quadKey of bottom right tile
bounds[east] No Bounding box east (min latitude) bound.
bounds[north] No Bounding box north (min latitude) bound.
bounds[south] No Bounding box south (min latitude) bound.
bounds[west] No Bounding box west (min latitude) bound.
my_vote

Possible values: 0 - negative vote 1 - neutral vote 2 - positive vote

Marks all the follow elements as read

curl --request POST --url /api/user/me/follow/all/read
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be bool value

{
    "httpCode": 200,
    "operationStatus": "success",
}

You can use this operation to marks all the follow list elements for the current user as read.

Request Signature

POST /api/user/me/follow/all/read

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Marks selected follow suggestion as read

curl --request POST --url /api/user/me/follow/suggestion/0a0a0a0a-0a0a-0a0a-0a0a-0a0a0a0a0a0a/read
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be bool value

{
    "httpCode": 200,
    "operationStatus": "success",
}

You can use this operation to marks selected suggestion follower element for the current user as read.

Request Signature

POST /api/user/me/follow/suggestion/{suggestionFollowerId}/read

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
suggestionFollowerId Suggestion follower ID
Query Parameters

No query parameters.

Body Parameters

No body parameters.

Marks selected follow tile as read

curl --request POST --url /api/user/me/follow/tile/0a0a0a0a-0a0a-0a0a-0a0a-0a0a0a0a0a0a/read
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be bool value

{
    "httpCode": 200,
    "operationStatus": "success",
}

You can use this operation to marks selected tile follower element for the current user as read.

Request Signature

POST /api/user/me/follow/tile/{tileFollowerId}/read

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
tileFollowerId Tile follower ID
Query Parameters

No query parameters.

Body Parameters

No body parameters.

Get Current User First Login Info

curl --request GET --url /api/user/me/is-first-login
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be bool value

{
  "response": {
      "is_first_login": false
  }
}
Request Signature

GET /api/user/me/is-first-login

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Create Activity Like or Dislike

curl --request POST --url /api/user/activity/91b772ad-065c-45e5-a2ab-04e2e04e739b/like
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "action=[like|dislike]"

The result of this operation would be success operation status.

{
  "httpCode": 200,
  "operationStatus": "success",
}
Request Signature

POST /api/user/activity/{activityId}/like

Security

OAuth2 Client Credentials Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
action Yes like/dislike

Create User Account

curl --request POST --url /api/user/create
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "display_name=[display_name]"
    --form "email=[email]"
    --form "password=[password]"
    --form "language_code=[language_code]"
    --form "gender=[gender]"
    --form "birth_year=[birth_year]"
    --form "transport_types[[transport_types]"
    --form "transport_types[[transport_types]"
    --form "education=[education]"
    --form "work_status=[work_status]"
    --form "political_views=[political_views]"
    --form "annual_income=[annual_income]"
    --form "intro=[intro]"
    --form "photo@/path/to/file"
    --form "address[country_code]=[country_code]"
    --form "address[state]=[state]"
    --form "address[city]=[city]"
    --form "address[street]=[street]"
    --form "address[postal_code]=[postal_code]"
    --form "address[location][longitude]=[longitude]"
    --form "address[location][latitude]=[latitude]"

The result of this operation would be a created user model.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "display_name": "Paul O'Reilly",
    "email": "paul@wequbit.com",
    "language_code": "da",
    "gender": "male",
    "birth_year": 1990,
    "transport_types": [
      "car",
      "bus"
    ],
    "education": "candidate",
    "work_status": "self_employed",
    "political_views": "center",
    "annual_income": "_..125k",
    "intro": "Hello, my name is Paul and I love beautiful cities!",
    "id": "8f0b604e-f9b3-4df0-b75e-c65e15c6edc2",
    "updated_at": "2019-11-03 14:10:32",
    "created_at": "2019-11-03 14:10:32",
    "file_photo": {
      "id": "8f0b604f-0f6c-4116-a4e3-956f868b7ec4",
      "scope": "photo",
      "links": {
          "sizes": {
              "original": {
                  "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view",
                  "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download"
              },
              "default": {
                  "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view/default",
                  "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download/default"
              }
          }
      }
    },
    "address": {
      "id": "8f0b604f-1855-4d65-96a1-af86f575474e",
      "country_code": "ua",
      "state": "Zaporozhskaya Oblast",
      "city": "Zaporozhye",
      "street": "Lenina avenue 122",
      "postal_code": "69006",
      "phone": null,
      "created_at": "2019-11-03 14:10:32",
      "updated_at": "2019-11-03 14:10:32"
    }
  }
}

Finish sign-up procedure by actually creating user account. This operation accepts number of related models, including address and photo, allowing you to create all nested models in one request.

Request Signature

POST /api/user/create

Security

OAuth2 Client Credentials Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
display_name Yes User display name. Max length 255.
email Yes User email address. Max length 255.
password Yes User password in plain text. Min length 8, max 255.
language_code No Available language, default - "en".
gender No User gender. Use value from enumeration.
birth_year No User birth year. Min 1900.
transport_types No Array of user transport types. Use values from enumeration.
education No User higher education level. Use value from enumeration.
work_status No User current work status. Use value from enumeration.
political_views No User political views. Use value from enumeration.
annual_income No User annual income. Use value from enumeration.
intro No User free-form intro text.
photo No Binary stream of user photo.
address.country_code Yes User country ISO2 code.
address.state Yes User state. Max length 255.
address.city Yes User city. Max length 255.
address.street Yes User street address. Max length 255.
address.postal_code Yes User postal code. Max length 255.
address.phone No User free-form phone number. Max length 255.
address.location.longitude No User address centroid location longitude.
address.location.latitude No User address centroid location latitude.

Request Password Reset

curl --request POST --url /api/user/password-reset
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "email=[email]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

Initiate password reset procedure. The complete procedure is:

Request Signature

POST /api/user/password-reset

Security

OAuth2 Client Credentials Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
email Yes Email address to initiate password reset for.

Finish Password Reset

curl --request PUT --url /api/user/password-reset
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "email=[email]"
    --data "password=[password]"
    --data "token=[token]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

Finish password reset procedure. Supply user email address along with token from the email and new password.

Request Signature

PUT /api/user/password-reset

Security

OAuth2 Client Credentials Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
email Yes Email address to initiate password reset for.
password Yes User new password.
token Yes Password reset token from email.

Check Email Existence

curl --request GET --url /api/user/check-email/example@gmail.com
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be bool value

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "registered": false
    }
}

You can use this operation to check if email already registered within the system.

Request Signature

GET /api/user/check-email/{email}

Security

OAuth2 Client Credentials Access Token

Path Parameters
Parameter Required? Description
email Yes Email address to initiate a check.
Query Parameters

No query parameters.

Body Parameters

No body parameters.

Resend user signup verification

curl --request GET --url /api/user/resend_verification
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a user model.

{
  "httpCode": 200,
  "operationStatus": "success",
 }
Request Signature

GET /api/user/resend_verification

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Add user to blacklist

curl --request POST --url /api/user/blacklist
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "action=[action]"
    --form "user_id=[user_id]"

The result of this operation would be an indication of a success.

{
"httpCode": 200,
"operationStatus": "success"
}
Request Signature

POST /api/user/blacklist

Security

OAuth2 Client Credentials Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
action Yes "block" or "unblock" string.
user_id Yes Blocked user ID.

Tiling System

These are collection of methods to build voting, suggestions and reporting functions in the client apps. Also provides an interface to query data attached to tiles.

Voting Parameters

Get Parameters

curl --request GET --url /api/tiles/parameters
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of available voting parameters.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": [
    {
      "id": "8f0b5db9-...",
      "label": "Aktivitetsniveau",
      "created_at": "2019-01-01 00:00:00",
      "updated_at": "2019-01-01 00:00:00",
      "files": [
        {
          "id": "9278ab77-...",
          "scope": "image",
          "links": {
            "sizes": {
              "original": {
                "view": "/api/file/9278ab77-.../view",
                "download": "/api/file/9278ab77-.../download"
              },
              "default": {
                "view": "/api/file/9278ab77-.../view/default",
                "download": "/api/file/9278ab77-.../download/default"
              }
            }
          }
        }
      ]
    },
    {
      "id": "8f0b5db9-...",
      "label": "Atmosfære",
      "created_at": "2019-01-01 00:00:00",
      "updated_at": "2019-01-01 00:00:00",
      "files": [
        {
          "id": "9278ab78-...",
          "scope": "image",
          "links": {
            "sizes": {
              "original": {
                "view": "/api/file/9278ab78-.../view",
                "download": "/api/file/9278ab78-.../download"
              },
              "default": {
                "view": "/api/file/9278ab78-.../view/default",
                "download": "/api/file/9278ab78-.../download/default"
              }
            }
          }
        }
      ]
    }
  ]
}

Get a list of available voting parameters. The file object attached to parameter represents parameter icon. Currently holds single file, will be changed in next release to hold collection of files which represent normal, positive and negative versions of the icons.

Request Signature

GET /api/tiles/parameters

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Suggest Parameters

curl --request POST --url /api/tiles/parameters
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "label=[label]"

The result of this operation would be a suggested parameter model.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "id": "8f0b678f-cf08-40d9-8cf1-66ea31f21793",
    "label": "Test",
    "suggestion_count": 2,
    "created_at": "2019-11-03 14:30:48",
    "updated_at": "2019-11-03 14:30:50"
  }
}

Suggest a parameter. If the parameter with same label already exists and is published, the HTTP 409 (Conflict) would be returned. Otherwise, the parameter will be created (if not exists) and it's suggestion_count will be increased.

Request Signature

POST /api/tiles/parameters

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
label Yes The label (free-form) for the suggested parameter.

Voting

Cast tile vote

curl --request POST --url /api/tiles/vote
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "vote_id=[vote_id]"
    --data "user_location[longitude]=[longitude]"
    --data "user_location[latitude]=[latitude]"
    --data "tiles[]=[tile_quad_key]"
    --data "value=[value]"
    --data "address[country_code]=[country_code]"
    --data "address[state]=[state]"
    --data "address[city]=[city]"
    --data "address[street]=[street]"
    --data "address[postal_code]=[postal_code]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

Cast a non-parametrized vote on a set of tiles. Each time, a new vote will be casted, meaning user can vote on a single tile multiple times.

Request Signature

POST /api/tiles/vote

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
vote_id Yes Generated UUID used for next vote steps (Parameter vote, General comment and Parameter comments).
user_location Yes Current user location as per device location services.
tiles Yes An array of tiles user is voting upon. Each element should be a tile quad key.
value Yes A vote value (0 - negative, 1 - neutral, 2 - positive).
address.country_code Yes Country ISO2 code.
address.state Yes State. Max length 255.
address.city Yes City. Max length 255.
address.street Yes Street address. Max length 255.
address.postal_code Yes Postal code. Max length 255.

Cast parameter vote

curl --request POST --url /api/tiles/vote
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "vote_id=[vote_id]"
    --data "user_location[longitude]=[longitude]"
    --data "user_location[latitude]=[latitude]"
    --data "tiles[]=[tile_quad_key]"
    --data "parameters[parameter_id]=[value]"
    --data "address[country_code]=[country_code]"
    --data "address[state]=[state]"
    --data "address[city]=[city]"
    --data "address[street]=[street]"
    --data "address[postal_code]=[postal_code]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
      "rating": 76,
      "rating_max": 84,
      "rating_min": 84,
      "trends": [
          {
              "date": "2021-05",
              "rating": 84
          }
      ],
      "gender": [
          {
              "gender": "male",
              "rating": 84
          }
      ],
      "age": [
          {
              "age": "20-29",
              "rating": 94
          },
          {
              "age": "30-39",
              "rating": 25
          }
      ],
      "parameters": [
          {
              "parameter_label": "Atmosfære",
              "parameter_id": "9278ab77-...",
              "rating": 100
          },
          {
              "parameter_label": "Skønhed",
              "parameter_id": "9278ab77-...",
              "rating": 50
          },
          {
              "parameter_label": "Luftkvalitet",
              "parameter_id": "9278ab77-...",
              "rating": 0
          }
      ]
  }
}

Cast a parametrized vote on a set of tiles. Each time, a new vote will be casted, meaning user can vote on a single tile-parameter pair multiple times.

Request Signature

POST /api/tiles/vote/parameters

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
vote_id Yes UUID used in previous GENERAL vote step.
user_location Yes Current user location as per device location services.
tiles Yes An array of tiles user is voting upon. Each element should be a tile quad key.
parameters Yes An array of parameters user is voting upon. Each element should be a vote value (0 - negative, 1 - neutral, 2 - positive), keyed by parameter id.
address.country_code Yes Country ISO2 code.
address.state Yes State. Max length 255.
address.city Yes City. Max length 255.
address.street Yes Street address. Max length 255.
address.postal_code Yes Postal code. Max length 255.

Analytics

Quick analytics

curl --request GET --url /api/tiles/analytics
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be an aggregated analytics for a given tiles set.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "ratings": {
      "average": 100,
      "timeline": {
        "2019-11": 100
      }
    },
    "aggregated": {
      "gender": {
        "male": 5
      },
      "age_group": {
        "20-29": 5
      },
      "locality": {
        "locals": 5
      },
      "parameters": {
        "8f096628-b5c1-43f2-9475-db44226132e6": {
          "positive": 0,
          "negative": 5
        },
        "8f096628-9cc7-48c0-a921-6494f0114fd0": {
          "positive": 0,
          "negative": 5
        },
        "8f096628-f2df-4b37-9278-57d82b431dd4": {
          "positive": 5,
          "negative": 0
        },
        "8f096628-eb8c-4f02-9c93-d81db616911d": {
          "positive": 5,
          "negative": 0
        }
      }
    }
  }
}

Get aggregated analytics for a given tiles set.

Response field Description
response.ratings.average Average rating for a given tiles set.
response.ratings.timeline Average rating for a given tiles set grouped by "year-month" key. To be used to build timeline chart.
response.aggregated Aggregate metrics of votes for different cross-sections.
response.aggregated.gender Number of votes for a given tiles set for gender cross-section.
response.aggregated.age_group Number of votes for a given tiles set for age group cross-section.
response.aggregated.locality Number of votes for a given tiles set for locality cross-section.
response.aggregated.parameters Number of votes for a given tiles set grouped by parameters.
Request Signature

GET /api/tiles/analytics

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
tiles Yes An array of tiles user is acting upon. Each element should be a tile quad key.
Body Parameters

No body parameters.

Detail analytics

curl --request GET --url /api/tiles/analytics/detail?tiles[]=0331111312313101230200
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be an detail aggregated analytics for a given tiles set.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "rating": 52,
    "rating_max": 50,
    "rating_min": 65,
    "trends": [
      {
        "date": "2020-02",
        "rating": 65
      },
      {
        "date": "2020-03",
        "rating": 53
      },
      {
        "date": "2020-04",
        "rating": 42
      },
      {
        "date": "2020-10",
        "rating": 50
      },
      {
        "date": "2020-11",
        "rating": 50
      }
    ],
    "gender": [
      {
        "gender": "female",
        "rating": 52
      },
      {
        "gender": "male",
        "rating": 53
      }
    ],
    "age": [
      {
        "age": "20-29",
        "rating": 52
      },
      {
        "age": "0-9",
        "rating": 58
      }
    ],
    "parameters_top": [
        {
          "parameter_label": "Fortove",
          "parameter_id": "8f0b5db9-a5f6-4bbc-a267-3d5d6f2f22fe",
          "rating": 93
        },
        {
          "parameter_label": "GÃ¥-muligheder",
          "parameter_id": "8f0b5db9-b85f-47b8-a41e-52bdee5f6666",
          "rating": 90
        },
        {
          "parameter_label": "Fortove",
          "parameter_id": "8f0b5db9-b102-459e-9a36-75f34db986aa",
          "rating": 88
        }
    ],
    "parameters_low": [
      {
        "parameter_label": "GÃ¥-muligheder",
        "parameter_id": "8f0b5db9-caa7-42bf-974a-1d2827dbb7c4",
        "rating": 13
      },
      {
        "parameter_label": "Fortove",
        "parameter_id": "8f0b5db9-9e7e-4495-95c9-319932aba33a",
        "rating": 50
      },
      {
        "parameter_label": "Fortove",
        "parameter_id": "8f0b5db9-bf9e-4d51-92f7-e8239d892c3d",
        "rating": 67
      }
    ]
  }
}

Get detail aggregated analytics for a given tiles set.

Response field Description
response.rating Average rating for a given tiles set.
response.rating_max Highest rating per last year for a given tiles set.
response.rating_min Lowest rating per last year for a given tiles set.
response.trends Average rating for a given tiles set grouped by "year-month" key per last year. To be used to build timeline chart.
response.gender Average rating by gender for a given tiles set.
response.age Average rating by age groups for a given tiles set.
response.parameters_top 5 parameters with the highest rating per last year for a given tiles set.
response.parameters_low 5 parameters with the lowest rating per last year for a given tiles set.
Request Signature

GET /api/tiles/analytics/detail

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
tiles Yes An array of tiles. Each element should be a tile quad key.
Body Parameters

No body parameters.

Analytics by parameters

curl --request GET --url /api/tiles/parameters/analytics
    --header "Authorization: [token_type] [access_token]"
    --data "tiles[]=[tile_quad_key]"

The result of this operation would be an aggregated rating by parameters for a given tiles set.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": [
    {
      "quad_key": "1202100011310100210220",
      "parameters": {
        "8f0b5db9-9726-4cd9-9005-378932a10f3e": 47,
        "8f0b5db9-b85f-47b8-a41e-52bdee5f6666": 78
      }
    },
    {
      "quad_key": "1202100011310100210222",
      "parameters": {
        "8f0b5db9-9726-4cd9-9005-378932a10f3e": 10,
        "8f0b5db9-bbfc-4adb-93ba-a612b0165d34": 83,
        "8f0b5db9-b85f-47b8-a41e-52bdee5f6666": 32
      }
    }
  ]
}

Get aggregated rating for parameters for a given tiles set.

Request Signature

`GET /api/tiles/parameters/analytics

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
tiles Yes An array of tiles. Each element should be a tile quad key.
Body Parameters

No body parameters.

Follow

Follow tiles set

curl --request POST --url /api/tiles/follow
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "tiles[]=[tile_quad_key]"
    --data "action=[action]"
    --data "address[country_code]=[country_code]"
    --data "address[state]=[state]"
    --data "address[city]=[city]"
    --data "address[street]=[street]"
    --data "address[postal_code]=[postal_code]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

Follow (or unfollow) a set of tiles.

Request Signature

POST /api/tiles/follow

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
tiles Yes An array of tiles user is acting upon. Each element should be a tile quad key.
action Yes An action to take (follow - follow tiles, unfollow - unfollow tiles)
address.country_code No Country ISO2 code.
address.state No State. Max length 255.
address.city No City. Max length 255.
address.street No Street address. Max length 255.
address.postal_code No Postal code. Max length 255.

Commenting

Get tile comments

curl --request GET --url /api/tiles/comments
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a collection of comments for a given tiles set.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": [
    {
      "id": "911a10dd-...",
      "comment": "This is the tile comment with parameter.",
      "parameter_id": "a11c1212-...",
      "quad_keys": [
        "1202100011310100210220",
        "1202100011310100212020"
      ],
      "is_liked": false,
      "likes_count": 0,
      "files": [{ FILE_OBJECT }],
      "user": { USER_OBJECT },
      "created_at": "2020-07-22 09:49:40",
      "updated_at": "2020-07-22 09:49:40"
    },
    {
      "id": "921a10dd-...",
      "comment": "This is the tile general comment.",
      "parameter_id": null,
      "quad_keys": [
        "1202100011310100210220",
        "1202100011310100212020"
      ],
      "is_liked": false,
      "likes_count": 0,
      "files": [{ FILE_OBJECT }],
      "user": { USER_OBJECT },
      "created_at": "2020-07-22 09:49:40",
      "updated_at": "2020-07-22 09:49:40"
    }
  ]
}

Get a collection of comments for a given tiles set.

Response field Description
response.tileComments A collection of comments left for the any of the given tiles.
response.parameterComments A collection of comments left for parameters for the any of the given tiles.
Request Signature

GET /api/tiles/comments

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
tiles Yes An array of tiles user is acting upon. Each element should be a tile quad key.
Body Parameters

No body parameters.

Post tile comment

curl --request POST --url /api/tiles/comments
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --data "vote_id=[vote_id]"
--data "tiles[]=[quad_key]" --data "parameter_id=[parameter_id]" --data "comment=[comment]" --data "value=[value]" --data "image@/path/to/file" --data "address[country_code]=[country_code]" --data "address[state]=[state]" --data "address[city]=[city]" --data "address[street]=[street]" --data "address[postal_code]=[postal_code]"

The result of this operation would be a created comment model.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "id": "911a10dd-02f6-471e-a14b-769538248321",
    "user_id": "911a08c8-c318-4aee-817a-40aba5d98c48",
    "parameter_id": null,
    "quad_keys": [
      "1202100011310100210220",
      "1202100011310100210222",
      "1202100011310100212000",
      "1202100011310100212002",
      "1202100011310100212020"
    ],
    "comment": "This is the tile comment.",
    "value": "2",
    "updated_at": "2019-11-02 14:36:03",
    "created_at": "2019-11-02 14:36:03",
    "is_liked": true,
    "likes_count": 1,
    "image": {
      "id": "8f096673-b1df-4899-8442-e0de55a72094",
      "scope": "image",
      "links": {
          "sizes": {
              "original": {
                  "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view",
                  "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download"
              },
              "default": {
                  "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view/default",
                  "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download/default"
              }
          }
      }
    },
    "user": {
      "id": "911a08c8-c318-4aee-817a-40aba5d98c48",
      "display_name": "Paul O'Reilly",
      "email": "paul@wequbit.com",
      "gender": "male",
      "birth_year": 1990,
      "transport_types": [
        "car",
        "bus"
      ],
      "education": "candidate",
      "work_status": "self_employed",
      "political_views": "center",
      "annual_income": "_..125k",
      "intro": "Hello, my name is Paul and I'm a seasoned tech geek with more than 10 years of experience!",
      "created_at": "2020-07-22 09:27:05",
      "updated_at": "2020-07-22 09:27:05"
    }
  }
}

Create a comment on one or more tile(s). Pass an optional parameter_id parameter to create a comment for a tile parameter rather than tile itself.

Request Signature

POST /api/tiles/comments

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
vote_id Yes UUID used in previous GENERAL vote step.
tiles Yes An array of tiles user is acting upon. Each element should be a tile quad key.
parameter_id No Parameter ID user if commenting upon.
comment Yes A free-form comment message. Max 255 characters.
value Yes A value from GENERAL or PARAMETER vote.
image No Binary stream of comment-attached image.
address.country_code Yes Country ISO2 code.
address.state Yes State. Max length 255.
address.city Yes City. Max length 255.
address.street Yes Street address. Max length 255.
address.postal_code Yes Postal code. Max length 255.

Like comment

curl --request POST --url /api/tiles/comments/{commentId}/like
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "action=[action]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

Like (or dislike) a comment model.

Request Signature

POST /api/tiles/comments/{commentId}/like

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
commentId Comment ID user is acting upon.
Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
action Yes An action to take (like - like comment, dislike - dislike comment)

Report comment

curl --request POST --url /api/tiles/comments/{commentId}/report
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "action=[action]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

Report (or unmark report) a comment model.

Request Signature

POST /api/tiles/comments/{commentId}/report

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
commentId Comment ID user is acting upon.
Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
action Yes An action to take (mark - report comment, unmark - unmark comment reporter)

Suggesting

Get suggestion categories

curl --request GET --url /api/tiles/suggest/categories
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of available suggesting categories.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": [
    {
      "id": "8f0b5dba-d2f8-4f7c-86e9-cd372b50c5cf",
      "label": "Andet",
      "created_at": "2019-11-03 14:03:19",
      "updated_at": "2019-11-03 14:03:19"
    },
    {
      "id": "8f0b5dba-cfbd-4ee7-9e34-d281bb7ddb5a",
      "label": "Beplantning",
      "created_at": "2019-11-03 14:03:19",
      "updated_at": "2019-11-03 14:03:19"
    },
    {
      "id": "8f0b5dba-cad8-43ea-98f0-981b9950b873",
      "label": "Byinventar",
      "created_at": "2019-11-03 14:03:19",
      "updated_at": "2019-11-03 14:03:19"
    },
    {
      "id": "8f0b5dba-ce1e-4148-94b9-651120574c59",
      "label": "Nye faciliteter",
      "created_at": "2019-11-03 14:03:19",
      "updated_at": "2019-11-03 14:03:19"
    },
    {
      "id": "8f0b5dba-cc79-459c-8556-f8e9c6c826e0",
      "label": "Opholdsareal",
      "created_at": "2019-11-03 14:03:19",
      "updated_at": "2019-11-03 14:03:19"
    },
    {
      "id": "8f0b5dba-d15d-4550-ac5b-73c60bb6abf4",
      "label": "Trafik",
      "created_at": "2019-11-03 14:03:19",
      "updated_at": "2019-11-03 14:03:19"
    },
    {
      "id": "8f0b5dba-c915-4682-8db8-318161e9f97c",
      "label": "Vej og fortov",
      "created_at": "2019-11-03 14:03:19",
      "updated_at": "2019-11-03 14:03:19"
    }
  ]
}

Get a list of available suggesting categories.

Request Signature

GET /api/tiles/suggest/categories

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Create suggestions

curl --request POST --url /api/tiles/suggest
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --data "tiles[]=[tile_quad_key]"
    --data "category_id=[category_id]"
    --data "title=[title]"
    --data "description=[description]"
    --data "photos[]@/path/to/file1"
    --data "photos[]@/path/to/file2"
    --data "photos[]@/path/to/file3"
    --data "address[country_code]=[country_code]"
    --data "address[state]=[state]"
    --data "address[city]=[city]"
    --data "address[street]=[street]"
    --data "address[postal_code]=[postal_code]"

The result of this operation would be a created suggestion model.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "id": "8f2b4a8d-4760-4512-87f6-4305d055ef6f",
    "user_id": "8f05dcdc-db6e-49cd-8ef3-8a24d0c7d37f",
    "category_id": "8f0af80e-7959-47e3-9106-deffa6a9554a",
    "quad_keys": [
      "1202100011310100210222"
    ],
    "title": "Howdy!",
    "description": "This is the test suggestion on #1 category.",
    "created_at": "2019-11-19 10:56:11",
    "updated_at": "2019-11-19 10:56:11",
    "rating": 33,
    "votes_count": {
      "total": 3,
      "negative": 2,
      "neutral": 0,
      "positive": 1
    },
    "is_follower": false,
    "followers_count": 0,
    "is_liked": false,
    "likes_count": 0,
    "category": {
      "id": "8f0af80e-7959-47e3-9106-deffa6a9554a",
      "label": "Andet",
      "created_at": "2019-11-03 09:19:01",
      "updated_at": "2019-11-03 09:19:01"
    },
    "file_photos": [
      {
        "id": "8f2b5104-b8ce-43f2-b699-df6fe4b3082b",
        "scope": "photos",
        "links": {
            "sizes": {
                "original": {
                    "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view",
                    "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download"
                },
                "default": {
                    "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view/default",
                    "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download/default"
                }
            }
        }
      },
      {
        "id": "8f2b5104-c376-4fb5-9ef1-813c283e47b6",
        "scope": "photos",
        "links": {
            "sizes": {
                "original": {
                    "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view",
                    "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download"
                },
                "default": {
                    "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view/default",
                    "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download/default"
                }
            }
        }
      }
    ]
  }
}

Create suggestion for a given set of tiles.

Request Signature

POST /api/tiles/suggest

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
tiles Yes An array of tiles user is acting upon. Each element should be a tile quad key.
category_id Yes A suggestion category.
title Yes Suggestion title. Max 255 characters.
description Yes Suggestion description. Max 512 characters.
photos No An array of photos to attach to the suggestion.
address.country_code Yes Country ISO2 code.
address.state Yes State. Max length 255.
address.city Yes City. Max length 255.
address.street Yes Street address. Max length 255.
address.postal_code Yes Postal code. Max length 255.

Get suggestions

curl --request GET --url /api/tiles/suggest
    --header "Authorization: [token_type] [access_token]"
    --data "tiles[]=tile_quad_key"

The result of this operation would be a collection of suggestions for a given tiles set.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": [
    {
      "id": "8f0af81c-...",
      "category_id": "8f0af80e-...",
      "address": { ADDRESS_OBJECT },
"quad_keys": [ "1202100011310100210220", "1202100011310100212020" ], "centroid": [ 12.571663856506348, 55.62232608675592 ],
"slug": "2019-111", "title": "Howdy!", "description": "This is the test suggestion", "created_at": "2019-11-03 09:19:10", "updated_at": "2019-11-03 09:19:10", "rating": 50, "votes_count": { "total": 0, "negative": 0, "neutral": 0, "positive": 0 }, "my_vote": 1, "is_liked": true, "likes_count": 1, "files": [{ FILE_OBJECT }] "category": { "id": "8f0af80e-...", "label": "Andet", "created_at": "2019-11-03 09:19:01", "updated_at": "2019-11-03 09:19:01" }, "user": { USER_OBJECT }, "is_follower": false, "followers_count": 0 }, { "id": "8f0af81c-...", "category_id": "8f0af80e-...", "address": { ADDRESS_OBJECT },
"quad_keys": [ "1202100011310100210220", "1202100011310100212020" ], "centroid": [ 12.571663856506348, 55.62232608675592 ],
"slug": "2019-110", "title": "Howdy!", "description": "This is the test suggestion", "created_at": "2019-11-03 09:19:10", "updated_at": "2019-11-03 09:19:10", "rating": 50, "votes_count": { "total": 0, "negative": 0, "neutral": 0, "positive": 0 },
"is_liked": false, "likes_count": 0, "files": [{ FILE_OBJECT }] "category": { "id": "8f0af80e-...", "label": "Trafik", "created_at": "2019-11-03 09:19:01", "updated_at": "2019-11-03 09:19:01" }, "user": { USER_OBJECT }, "is_follower": false, "followers_count": 0 } ] }

Get a collection of suggestions for a given tiles set.

Request Signature

GET /api/tiles/suggest

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
tiles Yes An array of tiles user is acting upon. Each element should be a tile quad key.
Body Parameters

No body parameters.

Get suggestions by Bounding box

curl --request GET --url /api/tiles/suggest/box
    --header "Authorization: [token_type] [access_token]"
    --data "tiles[]=tile_quad_key"

The result of this operation would be a collection of suggestions for a given tiles set.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": [
    {
      "id": "8f0af81c-...",
      "category_id": "8f0af80e-...",
      "address": { ADDRESS_OBJECT },
"quad_keys": [ "1202100011310100210220", "1202100011310100212020" ], "centroid": [ 12.571663856506348, 55.62232608675592 ],
"slug": "2019-111", "title": "Howdy!", "description": "This is the test suggestion", "created_at": "2019-11-03 09:19:10", "updated_at": "2019-11-03 09:19:10", "rating": 50, "votes_count": { "total": 0, "negative": 0, "neutral": 0, "positive": 0 }, "my_vote": 1, "is_liked": true, "likes_count": 1, "files": [{ FILE_OBJECT }] "category": { "id": "8f0af80e-...", "label": "Andet", "created_at": "2019-11-03 09:19:01", "updated_at": "2019-11-03 09:19:01" }, "user": { USER_OBJECT }, "is_follower": false, "followers_count": 0 }, { "id": "8f0af81c-...", "category_id": "8f0af80e-...", "address": { ADDRESS_OBJECT },
"quad_keys": [ "1202100011310100210220", "1202100011310100212020" ], "centroid": [ 12.571663856506348, 55.62232608675592 ],
"slug": "2019-110", "title": "Howdy!", "description": "This is the test suggestion", "created_at": "2019-11-03 09:19:10", "updated_at": "2019-11-03 09:19:10", "rating": 50, "votes_count": { "total": 0, "negative": 0, "neutral": 0, "positive": 0 },
"is_liked": false, "likes_count": 0, "files": [{ FILE_OBJECT }] "category": { "id": "8f0af80e-...", "label": "Trafik", "created_at": "2019-11-03 09:19:01", "updated_at": "2019-11-03 09:19:01" }, "user": { USER_OBJECT }, "is_follower": false, "followers_count": 0 } ] }

Get a collection of suggestions for a given bounding box by corner tiles or bounds.

Request Signature

GET /api/tiles/suggest/box

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
quadKeys[0] Yes An quadKey of top left tile
quadKeys[1] Yes An quadKey of bottom right tile
--- --- ---
bounds[east] Yes Bounding box east (min latitude) bound
bounds[north] Yes Bounding box north (min latitude) bound
bounds[south] Yes Bounding box south (min latitude) bound
bounds[west] Yes Bounding box west (min latitude) bound

One of the parameter sets must be specified.

Body Parameters

No body parameters.

Get suggestion by id

curl --request GET --url /api/tiles/suggest/{suggestionId}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a collection of suggestions for a given tiles set.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "id": "8f0af81c-...",
    "category_id": "8f0af80e-...",
    "address": { ADDRESS_OBJECT },
"quad_keys": [ "1202100011310100210220", "1202100011310100212020" ], "title": "Howdy!", "description": "This is the test suggestion", "created_at": "2019-11-03 09:19:10", "updated_at": "2019-11-03 09:19:10", "rating": 50, "votes_count": { "total": 0, "negative": 0, "neutral": 0, "positive": 0 }, "my_vote": 1, "is_liked": true, "likes_count": 1, "files": [{ FILE_OBJECT }] "category": { "id": "8f0af80e-...", "label": "Andet", "created_at": "2019-11-03 09:19:01", "updated_at": "2019-11-03 09:19:01" }, "user": { USER_OBJECT }, "is_follower": false, "followers_count": 0 } }

Get a suggestion info by ID.

Request Signature

GET /api/tiles/suggest/{suggestionId}

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters
Parameter Required? Description
suggestionId Yes Suggestion ID.
Body Parameters

No body parameters.

Vote for a suggestion

curl --request POST --url /api/tiles/suggest/{suggestionId}/vote
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "value=[value]"

The result of this operation would be a suggestion model with an updated rating.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "id": "8f2b4a8d-5937-421a-9e62-ab93e155ebf6",
    "user_id": "8f05dcdc-db6e-49cd-8ef3-8a24d0c7d37f",
    "suggestion_id": "8f2b4a8d-4760-4512-87f6-4305d055ef6f",
    "value": 2,
    "created_at": "2019-11-19 10:56:11",
    "updated_at": "2019-11-19 11:10:40",
    "suggestion": {
      "id": "8f2b4a8d-4760-4512-87f6-4305d055ef6f",
      "user_id": "8f05dcdc-db6e-49cd-8ef3-8a24d0c7d37f",
      "category_id": "8f0af80e-7959-47e3-9106-deffa6a9554a",
      "quad_keys": [
        "1202100011310100210222"
      ],
      "title": "Howdy!",
      "description": "This is the test suggestion on #1 category.",
      "created_at": "2019-11-19 10:56:11",
      "updated_at": "2019-11-19 10:56:11",
      "rating": 33,
      "votes_count": {
        "total": 3,
        "negative": 2,
        "neutral": 0,
        "positive": 1
      },
      "is_follower": false,
      "followers_count": 0,
      "is_liked": false,
      "likes_count": 0,
      "category": {
        "id": "8f0af80e-7959-47e3-9106-deffa6a9554a",
        "label": "Andet",
        "created_at": "2019-11-03 09:19:01",
        "updated_at": "2019-11-03 09:19:01"
      }
    }
  }
}

Vote on a suggestion. Accepts same format of vote as regular tiles (positive, neutral, negative).

Request Signature

POST /api/tiles/suggest/{suggestionId}/vote

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
suggestionId Suggestion ID user is acting upon.
Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
value Yes A vote value (0 - negative, 1 - neutral, 2 - positive).

Get suggestion comments

curl --request GET --url /api/tiles/suggest/{suggestionId}/comments
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a collection of comments for a given suggestion.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": [
    {
      "id": "8f2b4bd0-...",
      "comment": "This is the suggestion comment 1.",
      "created_at": "2019-11-19 10:59:42",
      "updated_at": "2019-11-19 10:59:42",
      "is_liked": true,
      "likes_count": 1,
      "files": [{ FILE_OBJECT }],
      "suggestion": {
        "id": "8f2b4a8d-...",
        "category_id": "8f0af80e-...",
        "quad_keys": [
          "1202100011310100210222"
        ],
        "title": "Howdy!",
        "description": "This is the test suggestion on #1 category.",
        "created_at": "2019-11-19 10:56:11",
        "updated_at": "2019-11-19 10:56:11",
        "rating": 33,
        "votes_count": {
          "total": 3,
          "negative": 2,
          "neutral": 0,
          "positive": 1
        },
        "is_liked": false,
        "likes_count": 0
        "files": [{ FILE_OBJECT }],
        "category": {
            "id": "9278ab77-...",
            "label": "Trafik",
            "created_at": "2021-01-12 15:41:44",
            "updated_at": "2021-01-12 15:41:44"
        },
"user": { USER_OBJECT }, "is_follower": false, "followers_count": 0, }, "user": { USER_OBJECT } }, { "id": "8f2b4bd0-...", "comment": "This is the suggestion comment 2.", "created_at": "2019-11-19 10:59:42", "updated_at": "2019-11-19 10:59:42", "is_liked": true, "likes_count": 1, "files": [{ FILE_OBJECT }], "suggestion": { "id": "8f2b4a8d-...", "category_id": "8f0af80e-...", "quad_keys": [ "1202100011310100210222" ], "title": "Howdy!", "description": "This is the test suggestion on #2 category.", "created_at": "2019-11-19 10:56:11", "updated_at": "2019-11-19 10:56:11", "rating": 33, "votes_count": { "total": 3, "negative": 2, "neutral": 0, "positive": 1 }, "is_liked": false, "likes_count": 0 "files": [{ FILE_OBJECT }], "category": { "id": "9278ab77-...", "label": "Trafik", "created_at": "2021-01-12 15:41:44", "updated_at": "2021-01-12 15:41:44" },
"user": { USER_OBJECT }, "is_follower": false, "followers_count": 0, }, "user": { USER_OBJECT } } ] }

Get a collection of comments for a given suggestion.

Request Signature

GET /api/tiles/suggest/{suggestionId}/comments

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Post suggestion comment

curl --request POST --url /api/tiles/suggest/{suggestionId}/comments
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --data "comment=[comment]"
    --data "image@/path/to/file"

The result of this operation would be a created suggestion comment model.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": {
    "user_id": "8f05dcdc-db6e-49cd-8ef3-8a24d0c7d37f",
    "comment": "This is the suggestion comment 2.",
    "suggestion_id": "8f2b4a8d-4760-4512-87f6-4305d055ef6f",
    "id": "8f2b5160-237c-4494-bdae-5cf611d4d6df",
    "updated_at": "2019-11-19 11:15:16",
    "created_at": "2019-11-19 11:15:16",
    "is_liked": true,
    "likes_count": 1,
    "file_image": {
      "id": "8f2b5160-287c-48c8-aad6-43c1e8dc8521",
      "scope": "image",
      "links": {
          "sizes": {
              "original": {
                  "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view",
                  "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download"
              },
              "default": {
                  "view": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/view/default",
                  "download": "/api/file/8f29313b-398f-45d7-9ec8-98ed44a11665/download/default"
              }
          }
      }
    },
    "suggestion": {
      "id": "8f2b4a8d-4760-4512-87f6-4305d055ef6f",
      "user_id": "8f05dcdc-db6e-49cd-8ef3-8a24d0c7d37f",
      "category_id": "8f0af80e-7959-47e3-9106-deffa6a9554a",
      "quad_keys": [
        "1202100011310100210222"
      ],
      "title": "Howdy!",
      "description": "This is the test suggestion on #1 category.",
      "created_at": "2019-11-19 10:56:11",
      "updated_at": "2019-11-19 10:56:11",
      "rating": 33,
      "votes_count": {
        "total": 3,
        "negative": 2,
        "neutral": 0,
        "positive": 1
      },
      "is_follower": false,
      "followers_count": 0,
      "is_liked": false,
      "likes_count": 0
    },
    "user": {
      "id": "8f05dcdc-db6e-49cd-8ef3-8a24d0c7d37f",
      "display_name": "Paul O'Reilly",
      "email": "paul@wequbit.com",
      "gender": "male",
      "birth_year": 1990,
      "transport_types": [
        "car",
        "bus"
      ],
      "education": "candidate",
      "work_status": "self_employed",
      "political_views": "center",
      "annual_income": "_..125k",
      "intro": null,
      "created_at": "2019-10-31 20:23:50",
      "updated_at": "2019-10-31 20:23:50"
    }
  }
}

Create a comment on a suggestion.

Request Signature

POST /api/tiles/suggest/{suggestionId}/comments

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
comment Yes A free-form comment message. Max 255 characters.
image No Binary stream of comment-attached image.

Like suggestion comment

curl --request POST --url /api/tiles/suggest/{suggestionId}/comments/{commentId}/like
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "action=[action]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

Like (or dislike) an suggestion comment model.

Request Signature

POST /api/tiles/suggest/{suggestionId}/comments/{commentId}/like

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
suggestionId Suggestion ID user is acting upon.
commentId Comment ID user is acting upon.
Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
action Yes An action to take (like - like comment, dislike - dislike comment)

Report suggestion comment

curl --request POST --url /api/tiles/suggest/{suggestionId}/comments/{commentId}/report
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "action=[action]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

Report (or unmark report) a comment model.

Request Signature

POST /api/tiles/suggest/{suggestionId}/comments/{commentId}/report

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
suggestionId Suggestion ID user is acting upon.
commentId Comment ID user is acting upon.
Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
action Yes An action to take (mark - report comment, unmark - unmark comment reporter)

Follow suggestion

curl --request POST --url /api/tiles/suggest/follow
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --data "suggestions[0][suggestion_id]=[suggestion_id]"
    --data "suggestions[0][action]=[action]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success"
}

Follow (or unfollow) an suggestion model.

Request Signature

POST /api/tiles/suggest/follow

Security

OAuth2 Password Access Token

Path Parameters

No Path Parameters

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description Type
suggestions Yes An array with suggestion to follow or unfollow array
suggestions[0][suggestion_id] Yes Suggestion Id string
suggestions[0][action] Yes Suggestion action (follow or unfollow) string enum (in:follow,unfollow)

My Hood Categories

These are collection of methods to work with my hood categories

My Hood Categories

curl --request GET --url /api/my-hood/categories
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be issued sorted categories

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": [
        {
            "id": "9278ab77-...",
            "label": "Butikker (shops)",
            "created_at": "2021-01-12 15:41:44",
            "updated_at": "2021-01-12 15:41:44",
            "_lft": 1,
            "_rgt": 38,
            "parent_id": null,
            "files": [{ FILE_OBJECT }],
            "has_child_votes": true,
            "weight": 0,
            "children": [
                {
                    "id": "9278ab77-...",
                    "label": "Supermarked | discount",
                    "created_at": "2021-01-12 15:41:44",
                    "updated_at": "2021-01-12 15:41:44",
                    "_lft": 2,
                    "_rgt": 3,
                    "parent_id": "9278ab77-...",
                    "files": [{ FILE_OBJECT }],
                    "has_child_votes": false,
                    "weight": 0,
                    "children": []
                },
                {
                    "id": "9278ab77-...",
                    "label": "Supermarked | standard",
                    "created_at": "2021-01-12 15:41:44",
                    "updated_at": "2021-01-12 15:41:44",
                    "_lft": 4,
                    "_rgt": 5,
                    "parent_id": "9278ab77-...",
                    "files": [{ FILE_OBJECT }],
                    "has_child_votes": false,
                    "weight": 2,
                    "children": []
                }
            ]
        }
    }
}
Request Signature

GET /api/my-hood/categories

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Post category suggestion

curl --request POST --url /api/my-hood/categories/suggest
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --data "parent_id=[parent_id]"
    --data "label=[label]"

The result of this operation would be an indication of a success.

{
  "label": "TEST_TEST",
  "is_suggested": "true",
  "parent_id": "91b0da0c-bd77-4ff2-8d3c-f3546eef4a30",
  "_lft": 38,
  "_rgt": 39,
  "id": "91b772ad-065c-45e5-a2ab-04e2e04e739b",
  "updated_at": "2020-10-08 15:28:09",
  "created_at": "2020-10-08 15:28:09",
  "children": {},
}

Send suggestion category

Request Signature

POST /api/my-hood/categories/suggest

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description Type
parent_id Yes Parent category id string
label Yes Name of suggested category string

Post feedback for my hood category

curl --request POST --url /api/my-hood/feedback
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --data "votes_data[0][my_hood_category_id]=[my_hood_category_id]"
    --data "votes_data[0][weight]=[weight]"

The result of this operation would be an indication of a success.

{
  "httpCode": 200,
  "operationStatus": "success",
  "response": [
    {
      "id": "91b0e33a-bd36-443b-9d5e-422eb5a0c31f",
      "user_id": "8f0b604e-f9b3-4df0-b75e-c65e15c6edc2",
      "my_hood_category_id": "91b8f43b-cff7-4a55-aff6-47ae4137f73d",
      "weight": 2,
      "created_at": "2020-10-05 09:12:05",
      "updated_at": "2020-10-05 09:12:05"
    }
  ]
}

Send feedback on my hood category

Request Signature

POST /api/my-hood/feedback

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description Type
votes_data Yes Array of votes data array
votes_data[0][my_hood_category_id] Yes My Hood Category id string
votes_data[0][weight] Yes Vote value integer

Get user feedback

curl --request GET --url /api/my-hood/feedback
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be list of feedback from current user

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": [
        {
            "id": "92764c5d-...",
            "user_id": "926a3150-...",
            "category": {
                "id": "91b8f43c-...",
                "label": "Spa",
                "is_suggested": false,
                "created_at": "2020-10-09 07:26:16",
                "updated_at": "2020-10-09 07:26:16",
                "_lft": 110,
                "_rgt": 111,
                "parent_id": "91b8f43c-..."
            },
            "parent_category": {
                "id": "91b8f43c-...",
                "label": "Sport og sundhed",
                "is_suggested": false,
                "created_at": "2020-10-09 07:26:16",
                "updated_at": "2020-10-09 07:26:16",
                "_lft": 101,
                "_rgt": 114,
                "parent_id": null
            },
            "weight": 2,
            "created_at": "2021-01-11 12:24:10"
        },
        {
            "id": "92764cef-...",
            "user_id": "926a3150-...",
            "category": {
                "id": "91b8f43c-...",
                "label": "Café | hyggelig",
                "is_suggested": false,
                "created_at": "2020-10-09 07:26:15",
                "updated_at": "2020-10-09 07:26:15",
                "_lft": 50,
                "_rgt": 51,
                "parent_id": "91b8f43c-..."
            },
            "parent_category": {
                "id": "91b8f43c-...",
                "label": "Mad og drikke (food & drink)",
                "is_suggested": false,
                "created_at": "2020-10-09 07:26:15",
                "updated_at": "2020-10-09 07:26:15",
                "_lft": 37,
                "_rgt": 100,
                "parent_id": null
            },
            "weight": 1,
            "created_at": "2021-01-11 12:25:45"
        }
    ]
}

User feedback

Request Signature

GET /api/my-hood/feedback

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Notifications

These are collection of notifications methods.

Get all notification dates

curl --request GET --url /api/notification
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of notification dates

{
  "response": [
    {
      "demographic": "2020-12-14 10:35:48",
    }
  ]
}
Request Signature

GET /api/notification

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Update demographic date

curl --request POST --url /api/notification/demographic
    --header "Authorization: [token_type] [access_token]"

This request will update the demographic date

Request Signature

POST /api/notification/demographic

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters

No body parameters.

Dashboard

These are collection of Dashboard methods

Tile Parameters

These are collection of Tile Parameters methods

Tile Get Parameter

curl --request GET --url /api/dashboard/tile-parameter/{id}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a parameter.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "9278ab77-0688-4a4b-b573-fdc7c9b5ca4e",
        "label": "Atmosfære",
        "created_at": "2021-01-12 15:41:44",
        "updated_at": "2021-01-12 15:41:44",
        "label_translations": {
            "da": "AtmosphereDA",
            "en": "AtmosphereEN"
        },
"files": [ { FILE_OBJECT } ], } }

Get a tile parameter by ID.

Request Signature

GET /api/dashboard/tile-parameter/{id}

Security

OAuth2 Password Access Token

Tile Get Parameters

curl --request GET --url /api/dashboard/tile-parameter?language_code=dk
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of available voting parameters.

{
    "count": 5,
    "data": [
        {
            "id": "9278ab77-0688-4a4b-b573-fdc7c9b5ca4e",
            "title": "AtmosfÊre",
            "icon": "https://localhost/api/file/9278ab77-06fe-4390-a7b1-d11c3ddf0369/view"
        },
        {
            "id": "9278ab77-087d-48e1-ac93-1435c5617527",
            "title": "SkÞnhed",
            "icon": "https://localhost/api/file/9278ab77-08d0-4900-8f95-26146e84c75a/view"
        },
        {
            "id": "9278ab77-0937-49c6-9192-77807bbcf733",
            "title": "Aktivitetsniveau",
            "icon": "https://localhost/api/file/9278ab77-098c-4962-a743-19382a0f91d0/view"
        },
        {
            "id": "9278ab77-09e0-47b7-a40a-748a003542f0",
            "title": "StÞrrelse / skala",
            "icon": "https://localhost/api/file/9278ab77-0a19-4566-98e0-40b2744139e5/view"
        },
        {
            "id": "9278ab77-0a5c-412a-8cca-c43d918cd71a",
            "title": "GrÞnt",
            "icon": "https://localhost/api/file/9278ab77-0a94-4ffa-ad06-ca2b53e8a44b/view"
        }
    ]
}

Get a list of available voting parameters.

Request Signature

GET /api/dashboard/tile-parameter?language_code={language_code}

Security

OAuth2 Password Access Token

Query Parameters
Parameter Required? Description
language_code No Available language, default - "en"

Tile Get Suggested Parameters

curl --request GET --url /api/dashboard/tile-parameter/suggested
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of suggested voting parameters.

{
    "count": 5,
    "data": [
        {
            "id": "9278ab77-0688-4a4b-b573-fdc7c9b5ca4e",
            "title": "AtmosfÊre",
            "icon": "https://localhost/api/file/9278ab77-06fe-4390-a7b1-d11c3ddf0369/view"
        },
        {
            "id": "9278ab77-087d-48e1-ac93-1435c5617527",
            "title": "SkÞnhed",
            "icon": "https://localhost/api/file/9278ab77-08d0-4900-8f95-26146e84c75a/view"
        },
        {
            "id": "9278ab77-0937-49c6-9192-77807bbcf733",
            "title": "Aktivitetsniveau",
            "icon": "https://localhost/api/file/9278ab77-098c-4962-a743-19382a0f91d0/view"
        }
    ]
}

Get a list of suggested voting parameters.

Request Signature

GET /api/dashboard/tile-parameter/suggested

Security

OAuth2 Password Access Token

Update Tile parameter

curl --request POST --url /api/dashboard/tile-parameter/update/{parameterId}
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "labels[da]=[label_danish]"
    --form "labels[en]=[label_english]"
    --form "suggested=[true]"
    --form "image@/path/to/file"

The result of this operation would be a updated tile parameter

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "9278ab77-0688-4a4b-b573-fdc7c9b5ca4e",
        "label": "AtmosfÊre update label",
        "created_at": "2021-01-12 15:41:44",
        "updated_at": "2021-01-12 15:41:44",
        "file_image": {
            "id": "9278ab77-06fe-4390-a7b1-d11c3ddf0369",
            "scope": "image",
            "links": {
                "sizes": {
                    "original": {
                        "view": "https://localhost/api/file/9278ab77-06fe-4390-a7b1-d11c3ddf0369/view",
                        "download": "https://localhost/api/file/9278ab77-06fe-4390-a7b1-d11c3ddf0369/download"
                    },
                    "default": {
                        "view": "https://localhost/api/file/9278ab77-06fe-4390-a7b1-d11c3ddf0369/view/default",
                        "download": "https://localhost/api/file/9278ab77-06fe-4390-a7b1-d11c3ddf0369/download/default"
                    }
                }
            }
        }
    }
}

Update tile parameter.

Request Signature

POST /api/dashboard/tile-parameter/update/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
parameterId Parameter ID.
Body Parameters
Parameter Required? Description
labels.da Yes The label translation in Danish.
labels.en Yes The label translation in English.
suggested No Make parameter active if false.
image No Image to attach to the parameter.

Create Tile parameter

curl --request POST --url /api/dashboard/tile-parameter/create
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "labels[da]=[label_danish]"
    --form "labels[en]=[label_english]"
    --form "suggested=[true]"
    --form "image@/path/to/file"

The result of this operation would be a created tile parameter

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "9278ab77-0688-4a4b-b573-fdc7c9b5ca4e",
        "label": "AtmosfÊre update label",
        "created_at": "2021-01-12 15:41:44",
        "updated_at": "2021-01-12 15:41:44",
        "files": [{ FILE_OBJECT }]
    }
}

Create tile parameter.

Request Signature

POST /api/dashboard/tile-parameter/create

Security

OAuth2 Password Access Token

Body Parameters
Parameter Required? Description
labels.da Yes The label translation in Danish.
labels.en Yes The label translation in English.
suggested No Make parameter active if false.
image No Image to attach to the parameter.

Delete Tile parameter

curl --request GET --url /api/dashboard/tile-parameter/delete/{parameterId}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be an indication of a success.

{
    "httpCode": 200,
    "operationStatus": "success",
}

Delete Tile parameter.

Request Signature

GET /api/dashboard/tile-parameter/delete/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
parameterId Parameter ID.

Demand

These are collection of Demand methods

Get Categories

curl --request GET --url /api/dashboard/demand-category?language_code=dk
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of Demand categories.

{
    "count": 4,
    "data": [
        {
            "id": "9278ab77-3aca-49ca-84e8-f6b608430c28",
            "parentId": null,
            "title": "Butikker (shops)",
            "icon": ""
        },
        {
            "id": "9278ab77-3bbe-42e9-ac44-f5f0cd5c86f8",
            "parentId": "9278ab77-3aca-49ca-84e8-f6b608430c28",
            "title": "Supermarked | discount",
            "icon": ""
        },
        {
            "id": "9278ab77-3cbf-4a70-9c5e-40a4cf49b189",
            "parentId": "9278ab77-3aca-49ca-84e8-f6b608430c28",
            "title": "Supermarked | standard",
            "icon": ""
        },
        {
            "id": "9278ab77-3dbe-445d-99cc-03d46b61cd67",
            "parentId": "9278ab77-3aca-49ca-84e8-f6b608430c28",
            "title": "Supermarked | gourmet",
            "icon": ""
        }
    }
}

Get a list of available categories.

Request Signature

GET /api/dashboard/demand-category?language_code={language_code}

Security

OAuth2 Password Access Token

Query Parameters
Parameter Required? Description
language_code No Available language, default - "en"

Get Root Categories

curl --request GET --url /api/dashboard/demand-category/root-categories
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of Root Demand categories.

{
    "count": 4,
    "data": [
        {
            "id": "9278ab77-3aca-49ca-84e8-f6b608430c28",
            "parentId": null,
            "title": "Butikker (shops)",
            "icon": ""
        },
        {
            "id": "9278ab77-3bbe-42e9-ac44-f5f0cd5c86f8",
            "parentId": null,
            "title": "Supermarked | discount",
            "icon": ""
        },
        {
            "id": "9278ab77-3cbf-4a70-9c5e-40a4cf49b189",
            "parentId": null,
            "title": "Supermarked | standard",
            "icon": ""
        },
        {
            "id": "9278ab77-3dbe-445d-99cc-03d46b61cd67",
            "parentId": null,
            "title": "Supermarked | gourmet",
            "icon": ""
        }
    }
}

Get a list of available root categories.

Request Signature

GET /api/dashboard/demand-category/root-categories

Security

OAuth2 Password Access Token

Get Demand Category

curl --request GET --url /api/dashboard/demand-category/{id}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a Demand category.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "9278ab77-3aca-49ca-84e8-f6b608430c28",
        "label": "Butikker",
        "is_suggested": false,
        "created_at": "2021-01-12 15:41:44",
        "updated_at": "2021-01-12 15:41:44",
        "_lft": 1,
        "_rgt": 38,
        "parent_id": null,
        "label_translations": {
            "da": "Butikker",
            "en": "Shops"
        },
        "files": [{ FILES }]
} }

Get a demand category by ID.

Request Signature

GET /api/dashboard/demand-category/{id}

Security

OAuth2 Password Access Token

Get suggested Categories

curl --request GET --url /api/dashboard/demand-category/suggested
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of suggested Demand categories.

{
    "count": 4,
    "data": [
        {
            "id": "9278ab77-3aca-49ca-84e8-f6b608430c28",
            "parentId": null,
            "title": "Butikker (shops)",
            "icon": ""
        },
        {
            "id": "9278ab77-3bbe-42e9-ac44-f5f0cd5c86f8",
            "parentId": "9278ab77-3aca-49ca-84e8-f6b608430c28",
            "title": "Supermarked | discount",
            "icon": ""
        },
        {
            "id": "9278ab77-3cbf-4a70-9c5e-40a4cf49b189",
            "parentId": "9278ab77-3aca-49ca-84e8-f6b608430c28",
            "title": "Supermarked | standard",
            "icon": ""
        },
        {
            "id": "9278ab77-3dbe-445d-99cc-03d46b61cd67",
            "parentId": "9278ab77-3aca-49ca-84e8-f6b608430c28",
            "title": "Supermarked | gourmet",
            "icon": ""
        }
    }
}

Get a list of suggested categories.

Request Signature

GET /api/dashboard/demand-category/suggested

Security

OAuth2 Password Access Token

Delete category

curl --request GET --url /api/dashboard/demand-category/delete/{categoryId}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be an indication of a success.

{
    "httpCode": 200,
    "operationStatus": "success",
}

Delete Demand category.

Request Signature

GET /api/dashboard/demand-category/delete/{categoryId}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
categoryId My hood category ID.

Update category

curl --request POST --url /api/dashboard/demand-category/update/{categoryId}
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "labels[da]=[label_danish]"
    --form "labels[en]=[label_english]"
    --form "is_suggested=[true]"
    --form "icon@/path/to/file"
    --form "parent_id=[parent_id]"

The result of this operation would be a updated category

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "9278ab77-...",
        "label": "category",
        "is_suggested": true,
        "created_at": "2021-01-12 15:41:44",
        "updated_at": "2021-02-04 11:40:57",
        "_lft": 13,
        "_rgt": 14,
        "parent_id": "9278ab77-...",
        "file_image": {
            "id": "93859042-...",
            "scope": "image",
            "links": {
                "sizes": {
                    "original": {
                        "view": "/api/file/93859042-.../view",
                        "download": "/api/file/93859042-.../download"
                    },
                    "default": {
                        "view": "/api/file/93859042-.../view/default",
                        "download": "/api/file/93859042-.../download/default"
                    }
                }
            }
        }
} }

Update Demand category.

Request Signature

POST /api/dashboard/demand-category/update/{categoryId}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
categoryId My hood category ID.
Body Parameters
Parameter Required? Description
labels.da Yes The label translation in Danish.
labels.en Yes The label translation in English.
is_suggested No Make category active.
parent_id Yes ID of parent category.
icon No Binary stream of category icon.

Create category

curl --request POST --url /api/dashboard/demand-category/create
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "labels[da]=[label_danish]"
    --form "labels[en]=[label_english]"
    --form "is_suggested=[true]"
    --form "icon@/path/to/file"
    --form "parent_id=[parent_id]"

The result of this operation would be a created category

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "9278ab77-...",
        "label": "new category",
        "is_suggested": true,
        "created_at": "2021-01-12 15:41:44",
        "updated_at": "2021-02-04 11:40:57",
        "_lft": 13,
        "_rgt": 14,
        "parent_id": "9278ab77-..."
    }
}

Create Demand category.

Request Signature

POST /api/dashboard/demand-category/create

Security

OAuth2 Password Access Token

Body Parameters
Parameter Required? Description
labels.da Yes The label translation in Danish.
labels.en Yes The label translation in English.
is_suggested No Make category active.
parent_id Yes ID of parent category.
icon No Binary stream of category icon.

Suggestions

These are collection of Suggestions methods

Get all suggestion categories

curl --request GET --url /api/dashboard/suggest-category
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of available suggestion categories.

{
    "count": 7,
    "data": [
        {
            "id": "9278ab77-284e-4f34-8da1-d7948ab25e1e",
            "title": "Vej og fortov"
        },
        {
            "id": "9278ab77-28c6-4a82-b881-3d553279e2af",
            "title": "Byinventar"
        },
        {
            "id": "9278ab77-2922-4e2a-afda-b091e8473c1f",
            "title": "Opholdsareal"
        },
        {
            "id": "9278ab77-2973-49c7-ad41-c1fa5d2ab790",
            "title": "Nye faciliteter"
        },
        {
            "id": "9278ab77-29b1-4cea-9ab6-ad8b03bc0dc4",
            "title": "Beplantning"
        },
        {
            "id": "9278ab77-29f0-4b0d-bda7-94cc6957dc53",
            "title": "Trafik"
        },
        {
            "id": "9278ab77-2a2e-4d8f-a9cd-97ae60b61a23",
            "title": "Andet"
        }
    ]
}

Get a list of available suggestion categories.

Request Signature

GET /api/dashboard/suggest-category

Security

OAuth2 Password Access Token

Get suggested Category

curl --request GET --url /api/dashboard/suggest-category/{id}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a suggested category.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "9278ab77-284e-4f34-8da1-d7948ab25e1e",
        "label": "Vej og fortov",
        "created_at": "2021-01-12 15:41:44",
        "updated_at": "2021-01-12 15:41:44"
    }
}

Get a suggested category by ID.

Request Signature

GET /api/dashboard/suggest-category/{id}

Security

OAuth2 Password Access Token

Get suggestion comments

curl --request GET --url /api/dashboard/suggest-comment
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a collection of comments for a given suggestion.

{
    "count": 2,
    "data": [
        {
            "id": "927a4e0c-c75f-486a-9928-5d2b9dbe2a1d",
            "userId": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
            "suggestId": "927a4e0c-c75f-486a-9928-5d2b9dbe2a7d",
            "likes": 0,
            "content": "Hello :)",
            "value": 0,
            "date": "2021.02.04",
            "user": {
                "id": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
                "fullName": "user name",
                "avatar": null
            }
        },
        {
            "id": "927a4e0c-c75f-486a-9928-5d2b9dbe2a1d",
            "userId": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
            "suggestId": "927a4e0c-c75f-486a-9928-5d2b9dbe2a7d",
            "likes": 0,
            "content": "Hello 2 :)",
            "value": 0,
            "date": "2021.02.04",
            "user": {
                "id": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
                "fullName": "user name",
                "avatar": null
            }
        }
    ]
}

Get a collection of comments for a given suggestion.

Request Signature

GET /api/dashboard/suggest-comment

Security

OAuth2 Password Access Token

Query Parameters
Parameter Required? Description
suggestId[] Yes An array of suggestion ids
count Yes Number of records
page Yes Page
orderWay Yes Order way - asc or desc
orderBy Yes Order by - date or likes
value Yes A vote value (0 - negative, 1 - neutral, 2 - positive)

Create Suggestion category

curl --request POST --url /api/dashboard/suggest-category/create
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --data "label=[label]"

The result of this operation would be a created suggestion category

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "label": "Category",
        "id": "93600904-1ce1-4e54-ac00-16e4f6995217",
        "updated_at": "2021-05-07 16:59:34",
        "created_at": "2021-05-07 16:59:34"
    }
}

Create Suggestion category.

Request Signature

POST /api/dashboard/suggest-category/create

Security

OAuth2 Password Access Token

Body Parameters
Parameter Required? Description
label Yes The label category.

Delete Suggestion category

curl --request POST --url /api/dashboard/suggest-category/delete/{categoryId}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be an indication of a success.

{
    "httpCode": 200,
    "operationStatus": "success",
}

Delete Suggestion category.

Request Signature

GET /api/dashboard/suggest-category/delete/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
categoryId Category ID.

Update Suggestion category

curl --request POST --url /api/dashboard/suggest-category/update/{categoryId}
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --data "label=[label]"

The result of this operation would be a updated suggestion category

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "93600904-1ce1-4e54-ac00-16e4f6995217",
        "label": "Updated category",
        "created_at": "2021-05-07 16:59:34",
        "updated_at": "2021-05-07 17:02:39"
    }
}

Update Suggestion category.

Request Signature

POST /api/dashboard/suggest-category/update/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
categoryId Category ID.
Body Parameters
Parameter Required? Description
label Yes The label category.

Tile

These are collection of Tile methods

Get comments

curl --request GET --url /api/dashboard/tile-comment
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a collection of comments for a given tiles or Bounding Box.

{
    "count": 1,
    "data": [
        {
            "id": "928cabd0-b686-4869-9019-085607cd65e2",
            "user_id": "92967238-5c53-4580-88f9-ba99bd1aff97",
            "parameterId": "9278ab77-0937-49c6-9192-77807bbcf733",
            "quadKeys": [
                "1230020311333311002133"
            ],
            "value": 1,
            "likes": 1,
            "content": "hi",
            "date": "2021.01.22",
            "user": {
                "id": "92967238-5c53-4580-88f9-ba99bd1aff97",
                "fullName": "name",
                "avatar": null
            },
            "images": []
        }
    ]
}

Get a collection of comments for a given tiles or Bounding Box.

Request Signature

GET /api/dashboard/tile-comment

Security

OAuth2 Password Access Token

Query Parameters
Parameter Required? Description
quadKeys[] No An array of quad keys
bounds[east] No Bounding box east (min latitude) bound.
bounds[north] No Bounding box north (min latitude) bound.
bounds[south] No Bounding box south (min latitude) bound.
bounds[west] No Bounding box west (min latitude) bound.
parameterId No Tile Parameter ID
hasParameter No true or false
count Yes Number of records
page Yes Page
orderWay Yes Order way - asc or desc
orderBy Yes Order by - date, rating or likes
value No A vote value (0 - negative, 1 - neutral, 2 - positive)

Markers

These are collection of Markers methods

Get markers

curl --request GET --url /api/dashboard/city-center
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of markers on map.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": [
        {
            "id": "20.926208496094 2 20.926208496094",
            "total": 2,
            "point": {
                "lat": 20.92620849609375,
                "lng": 143.8824462890625
            }
        },
        {
            "id": "55.670471191406 2 55.670471191406",
            "total": 2,
            "point": {
                "lat": 55.67047119140625,
                "lng": 12.5958251953125
            }
        },
        {
            "id": "-84.767761230469 2 -84.767761230469",
            "total": 2,
            "point": {
                "lat": -84.76776123046875,
                "lng": 178.3905029296875
            }
        },
        {
            "id": "39.465637207031 2 39.465637207031",
            "total": 2,
            "point": {
                "lat": 39.46563720703125,
                "lng": -0.3680419921875
            }
        },
        {
            "id": "15.586853027344 1 15.586853027344",
            "total": 1,
            "point": {
                "lat": 15.58685302734375,
                "lng": 143.8824462890625
            }
        },
        {
            "id": "55.692443847656 1 55.692443847656",
            "total": 1,
            "point": {
                "lat": 55.69244384765625,
                "lng": 8.9923095703125
            }
        },
        {
            "id": "55.159606933594 1 55.159606933594",
            "total": 1,
            "point": {
                "lat": 55.15960693359375,
                "lng": 8.8824462890625
            }
        },
        {
            "id": "24.897766113281 1 24.897766113281",
            "total": 1,
            "point": {
                "lat": 24.89776611328125,
                "lng": 77.1405029296875
            }
        },
        {
            "id": "24.892272949219 1 24.892272949219",
            "total": 1,
            "point": {
                "lat": 24.89227294921875,
                "lng": 77.1295166015625
            }
        },
        {
            "id": "-83.482360839844 1 -83.482360839844",
            "total": 1,
            "point": {
                "lat": -83.48236083984375,
                "lng": 143.8824462890625
            }
        },
        {
            "id": "-65.201110839844 1 -65.201110839844",
            "total": 1,
            "point": {
                "lat": -65.20111083984375,
                "lng": 99.6295166015625
            }
        },
        {
            "id": "-83.482360839844 1 -83.482360839844",
            "total": 1,
            "point": {
                "lat": -83.48236083984375,
                "lng": -36.1175537109375
            }
        }
    ]
}

Get a list of markers on map.

Request Signature

GET /api/dashboard/city-center

Query Parameters
Parameter Required? Description
type Yes Type of markers (overview, suggestions, demand)
Security

OAuth2 Password Access Token

Tile Analytics

These are collection of Analytics methods

Overview analytic

These are collection of Overview methods

Get Votes

curl --request GET --url /api/dashboard/tile
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of Tile votes.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "count": 2,
        "data": [
            {
                "id": "1202100011310102301233",
                "quadKey": "1202100011310102301233",
                "address": "street 12",
                "percentile": 0,
                "votesTotal": 1,
                "votesGeneral": 0,
                "votesPositive": 0,
                "votesNeutral": 1,
                "votesNegative": 0,
                "votesLocalPositive": 0,
                "votesLocalNeutral": 0,
                "votesLocalNegative": 0,
                "votesSurroundingGeneral": 0,
                "votesSurroundingTotal": 0,
                "votesSurroundingPositive": 0,
                "votesSurroundingNeutral": 0,
                "votesSurroundingNegative": 0,
                "commentsTotal": 0,
                "commentsGeneral": 0,
                "commentsPositive": 0,
                "commentsNeutral": 0,
                "commentsNegative": 0,
                "voteParameters": {
                    "9278ab77-0c48-4ffc-96a3-d52b19e6e0fc": {
                        "parameter_id": "9278ab77-0c48-4ffc-96a3-d52b19e6e0fc",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0,
                        "localPositive": 0,
                        "localNeutral": 0,
                        "localNegative": 0,
                        "surroundingTotal": 0,
                        "surroundingPositive": 0,
                        "surroundingNeutral": 0,
                        "surroundingNegative": 0
                    }
                },
                "voteGenders": {
                    "male": {
                        "gender": "male",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0
                    }
                },
                "voteGroups": {
                    "20-29": {
                        "age": "20-29",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0
                    }
                },
                "voteTransports": {
                    "bus": {
                        "type": "bus",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0
                    }
                }
            },
            {
                "id": "1202100011310102300130",
                "quadKey": "1202100011310102300130",
                "address": "street 11",
                "percentile": 0,
                "votesTotal": 1,
                "votesGeneral": 0,
                "votesPositive": 0,
                "votesNeutral": 1,
                "votesNegative": 0,
                "votesLocalPositive": 0,
                "votesLocalNeutral": 0,
                "votesLocalNegative": 0,
                "votesSurroundingGeneral": 1,
                "votesSurroundingTotal": 1,
                "votesSurroundingPositive": 0,
                "votesSurroundingNeutral": 1,
                "votesSurroundingNegative": 0,
                "commentsTotal": 0,
                "commentsGeneral": 0,
                "commentsPositive": 0,
                "commentsNeutral": 0,
                "commentsNegative": 0,
                "voteParameters": {
                    "9278ab77-0c48-4ffc-96a3-d52b19e6e0fc": {
                        "parameter_id": "9278ab77-0c48-4ffc-96a3-d52b19e6e0fc",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0,
                        "localPositive": 0,
                        "localNeutral": 0,
                        "localNegative": 0,
                        "surroundingTotal": 0,
                        "surroundingPositive": 0,
                        "surroundingNeutral": 0,
                        "surroundingNegative": 0
                    }
                },
                "voteGenders": {
                    "male": {
                        "gender": "male",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0
                    }
                },
                "voteGroups": {
                    "20-29": {
                        "age": "20-29",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0
                    }
                },
                "voteTransports": {
                    "bus": {
                        "type": "bus",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0
                    }
                }
            }
        ],
        "summary": {
            "dates": {
                "2021-02": 1
            },
            "votes": 1,
            "address": "street 12",
            "parameters": {
                "9278ab77-0c48-4ffc-96a3-d52b19e6e0fc": {
                    "votes": 1
                }
            }
        }
    }
}

Get a list of Tile votes.

Request Signature

GET /api/dashboard/tile

Security

OAuth2 Password Access Token

Query Parameters

Parameter Required? Description
quadKeys[] No An array of quadKeys
bounds[east] No Bounding box east (min latitude) bound.
bounds[north] No Bounding box north (min latitude) bound.
bounds[south] No Bounding box south (min latitude) bound.
bounds[west] No Bounding box west (min latitude) bound.
withSummary No Display summary statistics (true or false)

Get Votes list by month

curl --request GET --url /api/dashboard/tile-analytic
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a votes list by month

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "count": 2,
        "data": [
            {
                "id": "1202100011310102301233",
                "quadKey": "1202100011310102301233",
                "date": "2021-02",
                "address": "street 11",
                "votesTotal": 1,
                "votesPositive": 0,
                "votesNeutral": 1,
                "votesNegative": 0,
                "votesSurroundingTotal": 0,
                "voteParameters": {
                    "9278ab77-0c48-4ffc-96a3-d52b19e6e0fc": {
                        "parameter_id": "9278ab77-0c48-4ffc-96a3-d52b19e6e0fc",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0,
                        "localPositive": 0,
                        "localNeutral": 0,
                        "localNegative": 0,
                        "surroundingTotal": 0
                    }
                }
            },
            {
                "id": "1202100011310102300130",
                "quadKey": "1202100011310102300130",
                "date": "2021-02",
                "address": "street 11",
                "votesTotal": 1,
                "votesPositive": 0,
                "votesNeutral": 1,
                "votesNegative": 0,
                "votesSurroundingTotal": 0,
                "voteParameters": {
                    "9278ab77-0c48-4ffc-96a3-d52b19e6e0fc": {
                        "parameter_id": "9278ab77-0c48-4ffc-96a3-d52b19e6e0fc",
                        "positive": 0,
                        "neutral": 1,
                        "negative": 0,
                        "localPositive": 0,
                        "localNeutral": 0,
                        "localNegative": 0,
                        "surroundingTotal": 0
                    }
                }
            }
        ]
    }
}

Get a list of Tile votes separated by month.

Request Signature

GET /api/dashboard/tile-analytic

Security

OAuth2 Password Access Token

Query Parameters

Parameter Required? Description
quadKeys[] No An array of quadKeys
bounds[east] No Bounding box east (min latitude) bound.
bounds[north] No Bounding box north (min latitude) bound.
bounds[south] No Bounding box south (min latitude) bound.
bounds[west] No Bounding box west (min latitude) bound.

Suggestions analytic

These are collection of Suggestions methods

Get suggestion by ID

curl --request GET --url /api/dashboard/suggest/{suggestionId}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a suggestion.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "927a4e0c-c75f-486a-9928-5d2b9dbe2a7d",
        "address": "Street 21",
        "userId": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
        "categoryId": "9278ab77-29f0-4b0d-bda7-94cc6957dc53",
        "top5Ids": [
            "927a4e0c-c75f-486a-9928-5d2b9dbe2a7d"
        ],
        "quadKeys": [
            "1202011001122011110100",
            "1202100011310100210220"
        ],
        "title": "Suggestion",
        "description": "Suggestion description",
        "image": [],
        "user": {
            "id": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
            "fullName": "user name",
            "image": []
        },
        "votesMonth": [
            {
                "date": "2021-01",
                "votes_negative": 0,
                "votes_neutral": 1,
                "votes_positive": 0,
                "votes_local_negative": 0,
                "votes_local_neutral": 0,
                "votes_local_positive": 0
            },
            {
                "date": "2020-01",
                "votes_negative": 0,
                "votes_neutral": 0,
                "votes_positive": 1,
                "votes_local_negative": 0,
                "votes_local_neutral": 0,
                "votes_local_positive": 0
            }
        ],
        "votesTotal": 2,
        "votesPositive": 1,
        "votesNeutral": 1,
        "votesNegative": 0,
        "votesLocalPositive": 0,
        "votesLocalNeutral": 0,
        "votesLocalNegative": 0,
        "rateSurrounding": 2,
        "commentsTotal": 1,
        "date": "2021-01-13",
        "updateDate": "2021-01-13",
        "updateDays": 0
    }
}

Get a suggestion.

Request Signature

GET /api/dashboard/suggest/{suggestionId}

Security

OAuth2 Password Access Token

Path Parameters

Parameter Description
suggestionId Suggestion ID.

Get suggestions

curl --request GET --url /api/dashboard/suggest
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of Suggestions.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "count": 1,
        "data": [
            {
                "id": "927a4e0c-c75f-486a-9928-5d2b9dbe2a7d",
                "address": "street 12",
                "userId": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
                "categoryId": "9278ab77-29f0-4b0d-bda7-94cc6957dc53",
                "top5Ids": [
                    "927a4e0c-c75f-486a-9928-5d2b9dbe2a7d"
                ],
                "quadKeys": [
                    "1202011001122011110100",
                    "1202100011310100210220"
                ],
                "title": "Title",
                "description": "Description",
                "image": [],
                "user": {
                    "id": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
                    "fullName": "user name",
                    "image": []
                },
                "votesMonth": [
                    {
                        "date": "2021-01",
                        "votes_negative": 0,
                        "votes_neutral": 1,
                        "votes_positive": 0,
                        "votes_local_negative": 0,
                        "votes_local_neutral": 0,
                        "votes_local_positive": 0
                    },
                    {
                        "date": "2020-01",
                        "votes_negative": 0,
                        "votes_neutral": 0,
                        "votes_positive": 1,
                        "votes_local_negative": 0,
                        "votes_local_neutral": 0,
                        "votes_local_positive": 0
                    }
                ],
                "votesTotal": 2,
                "votesPositive": 1,
                "votesNeutral": 1,
                "votesNegative": 0,
                "votesLocalPositive": 0,
                "votesLocalNeutral": 0,
                "votesLocalNegative": 0,
                "rateSurrounding": 2,
                "commentsTotal": 1,
                "date": "2021-01-13",
                "updateDate": "2021-01-13",
                "updateDays": 0
            }
        ]
    }
}

Get a list of Suggestions.

Request Signature

GET /api/dashboard/suggest

Security

OAuth2 Password Access Token

Query Parameters

Parameter Required? Description
quadKeys[] No An array of quadKeys
bounds[east] No Bounding box east (min latitude) bound.
bounds[north] No Bounding box north (min latitude) bound.
bounds[south] No Bounding box south (min latitude) bound.
bounds[west] No Bounding box west (min latitude) bound.

Get Suggestions list by month

curl --request GET --url /api/dashboard/suggest-analytic
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a suggestions list by month

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "count": 2,
        "data": [
            {
                "id": "927a4e0c-c75f-486a-9928-5d2b9dbe2a7d-2021-01",
                "address": "street 12",
                "userId": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
                "categoryId": "9278ab77-29f0-4b0d-bda7-94cc6957dc53",
                "quadKeys": [
                    "1202011001122011110100",
                    "1202100011310100210220"
                ],
                "title": "Title",
                "description": "Description",
                "image": [],
                "user": {
                    "id": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
                    "fullName": "user name",
                    "image": []
                },
                "votesTotal": 1,
                "votesPositive": 0,
                "votesNeutral": 1,
                "votesNegative": 0,
                "votesLocalPositive": 0,
                "votesLocalNeutral": 0,
                "votesLocalNegative": 0,
                "date": "2021-01"
            },
            {
                "id": "927a4e0c-c75f-486a-9928-5d2b9dbe2a7d-2020-01",
                "address": "",
                "userId": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
                "categoryId": "9278ab77-29f0-4b0d-bda7-94cc6957dc53",
                "quadKeys": [
                    "1202011001122011110100",
                    "1202100011310100210220"
                ],
                "title": "Title",
                "description": "Description",
                "image": [],
                "user": {
                    "id": "9278b1dc-de74-46ab-adc8-f9448e8bc029",
                    "fullName": "user name",
                    "image": []
                },
                "votesTotal": 1,
                "votesPositive": 1,
                "votesNeutral": 0,
                "votesNegative": 0,
                "votesLocalPositive": 0,
                "votesLocalNeutral": 0,
                "votesLocalNegative": 0,
                "date": "2020-01"
            }
        ]
    }
}

Get a list of Suggestions separated by month.

Request Signature

GET /api/dashboard/suggest-analytic

Security

OAuth2 Password Access Token

Query Parameters

Parameter Required? Description
quadKeys[] No An array of quadKeys
bounds[east] No Bounding box east (min latitude) bound.
bounds[north] No Bounding box north (min latitude) bound.
bounds[south] No Bounding box south (min latitude) bound.
bounds[west] No Bounding box west (min latitude) bound.

Demand analytic

These are collection of Demand methods

Get Votes

curl --request GET --url /api/dashboard/demand-vote
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of Demand votes.

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "count": 1,
        "data": [
            {
                "quadKey": "1202100011310100202030",
                "location": {
                    "lat": 55.67552754550523,
                    "lon": 12.590546607971191
                },
                "categories": [
                    {
                        "category_id": "9278ab77-3bbe-42e9-ac44-f5f0cd5c86f8",
                        "demand": 1.4
                    },
                    {
                        "category_id": "9278ab77-3cbf-4a70-9c5e-40a4cf49b189",
                        "demand": 2.5
                    },
                    {
                        "category_id": "9278ab77-3dbe-445d-99cc-03d46b61cd67",
                        "demand": 7.1
                    }
                ]
            }
        ]
    }
}

Get a list of Demand votes.

Request Signature

GET /api/dashboard/demand-vote

Security

OAuth2 Password Access Token

Query Parameters

Parameter Required? Description
bounds[east] No Bounding box east (min latitude) bound.
bounds[north] No Bounding box north (min latitude) bound.
bounds[south] No Bounding box south (min latitude) bound.
bounds[west] No Bounding box west (min latitude) bound.

User

These are collection of User methods

Administrator registration

curl --request POST --url api/dashboard/admin/create
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --form "email=[email]"
    --form "password=[password]"
    --form "password_confirmation=[password_confirmation]"
    --form "gender=[gender]"
    --form "birth_year=[birth_year]"
    --form "first_name=[first_name]"
    --form "last_name=[last_name]"
    --form "organization=[organization]" 

The result of this operation would be a created admin user model.

{
    "id": "92a84295-cdf2-4c25-aec8-869ebf7371a5",
    "email": "admin@company.org",
    "gender": "male",
    "birthYear": 1995,
    "displayName": "name",
    "adminProfile": {
        "firstName": "name",
        "lastName": "last name",
        "organization": "dnc"
    }
}
Request Signature

POST api/dashboard/admin/create

Security

OAuth2 Client Credentials Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
email Yes User email address. Max length 255.
password Yes User password in plain text. Min length 8, max 255.
password_confirmation Yes Confirm user password.
gender Yes User gender. Use value from enumeration.
birth_year Yes User birth year. Min 1900.
first_name Yes User first name. Max length 255.
last_name Yes User last name Max length 255.
organization Yes Organization. Max length 255.

Admin

These are collection of Admin methods

User roles

These are collection of User roles methods

Update user role

curl --request POST --url /api/admin/user-role/update/{userId}
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: application/x-www-form-urlencoded"
    --data "role=[role]"

The result of this operation would be a success response

{
    "httpCode": 200,
    "operationStatus": "success",
}

Update user role.

Request Signature

POST /api/admin/user-role/update/{userId}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
userId User ID.
Body Parameters
Parameter Required? Description
role Yes The role name: admin, manager, government

Users

These are collection of Users methods

Get all users

curl --request GET --url /api/admin/users?page=2
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of users

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "current_page": 2,
        "data": [
            {
                "id": "1234...",
                "display_name": "name",
                "email": "user",
                "gender": "male",
                "birth_year": 1990,
                "transport_types": [
                    "bus"
                ],
                "roles": [
                    {
                        "id": "935b87c9-300b-4a68-b00d-4ab7705fa980",
                        "name": "admin",
                        "pivot": {
                            "user_id": "9278afcb-1c1e-4d10-8e35-be811cbd3200",
                            "role_id": "935b87c9-300b-4a68-b00d-4ab7705fa980"
                        }
                    }
                ]
                "education": "none",
                "work_status": "employee",
                "political_views": null,
                "annual_income": null,
                "intro": null,
                "rating": 0,
                "created_at": "2021-01-13 11:22:10",
                "updated_at": "2021-01-13 11:22:10"
            },
            ...
        ],
        "first_page_url": "/api/admin/users?page=1",
        "from": 21,
        "last_page": 3,
        "last_page_url": "/api/admin/users?page=4",
        "next_page_url": "/api/admin/users?page=3",
        "path": "/api/admin/users",
        "per_page": 20,
        "prev_page_url": "/api/admin/users?page=1",
        "to": 40,
        "total": 62
    }
}

Get all users.

Request Signature

GET /api/admin/users?page={page}&count={count}[&term={search_term}]

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
count Number of records per page
page Page
term Search by display_name and email fields
Body Parameters
Parameter Required? Description

Delete

Delete suggestion

curl --request POST --url /api/admin/delete/suggestion/{id}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a success response

{
    "httpCode": 200,
    "operationStatus": "success",
}

Delete suggestion.

Request Signature

POST /api/admin/delete/suggestion/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
id Suggestion ID.
Body Parameters
Parameter Required? Description

Delete suggestion comment

curl --request POST --url /api/admin/delete/suggestion-comment/{id}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a success response

{
    "httpCode": 200,
    "operationStatus": "success",
}

Delete suggestion comment.

Request Signature

POST /api/admin/delete/suggestion-comment/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
id Suggestion comment ID.
Body Parameters
Parameter Required? Description

Delete tile comment

curl --request POST --url /api/admin/delete/tile-comment/{id}
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a success response

{
    "httpCode": 200,
    "operationStatus": "success",
}

Delete tile comment.

Request Signature

POST /api/admin/delete/tile-comment/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
id Tile comment ID.
Body Parameters
Parameter Required? Description

Raw data

Get Raw data

curl --request POST --url /api/admin/raw-data/raw-data?count=15&page=0
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "types[]=[vote_posted]"
    --form "types[]=[suggestion_posted]"
    --form "users[]=[user_id]"
    --form "users[]=[user_id]"
    --form "date_from=[date_from]"
    --form "date_to=[date_to]"

The result of this operation would be a raw data

{
    "data": [
        {
            "id": "9440ef5e-...-9c43f2d0d632",
            "user_id": "935de0cd-...-92f6c3ec3815",
            "mail": "developer@gmail.com",
            "time": "2021-08-27T12:09:07.000000Z",
            "type": "Vote",
            "data": {
                "quad_keys": [
                    "0331111312313102231310",
                    "0331111312313102231311",
                ],
                "value": 2,
                "parameters": [],
                "comments": {
                    "general": [],
                    "parameters": []
                }
            }
        },
        ...
    ],
    "links": {
        "first": "/api/admin/raw-data?page=1",
        "last": "/api/admin/raw-data?page=3",
        "prev": null,
        "next": "/api/admin/raw-data?page=2"
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 3,
        "path": "/api/admin/raw-data",
        "per_page": 15,
        "to": 15,
        "total": 36
    }
}

Get Raw data

Request Signature

POST /api/admin/raw-data/raw-data?count=[per_page]&page=[page]

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Parameter Required? Description
count No Number for per page items, by default = 20.
page No Page number.
Body Parameters
Parameter Required? Description
types[] No Array of raw data item types - "vote_posted" or "suggestion_posted", by default = both.
users[] No Array of user ids.
date_from No "Date from", by default = null.
date_to No "Date to", by default = null.

Delete raw-data items

curl --request POST --url /api/admin/raw-data/delete
    --header "Authorization: [token_type] [access_token]"
    --header "Content-Type: multipart/form-data"
    --form "id[]=[item_id]"
    --form "id[]=[item_id]"
    ...

The result of this operation would be a user model.

{
    "httpCode": 200,
    "operationStatus": "success"
}
Request Signature

POST /api/admin/raw-data/delete

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Query Parameters

No query parameters.

Body Parameters
Parameter Required? Description
id[] Yes Array of raw data item ids.

Suggestion Categories

These are collection of Suggestion Categories methods

Get all Suggestion Categories

curl --request GET --url /api/dashboard/suggest-category
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of users

{
    "count": 3,
    "data": [
        {
            "id": "9278ab77-284e-4f34-8da1-d7948ab25e1e",
            "title": "Road and sidewalk"
        },
        {
            "id": "9278ab77-28c6-4a82-b881-3d553279e2af",
            "title": "Town inventory"
        },
        {
            "id": "9278ab77-2a2e-4d8f-a9cd-97ae60b61a23",
            "title": "Other things"
        }
    ]
}

Get all Suggestion Categories Suggestion Category Titles in user language

Request Signature

GET /api/dashboard/suggest-category

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Body Parameters

No path parameters.

Get Suggestion Category

curl --request GET --url /api/dashboard/suggest-category/9278ab77-284e-4f34-8da1-d7948ab25e1e
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of users

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "9278ab77-284e-4f34-8da1-d7948ab25e1e",
        "label": "Road and sidewalk",
        "created_at": "2021-01-12 15:41:44",
        "updated_at": "2021-01-12 15:41:44",
        "label_translations": {
            "da": "Vej og fortov",
            "en": "Road and sidewalk"
        }
    }
}

Get Suggestion Category by ID Suggestion Category Title in user language "label_translations" - all available translations

Request Signature

GET /api/dashboard/suggest-category/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
id Suggestion Category ID
Body Parameters

No path parameters.

Create Suggestion Category

curl --request POST --url /api/dashboard/suggest-category/create
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of users

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "label": "New category title",
        "id": "9416a415-...",
        "updated_at": "2021-08-08 00:00:00",
        "created_at": "2021-08-08 00:00:00"
    }
}

Create Suggestion Category

Request Signature

GET /api/dashboard/suggest-category/create

Security

OAuth2 Password Access Token

Path Parameters

No path parameters.

Body Parameters
Parameter Description
labels[da] New Suggestion Category title in Danish
labels[en] New Suggestion Category title in English

Delete Suggestion Category

curl --request POST --url /api/dashboard/suggest-category/delete/9278ab77-2a2e-4d8f-a9cd-97ae60b61a23
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of users

{
    "httpCode": 200,
    "operationStatus": "success"
}

Delete Suggestion Category

Request Signature

GET /api/dashboard/suggest-category/delete/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
id Deleted Suggestion Category id
Body Parameters
Parameter Description
recipient_id Another Suggestion Category Id

recipient_id - Another Suggestion_Category_Id to which the suggestions that previously belonged to the deleted category will be reassigned

Update Suggestion Category

curl --request POST --url /api/dashboard/suggest-category/update/9278ab77-2a2e-4d8f-a9cd-97ae60b61a23
    --header "Authorization: [token_type] [access_token]"

The result of this operation would be a list of users

{
    "httpCode": 200,
    "operationStatus": "success",
    "response": {
        "id": "9278ab77-2a2e-4d8f-a9cd-97ae60b61a23",
        "label": "Other things",
        "created_at": "2021-01-12 15:41:44",
        "updated_at": "2021-08-06 09:00:48"
    }
}

Create Suggestion Category

Request Signature

GET /api/dashboard/suggest-category/update/{id}

Security

OAuth2 Password Access Token

Path Parameters
Parameter Description
id Suggestion Category id
Body Parameters

Parameter Description
labels[da] New Suggestion Category title in Danish
labels[en] New Suggestion Category title in English

Object definitions

These are collection of the standard object definitions.

Address object

Address object definition

{
  "country_code": "au",
  "state": "nt",
  "city": "Darwin",
  "street": "Street 1",
  "postal_code": "00001"
}

File object

File object definition

{
    "id": "00000000-...",
    "scope": "image",
    "links": {
        "sizes": {
            "original": {
                "view": "/api/file/00000000-.../view",
                "download": "/api/file/00000000-.../download"
            },
        }
    }
}

Like object

Like object definition

{
    "id": "93175ea7-...",
    "created_at": "2021-01-01 14:03:35",
    "updated_at": "2021-01-01 14:03:35"
}

Suggestion object

Suggestion object definition

{
    "category_id": "9278ab77-...",
    "quad_keys": [...],
    "title": "Suggestion Title",
    "description": "Description for Suggestion",
    "created_at": "2019-11-03 09:19:10",
    "updated_at": "2019-11-03 09:19:10",
    "rating": 66,
    "votes_count": {
        "total": 0,
        "negative": 0,
        "neutral": 0,
        "positive": 0
    },
    "my_vote": -1,
    "comments_count": 0,
    "is_follower": false,
    "followers_count": 0,
    "my_vote": -1,
    "is_liked": false,
    "likes_count": 0,
    "category": {
      "id": "8f0af80e-...",
      "label": "Andet",
      "created_at": "2019-11-03 09:19:01",
      "updated_at": "2019-11-03 09:19:01"
    },
"files": [{ FILE_OBJECT }], "user": { USER_OBJECT } }
my_vote

Possible values: -1 - current user did not make vote for this suggestion 0 - negative vote 1 - neutral vote 2 - positive vote

Tile comment object

Tile comment object definition

{
  "id": "92c2dd11-...",
  "parameter_id": "9278ab77-...",
  "quad_keys": [...],
  "comment": "Comment about activity",
  "created_at": "2021-02-18 12:51:42",
  "updated_at": "2021-02-18 12:51:42",
  "is_liked": false,
  "likes_count": 0,
  "files": [
    { FILE_OBJECT }
  ],
  "user": { USER_OBJECT }
}

User object

User simplified data object definition

{
  "id": "0123...",
  "display_name": "User",
  "files": [
    {
      "id": "0123....ac36",
      "scope": "photo",
      "links": {
        "sizes": {
          "original": {
            "view": "/api/file/0123....ac36/view",
            "download": "/api/file/0123....ac36/download"
          },
          "default": {
            "view": "/api/file/0123....ac36/view/default",
            "download": "/api/file/0123....ac36/download/default"
          }
        }
      }
    }
  ]
}

User full object

User complete data object definition

{
  "id": "0123...",
  "display_name": "User",
  "is_verified": true,
  "email": "user@domain.dev",
  "language_code": "en",
  "gender": "male",
  "birth_year": 2000,
  "transport_types": [
    "bus",
    "car"
  ],
  "education": "high_school",
  "work_status": "self_employed",
  "political_views": "center",
  "annual_income": "125k..250k",
  "intro": "Intro text",
  "address": {
    "country_code": "au",
    "state": "nt",
    "city": "Darwin",
    "street": "Street 1",
    "postal_code": "00001"
  },
  "stats": {
    "votes": 32,
    "suggestions": 5,
    "reactions": 2
  },
  "user_meter": 666,
  "rank": 61,
  "my_hood_voted_categories_count": 2,  
  "files": [
    {
      "id": "0123....ac36",
      "scope": "photo",
      "links": {
        "sizes": {
          "original": {
            "view": "/api/file/0123....ac36/view",
            "download": "/api/file/0123....ac36/download"
          },
          "default": {
            "view": "/api/file/0123....ac36/view/default",
            "download": "/api/file/0123....ac36/download/default"
          }
        }
      }
    }
  ],
  "created_at": "2021-01-01 00:00:00",
  "updated_at": "2021-01-01 00:00:00"
}

Vote general object

Vote general object definition

{
  "user_id": "92ee8d08-...",
  "parameter_id": null,
  "value": 1,
  "quad_keys": [...],
  "parameter": null
}

Vote parameter object

Vote with parameter object definition

{
  "id": "931351d3-...",
  "user_id": "92fb35bd-...",
  "parameter_id": "9278ab77-...",
  "value": 2,
  "created_at": "2021-03-30 13:44:25",
  "updated_at": "2021-03-30 13:44:25",
  "quad_keys": [...],
  "parameter": {
    "id": "9278ab77-0f78-...",
    "label": "Parkering",
    "created_at": "2021-01-12 15:41:44",
    "updated_at": "2021-01-12 15:41:44"
  }
}