Skip to main content
PUT
Set load fleet
The Set Load Fleet endpoint puts a load in the fleet you name, the same as Change Fleet in Alvys. The fleet’s id, name and invoice number prefix are stored on the load, and the change is written to the load’s history. The load’s trips, rates and invoice-as subsidiary are not changed. For more information on how versioning works and how to include it in your requests, please refer to the Versioning page.
This endpoint requires the load:update scope. See Authentication.

Request parameters

Request body

Retry safely

Sending the fleet the load already has, with the same name and invoice number prefix, returns 200 OK with the load unchanged and writes nothing to its history. A retry after a timeout is safe. This holds for a Paid or Cancelled load too. If-Match is not used: the last write wins, the same as in the app.

Invoices

Invoiced, Financed and Completed loads accept the change, the same as in the app. Invoice numbers already issued keep their prefix. The load’s next invoice, or a supplemental or void-and-revise reissue, uses the new fleet’s invoice number prefix.
On a company with automatic fleet assignment, a later truck, trailer or driver assignment on the load can replace the fleet you set here.

Response

200 OK with the load, in the same shape as Get load. The Fleet object shows the new fleet.

Errors

Why a request is refused with 409

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

Example cURL request

Example response (200 OK)

Abbreviated. The full load has the same fields as Get load.

Rate limits

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

Authorizations

Authorization
string
header
required

OAuth 2.0 client-credentials access token. Obtain one from https://auth.alvys.com/oauth/token (grant_type=client_credentials, audience=https://api.alvys.com/public/), then paste it here. The playground sends it as Authorization: Bearer <token>.

Path Parameters

loadNumber
string
required
version
string
default:2.0
required

API version (e.g., 2.0)

Example:

"2.0"

Body

FleetId
string
required

Fleet id, as returned in Fleet.Id by GET /loads, /trucks or /trailers. Must be an active fleet of your account.

Required string length: 1 - 255

Response

OK

Id
string
required
LoadNumber
string
required
OrderNumber
string
required
CustomerId
string
required
Status
string
required
LoadType
string
required
deprecated
CustomerType
string[]
required
Stops
object[]
required
InvoiceAs
string
required
Notes
object[]
required
CreatedAt
string<date-time>
required
CreatedBy
string
required
References
object[]
required
PONumber
string | null
CustomerName
string | null
CustomerNumber
string | null
ContractId
string | null
Fleet
object | null
OfficeId
string | null
Linehaul
object | null
FuelSurcharge
object | null
CustomerAccessorials
object | null
CustomerAccessorialsDetails
object[] | null
CustomerRate
object | null
CustomerMileage
object | null
InvoicedAmount
object | null
Weight
object | null
Volume
object | null
ScheduledPickupAt
string<date-time> | null
ScheduledDeliveryAt
string<date-time> | null
PickedUpAt
string<date-time> | null
DeliveredAt
string<date-time> | null
InvoicedAt
string<date-time> | null
LastInvoiceSentAt
string<date-time> | null
CancelledAt
string<date-time> | null
CancelledBy
string | null
CustomerServiceRepId
string | null
CustomerSalesAgentId
string | null
CustomerSalesManagerId
string | null
CustomerLoadPlannerId
string | null
UpdatedAt
string<date-time> | null
UpdatedBy
string | null
CustomerAccountManagerId
string | null
PaidAt
string<date-time> | null
TotalPaid
object | null
Payments
object[] | null
TenderId
string | null
IsDeleted
boolean | null
RequiredEquipment
string[] | null
Origin
object | null

Address of the stop a load's Origin or Destination was derived from (first pickup / last delivery), with the identity of the physical location at that stop.

Destination
object | null

Address of the stop a load's Origin or Destination was derived from (first pickup / last delivery), with the identity of the physical location at that stop.