> ## 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.

# Search trips

> Search trips with paginated POST filters — driver, truck, status, load number, planned pickup and delivery windows, origin, and destination.

This endpoint provides detailed information about each trip that matches the search criteria, enabling efficient management and retrieval of trip records.

#### Request Body Parameters

The following parameters are required in the request body:

| Parameter               | Type               | Required      | Description                                                                                                                                                                                                                                                                                                      |
| ----------------------- | ------------------ | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Page                    | Integer            | Yes           | The page number to retrieve.                                                                                                                                                                                                                                                                                     |
| PageSize                | Integer            | Yes           | The number of items per page. Must be greater than 0.                                                                                                                                                                                                                                                            |
| Status                  | Array of Strings   | Conditionally | The status of the trip. Must be one or more of the allowed values: "Open", "Reserved", "Covered", "Dispatched", "In Transit", "Delivered", "Invoiced", "Completed", "Quoted", "Released", "TONU", "Cancelled", "Queued", "Financed", "Paid", "In Review". Required if no other conditional filters are provided. |
| LoadNumbers             | Array of Strings   | Conditionally | The load number(s) associated with the trips. This field is required if the other conditionally required fields are left empty.                                                                                                                                                                                  |
| TripNumbers             | Array of Strings   | Conditionally | The trip number(s) to search for. This field is required if items matching the other conditionally required fields are left empty.                                                                                                                                                                               |
| PickupDateRange         | Object             | No            | The range of pickup dates to filter by.                                                                                                                                                                                                                                                                          |
| PickupDateRange.Start   | String (Date-Time) | No            | The start date of the pickup range.                                                                                                                                                                                                                                                                              |
| PickupDateRange.End     | String (Date-Time) | No            | The end date of the pickup range.                                                                                                                                                                                                                                                                                |
| DeliveryDateRange       | Object             | No            | The range of delivery dates to filter by.                                                                                                                                                                                                                                                                        |
| DeliveryDateRange.Start | String (Date-Time) | No            | The start date of the delivery range.                                                                                                                                                                                                                                                                            |
| DeliveryDateRange.End   | String (Date-Time) | No            | The end date of the delivery range.                                                                                                                                                                                                                                                                              |
| UpdatedAtRange          | Object             | No            | The range of update timestamps to filter by.                                                                                                                                                                                                                                                                     |
| UpdatedAtRange.Start    | String (Date-Time) | No            | The start date of the updatedAt range.                                                                                                                                                                                                                                                                           |
| UpdatedAtRange.End      | String (Date-Time) | No            | The end date of the updatedAt range.                                                                                                                                                                                                                                                                             |
| UpdatedBy               | String             | Conditionally | The user who last updated the trips. This field is required if the other conditionally required fields are left empty.                                                                                                                                                                                           |
| IncludeDeleted          | Boolean            | No            | When set to `true`, the response will include both active and deleted trips (with `"IsDeleted": true` for deleted items). If `false` or omitted, only active records are returned and no `IsDeleted` flags are included.                                                                                         |

<br />

#### Example CURL request

Use the Current API version The load number and make sure to replace the Authorization header value associated with your actual Bearer token for the request:

```bash theme={null}
curl --location 'https://integrations.alvys.com/api/p/v1/trips/search' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ...' \
--header 'Content-Type: application/json' \
--data '{
"Page": 0,
"PageSize": 100,
"Status": [
"Covered"
],
"UpdatedBy" : "0d00f000-1b85-4ed8-000-6a000d1111db",
"UpdatedAtRange": {
"Start": "2024-09-09T13:09:30.788Z",
"End": "2024-10-19T13:09:30.788Z"
},
"LoadNumbers": [
"123456789"
],
"TripNumbers": [
"123456789"
],
"PickupDateRange": {
"Start": "2025-07-23T10:45:56.477Z",
"End": "2025-07-23T10:45:56.477Z"
},
"DeliveryDateRange": {
"Start": "2025-07-23T10:45:56.477Z",
"End": "2025-07-23T10:45:56.477Z"
}
}'
```

#### Response Body Parameters

The following parameters are required in the request body:

