API documentation

Save car location

POST /api/car_driver/car_location

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

With the help of this web service the user can save his car location for further use.

REQUEST PARAMETERS

Parameter name Parameter type Description
latitude float latitude of the car location
longitude float longitude of the car location
level_id int level id
parking_id int parking id where the user saved his car's location
{ 
     "latitude": "46.669371",
     "longitude": "23.590072",
     "parking_id": 856,
     "level_id": 1
}

OR when there is no parking selected and no level

{
    "latitude": "46.669371",
    "longitude": "23.590072",
    "level_id": null,
    "parking_id": null
}

Response

Status Code: 200 if OK

{
    "fo_user_id": 5,
    "latitude": "46.669371",
    "longitude": "23.590072",
    "level_id": 1,
    "parking": {
        "id": 862,
        "latitude": 46.75521799079933,
        "longitude": 23.58761429786682
    }
}
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 selected

{
    "fo_user_id": 5,
    "latitude": "46.669371",
    "longitude": "23.590072",
    "level_id": null
    "parking": null
}

Status Code: 401 if request access token not ok