Skip to main content

API Url

https://{company_name}.datatruck.io/api/v1/openapi/drivers/{id}/
Replace {company_name} with your company name and {id} with the driver ID.

Sample Request

curl --request PUT \
--url https://{company_name}.datatruck.io/api/v1/openapi/drivers/102/ \
--header "Authorization: Token YOUR_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
  "account": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "[email protected]"
  },
  "contact_number": "+1 234-567-8901",
  "driver_type": "company_driver",
  "new_employee_status": "employed",
  "status": "active",
  "is_main": true,
  "mc_number": 12345,
  "brith_date": "1990-05-15",
  "telegram_number": "@johndoe",
  "driver_license": "D1234567",
  "driver_license_issue_date": "2015-06-01",
  "driver_license_state": "TX",
  "driver_license_expiration": "2025-06-01",
  "driver_license_class": "A",
  "dispatch_status": 1
}'
FieldTypeRequiredDescription
accountobjectyesNested driver account info
account.first_namestringyesFirst name of the driver
account.last_namestringyesLast name of the driver
account.emailstringyesEmail address
contact_numberstringyesContact number
driver_typestringyesType of driver (company_driver, owner_operator, etc.)
new_employee_statusstringyesNew employee status
statusstringyesCurrent status of the driver
is_mainbooleanyesIs main driver
mc_numberintegeryesMC number
brith_datestring (date)yesDate of birth
telegram_numberstringnoTelegram username / handle
driver_licensestringnoDriver license number
driver_license_issue_datestring (date)noLicense issue date
driver_license_statestringnoLicense issuing state
driver_license_expirationstring (date)noLicense expiration date
driver_license_classstringnoLicense class
dispatch_statusintegernoDispatch status code

Sample Response

[
  {
    "id": 102,
    "account": {
      "first_name": "John",
      "last_name": "Doe",
      "full_name": "John Doe",
      "email": "[email protected]"
    },
    "contact_number": "+1 234-567-8901",
    "driver_type": "company_driver",
    "employee_status": "employed",
    "status": "active",
    "is_main": true,
    "mc_number": 12345,
    "brith_date": "1990-05-15",
    "telegram_number": "@johndoe",
    "driver_license": "D1234567",
    "driver_license_issue_date": "2015-06-01",
    "driver_license_state": "TX",
    "driver_license_expiration": "2025-06-01",
    "driver_license_class": "A",
    "dispatch_status": 1
  }
]