| Parameter                                                   | Type              | Required | Description                                                                                                                                                                                                                                                      |
| :---------------------------------------------------------- | :---------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Page                                                        | integer           | No       | The current page of the response.                                                                                                                                                                                                                                |
| PageSize                                                    | integer           | Yes      | The number of items per page.                                                                                                                                                                                                                                    |
| Total                                                       | integer           | Yes      | The total number of items matching the criteria.                                                                                                                                                                                                                 |
| Items\[].Id                                                 | string            | Yes      | The unique identifier of the trip.                                                                                                                                                                                                                               |
| Items\[].TripNumber                                         | string            | Yes      | The number associated with the trip.                                                                                                                                                                                                                             |
| Items\[].Status                                             | string            | No       | The current status of the trip. Will always be one of the allowed values: "Open", "Reserved", "Covered", "Dispatched", "In Transit", "Delivered", "Invoiced", "Completed", "Quoted", "Released", "TONU", "Cancelled", "Queued", "Financed", "Paid", "In Review". |
| Items\[].LoadNumber                                         | string            | No       | The load number associated with the trip.                                                                                                                                                                                                                        |
| Items\[].TenderAs                                           | string            | No       | Role under which the trip was tendered.                                                                                                                                                                                                                          |
| Items\[].Stops\[]                                           | array of objects  | No       | The list of stops associated with the trip.                                                                                                                                                                                                                      |
| Items\[].Stops\[].Id                                        | string            | No       | The unique identifier of the stop.                                                                                                                                                                                                                               |
| Items\[].Stops\[].Address.Street                            | string            | No       | The street address of the stop.                                                                                                                                                                                                                                  |
| Items\[].Stops\[].Address.City                              | string            | No       | The city of the stop.                                                                                                                                                                                                                                            |
| Items\[].Stops\[].Address.State                             | string            | No       | The state of the stop.                                                                                                                                                                                                                                           |
| Items\[].Stops\[].Address.ZipCode                           | string            | No       | The ZIP code of the stop.                                                                                                                                                                                                                                        |
| Items\[].Stops\[].Coordinates.Latitude                      | string            | No       | The latitude of the stop location.                                                                                                                                                                                                                               |
| Items\[].Stops\[].Coordinates.Longitude                     | string            | No       | The longitude of the stop location.                                                                                                                                                                                                                              |
| Items\[].Stops\[].Status                                    | string            | No       | The current status of the stop.                                                                                                                                                                                                                                  |
| Items\[].Stops\[].StopType                                  | string            | No       | The type of stop (e.g., Pickup, Delivery).                                                                                                                                                                                                                       |
| Items\[].Stops\[].ScheduleType                              | string            | No       | The schedule type of the stop. If `APPT`, see `appointmentDate`; if `FCFS`, see `stopWindow.*`.                                                                                                                                                                  |
| Items\[].Stops\[].AppointmentDate                           | string (datetime) | No       | Appointment date/time for the stop. **Only populated when `scheduleType = APPT`.**                                                                                                                                                                               |
| Items\[].Stops\[].StopWindow\.Begin                         | string (datetime) | No       | Window begin time for the stop. **Only populated when `scheduleType = FCFS`.**                                                                                                                                                                                   |
| Items\[].Stops\[].StopWindow\.End                           | string (datetime) | No       | Window end time for the stop. **Only populated when `scheduleType = FCFS`.**                                                                                                                                                                                     |
| Items\[].Stops\[].LoadingType                               | string            | No       | The loading type at the stop.                                                                                                                                                                                                                                    |
| Items\[].Stops\[].ArrivedAt                                 | string (datetime) | No       | When the stop was arrived at (UTC).                                                                                                                                                                                                                              |
| Items\[].Stops\[].DepartedAt                                | string (datetime) | No       | When the stop was departed from (UTC).                                                                                                                                                                                                                           |
| Items\[].Stops\[].References\[]                             | array of objects  | No       | A list of references associated with the stop.                                                                                                                                                                                                                   |
| Items\[].Stops\[].References\[].Id                          | string            | No       | The unique identifier of the reference.                                                                                                                                                                                                                          |
| Items\[].Stops\[].References\[].ReferenceId                 | string            | No       | The external reference ID.                                                                                                                                                                                                                                       |
| Items\[].Stops\[].References\[].Name                        | string            | No       | The name of the reference.                                                                                                                                                                                                                                       |
| Items\[].Stops\[].References\[].Value                       | string            | No       | The value of the reference.                                                                                                                                                                                                                                      |
| Items\[].Stops\[].References\[].Type                        | string            | No       | The type of reference (e.g., Text, Date).                                                                                                                                                                                                                        |
| Items\[].Stops\[].References\[].Access                      | string            | No       | The access level (e.g., Internal, Public).                                                                                                                                                                                                                       |
| Items\[].Stops\[].References\[].Origin                      | string            | No       | Origin of the reference field (e.g., Manual, Integration).                                                                                                                                                                                                       |
| Items\[].Stops\[].CompanyId                                 | string            | No       | The unique identifier of the company associated with the stop.                                                                                                                                                                                                   |
| Items\[].Stops\[].CompanyNumber                             | string            | No       | The number of registration or identification number of the company linked to the stop.                                                                                                                                                                           |
| Items\[].Stops\[].CompanyName                               | string            | No       | Name of the company linked to this stop.                                                                                                                                                                                                                         |
| Items\[].TotalMileage.Distance.Value                        | number            | No       | Total mileage value.                                                                                                                                                                                                                                             |
| Items\[].TotalMileage.Distance.UnitOfMeasure                | string            | No       | Unit of measure for total mileage (e.g., Miles).                                                                                                                                                                                                                 |
| Items\[].TotalMileage.Source                                | string            | No       | Source of total mileage.                                                                                                                                                                                                                                         |
| Items\[].TotalMileage.ProfileId                             | string            | No       | ID of mileage profile used.                                                                                                                                                                                                                                      |
| Items\[].TotalMileage.ProfileName                           | string            | No       | Name of mileage profile used.                                                                                                                                                                                                                                    |
| Items\[].EmptyMileage.Distance.Value                        | number            | No       | Empty mileage value.                                                                                                                                                                                                                                             |
| Items\[].LoadedMileage.Distance.Value                       | number            | No       | Loaded mileage value.                                                                                                                                                                                                                                            |
| Items\[].PickupDate                                         | string (datetime) | No       | Scheduled pickup date.                                                                                                                                                                                                                                           |
| Items\[].DeliveryDate                                       | string (datetime) | No       | Scheduled delivery date.                                                                                                                                                                                                                                         |
| Items\[].PickedUpAt                                         | string (datetime) | No       | Actual pickup timestamp.                                                                                                                                                                                                                                         |
| Items\[].DeliveredAt                                        | string (datetime) | No       | Actual delivery timestamp.                                                                                                                                                                                                                                       |
| Items\[].CarrierAssignedAt                                  | string (datetime) | No       | Carrier assignment timestamp.                                                                                                                                                                                                                                    |
| Items\[].ReleasedAt                                         | string (datetime) | No       | Timestamp when the trip was marked as released.                                                                                                                                                                                                                  |
| Items\[].TripValue.Amount                                   | number            | No       | Total trip value.                                                                                                                                                                                                                                                |
| Items\[].TripValue.Currency                                 | string            | No       | Currency for trip value.                                                                                                                                                                                                                                         |
| Items\[].Truck.Id                                           | string            | No       | ID of the truck.                                                                                                                                                                                                                                                 |
| Items\[].Trailer.Id                                         | string            | No       | ID of the trailer.                                                                                                                                                                                                                                               |
| Items\[].Trailer.EquipmentType                              | string            | No       | Equipment type of trailer.                                                                                                                                                                                                                                       |
| Items\[].Trailer.EquipmentLength.Value                      | number            | No       | Trailer length.                                                                                                                                                                                                                                                  |
| Items\[].Trailer.EquipmentLength.UnitOfMeasure              | string            | No       | Unit for trailer length (e.g., Feet).                                                                                                                                                                                                                            |
| Items\[].Driver1.AccessorialsDetails\[]                     | array of objects  | No       | List of driver1 accessorials.                                                                                                                                                                                                                                    |
| Items\[].Driver2.AccessorialsDetails\[]                     | array of objects  | No       | List of driver2 accessorials.                                                                                                                                                                                                                                    |
| Items\[].OwnerOperator.AccessorialsDetails\[]               | array of objects  | No       | List of owner-operator accessorials.                                                                                                                                                                                                                             |
| Items\[].Carrier.AccessorialsDetails\[]                     | array of objects  | No       | List of carrier accessorials.                                                                                                                                                                                                                                    |
| Items\[].\*.AccessorialsDetails\[].Id                       | string            | No       | Unique ID of the accessorial.                                                                                                                                                                                                                                    |
| Items\[].\*.AccessorialsDetails\[].Type                     | string            | No       | Type of accessorial (e.g., Detention).                                                                                                                                                                                                                           |
| Items\[].\*.AccessorialsDetails\[].Total.Amount             | number            | No       | Total charge amount.                                                                                                                                                                                                                                             |
| Items\[].\*.AccessorialsDetails\[].Total.Currency           | string            | No       | Currency of the total.                                                                                                                                                                                                                                           |
| Items\[].\*.AccessorialsDetails\[].Rate.Amount              | number            | No       | Rate per unit.                                                                                                                                                                                                                                                   |
| Items\[].\*.AccessorialsDetails\[].Rate.Currency            | string            | No       | Currency of the rate.                                                                                                                                                                                                                                            |
| Items\[].\*.AccessorialsDetails\[].RateType                 | string            | No       | Rate type (Flat, PerHour, etc).                                                                                                                                                                                                                                  |
| Items\[].\*.AccessorialsDetails\[].Uom                      | string            | No       | Unit of measure (e.g., Hours, Miles).                                                                                                                                                                                                                            |
| Items\[].\*.AccessorialsDetails\[].Quantity                 | number            | No       | Quantity of units billed.                                                                                                                                                                                                                                        |
| Items\[].\*.AccessorialsDetails\[].IsPaid                   | boolean           | No       | If present, indicates whether accessorial has been paid.                                                                                                                                                                                                         |
| Items\[].\*.AccessorialsDetails\[].StopId                   | string            | No       | ID of the stop this accessorial is linked to (if applicable).                                                                                                                                                                                                    |
| Items\[].\*.AccessorialsDetails\[].ECheckNumber             | string            | No       | Associated ECheck number if applicable.                                                                                                                                                                                                                          |
| Items\[].\*.AccessorialsDetails\[].CreatedAt                | string (datetime) | No       | When the accessorial was created (UTC).                                                                                                                                                                                                                          |
| Items\[].\*.AccessorialsDetails\[].CreatedBy                | string            | No       | User who created the accessorial.                                                                                                                                                                                                                                |
| Items\[].\*.AccessorialsDetails\[].UpdatedAt                | string (datetime) | No       | When the accessorial was last updated (UTC).                                                                                                                                                                                                                     |
| Items\[].\*.AccessorialsDetails\[].UpdatedBy                | string            | No       | User who last updated the accessorial.                                                                                                                                                                                                                           |
| Items\[].\*.EChecks\[]                                      | array of objects  | No       | List of EChecks issued to driver1, driver2, or ownerOperator.                                                                                                                                                                                                    |
| Items\[].\*.EChecks\[].Id                                   | string            | No       | Unique ID of the ECheck.                                                                                                                                                                                                                                         |
| Items\[].\*.EChecks\[].CheckNumber                          | string            | No       | ECheck number.                                                                                                                                                                                                                                                   |
| Items\[].\*.EChecks\[].Amount.Amount                        | number            | No       | Amount value of the ECheck.                                                                                                                                                                                                                                      |
| Items\[].\*.EChecks\[].Amount.Currency                      | string            | No       | Currency of the ECheck amount.                                                                                                                                                                                                                                   |
| Items\[].\*.EChecks\[].Fee.Amount                           | number            | No       | Fee value of the ECheck.                                                                                                                                                                                                                                         |
| Items\[].\*.EChecks\[].Fee.Currency                         | string            | No       | Currency of the fee.                                                                                                                                                                                                                                             |
| Items\[].\*.EChecks\[].Type                                 | string            | No       | Type of ECheck.                                                                                                                                                                                                                                                  |
| Items\[].\*.EChecks\[].IsPaid                               | boolean           | No       | Indicates whether the ECheck is paid.                                                                                                                                                                                                                            |
| Items\[].\*.EChecks\[].CreatedAt                            | string (datetime) | No       | When the ECheck was created (UTC).                                                                                                                                                                                                                               |
| Items\[].Carrier.Linehaul.Amount                            | number            | No       | Carrier linehaul amount.                                                                                                                                                                                                                                         |
| Items\[].Carrier.Linehaul.Currency                          | string            | No       | Currency of linehaul.                                                                                                                                                                                                                                            |
| Items\[].Carrier.Accessorials.Amount                        | number            | No       | Total accessorials amount for carrier.                                                                                                                                                                                                                           |
| Items\[].Carrier.Accessorials.Currency                      | string            | No       | Currency for carrier accessorials.                                                                                                                                                                                                                               |
| Items\[].Carrier.TotalPayable.Amount                        | number            | No       | Total amount payable to carrier.                                                                                                                                                                                                                                 |
| Items\[].Carrier.TotalPayable.Currency                      | string            | No       | Currency for total payable amount.                                                                                                                                                                                                                               |
| Items\[].Carrier.CarrierInvoiceNumber                       | string            | No       | Invoice number from the carrier.                                                                                                                                                                                                                                 |
| Items\[].Carrier.Id                                         | string            | No       | Unique ID of the carrier.                                                                                                                                                                                                                                        |
| Items\[].ReleasedBy                                         | string            | No       | User who released the trip.                                                                                                                                                                                                                                      |
| Items\[].DispatchedBy                                       | string            | No       | User who dispatched the trip.                                                                                                                                                                                                                                    |
| Items\[].DispatcherId                                       | string            | No       | ID of the dispatcher.                                                                                                                                                                                                                                            |
| Items\[].CarrierSalesAgentId                                | string            | No       | ID of the carrier sales agent.                                                                                                                                                                                                                                   |
| Items\[].CarrierPayOnHold                                   | boolean           | No       | Indicates if carrier payment is on hold.                                                                                                                                                                                                                         |
| Items\[].UpdatedAt                                          | string (datetime) | No       | Timestamp when the trip was last updated.                                                                                                                                                                                                                        |
| Items\[].UpdatedBy                                          | string            | No       | User who last updated the trip.                                                                                                                                                                                                                                  |
| Items\[].IsDeleted                                          | boolean           | No       | Indicates if trip is deleted (true) or active (false). Only shown when IncludeDeleted: true.                                                                                                                                                                     |
| Items\[].Driver1.Rates\[]                                   | array             | No       | Legacy rate objects for **Driver 1** — used before the new driver rate-policy logic was introduced. This field remains for backward compatibility but is currently returned empty and will be **deprecated**.                                                    |
| Items\[].Driver2.Rates\[]                                   | array             | No       | Legacy rate objects for **Driver 2** — used before the new driver rate-policy logic was introduced. This field remains for backward compatibility but is currently returned empty and will be **deprecated**.                                                    |
| Items\[].OwnerOperator.Rates\[]                             | array             | No       | Legacy rate objects for **Owner Operator** — used before the new driver rate-policy logic was introduced. This field remains for backward compatibility but is currently returned empty and will be **deprecated**.                                              |
| Items\[].Driver1.RatesV2\[]                                 | array             | No       | List of structured rate objects for **Driver 1** showing applied pay rules and calculated line items.                                                                                                                                                            |
| Items\[].Driver2.RatesV2\[]                                 | array             | No       | List of structured rate objects for **Driver 2** showing applied pay rules and calculated line items.                                                                                                                                                            |
| Items\[].OwnerOperator.RatesV2\[]                           | array             | No       | List of structured rate objects for **Owner Operator** showing applied pay rules and calculated line items.                                                                                                                                                      |
| Items\[].\*.RatesV2\[].PolicyId                             | string            | No       | Unique identifier of the specific pay policy instance applied to this driver for this trip.                                                                                                                                                                      |
| Items\[].\*.RatesV2\[].PolicyName                           | string            | No       | Display name of the rate policy as shown in the UI.                                                                                                                                                                                                              |
| Items\[].\*.RatesV2\[].PerTripRate.Rate                     | number            | No       | Flat per-trip pay rate applied to the trip.                                                                                                                                                                                                                      |
| Items\[].\*.RatesV2\[].PerTripRate.RateId                   | string            | No       | Identifies the rate type defined within that policy.                                                                                                                                                                                                             |
| Items\[].\*.RatesV2\[].PerTripRate.RateName                 | string            | No       | Name of the per-trip rate type.                                                                                                                                                                                                                                  |
| Items\[].\*.RatesV2\[].PerTripRate.LineItems\[]             | array             | No       | Detailed line-item breakdown for the per-trip rate (description and amount).                                                                                                                                                                                     |
| Items\[].\*.RatesV2\[].TripValuePercentageRate.Percentage   | number            | No       | Percentage of trip value used to calculate pay.                                                                                                                                                                                                                  |
| Items\[].\*.RatesV2\[].TripValuePercentageRate.RateId       | string            | No       | Identifier of the percentage-based rate type.                                                                                                                                                                                                                    |
| Items\[].\*.RatesV2\[].TripValuePercentageRate.RateName     | string            | No       | Name of the percentage-based rate.                                                                                                                                                                                                                               |
| Items\[].\*.RatesV2\[].TripValuePercentageRate.LineItems\[] | array             | No       | Line-item breakdown for the percentage-based rate (description, amount, currency).                                                                                                                                                                               |
| Items\[].RequiredEquipment\[]                               | array of strings  | No       | List of equipment types required for the trip (e.g., "Reefer", "Van", "Flatbed"). Returned only when configured; otherwise omitted.                                                                                                                              |
| Items\[].Temperature                                        | object            | No       | Temperature requirements for temperature-controlled trips. Returned only when configured; otherwise omitted.                                                                                                                                                     |
| Items\[].Temperature.SetpointTemperature                    | number            | No       | Required target temperature.                                                                                                                                                                                                                                     |
| Items\[].Temperature.SetpointTemperatureMax                 | number            | No       | Optional maximum temperature when a range is defined.                                                                                                                                                                                                            |
| Items\[].Temperature.ControlMode                            | string            | No       | Operational mode ("Continuous", "Start/Stop").                                                                                                                                                                                                                   |

