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:
Parameter | Type | Required | Description |
---|---|---|---|
version | String | Yes | The version of the API being requested. |
Request Body
The request body must include the following parameters to filter the search results.
Parameter | Type | Required | Description |
---|---|---|---|
page | Integer | No | The page number of the results to retrieve. |
pageSize | Integer | Yes | The number of results per page. PageSize must be greater than 0. |
status | Array of Strings | No | A list of truck statuses to filter by. |
truckNumber | String | Conditionally | The truck number to search for. This field is required if the other conditionally required fields are left empty. |
fleetName | String | Conditionally | The fleet name to filter by. This field is required if the other conditionally required fields are left empty. |
vinNumber | String | Conditionally | The Vehicle Identification Number (VIN) to search for. This field is required if the other conditionally required fields are left empty. |
isActive | Boolean | Conditionally | Filter by active status (true for active, false for inactive). This field is required if the other conditionally required fields are left empty. |
registeredName | String | Conditionally | The 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.
Parameter | Type | Description |
---|---|---|
page | Integer | The current page number of the results. |
pageSize | Integer | The number of results per page. |
total | Integer | The total number of results available. |
items | Array of Objects | The list of truck objects matching the search criteria. |
items.id | String | The unique identifier of the truck. |
items.truckNum | String | The truck number. |
items.vinNumber | String | The Vehicle Identification Number (VIN) of the truck. |
items.year | Integer | The manufacturing year of the truck. |
items.make | String | The manufacturer of the truck. |
items.model | String | The model of the truck. |
items.licenseNum | String | The license plate number of the truck. |
items.licenseState | String | The state that issued the truck's license plate. |
items.plateExpirationDate | String (Date-Time) | The expiration date of the truck's license plate. |
items.licenseExpirationDate | String (Date-Time) | The expiration date of the truck's license. |
items.status | String | The current status of the truck (e.g., Active). |
items.subsidiaryId | String | The subsidiary ID associated with the truck. |
items.numberOfAxles | Integer | The number of axles on the truck. |
items.fleet | Object | The fleet details associated with the truck. |
items.fleet.id | String | The unique identifier of the fleet. |
items.fleet.name | String | The name of the fleet. |
items.fleet.invoiceNumberPrefix | String | The invoice number prefix for the fleet. |
items.grossWeight | Object | The gross weight details of the truck. |
items.grossWeight.value | Integer | The value of the gross weight. |
items.grossWeight.unitOfMeasure | String | The unit of measure for the gross weight (e.g., Kilograms). |
items.emptyWeight | Object | The empty weight details of the truck. |
items.emptyWeight.value | Integer | The value of the empty weight. |
items.emptyWeight.unitOfMeasure | String | The unit of measure for the empty weight (e.g., Kilograms). |
items.color | String | The color of the truck. |
items.fuelType | String | The type of fuel used by the truck. |
items.fuelCards | Array of Objects | The list of fuel cards associated with the truck. |
items.fuelCards.id | String | The unique identifier of the fuel card. |
items.fuelCards.cardNumber | String | The card number of the fuel card. |
items.fuelCards.provider | String | The provider of the fuel card. |
items.fuelCards.deductFuel | Boolean | Indicates if fuel costs are deducted. |
items.fuelCards.applyFuelDiscount | Boolean | Indicates if a fuel discount is applied. |
items.fuelCards.deductFromId | String | The ID from which fuel costs are deducted. |
items.fuelCards.deductFromName | String | The name from which fuel costs are deducted. |
items.fuelCards.deductFromSubsidiary | String | The subsidiary from which fuel costs are deducted. |
items.fuelCards.deductFromContractorType | String | The contractor type from which fuel costs are deducted. |
items.insuranceCompany | String | The insurance company of the truck. |
items.insurancePolicyNumber | String | The insurance policy number. |
items.insuranceExpirationDate | String (Date-Time) | The expiration date of the insurance policy. |
items.inspectionExpirationDate | String (Date-Time) | The expiration date of the truck's inspection. |
items.notes | Array of Objects | An optional list of notes related to the truck. |
items.notes.id | String | The unique identifier of the note. |
items.notes.description | String | The description of the note. |
items.notes.noteType | String | The type of note. |
items.notes.time | String (Date-Time) | The time the note was created. |
items.notes.user | String | The user who created the note. |
items.createdAt | String (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.