Trailers
Search trailers
Search trailers with paginated POST filters — trailer number, type, ownership, current status, license, home terminal, and current load or trip.
POST
/
api
/
p
/
v
{version}
/
trailers
/
search
Search trailers
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/trailers/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"Page": 123,
"PageSize": 123,
"Status": [
"<string>"
],
"TrailerNumber": "<string>",
"FleetName": "<string>",
"VinNumber": "<string>",
"CompanyOwnedAsset": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
Page: 123,
PageSize: 123,
Status: ['<string>'],
TrailerNumber: '<string>',
FleetName: '<string>',
VinNumber: '<string>',
CompanyOwnedAsset: true
})
};
fetch('https://integrations.alvys.com/api/p/v{version}/trailers/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/trailers/search"
payload = {
"Page": 123,
"PageSize": 123,
"Status": ["<string>"],
"TrailerNumber": "<string>",
"FleetName": "<string>",
"VinNumber": "<string>",
"CompanyOwnedAsset": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/trailers/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Page' => 123,
'PageSize' => 123,
'Status' => [
'<string>'
],
'TrailerNumber' => '<string>',
'FleetName' => '<string>',
'VinNumber' => '<string>',
'CompanyOwnedAsset' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/trailers/search"
payload := strings.NewReader("{\n \"Page\": 123,\n \"PageSize\": 123,\n \"Status\": [\n \"<string>\"\n ],\n \"TrailerNumber\": \"<string>\",\n \"FleetName\": \"<string>\",\n \"VinNumber\": \"<string>\",\n \"CompanyOwnedAsset\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integrations.alvys.com/api/p/v{version}/trailers/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"Page\": 123,\n \"PageSize\": 123,\n \"Status\": [\n \"<string>\"\n ],\n \"TrailerNumber\": \"<string>\",\n \"FleetName\": \"<string>\",\n \"VinNumber\": \"<string>\",\n \"CompanyOwnedAsset\": true\n}")
.asString();{
"Page": 123,
"PageSize": 123,
"Total": 123,
"Items": [
{
"Id": "<string>",
"TrailerNum": "<string>",
"Status": "<string>",
"Notes": [
{
"id": "<string>",
"Description": "<string>",
"NoteType": "<string>",
"User": "<string>",
"Time": "2023-11-07T05:31:56Z",
"UserId": "<string>"
}
],
"CreatedAt": "2023-11-07T05:31:56Z",
"Fleet": {
"Id": "<string>",
"Name": "<string>",
"InvoiceNumberPrefix": "<string>"
},
"Year": 123,
"Make": "<string>",
"LicenseNum": "<string>",
"LicenseState": "<string>",
"LicenseCountry": "<string>",
"PlateExpiresAt": "2023-12-25",
"LicenseExpiresAt": "2023-12-25",
"VinNum": "<string>",
"SubsidiaryId": "<string>",
"EquipmentType": "<string>",
"EquipmentSize": "<string>",
"Capacity": {
"Pallets": 123,
"Weight": 123
},
"InsuranceCompany": "<string>",
"InsurancePolicyNumber": "<string>",
"InsuranceExpiresAt": "2023-12-25",
"InspectionExpiresAt": "2023-12-25",
"References": [
{
"Name": "<string>",
"Value": "<string>",
"Id": "<string>",
"ReferenceId": "<string>",
"Type": "<string>",
"Access": "<string>",
"Origin": "<string>"
}
],
"CompanyOwnedAsset": true
}
],
"Facets": {}
}{
"Errors": {},
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}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, VIN number, and ownership. This endpoint provides detailed information about each trailer that matches the search criteria, facilitating efficient management and retrieval of trailer records.
Parameter Type Required Description
Page Integer Yes 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. CompanyOwnedAsset Boolean No Filter by ownership.

Which trailers each endpoint returns differs by design:
This endpoint searches external trailers as well as company-owned ones unless you filter on
CompanyOwnedAsset. This differs from List trailers, which is always company-owned only. See Trailer ownership.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:<Table>
PageSize must be greater than 0.
true returns only company-owned trailers, false only external ones. Omit it to return both. See Trailer ownership.</Table>
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": "",
"CompanyOwnedAsset": true
}'
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.LicenseCountry | String | No | The country where the trailer is licensed (USA, Canada, Mexico). |
| Items.PlateExpiresAt | String (Date) | No | The expiration date of the trailer’s plate. |
| Items.LicenseExpiresAt | String (Date) | No | The expiration date of the trailer’s license (registration). |
| 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.InsuranceCompany | String | No | The name of the insurance company. |
| Items.InsurancePolicyNumber | String | No | The insurance policy number. |
| Items.InsuranceExpiresAt | String (Date) | No | The expiration date of the insurance policy. |
| Items.InspectionExpiresAt | String (Date) | No | The expiration date of the trailer’s inspection. |
| Items.Notes | Array | No | An optional list of notes related to the trailer. |
| Items.References | Array | No | An optional list of custom references associated with the trailer. |
| Items.CreatedAt | String (Date-Time) | Yes | The date and time when the trailer was created in Alvys. |
| Items.CompanyOwnedAsset | Boolean | No | Whether the trailer belongs to your own fleet. See Trailer ownership. |
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.Trailer ownership
Alvys records two kinds of trailer:CompanyOwnedAsset | What it is | |
|---|---|---|
| Company-owned | true | A trailer in your own fleet, managed as an asset in Alvys. |
| External | false, null, or absent | A carrier’s trailer, recorded against a trip so the equipment on the load is known. It is not an asset you manage and has no fleet, VIN, or equipment detail. |
| Endpoint | External trailers |
|---|---|
| List trailers | Excluded |
| Get trailer | Included |
| Search trailers | Included, unless you filter on CompanyOwnedAsset |
Test for
CompanyOwnedAsset !== true, not === false. A small number of older external records were written before the field existed and carry no value at all, so they come back with CompanyOwnedAsset absent or null. They are external trailers. For the same reason, searching with CompanyOwnedAsset: false does not return them — omit the filter and test the response field if you need every external trailer.Authorizations
OAuth 2.0 client-credentials access token. Obtain one from https://auth.alvys.com/oauth/token (grant_type=client_credentials, audience=https://api.alvys.com/public/), then paste it here. The playground sends it as Authorization: Bearer <token>.
Path Parameters
API version (e.g., 1.0)
Example:
"1.0"
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Filter by ownership. true returns only company-owned trailers, false only external ones. Omit it to return both. Because the filter matches the stored value exactly, false does not return older external records that have no ownership value set; omit the filter and test the response field instead if you need every external trailer.
⌘I
Search trailers
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/trailers/search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"Page": 123,
"PageSize": 123,
"Status": [
"<string>"
],
"TrailerNumber": "<string>",
"FleetName": "<string>",
"VinNumber": "<string>",
"CompanyOwnedAsset": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
Page: 123,
PageSize: 123,
Status: ['<string>'],
TrailerNumber: '<string>',
FleetName: '<string>',
VinNumber: '<string>',
CompanyOwnedAsset: true
})
};
fetch('https://integrations.alvys.com/api/p/v{version}/trailers/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/trailers/search"
payload = {
"Page": 123,
"PageSize": 123,
"Status": ["<string>"],
"TrailerNumber": "<string>",
"FleetName": "<string>",
"VinNumber": "<string>",
"CompanyOwnedAsset": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/trailers/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'Page' => 123,
'PageSize' => 123,
'Status' => [
'<string>'
],
'TrailerNumber' => '<string>',
'FleetName' => '<string>',
'VinNumber' => '<string>',
'CompanyOwnedAsset' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/trailers/search"
payload := strings.NewReader("{\n \"Page\": 123,\n \"PageSize\": 123,\n \"Status\": [\n \"<string>\"\n ],\n \"TrailerNumber\": \"<string>\",\n \"FleetName\": \"<string>\",\n \"VinNumber\": \"<string>\",\n \"CompanyOwnedAsset\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integrations.alvys.com/api/p/v{version}/trailers/search")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"Page\": 123,\n \"PageSize\": 123,\n \"Status\": [\n \"<string>\"\n ],\n \"TrailerNumber\": \"<string>\",\n \"FleetName\": \"<string>\",\n \"VinNumber\": \"<string>\",\n \"CompanyOwnedAsset\": true\n}")
.asString();{
"Page": 123,
"PageSize": 123,
"Total": 123,
"Items": [
{
"Id": "<string>",
"TrailerNum": "<string>",
"Status": "<string>",
"Notes": [
{
"id": "<string>",
"Description": "<string>",
"NoteType": "<string>",
"User": "<string>",
"Time": "2023-11-07T05:31:56Z",
"UserId": "<string>"
}
],
"CreatedAt": "2023-11-07T05:31:56Z",
"Fleet": {
"Id": "<string>",
"Name": "<string>",
"InvoiceNumberPrefix": "<string>"
},
"Year": 123,
"Make": "<string>",
"LicenseNum": "<string>",
"LicenseState": "<string>",
"LicenseCountry": "<string>",
"PlateExpiresAt": "2023-12-25",
"LicenseExpiresAt": "2023-12-25",
"VinNum": "<string>",
"SubsidiaryId": "<string>",
"EquipmentType": "<string>",
"EquipmentSize": "<string>",
"Capacity": {
"Pallets": 123,
"Weight": 123
},
"InsuranceCompany": "<string>",
"InsurancePolicyNumber": "<string>",
"InsuranceExpiresAt": "2023-12-25",
"InspectionExpiresAt": "2023-12-25",
"References": [
{
"Name": "<string>",
"Value": "<string>",
"Id": "<string>",
"ReferenceId": "<string>",
"Type": "<string>",
"Access": "<string>",
"Origin": "<string>"
}
],
"CompanyOwnedAsset": true
}
],
"Facets": {}
}{
"Errors": {},
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}