Drivers

Create a driver

Creates a new driver record. All fields are optional.

post/drivers

Request

  • Base URL: http://localhost:3000
  • URL: http://localhost:3000/drivers
  • Auth: none declared

Request body

first_namestring nullable

Driver first name

last_namestring nullable

Driver last name

emailstring nullable

Driver email address

phonestring nullable

Driver phone number

contract_typestring nullable

Contract type (e.g. FULL_TIME, CONTRACTOR)

statusstring nullable

Driver status

Example request

{
  "first_name": "Jan",
  "last_name": "Kowalski",
  "email": "jan.kowalski@example.com",
  "phone": "1234567890",
  "contract_type": "FULL_TIME",
  "status": "ACTIVE"
}

Response

Driver created successfully

idinteger required

Unique driver identifier

first_namestring nullable

Driver first name

last_namestring nullable

Driver last name

emailstring nullable

Driver email address

phonestring nullable

Driver phone number

contract_typestring nullable

Contract type (e.g. CONTRACTOR, FULL_TIME)

statusstring nullable

Driver status (e.g. ON_ROUTE, ACTIVE, RESTING)

Example response

{
  "id": 1,
  "first_name": "Matt",
  "last_name": "Jerde",
  "email": "celiawalker@swift.net",
  "phone": "4111234962",
  "contract_type": "CONTRACTOR",
  "status": "ON_ROUTE"
}

Changes

No recorded changes to this operation across all 4 revisions of this API.