#### ⚠️ Important Note on `Rates` and `RatesV2` Fields

Both the legacy `Rates[]` and the new `RatesV2[]` fields are currently returned in the Trips API response under `Driver1`, `Driver2`, and `OwnerOperator`.

* The legacy **`Rates[]`** field remains available for backward compatibility but is no longer populated for **new trips created after migration** to Driver Settlement.
* For **trips that existed prior to migration**, `Rates[]` may still contain historical data; however, it can be **out of sync** with `RatesV2[]` if additional rate changes were made after migration.
* Integrations that continue to read data from `Rates[]` will receive **empty or outdated arrays**.
* To ensure accurate and complete pay information, integrations should rely solely on **`RatesV2[]`** going forward.

Each rate type (e.g., `TripValuePercentageRate`, `PerTripRate`, `MinimumPayRate`, etc.) within `RatesV2[]` is provided as a **structured object** with detailed breakdowns via optional `LineItems[]`.

#### 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](/docs/versioning) page.

#### 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](/docs/rate-limits) section.

<br />


## OpenAPI

````yaml POST /api/p/v{version}/trips/search
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, search loads, and manage load documents and notes.
  - name: Locations
    description: Read and search company location details.
  - name: Maintenance
    description: Read and search maintenance records.
  - name: Tenders
    description: Create, accept, reject, cancel, update, and search inbound EDI tenders.
  - name: Tolls
    description: Read and search toll transactions.
  - name: Trailers
    description: Read trailers, search trailer events, and manage trailer documents.
  - name: Trips
    description: >-
      Read, search trips, manage trip documents, and record stop appointments,
      arrivals, and departures.
  - 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.
