Get trailer
Retrieve a single trailer record by ID, including trailer number, type, ownership, license plate, current location, and current load or trip assignment.
curl --request GET \
--url https://integrations.alvys.com/api/p/v{version}/trailers/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://integrations.alvys.com/api/p/v{version}/trailers/{id}', 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/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/trailers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/trailers/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://integrations.alvys.com/api/p/v{version}/trailers/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"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
}{
"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>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}Request Parameters
The following parameters are required in the URL path:| Parameter | Type | Required | Description |
|---|---|---|---|
| version | String | Yes | The API version to use. |
| id | String | Yes | The unique identifier of the trailer. |
CompanyOwnedAsset on the response to tell the two apart — see Trailer ownership.Example CURL request
curl --location 'https://integrations.alvys.com/api/p/v{version}/trailers/{trailerId}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN'
{version} with the API version number, {trailerId} with the actual trailer ID, and YOUR_ACCESS_TOKEN with your actual Bearer token.
curl --location 'https://integrations.alvys.com/api/p/v1/trailers/TL2512345678951234569' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ....'
Response Parameters
The following table lists the parameters included in the response for trailer-related requests:| Parameter | Type | Required | Description |
|---|---|---|---|
| Id | String | Yes | The unique identifier of the trailer. |
| TrailerNum | String | No | The trailer number associated with the trailer. |
| Fleet | Object | No | The fleet information associated with the trailer. |
| Fleet.Id | String | No | The unique identifier of the fleet. |
| Fleet.Name | String | No | The name of the fleet. |
| Fleet.InvoiceNumberPrefix | String | No | The invoice number prefix for the fleet. |
| Year | Integer | No | The manufacturing year of the trailer. |
| Make | String | No | The make of the trailer. |
| LicenseNum | String | No | The license number of the trailer. |
| LicenseState | String | No | The state where the trailer is licensed. |
| LicenseCountry | String | No | The country where the trailer is licensed (USA, Canada, Mexico). |
| PlateExpiresAt | String (Date) | No | The expiration date of the trailer’s plate. |
| LicenseExpiresAt | String (Date) | No | The expiration date of the trailer’s license (registration). |
| VinNum | String | No | The Vehicle Identification Number (VIN) of the trailer. |
| Status | String | No | The current status of the trailer. |
| SubsidiaryId | String | No | The subsidiary ID associated with the trailer. |
| EquipmentType | String | No | The type of equipment of the trailer. |
| EquipmentSize | String | No | The size of the equipment. |
| Capacity | Object | No | The capacity information of the trailer. |
| Capacity.Pallets | Integer | No | The number of pallets the trailer can carry. |
| Capacity.Weight | Integer | No | The weight capacity of the trailer. |
| InsuranceCompany | String | No | The name of the insurance company. |
| InsurancePolicyNumber | String | No | The insurance policy number. |
| InsuranceExpiresAt | String (Date) | No | The expiration date of the insurance policy. |
| InspectionExpiresAt | String (Date) | No | The expiration date of the trailer’s inspection. |
| Notes | Array | No | An optional list of notes related to the trailer. |
| References | Array | No | An optional list of custom references associated with the trailer. |
| CreatedAt | String (Date-Time) | Yes | The date and time when the trailer was created in Alvys. |
| 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.
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 trailer 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.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 |
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)
"1.0"
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Whether this trailer is part of the company's own fleet. true is a company-owned trailer. false is an external trailer — a carrier's equipment recorded against a trip rather than an asset this tenant manages. The field is also absent or null on a small number of older external records, so treat anything other than true as external.
curl --request GET \
--url https://integrations.alvys.com/api/p/v{version}/trailers/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://integrations.alvys.com/api/p/v{version}/trailers/{id}', 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/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/trailers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/trailers/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://integrations.alvys.com/api/p/v{version}/trailers/{id}")
.header("Authorization", "Bearer <token>")
.asString();{
"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
}{
"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>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}