Drivers

Get driver by ID

Returns a single driver with their associated driver licenses.

get/drivers/{id}

Request

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

Path parameters

idinteger required

Numeric resource identifier

Response

Driver found

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

Example response

{
  "id": 1,
  "first_name": "Matt",
  "last_name": "Jerde",
  "email": "celiawalker@swift.net",
  "phone": "4111234962",
  "contract_type": "CONTRACTOR",
  "status": "ON_ROUTE",
  "licenses": [
    {
      "id": 1,
      "document_number": "CXX232105",
      "issue_date": "2020-08-30",
      "expiry_date": "2027-09-21",
      "status": "active",
      "code": "C",
      "name": "Prawo jazdy kat. C",
      "description": "Pojazdy ciężarowe powyżej 3,5t"
    }
  ]
}

Changes

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