POST /authenticate
field |
description |
required |
example |
email |
email of user |
Yes |
1 |
password |
password of user |
Yes |
123456 |
{
"email": "luca123@gmail.com",
"password": "123456"
}
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJadwq6MSwiZW1haWwiOiJhbGFuc2FudGFuYUBhbHVub3MudXRmcHIuZWR1LmJyIiwicGhvbmVfbnVtYmVyIjoiOTk4MDgtMzAxNyIsImlhdCI6MTYzMzcyOTk5MiwiZXhwIjoxNjMzOTAyNzkyfQ.pYTLcIAEnwONb9R53pJplQL2s_fthALWPIcq4aMUf2Q"
}
POST /markers
field |
description |
required |
types |
example |
user_id |
id of user |
Yes |
|
1 |
markers_type_id |
id of type of marker |
Yes |
PLACE, WHEELCHAIR_PARKING |
PLACE |
coordinates |
coordinates of marker |
Yes |
|
POINT (-50.3826153 -28.0245769) |
category_id |
id of category |
No |
TRAVEL,TRANSPORT,SUPERMARKET,SERVICES,LEISURE,EDUCATION,FOOD,HOSPITALS,ACCOMMODATION,FINANCE |
SERVICES |
name |
name of place |
No |
|
Mac Burguer |
classify |
classify of place |
No |
ACCESSIBLE, NOT ACCESSIBLE, PARTIALLY |
ACESSIBLE |
description |
description of place |
No |
|
Lanchonete e petiscaria |
space_type |
type of space |
No |
PRIVATE,PUBLIC |
PRIVATE |
{
"user_id": 5,
"marker": {
"markers_type_id": "PLACE",
"category_id": "EDUCATION"
},
"point_data": {
"latitude": -28.0245769,
"longitude": -50.3826153
},
"place": {
"name": "Mac Burguer",
"classify": "ACCESSIBLE",
"description": "Lanchonete e petiscaria",
"space_type": "PRIVATE"
}
}
{
"id": 56,
"user_id": 1,
"markers_type_id": "PLACE",
"coordinates": "POINT(-50.3826153 -28.0245769)"
}
code |
description |
201 |
created |
Get Markers with current position
GET /markers/:current_position
field |
description |
example |
current_position |
current position of user |
POINT (-50.3826153 -28.0245769) |
[
{
"id": 30,
"user_id": 1,
"markers_type_id": "PLACE",
"coordinates": "POINT(-51.382978 -26.024556)",
"last_updated": null,
"denounced": false,
"category_id": "EDUCATION"
}
]
GET /markers/places/:marker_id
field |
description |
example |
marker_id |
id of marker |
1 |
{
"id": 44,
"marker_id": 42,
"name": "Mac Burguer",
"classify": "PARTIALLY",
"space_type": "PRIVATE",
"description": "Lanchonete e petiscaria"
}
GET /ranking
field |
description |
example |
page |
page of users |
1 |
{
"pagination": {
"total": 15,
"lastPage": 2,
"perPage": 10,
"currentPage": 1,
"from": 0,
"to": 10
},
"data": [
{
"name": "Rodrigo Santos",
"weekly_points": 1000,
"level": 1
},
{
"name": "kawamoto",
"weekly_points": 800,
"level": 2
}
]
}
PATCH /users/:id/informationAmount
field |
description |
example |
id |
id of users |
1 |
{
"updatedProperties": ["wheelchair_parking"],
"points": 10
}
GET /users/:id/informationAmount
field |
description |
example |
id |
id of users |
1 |
GET /users/:id/achievements
field |
description |
example |
id |
id of users |
1 |
Get comments
GET /markers/:id/comments
field |
description |
example |
id |
id of comment |
1 |
Post comment
POST /markers/:id/comments
{
"userId": 1,
"markerId": 1,
"description": "Parabéns!"
}
field |
description |
example |
id |
id of comment |
1 |
code |
description |
201 |
created |
PATCH /users/:id(\\d+)
field |
description |
example |
id |
id of user |
1 |
{
"name": "carlos@gmail.com",
"phone_number": "44998433695",
"birth_date": "1998-01-01"
}
PATCH /users
{
"name": "lucas silvano",
"birthDate": "1998-01-01",
"gender": "MALE",
"phoneNumber": "4499887565",
"email": "lucas321@gmail.com",
"password": "123456"
}
{
"id": 2
"birth_date": "1998-01-01",
"gender": "MALE",
"phone_number": "4499887565",
"email": "lucas321@gmail.com",
"password": "123456"
}
code |
description |
201 |
created |
GET /users/:id
field |
description |
example |
id |
id of user |
1 |
{
"id": 1,
"name": "ADMIN",
"phone_number": "99702-3015",
"birth_date": "1992-12-21T02:00:00.000Z"
}
PATCH /users/passwords/:user_id
field |
description |
example |
user_id |
id of user |
1 |
{
"current_password": "masterkey",
"new_password": "123456"
}
PATCH /users/:email
- Send email with new password
field |
description |
example |
email |
email of user |
1 |