The Search Trailers API endpoint allows you to search for trailers within the Alvys system on various criteria such as status, trailer number, fleet name, and VIN number. This endpoint provides detailed information about each trailer that matches the search criteria, facilitating efficient management and retrieval of trailer records.
The Search Trailers API endpoint allows you to search for trailers within the Alvys system based on various criteria such as status, trailer number, fleet name, and VIN number. This endpoint provides detailed information about each trailer that matches the search criteria, facilitating efficient management and retrieval of trailer records.
Request Parameters
The following parameter is required in the URL path:
Parameter | Type | Required | Description |
---|---|---|---|
version | String | Yes | The API version to use. |
Request Body
The following fields are required in the request body to filter the search results:
Parameter | Type | Required | Description |
---|---|---|---|
page | Integer | No | The page number 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 status values to filter by. |
trailerNumber | String | Conditionally | The trailer number to search for. This field is required if the other conditionally required fields are left empty. |
fleetName | String | Conditionally | The name of the fleet to search for. This field is required if the other conditionally required fields are left empty. |
vinNumber | String | Conditionally | The VIN number of the trailer. 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/trailers/search' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ...' \
--header 'Content-Type: application/json' \
--data '{
"page": 0,
"pageSize": 50,
"status": [
"Active"
],
"trailerNumber": "",
"fleetName": "",
"vinNumber": ""
}'
Response Parameters
The following table lists the parameters included in the response for trailer search requests:
Parameter | Type | Required | Description |
---|---|---|---|
page | Integer | Yes | The current page number of the results. |
pageSize | Integer | Yes | The number of results per page. |
total | Integer | Yes | The total number of matching trailers. |
items | Array of Objects | Yes | The list of trailer records matching the criteria. |
items.id | String | Yes | The unique identifier of the trailer. |
items.trailerNum | String | No | The trailer number associated with the trailer. |
items.fleet | Object | No | The fleet information associated with the trailer. |
items.fleet.id | String | No | The unique identifier of the fleet. |
items.fleet.name | String | No | The name of the fleet. |
items.fleet.invoiceNumberPrefix | String | No | The invoice number prefix for the fleet. |
items.year | Integer | No | The manufacturing year of the trailer. |
items.make | String | No | The make of the trailer. |
items.licenseNum | String | No | The license number of the trailer. |
items.licenseState | String | No | The state where the trailer is licensed. |
items.vinNum | String | No | The Vehicle Identification Number (VIN) of the trailer. |
items.status | String | No | The current status of the trailer. |
items.subsidiaryId | String | No | The subsidiary ID associated with the trailer. |
items.equipmentType | String | No | The type of equipment of the trailer. |
items.equipmentSize | String | No | The size of the equipment. |
items.capacity | Object | No | The capacity information of the trailer. |
items.capacity.pallets | Integer | No | The number of pallets the trailer can carry. |
items.capacity.weight | Integer | No | The weight capacity of the trailer. |
items.createdAt | String (Date-Time) | Yes | The date and time when the trailer was created in Alvys. |
Example Response
On the right side, you can see examples of different error codes by clicking "Example" and selecting the response code.
Versioning
The version parameter in the URL path specifies which version of the API you are using. 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.
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 specifying the API version in the URL path and providing the necessary request body. 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.