API documentation

Get Car location

GET /api/car_driver/car_location

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

This web service returns the current car location if it was previously set by the user.

Response

Status Code: 200 if OK

{
    "fo_user_id": 5,
    "latitude": "46.669371",
    "longitude": "23.590072",
    "level_id": 1,
    "parking": {
        "id": 856,
        "latitude": 46.772965616361354,
        "longitude": 23.62328031216748
    }
}
Parameter name Parameter type Description
fo_user_id int id of the user
latitude float latitude of the car location
longitude float longitude of the car location
level_id int level id
parking object object containing location details of the parking in which the user saved his car's location

OR when no parking is set, or no level is set

{
    "fo_user_id": 5,
    "latitude": "46.669371",
    "longitude": "23.590072",
    "level_id": null
    "parking": null
}
Parameter name Parameter type Description
fo_user_id int id of the user
latitude float latitude of the car location
longitude float longitude of the car location
level_id int level id
parking object this object can be null, if the user saved the location on the global map and not on a particular parking

Status Code: 404 when no car location is saved

{
    "error": "404 Not Found"
}

Status Code: 401 when sending bad access token