API documentation

Update Account

PATCH /api/car_driver

Include access_token in HTTP header:

Authorization: Bearer 09ba487fc3df...

Description

This web service updates a users account information.

REQUEST PARAMETERS

Parameter name Parameter type Description
api_car_driver_fo_user object car driver user object
first_name string first name of the user
last_name string last name of the user
phone string phone number of the user
birthdate string 'yyyy-mm-dd'
gender string gender of the user; accepted values 'Male'/'Female'
newsletter bool true if user accepts newsletter
{ 
"api_car_driver_fo_user":
                  {
                    "first_name": "first_name",
                    "last_name": "last_name",
                    "phone": "phone",
                    "birthdate": "1988-12-23",
                    "gender": "Male",
                    "newsletter": true
                  }
}

Response

Status Code: 200 if OK

Response PARAMETERS

Parameter name Parameter type Description
api_car_driver_fo_user object car driver user object
email string email of the user
created_at datetime date and time of the account creation
updated_at datetime date and time of the account update
first_name string first name of the user
last_name string last name of the user
is_deleted bool true if the account has been disabled
phone string phone number of the user
birthdate string 'yyyy-mm-dd'
gender string gender of the user; accepted values 'Male'/'Female'
newsletter bool true if user accepts newsletter
home_location_id int id of the home location
work_location_id int id of the work location
{
    "api_car_driver_fo_user": {
        "id": 8,
        "email": "test1@example.com",
        "created_at": "2014-09-08T13:05:07Z",
        "updated_at": "2014-09-08T13:05:07Z",
        "first_name": "test",
        "last_name": "test",
        "phone": "1234567890",
        "is_deleted": false,
        "provider": null,
        "uid": null,
        "birthdate": "1988-12-23",
        "gender": "Male",
        "newsletter": true,
        "home_location_id": 1,
        "work_location_id": 2,
        "has_valid_card": true
    }
}

Status Code: 422 if field validation not ok

{
    "email": ["has already been taken"],
    "phone": ["can't be blank"],
    "first_name": ["only alphanumeric and spaces"],
    "last_name": ["only alphanumeric and spaces"]
}

Status Code: 401 when sending bad access token