> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alvys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create trailer

> Register a company-owned trailer in Alvys with its trailer number, equipment type and size, VIN, plates, capacity, reefer, insurance, and ELD links.

The Create Trailer endpoint registers a company-owned trailer. On success it returns the new trailer and its optimistic-concurrency token in the `ETag` response header. Send that value in the `If-Match` header of a later [Update trailer](https://docs.alvys.com/en/api/reference/trailers/update-trailer.md) request. For more information on how versioning works and how to include it in your requests, please refer to the [Versioning](https://docs.alvys.com/en/api/guides/versioning.md) page.

> [!NOTE]
>
> This endpoint requires the `trailer:create` scope. See [Authentication](https://docs.alvys.com/en/api/guides/authentication-1.md).

### Equipment type and size are required

`EquipmentType` and `EquipmentSize` are required. A trailer without them never matches the equipment requirement of a load. `EquipmentType` is an Alvys equipment type such as `Van`, `Reefer`, or `Flatbed`, matched case-insensitively. `EquipmentSize` is the length in feet, for example `53` or `53'`.

### Trailer number and VIN must be unique

`TrailerNum` must be unique among your company's trailers. When you supply `VinNum`, it must be unique too. A request that would create a duplicate is rejected with `409 Conflict`, and the problem `type` tells you which value clashed:

| Problem `type` | Cause |
| - | - |
| `https://api.alvys.com/errors/Conflict/DuplicateAssetNumber` | Another trailer in your company has this `TrailerNum`. |
| `https://api.alvys.com/errors/Conflict/DuplicateVin` | Another trailer in your company has this `VinNum`. |

The response does not identify the existing trailer. If your credential also has the `trailer:read` scope, find it with [Search trailers](https://docs.alvys.com/en/api/reference/trailers/search-trailers.md) and update that record instead. This lets an onboarding job that runs twice reconcile with what it already created.

### Subsidiary

`SubsidiaryId` must be a subsidiary that your credential may write to. Get the ids from [List subsidiaries](https://docs.alvys.com/en/api/reference/subsidiaries/list-subsidiaries.md). If the credential can write to exactly one subsidiary, you can omit `SubsidiaryId` and the trailer is created in that subsidiary.

### Trailer status

`Status` is shown in the dispatch planner. It does not by itself block dispatch. A maintenance work order started in Alvys moves the trailer to `In Shop`, and back to `Active` when the work order completes. `Crashed` and `Inactive` remove the trailer from the ELD live map and from the trailer lists you pick from in Alvys.

***

### Request parameters

The following parameter is required in the URL path:

| Parameter | Type | Required | Description |
| - | - | - | - |
| version | String | Yes | The version of the API. |

***

### Request body

`TrailerNum`, `EquipmentType`, and `EquipmentSize` are required. Dates are date-only values in `yyyy-MM-dd` format.

| Field | Type | Required | Description |
| - | - | - | - |
| TrailerNum | String | Yes | The trailer number. Must be unique among your company's trailers. |
| EquipmentType | String | Yes | The Alvys equipment type, for example `Van`, `Reefer`, or `Flatbed`. Case-insensitive. |
| EquipmentSize | String | Yes | The length in feet, for example `53` or `53'`. |
| VinNum | String | No | The Vehicle Identification Number (VIN). Must be unique among your company's trailers. |
| Year | Integer | No | The manufacturing year of the trailer. |
| Make | String | No | The make of the trailer. |
| LicenseNum | String | No | The license plate number of the trailer. |
| LicenseState | String | No | The state where the trailer is licensed. |
| LicenseCountry | String | No | The country where the trailer is licensed. |
| LicenseExpiresAt | String (Date) | No | The plate registration expiration date ("License Expiration" in Alvys). |
| PlatesExpire | Boolean | No | Whether the plates expire ("Plates Expire" in Alvys). |
| Status | String | No | One of `Active`, `Planned`, `Temporary`, `Repair`, `In Shop`, `Leased Out`, `Crashed`, `Inactive` (case-insensitive). Defaults to `Active`. |
| SubsidiaryId | String | No | The subsidiary of the trailer. See [Subsidiary](#subsidiary). |
| FleetId | String | No | An active fleet of your account, as returned in `Fleet.Id` by [List trailers](https://docs.alvys.com/en/api/reference/trailers/list-trailers.md). |
| Capacity | Object | No | The load capacity of the trailer. |
| Capacity.Pallets | Integer | No | The number of pallets the trailer can carry. |
| Capacity.Weight | Number | No | The maximum payload, in pounds. |
| NumberOfAxles | Integer | No | The number of axles on the trailer. |
| EmptyWeight | Object | No | The empty (tare) weight, with `Value` (Number) and `UnitOfMeasure` (`Pounds`, `Kilograms`, `Grams`, `Ounces`, `Tons`, `CWT`, `MetricTon`, or `LongTon`). Stored and returned in pounds. |
| GrossVehicleWeightRating | Object | No | The gross vehicle weight rating, with `Value` and `UnitOfMeasure` as in `EmptyWeight`. The maximum payload stays on `Capacity.Weight`. |
| Dimensions | Object | No | The outside dimensions for the routing vehicle profile. |
| Dimensions.Height | Object | No | The height, with `Value` (Number) and `Unit` (`Feet`, `Inches`, `Yards`, or `Meters`). |
| Dimensions.Width | Object | No | The width, with `Value` and `Unit`. |
| Dimensions.Length | Object | No | The length, with `Value` and `Unit`. |
| TireCount | Integer | No | The number of tires on the trailer. |
| TireSize | String | No | The tire size, free text (for example `295/75R22.5`). |
| ReeferMake | String | No | The make of the reefer unit. |
| Reefer | Object | No | The fuel use of the reefer unit. |
| Reefer.FuelBurnPerHour | Number | No | The fuel burned per hour, in gallons. |
| Reefer.TankCapacity | Object | No | The capacity of the reefer tank, with `Value` (Number) and `UnitOfMeasure` (for example `Gallons` or `Liters`). |
| 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. |
| InsuranceValue | Number | No | The insured value of the trailer. |
| InspectionExpiresAt | String (Date) | No | The expiration date of the annual inspection. |
| LeasedFrom | Object | No | The lease under which your company holds the trailer. |
| LeasedFrom.CompanyId | String | No | The id of the company the trailer is leased from. Must be a company in your account. |
| LeasedFrom.DriverName | String | No | The driver name recorded on the lease. |
| LeasedFrom.StartDate | String (Date) | No | The start date of the lease. |
| LeasedFrom.EndDate | String (Date) | No | The end date of the lease. |
| LeasedTo | Object | No | The lease under which your company leases the trailer to another company. Same fields as `LeasedFrom`. |
| StartDate | String (Date) | No | The date the trailer entered service. |
| EndDate | String (Date) | No | The date the trailer left service. |
| OwnerOperatorId | String | No | The driver id of the owner operator the trailer belongs to ("Assigned to Owner Operator" in Alvys). The driver must exist in your account with contractor type Owner Operator. |
| EldProviders | Array | No | The ELD links of the trailer. One link per integration. |
| EldProviders.IntegrationType | String | No | The ELD integration by its Alvys name (for example `Samsara`, `Motive`, or `Orbcomm`). Case-insensitive. |
| EldProviders.Id | String | No | The id of the trailer in that provider. |
| EldProviders.DatagateWayId | String | No | Orbcomm only: the data gateway id of the device. Rejected for any other integration. |
| EldProviders.SensorId | String | No | The sensor id on the device. |
| References | Array | No | The custom references of the trailer. |
| References.TenantReferenceId | String | Yes | The `Id` of a trailer reference definition of your company. Get it from [List custom reference definitions](https://docs.alvys.com/en/api/reference/references/list-reference-definitions.md) with `entities=Trailer`. |
| References.Value | String | No | The value, checked against the type of the definition: `true` or `false` for Bool, a date (`yyyy-MM-dd`) for Date, one of the definition's values for List. |

***

### Example cURL request

```bash theme={null}
curl --location 'https://integrations.alvys.com/api/p/v1/trailers' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
  "TrailerNum": "TR-932",
  "EquipmentType": "Reefer",
  "EquipmentSize": "53",
  "VinNum": "1JJV532D2PL000932",
  "Year": 2023,
  "Make": "Utility",
  "LicenseNum": "TRL5678",
  "LicenseState": "TX",
  "LicenseCountry": "USA",
  "SubsidiaryId": "a1b2c3d4-0000-0000-0000-000000000001",
  "Capacity": { "Pallets": 26, "Weight": 45000 },
  "NumberOfAxles": 2,
  "ReeferMake": "Thermo King",
  "Reefer": {
    "FuelBurnPerHour": 0.8,
    "TankCapacity": { "Value": 50, "UnitOfMeasure": "Gallons" }
  },
  "TireSize": "295/75R22.5",
  "StartDate": "2026-11-01"
}'
```

Replace `YOUR_ACCESS_TOKEN` with your actual Bearer token.

***

### Response fields

A successful request returns `201 Created` with the new trailer, in the same shape as [Get trailer](https://docs.alvys.com/en/api/reference/trailers/get-trailer.md). The trailer's current `ETag` is in the `ETag` response header.

***

### Example response

**201 Created**

```json theme={null}
{
  "Id": "TR100000000000000932",
  "TrailerNum": "TR-932",
  "Year": 2023,
  "Make": "Utility",
  "LicenseNum": "TRL5678",
  "LicenseState": "TX",
  "LicenseCountry": "USA",
  "VinNum": "1JJV532D2PL000932",
  "Status": "Active",
  "SubsidiaryId": "a1b2c3d4-0000-0000-0000-000000000001",
  "EquipmentType": "Reefer",
  "EquipmentSize": "53",
  "Capacity": { "Pallets": 26, "Weight": 45000 },
  "CreatedAt": "2026-11-13T15:04:05.000Z",
  "CompanyOwnedAsset": true,
  "ReeferMake": "Thermo King",
  "StartDate": "2026-11-01",
  "NumberOfAxles": 2,
  "Reefer": {
    "FuelBurnPerHour": 0.8,
    "TankCapacity": { "Value": 50, "UnitOfMeasure": "Gallons" }
  }
}
```

The example shows a subset of the response fields.

***

### Status codes

| Status | Meaning |
| - | - |
| 201 | The trailer was created. |
| 400 | The request body failed validation. The response lists the invalid fields. |
| 401 | The request was not authenticated. |
| 403 | The caller lacks the `trailer:create` scope. |
| 409 | Another trailer in your company has the same `TrailerNum` (`DuplicateAssetNumber`) or `VinNum` (`DuplicateVin`). |
| 422 | A referenced record is not usable. See [Why a request is refused with 422](#why-a-request-is-refused-with-422). |
| 429 | The rate limit was exceeded. |

### Why a request is refused with 422

The problem `type` is `https://api.alvys.com/errors/UnprocessableEntity/` followed by the reason:

| Reason | Cause |
| - | - |
| `SubsidiaryRequired` | You omitted `SubsidiaryId`, and the credential can write to more than one subsidiary, or to none. |
| `SubsidiaryNotInScope` | `SubsidiaryId` is not a subsidiary that this credential may write to. |
| `FleetNotFound` | `FleetId` is not an active fleet of your account. |
| `LeaseCompanyNotFound` | `LeasedFrom.CompanyId` or `LeasedTo.CompanyId` is not a company in your account. |
| `OwnerOperatorNotFound` | `OwnerOperatorId` is not a driver in your account with contractor type Owner Operator. |
| `ReferenceDefinitionNotFound` | A `References.TenantReferenceId` is not a trailer reference definition of your account. |

***

### 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](https://docs.alvys.com/en/api/guides/rate-limits.md) section.

This page is interactive, allowing you to try a request by completing the fields for the parameters below. As you fill out the parameters, the CURL command on the right side of the page will be automatically updated.


## OpenAPI

````yaml POST /api/p/v{version}/trailers
openapi: 3.0.1
info:
  title: Alvys
  description: >-
    Alvys provides a robust set of REST APIs to allow you to integrate Alvys
    into virtually any platform. These APIs cover most of Alvys' major product
    areas with additional endpoints being added regularly based on customer
    requests.
  contact:
    name: Alvys Support
    url: https://www.alvys.com/resources/contact/
  version: v1
servers:
  - url: https://integrations.alvys.com
    description: Public API Server
  - url: https://api.alvys.com/
    description: Public API Server
security:
  - Public: []
tags:
  - name: Authentication
    description: Obtain an OAuth 2.0 access token for the Alvys Public API.
  - name: Carrier Settlement Statements
    description: >-
      Search carrier settlement statements and retrieve a single statement by
      number.
  - name: Carriers
    description: Read carrier records, search carriers, and manage carrier documents.
  - name: Customers
    description: Create, read, update, delete, and search customer records.
  - name: Deductions
    description: >-
      Create one-time deductions and search or delete existing deduction
      records.
  - name: DispatchPreferences
    description: Dispatch preferences endpoints for reading dispatch rules and preferences.
  - name: Driver Settlement Statements
    description: >-
      Search driver settlement statements and retrieve a single statement by
      number.
  - name: Drivers
    description: >-
      Read driver records, search drivers and driver events, and manage driver
      documents.
  - name: Fuel
    description: Read and search fuel transactions.
  - name: Invoices
    description: >-
      Read invoices, create carrier invoices, and record carrier and customer
      payments.
  - name: Loads
    description: >-
      Read, update, and search loads; manage load documents, notes, and custom
      references.
  - name: Locations
    description: Read and search company location details.
  - name: Maintenance
    description: Read and search maintenance records.
  - name: References
    description: >-
      List tenant custom reference definitions and create or update values on
      existing loads, stops, and trips.
  - name: Subsidiaries
    description: >-
      List your company's subsidiaries and read a single subsidiary, so an
      integration can resolve a subsidiary id to a recognizable name.
  - name: Tenders
    description: Create, accept, reject, cancel, update, and search inbound EDI tenders.
  - name: Tolls
    description: Read and search toll transactions.
  - name: Tracking
    description: >-
      Record an asset's current location or telemetry from a third-party source,
      such as an external ELD or a self-reporting vehicle.
  - name: Trailers
    description: Read trailers, search trailer events, and manage trailer documents.
  - name: Trips
    description: >-
      Read and search trips; manage trip documents, stop appointments, arrivals,
      departures, and stop and trip custom references.
  - name: Trucks
    description: Read trucks, search truck events, and manage truck documents.
  - name: Users
    description: List and search users.
  - name: Visibility
    description: >-
      Read inbound and outbound visibility history and search outbound
      visibility errors.
  - name: Webhooks
    description: >-
      Create, read, update, delete, enable, disable, verify, test, and rotate
      secrets for webhook subscriptions; read event types, delivery logs, and
      health metrics.
  - name: Accessorials
  - name: Credits
paths:
  /api/p/v{version}/trailers:
    post:
      tags:
        - Trailers
      summary: Create trailer
      description: >-
        Registers a company-owned trailer. TrailerNum must be unique among your
        company's trailers; the VIN must be unique when supplied. A clash
        answers 409; find the holder with POST /trailers/search when your
        credential can read, so a re-run of an onboarding step can reconcile
        instead of creating a duplicate. Status defaults to Active.
        EquipmentType and EquipmentSize are required: a trailer without them
        never matches a load's equipment requirement. SubsidiaryId may be
        omitted only when the credential can write to exactly one subsidiary
        (see GET /subsidiaries).
      parameters:
        - name: version
          in: path
          description: API version (e.g., 1.0)
          required: true
          schema:
            type: string
            default: '1.0'
            example: '1.0'
      requestBody:
        content:
          application/json-patch+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Alvys.Models.Trailers.TrailerCreateRequest
          application/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Alvys.Models.Trailers.TrailerCreateRequest
          text/json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Alvys.Models.Trailers.TrailerCreateRequest
          application/*+json:
            schema:
              allOf:
                - $ref: >-
                    #/components/schemas/Alvys.Models.Trailers.TrailerCreateRequest
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Alvys.Models.Trailers.TrailerResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '409':
          description: >-
            Conflict (TrailerNum or VIN already used by another trailer:
            DuplicateAssetNumber or DuplicateVin)
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '422':
          description: Unprocessable Content
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
            application/json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '429':
          description: Too Many Requests
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
      security:
        - Public: []
components:
  schemas:
    Alvys.Models.Trailers.TrailerCreateRequest:
      required:
        - EquipmentSize
        - EquipmentType
        - TrailerNum
      type: object
      properties:
        TrailerNum:
          type: string
        EquipmentType:
          type: string
          description: >-
            Alvys equipment type, e.g. "Van", "Reefer", "Flatbed". Matched
            case-insensitively. Required: a trailer without one never matches a
            load's equipment requirement.
        EquipmentSize:
          type: string
          description: Length in feet, e.g. "53" or "53'".
        VinNum:
          type: string
          nullable: true
        Year:
          type: integer
          format: int32
          nullable: true
        Make:
          type: string
          nullable: true
        LicenseNum:
          type: string
          nullable: true
        LicenseState:
          type: string
          nullable: true
        LicenseCountry:
          type: string
          nullable: true
        LicenseExpiresAt:
          type: string
          description: >-
            Plate registration expiration ("License Expiration" in the app).
            Date only (yyyy-MM-dd), stored as 00:00 UTC.
          format: date
          nullable: true
        PlatesExpire:
          type: boolean
          description: Whether the plates expire ("Plates Expire" in the app).
          nullable: true
        Status:
          type: string
          description: >-
            One of Active, Planned, Temporary, Repair, In Shop, Leased Out,
            Crashed, Inactive (case-insensitive). Shown in the dispatch planner;
            does not by itself block dispatch. In Shop and Active are also
            written by the maintenance work-order sync. Crashed and Inactive
            remove the trailer from the ELD live map and from trailer pickers.
            Defaults to Active.
          nullable: true
        SubsidiaryId:
          type: string
          description: >-
            Subsidiary id from GET /subsidiaries. Must be one this credential
            may write to. May be omitted only when the credential can write to
            exactly one subsidiary.
          nullable: true
        FleetId:
          type: string
          description: >-
            Fleet id, as returned in Fleet.Id by GET /trailers. Must be an
            active fleet of your account.
          nullable: true
        Capacity:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Capacity'
          description: 'Load capacity: pallets and weight in pounds.'
          nullable: true
        ReeferMake:
          type: string
          nullable: true
        NumberOfAxles:
          type: integer
          format: int32
          nullable: true
        EmptyWeight:
          allOf:
            - $ref: '#/components/schemas/Alvys.Weight'
          description: >-
            Empty (tare) weight, with its unit (Pounds, Kilograms, ...). Stored
            and returned in pounds.
          nullable: true
        Dimensions:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.VehicleDimensions'
          description: >-
            Outside dimensions for the routing vehicle profile: Height, Width
            and Length, each with its unit (Feet, Inches, Meters, ...).
          nullable: true
        GrossVehicleWeightRating:
          allOf:
            - $ref: '#/components/schemas/Alvys.Weight'
          description: >-
            Gross vehicle weight rating, with its unit (Pounds, Kilograms, ...).
            Max payload stays on Capacity.Weight.
          nullable: true
        TireCount:
          type: integer
          format: int32
          nullable: true
        Reefer:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.ReeferFuelProfile'
          description: >-
            Reefer unit fuel use: FuelBurnPerHour (gallons) and TankCapacity
            (with its unit).
          nullable: true
        InsuranceCompany:
          type: string
          nullable: true
        InsurancePolicyNumber:
          type: string
          nullable: true
        InsuranceExpiresAt:
          type: string
          description: Date only (yyyy-MM-dd), stored as 00:00 UTC.
          format: date
          nullable: true
        InspectionExpiresAt:
          type: string
          description: >-
            Annual inspection expiration. Date only (yyyy-MM-dd), stored as
            00:00 UTC.
          format: date
          nullable: true
        InsuranceValue:
          type: number
          format: double
          nullable: true
        LeasedFrom:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Assets.AssetLeaseRequest'
          nullable: true
        LeasedTo:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Assets.AssetLeaseRequest'
          nullable: true
        StartDate:
          type: string
          description: >-
            Date the trailer entered service. Date only (yyyy-MM-dd), stored as
            00:00 UTC.
          format: date
          nullable: true
        EndDate:
          type: string
          description: >-
            Date the trailer left service. Date only (yyyy-MM-dd), stored as
            00:00 UTC.
          format: date
          nullable: true
        OwnerOperatorId:
          type: string
          description: >-
            Driver id of the owner operator the asset belongs to ("Assigned to
            Owner Operator" in the app). The driver must exist in your account
            with contractor type Owner Operator. null unassigns the asset: it
            goes back to its subsidiary's carrier. On a truck, fuel cards with
            Deduct Fuel follow the change in the same write: they stop deducting
            when the truck leaves its owner operator, and deduct from the new
            one when it moves.
          nullable: true
        TireSize:
          type: string
          description: Tire size, free text (e.g. 295/75R22.5).
          nullable: true
        EldProviders:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Assets.EldProviderRequest'
          description: >-
            ELD links, replaced whole. Moving an asset off a link stops its
            location updates from that provider.
          nullable: true
        References:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Assets.AssetReferenceRequest'
          description: >-
            Custom references, replaced whole. Each new or changed reference
            must name a definition the tenant set up for this asset type; type,
            access and visibility come from the definition.
          nullable: true
      additionalProperties: false
    Alvys.Models.Trailers.TrailerResponse:
      required:
        - CreatedAt
        - Id
        - Notes
        - Status
        - TrailerNum
      type: object
      properties:
        Id:
          type: string
        TrailerNum:
          type: string
        Fleet:
          allOf:
            - $ref: '#/components/schemas/FleetResponse'
          nullable: true
        Year:
          type: integer
          format: int32
          nullable: true
        Make:
          type: string
          nullable: true
        LicenseNum:
          type: string
          nullable: true
        LicenseState:
          type: string
          nullable: true
        LicenseCountry:
          type: string
          nullable: true
        PlateExpiresAt:
          type: string
          format: date
          nullable: true
        LicenseExpiresAt:
          type: string
          format: date
          nullable: true
        VinNum:
          type: string
          nullable: true
        Status:
          type: string
        SubsidiaryId:
          type: string
          nullable: true
        EquipmentType:
          type: string
          nullable: true
        EquipmentSize:
          type: string
          nullable: true
        Capacity:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Capacity'
          nullable: true
        InsuranceCompany:
          type: string
          nullable: true
        InsurancePolicyNumber:
          type: string
          nullable: true
        InsuranceExpiresAt:
          type: string
          format: date
          nullable: true
        InspectionExpiresAt:
          type: string
          format: date
          nullable: true
        Notes:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Notes.NoteDto'
        CreatedAt:
          type: string
          format: date-time
        References:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.References.ReferenceResponse'
          nullable: true
        CompanyOwnedAsset:
          type: boolean
          nullable: true
          description: >-
            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.
        PlatesExpire:
          type: boolean
          nullable: true
        ReeferMake:
          type: string
          nullable: true
        InsuranceValue:
          type: number
          format: double
          nullable: true
        LeasedFrom:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Assets.AssetLeaseResponse'
          nullable: true
        LeasedTo:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Assets.AssetLeaseResponse'
          nullable: true
        StartDate:
          type: string
          format: date
          nullable: true
        EndDate:
          type: string
          format: date
          nullable: true
        NumberOfAxles:
          type: integer
          format: int32
          nullable: true
        EmptyWeight:
          allOf:
            - $ref: '#/components/schemas/Alvys.Weight'
          nullable: true
        Dimensions:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.VehicleDimensions'
          nullable: true
        GrossVehicleWeightRating:
          allOf:
            - $ref: '#/components/schemas/Alvys.Weight'
          nullable: true
        TireCount:
          type: integer
          format: int32
          nullable: true
        Reefer:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.ReeferFuelProfile'
          nullable: true
      additionalProperties: false
    Microsoft.AspNetCore.Mvc.ValidationProblemDetails:
      required:
        - Errors
      type: object
      properties:
        Errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        Type:
          type: string
          nullable: true
        Title:
          type: string
          nullable: true
        Status:
          type: integer
          format: int32
          nullable: true
        Detail:
          type: string
          nullable: true
        Instance:
          type: string
          nullable: true
      additionalProperties: {}
    Microsoft.AspNetCore.Mvc.ProblemDetails:
      type: object
      properties:
        Type:
          type: string
          nullable: true
        Title:
          type: string
          nullable: true
        Status:
          type: integer
          format: int32
          nullable: true
        Detail:
          type: string
          nullable: true
        Instance:
          type: string
          nullable: true
      additionalProperties: {}
    Alvys.Models.Capacity:
      required:
        - Pallets
        - Weight
      type: object
      properties:
        Pallets:
          type: integer
          format: int32
        Weight:
          type: number
          format: double
      additionalProperties: false
    Alvys.Weight:
      required:
        - UnitOfMeasure
        - Value
      type: object
      properties:
        Value:
          type: number
          format: double
        UnitOfMeasure:
          allOf:
            - $ref: '#/components/schemas/Alvys.WeightWeightUnits'
      additionalProperties: false
    Alvys.Models.VehicleDimensions:
      type: object
      properties:
        Height:
          allOf:
            - $ref: '#/components/schemas/Alvys.Length'
          nullable: true
        Width:
          allOf:
            - $ref: '#/components/schemas/Alvys.Length'
          nullable: true
        Length:
          allOf:
            - $ref: '#/components/schemas/Alvys.Length'
          nullable: true
      additionalProperties: false
    Alvys.Models.ReeferFuelProfile:
      type: object
      properties:
        FuelBurnPerHour:
          type: number
          format: double
          nullable: true
        TankCapacity:
          allOf:
            - $ref: '#/components/schemas/Alvys.Volume'
          nullable: true
      additionalProperties: false
    Alvys.Models.Assets.AssetLeaseRequest:
      type: object
      properties:
        CompanyId:
          type: string
          description: >-
            Id of the company the asset is leased from or to. Must be a company
            in your account.
          nullable: true
        DriverName:
          type: string
          nullable: true
        StartDate:
          type: string
          description: Date only (yyyy-MM-dd), stored as 00:00 UTC.
          format: date
          nullable: true
        EndDate:
          type: string
          description: Date only (yyyy-MM-dd), stored as 00:00 UTC.
          format: date
          nullable: true
      additionalProperties: false
    Alvys.Models.Assets.EldProviderRequest:
      type: object
      properties:
        IntegrationType:
          type: string
          description: >-
            The ELD integration, by its Alvys name (e.g. Samsara, Motive,
            Orbcomm). Matched case-insensitively; one link per integration.
          nullable: true
        Id:
          type: string
          description: The asset's id in that provider.
          nullable: true
        DatagateWayId:
          type: string
          description: >-
            Orbcomm only: the device's data gateway id. Rejected for any other
            integration.
          nullable: true
        SensorId:
          type: string
          description: >-
            Sensor id on the device. Omit or send null to keep the one stored on
            the same link.
          nullable: true
      additionalProperties: false
    Alvys.Models.Assets.AssetReferenceRequest:
      type: object
      properties:
        Id:
          type: string
          description: >-
            Id of a reference already on the asset, to keep or edit it. Omit for
            a new reference.
          nullable: true
        TenantReferenceId:
          type: string
          description: >-
            Id of the reference definition (GET
            companyprofiles/reference/entity/{Truck|Trailer}). Required for a
            new or changed reference.
          nullable: true
        Value:
          type: string
          description: >-
            The value, checked against the definition's type: true or false for
            Bool, a date (yyyy-MM-dd) for Date, one of the definition's values
            for List. A reference identical to one already stored is kept as it
            is.
          nullable: true
      additionalProperties: false
    FleetResponse:
      type: object
      properties:
        Id:
          type: string
          nullable: true
        Name:
          type: string
          nullable: true
        InvoiceNumberPrefix:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.Notes.NoteDto:
      required:
        - Description
        - id
        - NoteType
        - User
      type: object
      properties:
        id:
          type: string
        Description:
          type: string
        NoteType:
          type: string
        Time:
          type: string
          format: date-time
          nullable: true
        User:
          type: string
        UserId:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.References.ReferenceResponse:
      required:
        - Name
        - Value
      type: object
      properties:
        Id:
          type: string
          nullable: true
        ReferenceId:
          type: string
          nullable: true
        Name:
          type: string
        Value:
          type: string
        Type:
          type: string
          nullable: true
        Access:
          type: string
          nullable: true
        Origin:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.Assets.AssetLeaseResponse:
      type: object
      properties:
        CompanyId:
          type: string
          nullable: true
        DriverName:
          type: string
          nullable: true
        StartDate:
          type: string
          format: date
          nullable: true
        EndDate:
          type: string
          format: date
          nullable: true
      additionalProperties: false
    Alvys.WeightWeightUnits:
      enum:
        - Kilograms
        - Grams
        - Pounds
        - Ounces
        - Tons
        - CWT
        - MetricTon
        - LongTon
      type: string
    Alvys.Length:
      required:
        - Value
        - Unit
      type: object
      properties:
        Value:
          type: number
          format: double
        Unit:
          allOf:
            - $ref: '#/components/schemas/Alvys.LengthUnits'
      additionalProperties: false
    Alvys.Volume:
      required:
        - UnitOfMeasure
        - Value
      type: object
      properties:
        Value:
          type: number
          format: double
        UnitOfMeasure:
          allOf:
            - $ref: '#/components/schemas/Alvys.VolumeVolumeUnits'
      additionalProperties: false
    Alvys.LengthUnits:
      enum:
        - Feet
        - Inches
        - Yards
        - Meters
      type: string
    Alvys.VolumeVolumeUnits:
      enum:
        - Gallons
        - Liters
        - Bushels
        - CubicFoot
        - CubicMeter
        - Quarts
      type: string
  securitySchemes:
    Public:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        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>`.

````