<!-- dev-portal
method: PATCH
title: Update Driver
path: /v1/driver
-->

### PATCH /v1/driver

Update driver details including first_name, last_name, primary_phone, language and employee_id.  Cannot update email.

#### Request Body

| Name                       | Type                                             | Required | Description                                                                                                                      |
|----------------------------|--------------------------------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------|
| id                         | String                                           | Yes      | Id of the user given by system.  Required.                                                                                       |
| first_name                 | String                                           | No       | First name of the driver.                                                                                                        |
| last_name                  | String                                           | No       | Last name of the driver.                                                                                                         |
| language                   | [DriverLanguage](../../Schemas#driverlanguage)      | No       | Language for the driver.  Defaults to en-US.                                                                                     |
| primary_phone_country_code | String                                           | No       | Country code for the phone number.  Defaults to country prefix used in phone number.                                             |
| primary_phone              | String                                           | No       | Phone number for the driver.                                                                                                     |
| employee_id                | String                                           | No       | Employee id given to the driver by the customer.  Must be unique per customer.                                                   |
| segments                   | Array[[DriverSegment](../../Schemas#driversegment)] | No       | Set with the segments UUID. You can get available segments from [Company Details endpoint](../Company%20Details). The API user needs [access](../../Getting%20Started) to the segments you are associating the driver to. |
| send_invite                | Boolean                                          | No       | Flag indicating if you want to invite user to use drive app (Requires drive app to be enabled in the marketplace).               |

#### Response

| Name                       | Type                                             | Required | Description                                                                          |
|----------------------------|--------------------------------------------------|----------|--------------------------------------------------------------------------------------|
| id                         | String                                           | Yes      | Id of the user given by system.  Required.                                           |
| first_name                 | String                                           | No       | First name of the driver.                                                            |
| last_name                  | String                                           | No       | Last name of the driver.                                                             |
| language                   | DriverLanguage                                   | No       | Language for the driver.  Defaults to en-US.                                         |
| primary_phone_country_code | String                                           | No       | Country code for the phone number.  Defaults to country prefix used in phone number. |
| primary_phone              | String                                           | No       | Phone number for the driver.                                                         |
| employee_id                | String                                           | No       | Employee id given to the driver by the customer.  Must be unique per customer.       |
| segments                   | Array[[DriverSegment](../../Schemas#driversegment)] | No       | Set with the segments UUID.                                                          |
| send_invite                | Boolean                                          | No       | Flag indicating if an invite was sent to the user                                    |

##### Response Codes

| Name | Description                                                                                                                            |
|------|----------------------------------------------------------------------------------------------------------------------------------------|
| 200  | Ok.                                                                                                                                    |

#### Example

```bash
curl -X PATCH \
  -H "Authorization: Bearer ${AUTH_TOKEN}" \
  "https://${HOST}/vehicle-status-api/v1/driver" \
  -d '{
    "id": "f2e147e2-2a96-43a5-9389-cddda480aa07",
    "employee_id": "fpi-test-driver001",
    "first_name": "FPITestPatchDriver001",
    "last_name": "TestDriver001",
    "language": {
      "code": "en-US"
    },
    "primary_phone": "+18888889897",
    "primary_phone_country_code": "USA",
    "segments": [
      {
        "id": "5a414d5f-0a2e-4413-b72b-20c016cf8f60"
      }
    ],
    "send_invite": false
  }'
```
Response:
```Json
{
  "id": "f2e147e2-2a96-43a5-9389-cddda480aa07",
  "employee_id": "fpi-test-driver001",
  "first_name": "FPITestPatchDriver001",
  "last_name": "TestDriver001",
  "language": {
    "code": "en-US"
  },
  "primary_phone": "+18888889897",
  "primary_phone_country_code": "USA",
  "segments": [
      {
        "id": "5a414d5f-0a2e-4413-b72b-20c016cf8f60"
      }
    ],
  "send_invite": false
}
```
