Skip to main content
POST
/
drivers
/
create
Create Driver
curl --request POST \
  --url https://{company}.datatruck.io/api/v1/openapi/drivers/create/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "first_name": "John",
  "last_name": "Smith",
  "contact_number": "+1-555-0123",
  "driver_type": "Company Driver",
  "new_employee_status": "Active",
  "status": "Available",
  "telegram_number": "blank",
  "is_main": true,
  "mc_number": 1,
  "birth_date": "1985-06-15",
  "driver_license": "D1234567",
  "driver_license_issue_date": "2020-03-10",
  "driver_license_state": "CA",
  "driver_license_expiration": "2028-03-10",
  "driver_license_class": "A",
  "dispatch_status": 1,
  "email": "[email protected]"
}
'
{
  "id": 123,
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Body

application/json
first_name
string
required

First name of the driver.

Example:

"John"

last_name
string
required

Last name of the driver.

Example:

"Smith"

contact_number
string
required

Contact number of the driver.

Example:

"+1-555-0123"

driver_type
string
required

Type of driver.

Example:

"Company Driver"

new_employee_status
string
required

Employment status of the driver.

Example:

"Active"

mc_number
integer
required

Motor carrier number ID (must be an existing MC number ID).

Example:

1

status
string | null

Current status of the driver, if applicable.

Example:

"Available"

telegram_number
string | null
default:blank

Telegram contact number, if provided.

Example:

"blank"

is_main
boolean
default:true

Indicates if the driver is the main driver.

Example:

true

birth_date
string<date> | null

Driver's birth date in YYYY-MM-DD format, if provided.

Example:

"1985-06-15"

driver_license
string | null

Driver's license number, if provided.

Example:

"D1234567"

driver_license_issue_date
string<date> | null

Issue date of the driver's license in YYYY-MM-DD format, if provided.

Example:

"2020-03-10"

driver_license_state
string | null

State issuing the driver's license, if provided.

Example:

"CA"

driver_license_expiration
string<date> | null

Expiration date of the driver's license in YYYY-MM-DD format, if provided.

Example:

"2028-03-10"

driver_license_class
string | null

Class of the driver's license, if provided.

Example:

"A"

dispatch_status
integer | null

Dispatch status ID (integer), if applicable.

Example:

1

email
string<email> | null

Email address of the driver, if provided.

Response

Driver successfully created.

id
integer
required

Unique identifier of the created driver.

message
string
required

Confirmation message.