Skip to main content
POST
/
trucks
/
create
Create Truck
curl --request POST \
  --url https://{company}.datatruck.io/api/v1/openapi/trucks/create/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "make": "<string>",
  "model": "<string>",
  "year": 123,
  "plate_number": "<string>",
  "unit_number": "<string>",
  "vin": "<string>",
  "state": "<string>",
  "ownership": "<string>",
  "status": "<string>",
  "company_mc": 123,
  "notes": "<string>",
  "driver_operator": 123,
  "co_driver_operator": 123,
  "reg_expiry_date": "2023-12-25",
  "last_annual_inspection_date": "2023-12-25",
  "odometer": 0,
  "color": "<string>",
  "dimensions": "<string>",
  "integration_eld": "<string>",
  "integration_id": "<string>",
  "integration_api": "<string>",
  "owner": 123,
  "vendor": "<string>",
  "seller": "<string>",
  "ownership_pickup_odometer": 0,
  "ownership_pickup_date": "2023-12-25",
  "primary_warranty": "2023-12-25",
  "secondary_warranty": "2023-12-25"
}
'
{
  "id": 123,
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Body

application/json
make
string
required

Manufacturer of the truck.

model
string
required

Model of the truck.

year
integer
required

Manufacturing year of the truck.

plate_number
string
required

Plate number of the truck.

unit_number
string
required

Unit number of the truck.

vin
string
required

Vehicle Identification Number (VIN) of the truck.

state
string
required

State where the truck is registered.

ownership
string
required

Ownership details of the truck.

status
string

Current status of the truck, if applicable.

company_mc
integer | null

Company motor carrier number, if applicable.

notes
string | null

Additional notes about the truck, if provided.

driver_operator
integer | null

ID of the primary driver operator assigned to the truck, if any.

co_driver_operator
integer | null

ID of the co-driver operator assigned to the truck, if any.

reg_expiry_date
string<date> | null

Registration expiry date of the truck, if provided.

last_annual_inspection_date
string<date> | null

Date of the last annual inspection, if provided.

odometer
number<float>
default:0

Current odometer reading of the truck.

color
string | null

Color of the truck, if provided.

dimensions
string | null

Dimensions of the truck, if provided.

integration_eld
string | null

Electronic Logging Device (ELD) integration details, if provided.

integration_id
string | null

Integration ID for the truck, if provided.

integration_api
string | null

Integration API details for the truck, if provided.

owner
integer | null

ID of the owner of the truck, if applicable.

vendor
string | null

Vendor of the truck, if provided.

seller
string | null

Seller of the truck, if provided.

ownership_pickup_odometer
number<float>
default:0

Odometer reading at the time of ownership pickup.

ownership_pickup_date
string<date> | null

Date of ownership pickup, if provided.

primary_warranty
string<date> | null

Primary warranty expiry date, if provided.

secondary_warranty
string<date> | null

Secondary warranty expiry date, if provided.

Response

Truck successfully created.

id
integer
required

Unique identifier of the created truck.

message
string
required

Confirmation message.