The GET Truck by ID API endpoint allows you to retrieve detailed information about a specific truck using its unique ID. This endpoint provides comprehensive data about the truck, facilitating effective truck management and tracking within the Alvys system.

The endpoint for retrieving trucks by ID requires specifying the API version in the URL path. Including the version number ensures that your application interacts with the correct version of the API, providing stability and compatibility as the API evolves. For more information on how versioning works and how to include it in your requests, please refer to the Versioning page.

Request Parameters

The following parameter is required in the URL path:

ParameterTypeRequiredDescription
versionStringYesThe version of the API being requested.
idStringYesThe unique identifier of the truck.

Example CURL request

curl --location 'https://integrations.alvys.com/api/p/v{version}/trucks/?id={truckId}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'

Replace {version} with the API version number, {truckId} with the actual truck ID, and YOUR_ACCESS_TOKEN with your actual Bearer token.

curl --location 'https://integrations.alvys.com/api/p/v1/trucks/?id=TL123456789123400402' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ...'

Response Parameters

The following table lists the parameters included in the response for truck-related requests.

ParameterTypeDescription
idStringThe unique identifier of the truck.
truckNumStringThe truck number.
vinNumberStringThe Vehicle Identification Number (VIN) of the truck.
yearIntegerThe manufacturing year of the truck.
makeStringThe manufacturer of the truck.
modelStringThe model of the truck.
licenseNumStringThe license plate number of the truck.
licenseStateStringThe state that issued the truck's license plate.
plateExpirationDateString (Date-Time)The expiration date of the truck's license plate.
licenseExpirationDateString (Date-Time)The expiration date of the truck's license.
statusStringThe current status of the truck (e.g., Active).
subsidiaryIdStringThe subsidiary ID associated with the truck.
numberOfAxlesIntegerThe number of axles on the truck.
fleetObjectThe fleet details associated with the truck.
fleet.idStringThe unique identifier of the fleet.
fleet.nameStringThe name of the fleet.
fleet.invoiceNumberPrefixStringThe invoice number prefix for the fleet.
grossWeightObjectThe gross weight details of the truck.
grossWeight.valueIntegerThe value of the gross weight.
grossWeight.unitOfMeasureStringThe unit of measure for the gross weight (e.g., Kilograms).
emptyWeightObjectThe empty weight details of the truck.
emptyWeight.valueIntegerThe value of the empty weight.
emptyWeight.unitOfMeasureStringThe unit of measure for the empty weight (e.g., Kilograms).
colorStringThe color of the truck.
fuelTypeStringThe type of fuel used by the truck.
fuelCardsArray of ObjectsThe list of fuel cards associated with the truck.
fuelCards.idStringThe unique identifier of the fuel card.
fuelCards.cardNumberStringThe card number of the fuel card.
fuelCards.providerStringThe provider of the fuel card.
fuelCards.deductFuelBooleanIndicates if fuel costs are deducted.
fuelCards.applyFuelDiscountBooleanIndicates if a fuel discount is applied.
fuelCards.deductFromIdStringThe ID from which fuel costs are deducted.
fuelCards.deductFromNameStringThe name from which fuel costs are deducted.
fuelCards.deductFromSubsidiaryStringThe subsidiary from which fuel costs are deducted.
fuelCards.deductFromContractorTypeStringThe contractor type from which fuel costs are deducted.
insuranceCompanyStringThe insurance company of the truck.
insurancePolicyNumberStringThe insurance policy number.
insuranceExpirationDateString (Date-Time)The expiration date of the insurance policy.
inspectionExpirationDateString (Date-Time)The expiration date of the truck's inspection.
notesArray of ObjectsAn optional list of notes related to the truck.
notes.idStringThe unique identifier of the note.
notes.descriptionStringThe description of the note.
notes.noteTypeStringThe type of note.
notes.timeString (Date-Time)The time the note was created.
notes.userStringThe user who created the note.
createdAtString (Date-Time)The date and time when the truck record was created.

Example Response

On the right side, you can see examples of different error codes by clicking "Example" and selecting the response code.

Rate Limits

All endpoints are subject to rate limits to protect the API from traffic spikes. For detailed information on rate limits, please refer to the Rate Limits section.

This page is interactive, allowing you to try a request by providing the truck ID in the URL path. As you fill out the parameters, the Curl command on the right side of the page will be automatically updated. Alternatively, you can directly edit the Curl command. Make sure to authorize yourself before trying a request.

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!