paths:
  /api/p/v{version}/trips/search:
    post:
      tags:
        - Trips
      summary: Search trips
      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.Loads.TripSearchRequest'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Alvys.Models.Loads.TripSearchRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Alvys.Models.Loads.TripSearchRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Alvys.Models.Loads.TripSearchRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Alvys.Helpers.PagedResponse1Alvys.Models.Trips.TripResponse
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Microsoft.AspNetCore.Mvc.ValidationProblemDetails
        '401':
          description: Unauthorized
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '403':
          description: Forbidden
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Microsoft.AspNetCore.Mvc.ProblemDetails'
        '404':
          description: Not Found
          content:
            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.Loads.TripSearchRequest:
      required:
        - IncludeDeleted
        - Page
        - PageSize
      type: object
      properties:
        Page:
          type: integer
          format: int32
        PageSize:
          type: integer
          format: int32
        Status:
          type: array
          items:
            type: string
          nullable: true
        LoadNumbers:
          type: array
          items:
            type: string
          nullable: true
        TripNumbers:
          type: array
          items:
            type: string
          nullable: true
        PickupDateRange:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Period'
          nullable: true
        DeliveryDateRange:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Period'
          nullable: true
        UpdatedAtRange:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Period'
          nullable: true
        UpdatedBy:
          type: string
          nullable: true
        IncludeDeleted:
          type: boolean
        DriverId:
          type: string
          nullable: true
        TrailerId:
          type: string
          nullable: true
        TruckId:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Helpers.PagedResponse1Alvys.Models.Trips.TripResponse:
      required:
        - Items
        - Page
        - PageSize
        - Total
      type: object
      properties:
        Page:
          type: integer
          format: int32
        PageSize:
          type: integer
          format: int32
        Facets:
          type: object
          additionalProperties:
            type: array
            items:
              $ref: '#/components/schemas/Alvys.Helpers.ResultSetFacetItem'
          nullable: true
        Total:
          type: integer
          format: int64
        Items:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.TripResponse'
      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.Period:
      required:
        - Start
      type: object
      properties:
        Start:
          type: string
          format: date-time
        End:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    Alvys.Helpers.ResultSetFacetItem:
      required:
        - Count
        - Value
      type: object
      properties:
        Value:
          type: string
        Count:
          type: integer
          format: int64
      additionalProperties: false
    Alvys.Models.Trips.TripResponse:
      required:
        - CarrierPayOnHold
        - EmptyMileage
        - Id
        - LoadedMileage
        - LoadNumber
        - Status
        - Stops
        - TotalMileage
        - TripNumber
        - TripValue
      type: object
      properties:
        Id:
          type: string
        TripNumber:
          type: string
        Status:
          type: string
        LoadNumber:
          type: string
        OrderNumber:
          type: string
          nullable: true
        Stops:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.StopResponse'
        TenderAs:
          type: string
          nullable: true
        TenderAsSubsidiaryType:
          type: string
          nullable: true
        RequiredEquipment:
          type: array
          items:
            type: string
          nullable: true
        Temperature:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.TripResponseTemperatureRequirements
          nullable: true
        TotalMileage:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Loads.LoadResponseMileage'
        EmptyMileage:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Loads.LoadResponseMileage'
        LoadedMileage:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Loads.LoadResponseMileage'
        PickupDate:
          type: string
          format: date-time
          nullable: true
        DeliveryDate:
          type: string
          format: date-time
          nullable: true
        PickedUpAt:
          type: string
          format: date-time
          nullable: true
        DeliveredAt:
          type: string
          format: date-time
          nullable: true
        CarrierAssignedAt:
          type: string
          format: date-time
          nullable: true
        ReleasedAt:
          type: string
          format: date-time
          nullable: true
        CarrierPaidAt:
          type: string
          format: date-time
          nullable: true
        DueDate:
          type: string
          format: date-time
          nullable: true
        TripValue:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        Truck:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.TripResponseTruckResponse
          nullable: true
        Trailer:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.TripResponseTrailerResponse
          nullable: true
        Driver1:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.TripResponseDriverResponse
          nullable: true
        Driver2:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.TripResponseDriverResponse
          nullable: true
        OwnerOperator:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.TripResponseOwnerOperatorResponse
          nullable: true
        ReleasedBy:
          type: string
          nullable: true
        DispatchedBy:
          type: string
          nullable: true
        DispatcherId:
          type: string
          nullable: true
        CarrierSalesAgentId:
          type: string
          nullable: true
        CarrierPayOnHold:
          type: boolean
        Carrier:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.TripResponseCarrierResponse
          nullable: true
        UpdatedAt:
          type: string
          format: date-time
          nullable: true
        UpdatedBy:
          type: string
          nullable: true
        IsDeleted:
          type: boolean
          nullable: true
        References:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.References.ReferenceResponse'
          nullable: true
      additionalProperties: false
    Alvys.Models.Trips.StopResponse:
      required:
        - $type
      type: object
      oneOf:
        - $ref: '#/components/schemas/Alvys.Models.Trips.AppointmentStopResponse'
        - $ref: '#/components/schemas/Alvys.Models.Trips.DeliveryWindowStopResponse'
        - $ref: '#/components/schemas/Alvys.Models.Trips.WaypointStopResponse'
      properties:
        $type:
          type: string
          description: Type discriminator for polymorphic serialization
      additionalProperties: false
      discriminator:
        propertyName: $type
        mapping:
          appointment:
            $ref: '#/components/schemas/Alvys.Models.Trips.AppointmentStopResponse'
          delivery_window:
            $ref: '#/components/schemas/Alvys.Models.Trips.DeliveryWindowStopResponse'
          waypoint:
            $ref: '#/components/schemas/Alvys.Models.Trips.WaypointStopResponse'
    Alvys.Models.Trips.TripResponseTemperatureRequirements:
      type: object
      properties:
        SetpointTemperature:
          type: number
          format: double
          nullable: true
        SetpointTemperatureMax:
          type: number
          format: double
          nullable: true
        ControlMode:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.Loads.LoadResponseMileage:
      required:
        - Distance
      type: object
      properties:
        Distance:
          allOf:
            - $ref: '#/components/schemas/Alvys.Distance'
        Source:
          type: string
          nullable: true
        ProfileId:
          type: string
          nullable: true
        ProfileName:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Money:
      required:
        - Amount
      type: object
      properties:
        Amount:
          type: number
          format: double
        Currency:
          type: integer
          format: int32
          nullable: true
      additionalProperties: false
    Alvys.Models.Trips.TripResponseTruckResponse:
      type: object
      properties:
        Id:
          type: string
          nullable: true
        Fleet:
          allOf:
            - $ref: '#/components/schemas/FleetResponse'
          nullable: true
      additionalProperties: false
    Alvys.Models.Trips.TripResponseTrailerResponse:
      required:
        - EquipmentType
      type: object
      properties:
        Id:
          type: string
          nullable: true
        EquipmentType:
          type: string
        EquipmentLength:
          allOf:
            - $ref: '#/components/schemas/Alvys.Length'
          nullable: true
        Fleet:
          allOf:
            - $ref: '#/components/schemas/FleetResponse'
          nullable: true
      additionalProperties: false
    Alvys.Models.Trips.TripResponseDriverResponse:
      required:
        - Rates
      type: object
      properties:
        Id:
          type: string
          nullable: true
        ContractorType:
          type: string
          nullable: true
        Rates:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.DriverRate'
          deprecated: true
        Fleet:
          allOf:
            - $ref: '#/components/schemas/FleetResponse'
          nullable: true
        AccessorialsDetails:
          type: array
          items:
            $ref: >-
              #/components/schemas/Alvys.Models.Accessorials.DriverAccessorialResponse
          nullable: true
        EChecks:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Accessorials.ECheckResponse'
          nullable: true
        RatesV2:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.DriverRatePolicyResponse'
          nullable: true
      additionalProperties: false
    Alvys.Models.Trips.TripResponseOwnerOperatorResponse:
      required:
        - Id
      type: object
      properties:
        Id:
          type: string
        AccessorialsDetails:
          type: array
          items:
            $ref: >-
              #/components/schemas/Alvys.Models.Accessorials.OwnerOperatorAccessorialResponse
          nullable: true
        EChecks:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Accessorials.ECheckResponse'
          nullable: true
        RatesV2:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.DriverRatePolicyResponse'
          nullable: true
      additionalProperties: false
    Alvys.Models.Trips.TripResponseCarrierResponse:
      required:
        - Accessorials
        - Id
        - Linehaul
        - Rate
        - TotalPayable
      type: object
      properties:
        Id:
          type: string
        CarrierInvoiceNumber:
          type: string
          nullable: true
        Rate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
          deprecated: true
        Linehaul:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        AccessorialsDetails:
          type: array
          items:
            $ref: >-
              #/components/schemas/Alvys.Models.Accessorials.CarrierAccessorialResponse
          nullable: true
        EChecks:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Accessorials.ECheckResponse'
          nullable: true
        Accessorials:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
          readOnly: true
        TotalPayable:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
          readOnly: 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.Trips.AppointmentStopResponse:
      required:
        - AppointmentConfirmed
        - AppointmentRequested
        - Id
        - References
        - ScheduleType
        - StopType
      type: object
      properties:
        AppointmentRequested:
          type: boolean
        AppointmentConfirmed:
          type: boolean
        AppointmentDate:
          type: string
          format: date-time
          nullable: true
        ScheduleType:
          type: string
        LoadingType:
          type: string
          nullable: true
        Id:
          type: string
        Address:
          allOf:
            - $ref: '#/components/schemas/Alvys.Features.Locations.ShortAddress'
          nullable: true
        Coordinates:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Coordinates'
          nullable: true
        Status:
          type: string
          nullable: true
        StopType:
          type: string
        ArrivedAt:
          type: string
          format: date-time
          nullable: true
        DepartedAt:
          type: string
          format: date-time
          nullable: true
        References:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.References.ReferenceResponse'
        CompanyId:
          type: string
          nullable: true
        CompanyNumber:
          type: string
          nullable: true
        CompanyName:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.Trips.DeliveryWindowStopResponse:
      required:
        - Id
        - References
        - ScheduleType
        - StopType
      type: object
      properties:
        StopWindow:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.DateTimeWindowDto'
          nullable: true
        ScheduleType:
          type: string
        LoadingType:
          type: string
          nullable: true
        Id:
          type: string
        Address:
          allOf:
            - $ref: '#/components/schemas/Alvys.Features.Locations.ShortAddress'
          nullable: true
        Coordinates:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Coordinates'
          nullable: true
        Status:
          type: string
          nullable: true
        StopType:
          type: string
        ArrivedAt:
          type: string
          format: date-time
          nullable: true
        DepartedAt:
          type: string
          format: date-time
          nullable: true
        References:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.References.ReferenceResponse'
        CompanyId:
          type: string
          nullable: true
        CompanyNumber:
          type: string
          nullable: true
        CompanyName:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.Trips.WaypointStopResponse:
      required:
        - $type
        - Id
        - References
        - StopType
      type: object
      properties:
        StopWindow:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.DateTimeWindowDto'
          nullable: true
        Id:
          type: string
        Address:
          allOf:
            - $ref: '#/components/schemas/Alvys.Features.Locations.ShortAddress'
          nullable: true
        Coordinates:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Coordinates'
          nullable: true
        Status:
          type: string
          nullable: true
        StopType:
          type: string
        ArrivedAt:
          type: string
          format: date-time
          nullable: true
        DepartedAt:
          type: string
          format: date-time
          nullable: true
        References:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.References.ReferenceResponse'
        CompanyId:
          type: string
          nullable: true
        CompanyNumber:
          type: string
          nullable: true
        CompanyName:
          type: string
          nullable: true
        $type:
          enum:
            - waypoint
          type: string
          description: Type discriminator for polymorphic serialization
      additionalProperties: false
    Alvys.Distance:
      required:
        - UnitOfMeasure
        - Value
      type: object
      properties:
        Value:
          type: number
          format: double
        UnitOfMeasure:
          allOf:
            - $ref: '#/components/schemas/Alvys.DistanceDistanceUnits'
      additionalProperties: false
    FleetResponse:
      type: object
      properties:
        Id:
          type: string
          nullable: true
        Name:
          type: string
          nullable: true
        InvoiceNumberPrefix:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Length:
      required:
        - UnitOfMeasure
        - Value
      type: object
      properties:
        Value:
          type: number
          format: double
        UnitOfMeasure:
          allOf:
            - $ref: '#/components/schemas/Alvys.LengthUnits'
      additionalProperties: false
    Alvys.Models.DriverRate:
      required:
        - FreeUnit
        - Rate
        - RateType
      type: object
      properties:
        Rate:
          type: number
          format: double
        ExtraStops:
          type: number
          format: double
          nullable: true
        RateType:
          type: string
        PerDiemRateType:
          type: string
          nullable: true
        FreeUnit:
          type: number
          format: double
        Source:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.Accessorials.DriverAccessorialResponse:
      required:
        - Id
        - Quantity
        - Rate
        - RateType
        - Total
        - Type
        - Uom
      type: object
      properties:
        Id:
          type: string
        Type:
          type: string
        Total:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        Rate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        RateType:
          type: string
        Uom:
          type: string
        Quantity:
          type: number
          format: double
        IsPaid:
          type: boolean
          nullable: true
        CreatedAt:
          type: string
          format: date-time
          nullable: true
        CreatedBy:
          type: string
          nullable: true
        UpdatedAt:
          type: string
          format: date-time
          nullable: true
        UpdatedBy:
          type: string
          nullable: true
        ECheckNumber:
          type: string
          nullable: true
        StopId:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.Accessorials.ECheckResponse:
      required:
        - Amount
        - CheckNumber
        - Fee
        - Id
        - Type
      type: object
      properties:
        Id:
          type: string
        CheckNumber:
          type: string
        Amount:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        Fee:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        Type:
          type: string
        IsPaid:
          type: boolean
          nullable: true
        CreatedAt:
          type: string
          format: date-time
          nullable: true
      additionalProperties: false
    Alvys.Models.Trips.DriverRatePolicyResponse:
      required:
        - PolicyId
        - PolicyName
      type: object
      properties:
        PolicyId:
          type: string
        PolicyName:
          type: string
        TripValuePercentageRate:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.TripValuePercentageRateDto
          nullable: true
        TripValuePercentageDeductionRate:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.TripValuePercentageRateDto
          nullable: true
        FuelSurchargePercentageRate:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.FuelSurchargePercentageRateDto
          nullable: true
        CustomerLineHaulPercentageRate:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.CustomerLineHaulPercentageRateDto
          nullable: true
        CustomerLineHaulDeductionRate:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.CustomerLineHaulPercentageRateDto
          nullable: true
        PerTripRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.PerTripRateDto'
          nullable: true
        ServiceFeeRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.ServiceFeeRateDto'
          nullable: true
        StatementMinimumPayRate:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.StatementMinimumPayRateDto
          nullable: true
        StatementBonusRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.StatementBonusRateDto'
          nullable: true
        StatementPerDiemRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.StatementPerDiemRateDto'
          nullable: true
        TotalMilesRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.MileageRateDto'
          nullable: true
        LoadedMilesRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.MileageRateDto'
          nullable: true
        EmptyMilesRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.MileageRateDto'
          nullable: true
        PerStopRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.PerStopRateDto'
          nullable: true
        PerLoadRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.PerLoadRateDto'
          nullable: true
        PerCustomerStopRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.PerStopRateDto'
          nullable: true
        PerHourRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.PerHourRateDto'
          nullable: true
        PerDayRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.PerDayRateDto'
          nullable: true
        DailyPerDiemRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.DailyPerDiemRateDto'
          nullable: true
        MileagePerDiemRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.MileagePerDiemRateDto'
          nullable: true
        PerMileRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.PerMileRateDto'
          nullable: true
        PerMileDeductionRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.PerMileRateDto'
          nullable: true
        DailyMinimumPayRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.DailyMinimumPayRateDto'
          nullable: true
        PerHourWithOvertimeRate:
          allOf:
            - $ref: >-
                #/components/schemas/Alvys.Models.Trips.PerHourWithOvertimeRateDto
          nullable: true
        PerWeightRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.PerWeightRateDto'
          nullable: true
        RestBreaksRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Trips.RestBreaksRateDto'
          nullable: true
      additionalProperties: false
    Alvys.Models.Accessorials.OwnerOperatorAccessorialResponse:
      required:
        - Id
        - Quantity
        - Rate
        - RateType
        - Total
        - Type
        - Uom
      type: object
      properties:
        Id:
          type: string
        Type:
          type: string
        Total:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        Rate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        RateType:
          type: string
        Uom:
          type: string
        Quantity:
          type: number
          format: double
        IsPaid:
          type: boolean
          nullable: true
        CreatedAt:
          type: string
          format: date-time
          nullable: true
        CreatedBy:
          type: string
          nullable: true
        UpdatedAt:
          type: string
          format: date-time
          nullable: true
        UpdatedBy:
          type: string
          nullable: true
        ECheckNumber:
          type: string
          nullable: true
        StopId:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.Accessorials.CarrierAccessorialResponse:
      required:
        - Id
        - Quantity
        - Rate
        - RateType
        - Total
        - Type
        - Uom
      type: object
      properties:
        Id:
          type: string
        Type:
          type: string
        Total:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        Rate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        RateType:
          type: string
        Uom:
          type: string
        Quantity:
          type: number
          format: double
        IsPaid:
          type: boolean
          nullable: true
        CreatedAt:
          type: string
          format: date-time
          nullable: true
        CreatedBy:
          type: string
          nullable: true
        UpdatedAt:
          type: string
          format: date-time
          nullable: true
        UpdatedBy:
          type: string
          nullable: true
        StopId:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Features.Locations.ShortAddress:
      required:
        - City
        - State
        - Street
        - ZipCode
      type: object
      properties:
        Street:
          type: string
        City:
          type: string
        State:
          type: string
        ZipCode:
          type: string
      additionalProperties: false
    Alvys.Models.Coordinates:
      required:
        - Latitude
        - Longitude
      type: object
      properties:
        Latitude:
          type: string
        Longitude:
          type: string
      additionalProperties: false
    Alvys.Models.Trips.DateTimeWindowDto:
      required:
        - Begin
        - End
      type: object
      properties:
        Begin:
          type: string
          format: date-time
        End:
          type: string
          format: date-time
      additionalProperties: false
    Alvys.DistanceDistanceUnits:
      enum:
        - Miles
        - Kilometers
        - Meters
        - Feet
      type: string
    Alvys.LengthUnits:
      enum:
        - Feet
        - Inches
        - Yards
        - Meters
      type: string
    Alvys.Models.Trips.TripValuePercentageRateDto:
      required:
        - LineItems
        - Percentage
        - RateId
        - RateName
      type: object
      properties:
        Percentage:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.FuelSurchargePercentageRateDto:
      required:
        - LineItems
        - Percentage
        - RateId
        - RateName
      type: object
      properties:
        Percentage:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.CustomerLineHaulPercentageRateDto:
      required:
        - LineItems
        - Percentage
        - RateId
        - RateName
        - HideCalculationDetails
      type: object
      properties:
        Percentage:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
        HideCalculationDetails:
          type: boolean
      additionalProperties: false
    Alvys.Models.Trips.PerTripRateDto:
      required:
        - LineItems
        - Rate
        - RateId
        - RateName
      type: object
      properties:
        Rate:
          type: number
          format: double
          deprecated: true
        Tiers:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.MileageRateTierDto'
          nullable: true
        MileageType:
          type: string
          nullable: true
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.ServiceFeeRateDto:
      required:
        - FlatFee
        - LineItems
        - Percentage
        - RateId
        - RateName
      type: object
      properties:
        Percentage:
          type: number
          format: double
        FlatFee:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.StatementMinimumPayRateDto:
      required:
        - LineItems
        - MinimumAmount
        - RateId
        - RateName
      type: object
      properties:
        MinimumAmount:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.StatementBonusRateDto:
      required:
        - Amount
        - LineItems
        - RateId
        - RateName
      type: object
      properties:
        Amount:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.StatementPerDiemRateDto:
      required:
        - LineItems
        - MileageType
        - RateId
        - RateName
        - Tiers
      type: object
      properties:
        Tiers:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.MileageRateTierDto'
        MileageType:
          type: string
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.MileageRateDto:
      required:
        - LineItems
        - RateId
        - RateName
        - Tiers
        - UseHighestTier
      type: object
      properties:
        Tiers:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.MileageRateTierDto'
        UseHighestTier:
          type: boolean
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.PerStopRateDto:
      required:
        - LineItems
        - RateId
        - RateName
        - Tiers
      type: object
      properties:
        Tiers:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.PerStopRateTierDto'
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.PerLoadRateDto:
      required:
        - LineItems
        - Rate
        - RateId
        - RateName
      type: object
      properties:
        Rate:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.PerHourRateDto:
      required:
        - LineItems
        - Rate
        - RateId
        - RateName
      type: object
      properties:
        Rate:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.PerDayRateDto:
      required:
        - LineItems
        - Rate
        - RateId
        - RateName
      type: object
      properties:
        Rate:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.DailyPerDiemRateDto:
      required:
        - LineItems
        - Rate
        - RateId
        - RateName
      type: object
      properties:
        Rate:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.MileagePerDiemRateDto:
      required:
        - LineItems
        - MileageType
        - RateId
        - RateName
        - Tiers
        - UseHighestTier
      type: object
      properties:
        Tiers:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.MileageRateTierDto'
        UseHighestTier:
          type: boolean
        MileageType:
          type: string
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.PerMileRateDto:
      required:
        - LineItems
        - MileageType
        - RateId
        - RateName
        - Tiers
        - UseHighestTier
      type: object
      properties:
        Tiers:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.MileageRateTierDto'
        UseHighestTier:
          type: boolean
        MileageType:
          type: string
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.DailyMinimumPayRateDto:
      required:
        - DailyRate
        - EndGraceHours
        - IncludeWaypoints
        - LineItems
        - RateId
        - RateName
        - StartGraceHours
      type: object
      properties:
        DailyRate:
          type: number
          format: double
        StartGraceHours:
          type: number
          format: double
        EndGraceHours:
          type: number
          format: double
        IncludeWaypoints:
          type: boolean
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.PerHourWithOvertimeRateDto:
      required:
        - BaseRate
        - LineItems
        - OtMultiplier
        - RateId
        - RateName
        - WeeklyOtThreshold
      type: object
      properties:
        BaseRate:
          type: number
          format: double
        OtMultiplier:
          type: number
          format: double
        WeeklyOtThreshold:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.PerWeightRateDto:
      required:
        - LineItems
        - Rate
        - RateId
        - RateName
      type: object
      properties:
        Rate:
          type: number
          format: double
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.RestBreaksRateDto:
      required:
        - EveryNthHour
        - LineItems
        - PerBreakRate
        - RateId
        - RateName
      type: object
      properties:
        PerBreakRate:
          type: number
          format: double
        EveryNthHour:
          type: integer
          format: int32
        RateId:
          type: string
        RateName:
          type: string
        LineItems:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.LineItemDto'
      additionalProperties: false
    Alvys.Models.Trips.LineItemDto:
      required:
        - Amount
        - Description
      type: object
      properties:
        Description:
          type: string
        Amount:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
      additionalProperties: false
    Alvys.Models.Trips.MileageRateTierDto:
      required:
        - Miles
        - Rate
      type: object
      properties:
        Miles:
          type: integer
          format: int32
        Rate:
          type: number
          format: double
      additionalProperties: false
    Alvys.Models.Trips.PerStopRateTierDto:
      required:
        - FlatBonus
        - Rate
        - Stops
      type: object
      properties:
        Stops:
          type: integer
          format: int32
        Rate:
          type: number
          format: double
        FlatBonus:
          type: number
          format: double
      additionalProperties: false
  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>`.

````