he Search Trucks API endpoint allows you to search for trucks within the Alvys system based on various criteria such as status, truck number, fleet name, VIN number, active status, and registered name.

This endpoint provides detailed information about each truck that matches the search criteria, facilitating efficient management and retrieval of truck records.

Request Parameters

The following parameter is required in the URL path:

ParameterTypeRequiredDescription
versionStringYesThe version of the API being requested.

Request Body

The request body must include the following parameters to filter the search results.

ParameterTypeRequiredDescription
pageIntegerNoThe page number of the results to retrieve.
pageSizeIntegerYesThe number of results per page.
PageSize must be greater than 0.
statusArray of StringsNoA list of truck statuses to filter by.
truckNumberStringConditionallyThe truck number to search for. This field is required if the other conditionally required fields are left empty.
fleetNameStringConditionallyThe fleet name to filter by. This field is required if the other conditionally required fields are left empty.
vinNumberStringConditionallyThe Vehicle Identification Number (VIN) to search for. This field is required if the other conditionally required fields are left empty.
isActiveBooleanConditionallyFilter by active status (true for active, false for inactive). This field is required if the other conditionally required fields are left empty.
registeredNameStringConditionallyThe registered name of the truck to search for. This field is required if the other conditionally required fields are left empty.

Example CURL request

Use the Current API version number and make sure to replace the Authorization header value with your actual Bearer token for the request:

curl --location 'https://integrations.alvys.com/api/p/v1/trucks/search' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ....' \
--header 'Content-Type: application/json' \
--data '{
  "page": 0,
  "pageSize": 100,
  "status": [
      "Active"
  ],
  "truckNumber": "",
  "fleetName": "",
  "vinNumber": "",
  "isActive": true,
  "registeredName": ""
}'

Response Parameters

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

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