API documentation

Set a parking as favorite

POST /api/parkings/set_favorite

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

This service can be used to set and unset a parking as favorite (if parking is already set it will unset it, and viceversa).

REQUEST PARAMETERS

Parameter name Parameter type Description
parking_id int id of the parking
{
"parking_id" : 782
}

Response

Status Code: 200 if OK

{
    "id": 782,
    "name": "Strada Herman Oberth",
    "price_per_hour": "0.0",
    "location_id": 1104,
    "is_active": true,
    "project_id": 36,
    "zone_id": 37,
    "is_private": false,
    "is_favorite": true
}

Response PARAMETERS

Parameter name Parameter type Description
id int id of the parking
name string name of the parking
price_per_hour string default price per hour on the parking
location_id int id of the location of the parking
is_active bool true if the parking is active
project_id int project id that contains the parking
zone_id int id zone of the parking
is_private bool true if the parking is private
is_favorite bool true if parking is one of the favorite parkings of the user

Status Code: 404 if the parking does not exists

Status Code: 401 if request not ok