Skip to main content
POST
/
trailers
/
create
Create Trailer
curl --request POST \
  --url https://{company}.datatruck.io/api/v1/openapi/trailers/create/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "make": "<string>",
  "model": "<string>",
  "year": 123,
  "unit_number": "<string>",
  "vin": "<string>",
  "plate_number": "<string>",
  "state": "<string>",
  "status": "<string>",
  "ownership": "<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",
  "owner": 123
}
'
{
  "id": 123,
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Body

application/json
make
string
required

Manufacturer of the trailer.

model
string
required

Model of the trailer.

year
integer
required

Manufacturing year of the trailer.

unit_number
string
required

Unit number of the trailer.

vin
string
required

Vehicle Identification Number (VIN) of the trailer.

plate_number
string | null

Plate number of the trailer, if available.

state
string | null

State where the trailer is registered, if available.

status
string

Current status of the trailer, if applicable.

ownership
string | null

Ownership details of the trailer, if provided.

company_mc
integer | null

Company motor carrier number, if applicable.

notes
string | null

Additional notes about the trailer, if provided.

driver_operator
integer | null

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

co_driver_operator
integer | null

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

reg_expiry_date
string<date> | null

Registration expiry date of the trailer, if provided.

last_annual_inspection_date
string<date> | null

Date of the last annual inspection, if provided.

owner
integer | null

ID of the owner of the trailer, if applicable.

Response

Trailer successfully created.

id
integer
required

Unique identifier of the created trailer.

message
string
required

Confirmation message.