API documentation

Set default a car

POST /api/cars/set_default

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

This web service changes the default car from the user account. It sets a new default car.

REQUEST PARAMETERS

Parameter name Parameter type Description
plate_number string plate number of the new car
{
"plate_number" :"BN88TITUS"
}

Response

Status Code: 200 if OK

{
    "id": 55,
    "plate_number": "BN88TITUS"
}
Parameter name Parameter type Description
id int id of the new car
plate_number string plate number of the new car

Status Code: 404 if car or relationship between user and car does not exist

Status Code: 401 if request not ok