Update load
Partially update a load by load number in Alvys, changing only the supplied fields such as rate, references, equipment, assigned driver, or stop details.
curl --request PATCH \
--url https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"OrderNumber": "<string>"
}
'const options = {
method: 'PATCH',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({OrderNumber: '<string>'})
};
fetch('https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}"
payload = { "OrderNumber": "<string>" }
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'OrderNumber' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}"
payload := strings.NewReader("{\n \"OrderNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"OrderNumber\": \"<string>\"\n}")
.asString();{
"Id": "<string>",
"LoadNumber": "<string>",
"OrderNumber": "<string>",
"CustomerId": "<string>",
"Status": "<string>",
"LoadType": "<string>",
"CustomerType": [
"<string>"
],
"Stops": [
{
"AppointmentRequested": true,
"AppointmentConfirmed": true,
"ScheduleType": "<string>",
"Id": "<string>",
"StopType": "<string>",
"References": [
{
"Name": "<string>",
"Value": "<string>",
"Id": "<string>",
"ReferenceId": "<string>",
"Type": "<string>",
"Access": "<string>",
"Origin": "<string>"
}
],
"$type": "<string>",
"AppointmentDate": "2023-11-07T05:31:56Z",
"LoadingType": "<string>",
"Address": {
"Street": "<string>",
"City": "<string>",
"State": "<string>",
"ZipCode": "<string>",
"Country": "<string>"
},
"Coordinates": {
"Latitude": "<string>",
"Longitude": "<string>"
},
"Status": "<string>",
"ArrivedAt": "2023-11-07T05:31:56Z",
"DepartedAt": "2023-11-07T05:31:56Z",
"CompanyId": "<string>",
"CompanyNumber": "<string>",
"CompanyName": "<string>",
"Eta": {
"Planned": "2023-11-07T05:31:56Z",
"Live": "2023-11-07T05:31:56Z",
"Manual": "2023-11-07T05:31:56Z"
}
}
],
"InvoiceAs": "<string>",
"Notes": [
{
"id": "<string>",
"Description": "<string>",
"NoteType": "<string>",
"User": "<string>",
"Time": "2023-11-07T05:31:56Z",
"UserId": "<string>"
}
],
"CreatedAt": "2023-11-07T05:31:56Z",
"CreatedBy": "<string>",
"References": [
{
"Name": "<string>",
"Value": "<string>",
"Id": "<string>",
"ReferenceId": "<string>",
"Type": "<string>",
"Access": "<string>",
"Origin": "<string>"
}
],
"PONumber": "<string>",
"CustomerName": "<string>",
"CustomerNumber": "<string>",
"ContractId": "<string>",
"Fleet": {
"Id": "<string>",
"Name": "<string>",
"InvoiceNumberPrefix": "<string>"
},
"OfficeId": "<string>",
"Linehaul": {
"Amount": 123,
"Currency": 123
},
"FuelSurcharge": {
"Amount": 123,
"Currency": 123
},
"CustomerAccessorials": {
"Amount": 123,
"Currency": 123
},
"CustomerAccessorialsDetails": [
{
"Id": "<string>",
"Type": "<string>",
"Total": {
"Amount": 123,
"Currency": 123
},
"Rate": {
"Amount": 123,
"Currency": 123
},
"RateType": "<string>",
"Uom": "<string>",
"Quantity": 123,
"IsPaid": true,
"CreatedAt": "2023-11-07T05:31:56Z",
"CreatedBy": "<string>",
"UpdatedAt": "2023-11-07T05:31:56Z",
"UpdatedBy": "<string>",
"ExternalId": "<string>"
}
],
"CustomerRate": {
"Amount": 123,
"Currency": 123
},
"CustomerMileage": {
"Distance": {
"Value": 123,
"UnitOfMeasure": "Miles"
},
"Source": "<string>",
"ProfileId": "<string>",
"ProfileName": "<string>"
},
"InvoicedAmount": {
"Amount": 123,
"Currency": 123
},
"Weight": {
"Value": 123,
"UnitOfMeasure": "Kilograms"
},
"Volume": {
"Value": 123,
"UnitOfMeasure": "Gallons"
},
"ScheduledPickupAt": "2023-11-07T05:31:56Z",
"ScheduledDeliveryAt": "2023-11-07T05:31:56Z",
"PickedUpAt": "2023-11-07T05:31:56Z",
"DeliveredAt": "2023-11-07T05:31:56Z",
"InvoicedAt": "2023-11-07T05:31:56Z",
"LastInvoiceSentAt": "2023-11-07T05:31:56Z",
"CancelledAt": "2023-11-07T05:31:56Z",
"CancelledBy": "<string>",
"CustomerServiceRepId": "<string>",
"CustomerSalesAgentId": "<string>",
"CustomerSalesManagerId": "<string>",
"CustomerLoadPlannerId": "<string>",
"UpdatedAt": "2023-11-07T05:31:56Z",
"UpdatedBy": "<string>",
"CustomerAccountManagerId": "<string>",
"PaidAt": "2023-11-07T05:31:56Z",
"TotalPaid": {
"Amount": 123,
"Currency": 123
},
"Payments": [
{
"Id": "<string>",
"Amount": {
"Amount": 123,
"Currency": 123
},
"PaidAt": "2023-11-07T05:31:56Z"
}
],
"TenderId": "<string>",
"IsDeleted": true,
"RequiredEquipment": [
"<string>"
],
"Origin": {
"Street": "<string>",
"City": "<string>",
"State": "<string>",
"ZipCode": "<string>",
"Country": "<string>",
"CompanyId": "<string>",
"Coordinates": {
"Latitude": "<string>",
"Longitude": "<string>"
}
},
"Destination": {
"Street": "<string>",
"City": "<string>",
"State": "<string>",
"ZipCode": "<string>",
"Country": "<string>",
"CompanyId": "<string>",
"Coordinates": {
"Latitude": "<string>",
"Longitude": "<string>"
}
}
}{
"Errors": {},
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}ETag in an If-Match header. The current ETag is returned on the ETag response header of this endpoint and of the load read endpoints. For more information on how versioning works and how to include it in your requests, please refer to the Versioning page.
Request Parameters
The following parameters are available in the URL path:| Parameter | Type | Required | Description |
|---|---|---|---|
| version | String | Yes | The version of the API. |
| loadNumber | String | Yes | The load number of the load to update. |
| Header | Type | Required | Description |
|---|---|---|---|
| If-Match | String | Yes | The load’s current ETag, for optimistic concurrency. If omitted, the request is rejected with 428. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| OrderNumber | String | No | The partner-facing Order Number (“Shipment Id”). Must be 30 characters or fewer. Omit to leave it unchanged; a blank value is rejected. |
Example CURL Request
curl --location --request PATCH 'https://integrations.alvys.com/api/p/v1/loads/{loadNumber}' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'If-Match: "00000000-0000-0000-0000-000000000001"' \
--data-raw '{
"OrderNumber": "SHIP-100245"
}'
{loadNumber} with the actual load number, the If-Match value with the load’s current ETag, and YOUR_ACCESS_TOKEN with your actual Bearer token.
Response
On success the endpoint returns the updated load (the same object shape as Get Loads), and the new optimistic-concurrency token on theETag response header.
Status Codes
| Code | Description |
|---|---|
| 200 | The load was updated; the response body contains the updated load. |
| 400 | The request body failed validation (e.g., Order Number longer than 30 characters or blank). |
| 401 | Authentication failed or the token is missing. |
| 403 | The token is not authorized to update loads. |
| 404 | No load was found for the given load number. |
| 409 | The update conflicts with the current state of the load. |
| 412 | The If-Match ETag did not match the load’s current version (it changed since you read it). |
| 428 | The If-Match header was not provided. |
Authorizations
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>.
Headers
The load's current ETag (from a prior GET/response), for optimistic concurrency. Required; if omitted the request is rejected with 428.
Path Parameters
API version (e.g., 1.0)
"1.0"
Body
The partner-facing Order Number ("Shipment Id"). Maximum 30 characters. Omit the field to leave it unchanged; a present but blank/whitespace value is rejected.
30Response
OK
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
curl --request PATCH \
--url https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"OrderNumber": "<string>"
}
'const options = {
method: 'PATCH',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({OrderNumber: '<string>'})
};
fetch('https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}"
payload = { "OrderNumber": "<string>" }
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'OrderNumber' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}"
payload := strings.NewReader("{\n \"OrderNumber\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://integrations.alvys.com/api/p/v{version}/loads/{loadNumber}")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"OrderNumber\": \"<string>\"\n}")
.asString();{
"Id": "<string>",
"LoadNumber": "<string>",
"OrderNumber": "<string>",
"CustomerId": "<string>",
"Status": "<string>",
"LoadType": "<string>",
"CustomerType": [
"<string>"
],
"Stops": [
{
"AppointmentRequested": true,
"AppointmentConfirmed": true,
"ScheduleType": "<string>",
"Id": "<string>",
"StopType": "<string>",
"References": [
{
"Name": "<string>",
"Value": "<string>",
"Id": "<string>",
"ReferenceId": "<string>",
"Type": "<string>",
"Access": "<string>",
"Origin": "<string>"
}
],
"$type": "<string>",
"AppointmentDate": "2023-11-07T05:31:56Z",
"LoadingType": "<string>",
"Address": {
"Street": "<string>",
"City": "<string>",
"State": "<string>",
"ZipCode": "<string>",
"Country": "<string>"
},
"Coordinates": {
"Latitude": "<string>",
"Longitude": "<string>"
},
"Status": "<string>",
"ArrivedAt": "2023-11-07T05:31:56Z",
"DepartedAt": "2023-11-07T05:31:56Z",
"CompanyId": "<string>",
"CompanyNumber": "<string>",
"CompanyName": "<string>",
"Eta": {
"Planned": "2023-11-07T05:31:56Z",
"Live": "2023-11-07T05:31:56Z",
"Manual": "2023-11-07T05:31:56Z"
}
}
],
"InvoiceAs": "<string>",
"Notes": [
{
"id": "<string>",
"Description": "<string>",
"NoteType": "<string>",
"User": "<string>",
"Time": "2023-11-07T05:31:56Z",
"UserId": "<string>"
}
],
"CreatedAt": "2023-11-07T05:31:56Z",
"CreatedBy": "<string>",
"References": [
{
"Name": "<string>",
"Value": "<string>",
"Id": "<string>",
"ReferenceId": "<string>",
"Type": "<string>",
"Access": "<string>",
"Origin": "<string>"
}
],
"PONumber": "<string>",
"CustomerName": "<string>",
"CustomerNumber": "<string>",
"ContractId": "<string>",
"Fleet": {
"Id": "<string>",
"Name": "<string>",
"InvoiceNumberPrefix": "<string>"
},
"OfficeId": "<string>",
"Linehaul": {
"Amount": 123,
"Currency": 123
},
"FuelSurcharge": {
"Amount": 123,
"Currency": 123
},
"CustomerAccessorials": {
"Amount": 123,
"Currency": 123
},
"CustomerAccessorialsDetails": [
{
"Id": "<string>",
"Type": "<string>",
"Total": {
"Amount": 123,
"Currency": 123
},
"Rate": {
"Amount": 123,
"Currency": 123
},
"RateType": "<string>",
"Uom": "<string>",
"Quantity": 123,
"IsPaid": true,
"CreatedAt": "2023-11-07T05:31:56Z",
"CreatedBy": "<string>",
"UpdatedAt": "2023-11-07T05:31:56Z",
"UpdatedBy": "<string>",
"ExternalId": "<string>"
}
],
"CustomerRate": {
"Amount": 123,
"Currency": 123
},
"CustomerMileage": {
"Distance": {
"Value": 123,
"UnitOfMeasure": "Miles"
},
"Source": "<string>",
"ProfileId": "<string>",
"ProfileName": "<string>"
},
"InvoicedAmount": {
"Amount": 123,
"Currency": 123
},
"Weight": {
"Value": 123,
"UnitOfMeasure": "Kilograms"
},
"Volume": {
"Value": 123,
"UnitOfMeasure": "Gallons"
},
"ScheduledPickupAt": "2023-11-07T05:31:56Z",
"ScheduledDeliveryAt": "2023-11-07T05:31:56Z",
"PickedUpAt": "2023-11-07T05:31:56Z",
"DeliveredAt": "2023-11-07T05:31:56Z",
"InvoicedAt": "2023-11-07T05:31:56Z",
"LastInvoiceSentAt": "2023-11-07T05:31:56Z",
"CancelledAt": "2023-11-07T05:31:56Z",
"CancelledBy": "<string>",
"CustomerServiceRepId": "<string>",
"CustomerSalesAgentId": "<string>",
"CustomerSalesManagerId": "<string>",
"CustomerLoadPlannerId": "<string>",
"UpdatedAt": "2023-11-07T05:31:56Z",
"UpdatedBy": "<string>",
"CustomerAccountManagerId": "<string>",
"PaidAt": "2023-11-07T05:31:56Z",
"TotalPaid": {
"Amount": 123,
"Currency": 123
},
"Payments": [
{
"Id": "<string>",
"Amount": {
"Amount": 123,
"Currency": 123
},
"PaidAt": "2023-11-07T05:31:56Z"
}
],
"TenderId": "<string>",
"IsDeleted": true,
"RequiredEquipment": [
"<string>"
],
"Origin": {
"Street": "<string>",
"City": "<string>",
"State": "<string>",
"ZipCode": "<string>",
"Country": "<string>",
"CompanyId": "<string>",
"Coordinates": {
"Latitude": "<string>",
"Longitude": "<string>"
}
},
"Destination": {
"Street": "<string>",
"City": "<string>",
"State": "<string>",
"ZipCode": "<string>",
"Country": "<string>",
"CompanyId": "<string>",
"Coordinates": {
"Latitude": "<string>",
"Longitude": "<string>"
}
}
}{
"Errors": {},
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}{
"Type": "<string>",
"Title": "<string>",
"Status": 123,
"Detail": "<string>",
"Instance": "<string>"
}