Skip to main content

Update a driver

PATCH 

/v1/drivers/:id

Updates driver information. Password will be hashed if provided. Username uniqueness is validated.

Request

Path Parameters

    id stringrequired

    Driver ID

Body

required
    supplierId stringnullable

    Supplier ID

    zoneIds string[]

    Operation zone IDs

    firstName string

    First name

    lastName string

    Last name

    phone string

    Phone

    password string

    Password

    email string

    Email

    homeAddress string

    Home address

    city string

    City

    state string

    State

    zipCode string

    Zip code

    dateOfBirth string

    Date of birth

    gender number

    Possible values: [0, 1, 2]

    Default value: 0

    Gender of the driver:

    • 0 - Male
    • 1 - Female
    • 2 - Other
    notes string

    Notes

    switchAnyVehicle boolean

    Ability to switch to any vehicle

Responses

Driver updated successfully

Schema
    _id stringrequired

    The ID of the driver

    supplierId stringrequired

    The supplier ID of the driver

    rating number

    The rating of the driver

    zoneIds string[]required

    The zone IDs of the driver

    firstName stringrequired

    The first name of the driver

    lastName string

    The last name of the driver

    fullName string

    The full name of the driver

    phone stringrequired

    The phone of the driver

    username object

    The username of the driver

    email string

    The email of the driver

    homeAddress string

    The home address of the driver

    city string

    The city of the driver

    state string

    The state of the driver

    zipCode string

    The zip code of the driver

    dateOfBirth string

    The date of birth of the driver

    gender number

    The gender of the driver

    notes string

    The notes of the driver

    avatar string

    The avatar of the driver

    isActive boolean

    Whether the driver is active

Loading...