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": "<string>",
  "last_name": "<string>",
  "contact_number": "<string>",
  "driver_type": "<string>",
  "new_employee_status": "<string>",
  "mc_number": 123,
  "status": "<string>",
  "telegram_number": "blank",
  "is_main": true,
  "birth_date": "2023-12-25",
  "driver_license": "<string>",
  "driver_license_issue_date": "2023-12-25",
  "driver_license_state": "<string>",
  "driver_license_expiration": "2023-12-25",
  "driver_license_class": "<string>",
  "dispatch_status": 123,
  "email": "[email protected]"
}
'
{
  "id": 123,
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Body

application/json
first_name
string
required

First name of the driver.

last_name
string
required

Last name of the driver.

contact_number
string
required

Contact number of the driver.

driver_type
string
required

Type of driver.

new_employee_status
string
required

Employment status of the driver.

mc_number
integer
required

Motor carrier number for the driver.

status
string

Current status of the driver, if applicable.

telegram_number
string | null
default:blank

Telegram contact number, if provided.

is_main
boolean
default:true

Indicates if the driver is the main driver.

birth_date
string<date> | null

Driver's birth date, if provided.

driver_license
string | null

Driver's license number, if provided.

driver_license_issue_date
string<date> | null

Issue date of the driver's license, if provided.

driver_license_state
string | null

State issuing the driver's license, if provided.

driver_license_expiration
string<date> | null

Expiration date of the driver's license, if provided.

driver_license_class
string | null

Class of the driver's license, if provided.

dispatch_status
integer | null

Dispatch status identifier, if applicable.

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.