Skip to main content
POST
Search trailers
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.
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:

Request Body

The following fields are required in the request body to filter the search results: <Table> ParameterTypeRequiredDescription PageIntegerYesThe page number to retrieve.PageSizeIntegerYesThe number of results per page.
PageSize must be greater than 0.
StatusArray of StringsNoA list of status values to filter by.TrailerNumberStringConditionallyThe trailer number to search for. This field is required if the other conditionally required fields are left empty.FleetNameStringConditionallyThe name of the fleet to search for. This field is required if the other conditionally required fields are left empty.VinNumberStringConditionallyThe VIN number of the trailer. This field is required if the other conditionally required fields are left empty.CompanyOwnedAssetBooleanNoFilter by ownership. 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:

Response Parameters

The following table lists the parameters included in the response for trailer search requests:

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: Which trailers each endpoint returns differs by design:
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

Authorization
string
header
required

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

version
string
default:1.0
required

API version (e.g., 1.0)

Example:

"1.0"

Body

Page
integer<int32>
required
PageSize
integer<int32>
required
Status
string[] | null
TrailerNumber
string | null
FleetName
string | null
VinNumber
string | null
CompanyOwnedAsset
boolean | null

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.

Response

OK

Page
integer<int32>
required
PageSize
integer<int32>
required
Total
integer<int64>
required
Items
object[]
required
Facets
object | null