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

> Search loads with paginated POST filters — customer, status, pickup and delivery date ranges, origin and destination, equipment, and reference numbers.

The endpoint for searching loads requires specifying the API version in the URL path. 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](#versioning) page.

### Request Parameters

The following parameter is required in the URL path:

| Parameter | Type   | Required | Description             |
| --------- | ------ | -------- | ----------------------- |
| version   | String | Yes      | The API version to use. |

#### Request Body Parameters

The version is **required** in the **path** parameters. The **request body** parameters for this endpoint are listed below.

| Parameter            | Type    | Required      | Description                                                                                                                                                                                                                                                                                                                                                   |
| -------------------- | ------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Page                 | Number  | Yes           | The page number for pagination.                                                                                                                                                                                                                                                                                                                               |
| PageSize             | Number  | Yes           | The number of items per page for pagination. PageSize must be greater than 0.                                                                                                                                                                                                                                                                                 |
| DateRange            | Object  | No            | The date range to filter the loads.                                                                                                                                                                                                                                                                                                                           |
| DateRange.Start      | String  | Yes           | The start date of the range to filter the `createdAt` loads.                                                                                                                                                                                                                                                                                                  |
| DateRange.End        | String  | No            | The end date of the range to filter the `createdAt` loads.                                                                                                                                                                                                                                                                                                    |
| Status               | Array   | Conditionally | The status of the loads to filter. This field is required if the other conditionally required fields are left empty. Statuses: \[Admin, In Review, Open, Quoted, Reserved, Covered, Dispatched, In Transit, Delivered, TONU, Released, Released-Carrier Paid, Carrier Paid, Trip Completed, Queued, Invoiced, Financed, Completed, Paid, Cancelled, En-Route] |
| OrderNumbers         | Array   | Conditionally | The order numbers to filter the loads. This field is required if the other conditionally required fields are left empty.                                                                                                                                                                                                                                      |
| LoadNumbers          | Array   | Conditionally | The load numbers to filter the loads. This field is required if the other conditionally required fields are left empty. The maximum number of load numbers allowed in the search body is 150.                                                                                                                                                                 |
| PONumbers            | Array   | Conditionally | The purchase order numbers to filter the loads. This field is required if the other conditionally required fields are left empty.                                                                                                                                                                                                                             |
| CustomerId           | String  | Conditionally | The customer ID to filter the loads. This field is required if the other conditionally required fields are left empty.                                                                                                                                                                                                                                        |
| UpdatedAtRange       | Object  | No            | The date range to filter loads based on their last update.                                                                                                                                                                                                                                                                                                    |
| UpdatedAtRange.Start | String  | Yes           | The start date of the range to filter the `updatedAt` loads.                                                                                                                                                                                                                                                                                                  |
| UpdatedAtRange.End   | String  | No            | The end date of the range to filter the `updatedAt` loads.                                                                                                                                                                                                                                                                                                    |
| UpdatedBy            | String  | Conditionally | The user ID of the person who last updated the loads. This field is required if the other conditionally required fields are left empty.                                                                                                                                                                                                                       |
| IncludeDeleted       | Boolean | No            | Optional flag. When set to true, the response will include both active and deleted loads (with `IsDeleted: true` for deleted items). If omitted or set to false, only active records are returned and no `IsDeleted` flags are included.                                                                                                                      |

<br />

#### Example CURL request

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

```bash theme={null}
curl --location 'https://integrations.alvys.com/api/p/v1/loads/search' \
--header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ...' \
--header 'Content-Type: application/json' \
--data '{
  "Page": 0,
  "PageSize": 200,
  "DateRange": {
    "Start": "2023-09-09T13:09:30.788Z",
    "End": "2024-09-09T13:09:30.788Z"
  },
  "Status": ["In Transit"],
  "UpdatedBy": "0d00f000-1b85-4ed8-000-6a000d1111db",
  "UpdatedAtRange": {
    "Start": "2024-09-09T13:09:30.788Z",
    "End": "2024-10-19T13:09:30.788Z"
  },
  "OrderNumbers": [
    "123456789"
  ],
  "LoadNumbers": [
    "123456789"
  ],
  "PONumbers": [
    "123456789"
  ],
  "CustomerId": "0e2bb9d5eae342c9bb89f7ac24f01a84"
}'
```

### Response Parameters

The following table lists the parameters included in the response for load-related requests.

| Parameter                                     | Type              | Required | Description                                                                                                                                                                  |
| :-------------------------------------------- | :---------------- | :------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Id                                            | String            | Yes      | The unique identifier of the load.                                                                                                                                           |
| LoadNumber                                    | String            | Yes      | Human-readable load number, unique by subsidiary.                                                                                                                            |
| OrderNumber                                   | String            | No       | An optional external order number.                                                                                                                                           |
| PONumber                                      | String            | No       | An optional external Purchase Order number.                                                                                                                                  |
| CustomerId                                    | String            | Yes      | The internal Customer ID for the load.                                                                                                                                       |
| CustomerName                                  | String            | No       | Normalized customer name for reporting purposes; can be null for some historical data.                                                                                       |
| CustomerNumber                                | String            | No       | The customer number associated with the load.                                                                                                                                |
| Status                                        | String            | Yes      | One of the following: In Review, Open, Quoted, Reserved, Covered, Dispatched, In Transit, Delivered, TONU, Released, Queued, Invoiced, Financed, Completed, Paid, Cancelled. |
| TenderId                                      | String            | No       | The identifier of the inbound EDI tender that created this load. `null` if the load was created manually or through a non-tender channel.                                    |
| ContractId                                    | String            | No       | Optional Customer Contract ID.                                                                                                                                               |
| CustomerType                                  | List `<String>`   | Yes      | The type of customer this load is associated with.                                                                                                                           |
| Stops                                         | Array of Objects  | Yes      | List of stops associated with the load.                                                                                                                                      |
| Fleet                                         | Object            | No       | Information about the fleet associated with the load.                                                                                                                        |
| Fleet.Id                                      | String            | No       | The unique identifier of the fleet.                                                                                                                                          |
| Fleet.Name                                    | String            | No       | The name of the fleet.                                                                                                                                                       |
| Fleet.InvoiceNumberPrefix                     | String            | No       | The invoice number prefix used by the fleet.                                                                                                                                 |
| InvoiceAs                                     | String            | Yes      | The subsidiary or company information used when invoicing this load.                                                                                                         |
| OfficeId                                      | String            | No       | This value corresponds to the internal Office ID associated with the load.                                                                                                   |
| Linehaul                                      | Object            | No       | The cost of transporting the load, excluding additional fees such as fuel surcharges or accessorials.                                                                        |
| Linehaul.Amount                               | Number            | No       | The numeric value of the linehaul charge.                                                                                                                                    |
| Linehaul.Currency                             | String            | No       | The currency of the linehaul charge.                                                                                                                                         |
| FuelSurcharge                                 | Object            | No       | The additional charge applied to cover fluctuating fuel costs.                                                                                                               |
| FuelSurcharge.Amount                          | Number            | No       | The numeric value of the fuel surcharge.                                                                                                                                     |
| FuelSurcharge.Currency                        | String            | No       | The currency of the fuel surcharge.                                                                                                                                          |
| CustomerAccessorials                          | Object            | No       | Additional charges beyond the base rate and fuel surcharge, such as detention or lumper fees.                                                                                |
| CustomerAccessorials.Amount                   | Number            | No       | The numeric value of the accessorial charges.                                                                                                                                |
| CustomerAccessorials.Currency                 | String            | No       | The currency of the accessorial charges.                                                                                                                                     |
| CustomerRate                                  | Object            | No       | Information about the rate charged to the customer for the load.                                                                                                             |
| CustomerRate.Amount                           | Number            | No       | The numeric amount of the customer rate, which includes all applicable customer accessorials like Linehaul (LH) + Fuel Surcharge (FSC) + Accessorials (ACC).                 |
| CustomerRate.Currency                         | String            | No       | The currency of the customer rate.                                                                                                                                           |
| CustomerMileage                               | Object            | No       | Information about the mileage associated with the load.                                                                                                                      |
| CustomerMileage.Distance                      | Object            | No       | Information about the distance details.                                                                                                                                      |
| CustomerMileage.Distance.Value                | Number            | No       | The numeric value of the distance.                                                                                                                                           |
| CustomerMileage.Distance.UnitOfMeasure        | String            | No       | The unit of measure for the distance, e.g., Miles.                                                                                                                           |
| CustomerMileage.Source                        | String            | No       | The source of the mileage data.                                                                                                                                              |
| CustomerMileage.ProfileId                     | String            | No       | The profile ID used for the mileage data.                                                                                                                                    |
| CustomerMileage.ProfileName                   | String            | No       | The profile name used for the mileage data.                                                                                                                                  |
| InvoicedAmount                                | Object            | No       | Information about the total amount invoiced for the load.                                                                                                                    |
| InvoicedAmount.Amount                         | Number            | No       | The numeric amount invoiced.                                                                                                                                                 |
| InvoicedAmount.Currency                       | String            | No       | The currency of the invoiced amount.                                                                                                                                         |
| Weight                                        | Object            | No       | Information about the weight of the load.                                                                                                                                    |
| Weight.Value                                  | Number            | No       | The numeric value of the weight.                                                                                                                                             |
| Weight.UnitOfMeasure                          | String            | No       | The unit of measure for the weight, e.g., Kilograms.                                                                                                                         |
| Volume                                        | Object            | No       | Information about the volume of the load.                                                                                                                                    |
| Volume.Value                                  | Number            | No       | The numeric value of the volume.                                                                                                                                             |
| Volume.UnitOfMeasure                          | String            | No       | The unit of measure for the volume, e.g., Gallons.                                                                                                                           |
| ScheduledPickupAt                             | String            | No       | Scheduled pick-up date and time.                                                                                                                                             |
| ScheduledDeliveryAt                           | String            | No       | Scheduled delivery date and time.                                                                                                                                            |
| PickedUpAt                                    | String            | No       | Actual pick-up time, always in UTC.                                                                                                                                          |
| DeliveredAt                                   | String            | No       | Actual delivery time, always in UTC.                                                                                                                                         |
| InvoicedAt                                    | String            | No       | Date and time when the first invoice was generated.                                                                                                                          |
| LastInvoiceSentAt                             | String (DateTime) | No       | The timestamp of the most recent successful submission of an invoice from the Load Details page.                                                                             |
| Notes                                         | Array of Objects  | Yes      | List of notes associated with the load.                                                                                                                                      |
| CreatedAt                                     | String (DateTime) | Yes      | The date and time when the load was created.                                                                                                                                 |
| CreatedBy                                     | String            | Yes      | The user who created the load.                                                                                                                                               |
| CancelledAt                                   | String (DateTime) | No       | The date and time when the load was cancelled.                                                                                                                               |
| CancelledBy                                   | String            | No       | The user who cancelled the load.                                                                                                                                             |
| References                                    | Object            | No       | Information about references associated with the load.                                                                                                                       |
| References.Id                                 | String            | No       | The unique identifier of the reference.                                                                                                                                      |
| References.Name                               | String            | No       | The name of the reference.                                                                                                                                                   |
| References.Value                              | String            | No       | The value of the reference.                                                                                                                                                  |
| References.Type                               | String            | No       | The data type of the reference, e.g., Text, Date, Bool, or List.                                                                                                             |
| References.Access                             | String            | No       | The access level of the reference, e.g., Internal or Public.                                                                                                                 |
| CustomerServiceRepId                          | String            | No       | The unique identifier of the Customer Service Representative assigned to the load.                                                                                           |
| CustomerSalesAgentId                          | String            | No       | The unique identifier of the Customer Sales Agent assigned to the load.                                                                                                      |
| CustomerSalesManagerId                        | String            | No       | The unique identifier of the Customer Sales Manager assigned to the load.                                                                                                    |
| CustomerLoadPlannerId                         | String            | No       | The unique identifier of the Customer Load Planner assigned to the load.                                                                                                     |
| CustomerAccountManagerId                      | String            | No       | The unique identifier of the Customer Account Manager assigned to the load.                                                                                                  |
| UpdatedAt                                     | String            | No       | The date and time when the load was last updated.                                                                                                                            |
| UpdatedBy                                     | String            | No       | The user who last updated the load.                                                                                                                                          |
| PaidAt                                        | String (DateTime) | No       | Timestamp when a customer payment was recorded against this load.                                                                                                            |
| TotalPaid                                     | Object            | No       | Total customer payment amount recorded to date.                                                                                                                              |
| TotalPaid.Amount                              | Number            | No       | The numeric value of the total customer payment amount recorded to date.                                                                                                     |
| TotalPaid.Currency                            | String            | No       | The currency of the total customer payment amount.                                                                                                                           |
| Payments                                      | Array of Objects  | No       | Array of individual customer payment records associated with this load.                                                                                                      |
| Payments\[].Id                                | String            | Yes      | The unique identifier of the payment record.                                                                                                                                 |
| Payments\[].Amount                            | Object            | Yes      | Information about the payment amount recorded for this payment entry.                                                                                                        |
| Payments\[].Amount.Amount                     | Number            | Yes      | The numeric value of the payment amount.                                                                                                                                     |
| Payments\[].Amount.Currency                   | String            | No       | The currency of the payment amount.                                                                                                                                          |
| Payments\[].PaidAt                            | String (DateTime) | No       | Timestamp when this payment record was marked as paid.                                                                                                                       |
| IsDeleted                                     | Boolean           | No       | Indicates deletion status of the item: `true` for deleted records, `false` for active records. Only present when `includeDeleted: true`.                                     |
| RequiredEquipment                             | Array             | No       | List of equipment types required for this load, e.g., `["Dry Van"]` or `["Reefer", "Liftgate"]`.                                                                             |
| LoadType                                      | String            | No       | The `LoadType` field indicates whether a load is `"Revenue"` or `"Non-Revenue"`.                                                                                             |
| CustomerAccessorialsDetails                   | Array of Objects  | No       | List of accessorial charges for the customer on the load.                                                                                                                    |
| CustomerAccessorialsDetails\[].Id             | String            | No       | Unique ID of the accessorial.                                                                                                                                                |
| CustomerAccessorialsDetails\[].Type           | String            | No       | Type of accessorial (e.g., Detention, Layover, Fuel Surcharge).                                                                                                              |
| CustomerAccessorialsDetails\[].Total.Amount   | Number            | No       | Total charge amount of the accessorial.                                                                                                                                      |
| CustomerAccessorialsDetails\[].Total.Currency | String            | No       | Currency of the total amount (e.g., USD).                                                                                                                                    |
| CustomerAccessorialsDetails\[].Rate.Amount    | Number            | No       | Unit rate applied to the accessorial.                                                                                                                                        |
| CustomerAccessorialsDetails\[].Rate.Currency  | String            | No       | Currency of the unit rate.                                                                                                                                                   |
| CustomerAccessorialsDetails\[].RateType       | String            | No       | How the rate is calculated (e.g., Flat, PerHour, PerMile).                                                                                                                   |
| CustomerAccessorialsDetails\[].Uom            | String            | No       | Unit of measure (e.g., Hour, Mile, Stop).                                                                                                                                    |
| CustomerAccessorialsDetails\[].Quantity       | Number            | No       | Quantity multiplied by the rate to compute the total.                                                                                                                        |
| CustomerAccessorialsDetails\[].IsPaid         | Boolean           | No       | If present, indicates whether the accessorial has been paid.                                                                                                                 |
| CustomerAccessorialsDetails\[].StopId         | String            | No       | ID of the related stop, if the accessorial is stop-specific (e.g., Detention).                                                                                               |
| CustomerAccessorialsDetails\[].CreatedAt      | String (DateTime) | No       | Timestamp when the accessorial was created (UTC).                                                                                                                            |
| CustomerAccessorialsDetails\[].UpdatedAt      | String (DateTime) | No       | Timestamp when the accessorial was last updated (UTC).                                                                                                                       |

#### Example Response

On the right side, you can see examples of different error codes by clicking "Example" and selecting the response code.

<img src="https://mintcdn.com/alvys/MPqgFq1pceM5E4R4/images/migrated/7e8e5be-See_.gif?s=d893b7e3a19cd2179b74fa3e1de32a92" alt="" width="740" height="760" data-path="images/migrated/7e8e5be-See_.gif" />

<br />

#### Rate Limits

All endpoints are subject to rate limits to protect the API from traffic spikes. For detailed information on rate limits, please refer to the Rate Limits section.

<br />


## OpenAPI

````yaml POST /api/p/v{version}/loads/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}/loads/search:
    post:
      tags:
        - Loads
      summary: Search loads
      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.LoadSearchRequest'
          application/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Alvys.Models.Loads.LoadSearchRequest'
          text/json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Alvys.Models.Loads.LoadSearchRequest'
          application/*+json:
            schema:
              allOf:
                - $ref: '#/components/schemas/Alvys.Models.Loads.LoadSearchRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Alvys.Helpers.PagedResponse1Alvys.Models.Loads.LoadResponse
        '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.LoadSearchRequest:
      required:
        - IncludeDeleted
        - Page
        - PageSize
      type: object
      properties:
        Page:
          type: integer
          format: int32
        PageSize:
          type: integer
          format: int32
        DateRange:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Period'
          nullable: true
        Status:
          type: array
          items:
            type: string
          nullable: true
        OrderNumbers:
          type: array
          items:
            type: string
          nullable: true
        LoadNumbers:
          type: array
          items:
            type: string
          nullable: true
        PONumbers:
          type: array
          items:
            type: string
          nullable: true
        CustomerId:
          type: string
          nullable: true
        UpdatedAtRange:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Period'
          nullable: true
        UpdatedBy:
          type: string
          nullable: true
        CustomerSalesAgentId:
          type: string
          nullable: true
        IncludeDeleted:
          type: boolean
      additionalProperties: false
    Alvys.Helpers.PagedResponse1Alvys.Models.Loads.LoadResponse:
      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.Loads.LoadResponse'
      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.Loads.LoadResponse:
      required:
        - CreatedAt
        - CreatedBy
        - CustomerId
        - CustomerType
        - Id
        - InvoiceAs
        - LoadNumber
        - LoadType
        - Notes
        - OrderNumber
        - References
        - Status
        - Stops
      type: object
      properties:
        Id:
          type: string
        LoadNumber:
          type: string
        OrderNumber:
          type: string
        PONumber:
          type: string
          nullable: true
        CustomerId:
          type: string
        CustomerName:
          type: string
          nullable: true
        CustomerNumber:
          type: string
          nullable: true
        Status:
          type: string
        LoadType:
          type: string
          deprecated: true
        ContractId:
          type: string
          nullable: true
        CustomerType:
          type: array
          items:
            type: string
        Stops:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Trips.StopResponse'
        Fleet:
          allOf:
            - $ref: '#/components/schemas/FleetResponse'
          nullable: true
        InvoiceAs:
          type: string
        OfficeId:
          type: string
          nullable: true
        Linehaul:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
          nullable: true
        FuelSurcharge:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
          nullable: true
        CustomerAccessorials:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
          nullable: true
        CustomerAccessorialsDetails:
          type: array
          items:
            $ref: >-
              #/components/schemas/Alvys.Models.Accessorials.CustomerAccessorialResponse
          nullable: true
        CustomerRate:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
          nullable: true
        CustomerMileage:
          allOf:
            - $ref: '#/components/schemas/Alvys.Models.Loads.LoadResponseMileage'
          nullable: true
        InvoicedAmount:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
          nullable: true
        Weight:
          allOf:
            - $ref: '#/components/schemas/Alvys.Weight'
          nullable: true
        Volume:
          allOf:
            - $ref: '#/components/schemas/Alvys.Volume'
          nullable: true
        ScheduledPickupAt:
          type: string
          format: date-time
          nullable: true
        ScheduledDeliveryAt:
          type: string
          format: date-time
          nullable: true
        PickedUpAt:
          type: string
          format: date-time
          nullable: true
        DeliveredAt:
          type: string
          format: date-time
          nullable: true
        InvoicedAt:
          type: string
          format: date-time
          nullable: true
        LastInvoiceSentAt:
          type: string
          format: date-time
          nullable: true
        Notes:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Notes.NoteDto'
        CreatedAt:
          type: string
          format: date-time
        CreatedBy:
          type: string
        CancelledAt:
          type: string
          format: date-time
          nullable: true
        CancelledBy:
          type: string
          nullable: true
        References:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.References.ReferenceResponse'
        CustomerServiceRepId:
          type: string
          nullable: true
        CustomerSalesAgentId:
          type: string
          nullable: true
        CustomerSalesManagerId:
          type: string
          nullable: true
        CustomerLoadPlannerId:
          type: string
          nullable: true
        UpdatedAt:
          type: string
          format: date-time
          nullable: true
        UpdatedBy:
          type: string
          nullable: true
        CustomerAccountManagerId:
          type: string
          nullable: true
        PaidAt:
          type: string
          format: date-time
          nullable: true
        TotalPaid:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
          nullable: true
        Payments:
          type: array
          items:
            $ref: '#/components/schemas/Alvys.Models.Loads.LoadResponsePaymentDto'
          nullable: true
        TenderId:
          type: string
          nullable: true
        IsDeleted:
          type: boolean
          nullable: true
        RequiredEquipment:
          type: array
          items:
            type: string
          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'
    FleetResponse:
      type: object
      properties:
        Id:
          type: string
          nullable: true
        Name:
          type: string
          nullable: true
        InvoiceNumberPrefix:
          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.Accessorials.CustomerAccessorialResponse:
      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
      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.Weight:
      required:
        - UnitOfMeasure
        - Value
      type: object
      properties:
        Value:
          type: number
          format: double
        UnitOfMeasure:
          allOf:
            - $ref: '#/components/schemas/Alvys.WeightWeightUnits'
      additionalProperties: false
    Alvys.Volume:
      required:
        - UnitOfMeasure
        - Value
      type: object
      properties:
        Value:
          type: number
          format: double
        UnitOfMeasure:
          allOf:
            - $ref: '#/components/schemas/Alvys.VolumeVolumeUnits'
      additionalProperties: false
    Alvys.Models.Notes.NoteDto:
      required:
        - Description
        - id
        - NoteType
        - User
      type: object
      properties:
        id:
          type: string
        Description:
          type: string
        NoteType:
          type: string
        Time:
          type: string
          format: date-time
          nullable: true
        User:
          type: string
        UserId:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.References.ReferenceResponse:
      required:
        - Name
        - Value
      type: object
      properties:
        Id:
          type: string
          nullable: true
        ReferenceId:
          type: string
          nullable: true
        Name:
          type: string
        Value:
          type: string
        Type:
          type: string
          nullable: true
        Access:
          type: string
          nullable: true
        Origin:
          type: string
          nullable: true
      additionalProperties: false
    Alvys.Models.Loads.LoadResponsePaymentDto:
      required:
        - Amount
        - Id
      type: object
      properties:
        Id:
          type: string
        Amount:
          allOf:
            - $ref: '#/components/schemas/Alvys.Money'
        PaidAt:
          type: string
          format: date-time
          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
    Alvys.WeightWeightUnits:
      enum:
        - Kilograms
        - Grams
        - Pounds
        - Ounces
        - Tons
        - CWT
        - MetricTon
        - LongTon
      type: string
    Alvys.VolumeVolumeUnits:
      enum:
        - Gallons
        - Liters
        - Bushels
        - CubicFoot
        - CubicMeter
        - Quarts
      type: string
    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
  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>`.

````