Trips
Record carrier quote
Record what a carrier asks to haul an open trip, the same as adding an interested carrier in Alvys, with one quote per carrier and safe retries.
POST
/
api
/
p
/
v
{version}
/
trips
/
{tripId}
/
carrier-quotes
Record carrier quote
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/carrier-quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"CarrierId": "<string>",
"Amount": 123,
"Notes": "<string>",
"ContactPhone": "<string>",
"ContactEmail": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
CarrierId: '<string>',
Amount: 123,
Notes: '<string>',
ContactPhone: '<string>',
ContactEmail: '<string>'
})
};
fetch('https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/carrier-quotes', 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}/trips/{tripId}/carrier-quotes"
payload = {
"CarrierId": "<string>",
"Amount": 123,
"Notes": "<string>",
"ContactPhone": "<string>",
"ContactEmail": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(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}/trips/{tripId}/carrier-quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'CarrierId' => '<string>',
'Amount' => 123,
'Notes' => '<string>',
'ContactPhone' => '<string>',
'ContactEmail' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$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}/trips/{tripId}/carrier-quotes"
payload := strings.NewReader("{\n \"CarrierId\": \"<string>\",\n \"Amount\": 123,\n \"Notes\": \"<string>\",\n \"ContactPhone\": \"<string>\",\n \"ContactEmail\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/carrier-quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"CarrierId\": \"<string>\",\n \"Amount\": 123,\n \"Notes\": \"<string>\",\n \"ContactPhone\": \"<string>\",\n \"ContactEmail\": \"<string>\"\n}")
.asString();{
"Id": "<string>",
"CarrierId": "<string>",
"Amount": 123,
"CreatedAt": "2023-11-07T05:31:56Z",
"Source": "<string>",
"Notes": "<string>",
"ContactPhone": "<string>",
"ContactEmail": "<string>",
"CreatedBy": "<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>"
}The Record Carrier Quote endpoint records what a carrier asks to haul a trip, for example a counter of $1,300 on a $1,000 load. It is the same as adding an interested carrier on the trip in Alvys, and the quote shows up in the trip’s interested carriers list. Recording a quote does not assign the carrier: to book it, use Assign trip. 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
trip:update scope. See Authentication.Carrier
CarrierId is the Alvys id of a carrier that already exists in your account. Find it by MC or DOT number with Search carriers. This endpoint does not create carriers: a carrier that is not in Alvys, or is deleted, is rejected with 404 Not Found. Add a new carrier in Alvys first. A carrier marked Do Not Load is rejected with 422 Unprocessable Entity.
The carrier’s name, MC number, DOT number and status are taken from the carrier record in Alvys, not from your request.
One quote per carrier
A trip holds one quote per carrier. Sending a quote for a carrier that already quoted on the trip replaces itsAmount, and its Notes, ContactPhone and ContactEmail when you send them:
- Leave a field out to keep its current value.
- Send an empty string to clear it.
- The quote keeps its
Id,CreatedAtandCreatedBy.
Retry safely
Sending the same terms again returns the stored quote and changes nothing, so a retry after a timeout is safe.Trip status
An Open trip and its load move to Quoted, as they do in Alvys. Quotes can be recorded while the trip is Open, Quoted or Reserved and has no carrier.Errors
| Status | When |
|---|---|
400 Bad Request | CarrierId or Amount is missing, Amount is negative or above the largest amount Alvys accepts (1,000,000 by default), a text field is too long, or ContactEmail is not an email address. |
404 Not Found | The trip does not exist or your credential cannot access it, or the carrier is not in Alvys or is deleted. |
409 Conflict | The trip kept changing while the quote was being saved, and part of it may have been saved. Read the quotes again with List trip carrier quotes and retry. |
422 Unprocessable Entity | Nothing was written. The trip already has a carrier, or it is not Open, Quoted or Reserved (TripNotOpenForQuotes); the trip is tendered as one of your own carrier subsidiaries; the carrier is marked Do Not Load (CarrierDoNotLoad); or the carrier’s quote on the trip is its Alvys Marketplace bid (QuoteFromMarketplace). |
Example cURL request
curl --location 'https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/carrier-quotes' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data-raw '{
"carrierId": "714698b2-956d-4511-a1ed-4b907b47b4ef",
"amount": 1300,
"notes": "Counter on 1,000",
"contactPhone": "555-0100",
"contactEmail": "dispatch@example.com"
}'
Example response (200 OK)
{
"Id": "1a5fa437-c902-42f1-955d-1dfd8a09c8d5",
"CarrierId": "714698b2-956d-4511-a1ed-4b907b47b4ef",
"Amount": 1300.0,
"Notes": "Counter on 1,000",
"ContactPhone": "555-0100",
"ContactEmail": "dispatch@example.com",
"CreatedAt": "2026-11-26T15:47:43.0689498+00:00",
"CreatedBy": "BYnMgXWF6d3fDxSB0GWr2Seo7yfeCzvv",
"Source": "Manual"
}
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
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
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Response
OK
⌘I
Record carrier quote
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/carrier-quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"CarrierId": "<string>",
"Amount": 123,
"Notes": "<string>",
"ContactPhone": "<string>",
"ContactEmail": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
CarrierId: '<string>',
Amount: 123,
Notes: '<string>',
ContactPhone: '<string>',
ContactEmail: '<string>'
})
};
fetch('https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/carrier-quotes', 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}/trips/{tripId}/carrier-quotes"
payload = {
"CarrierId": "<string>",
"Amount": 123,
"Notes": "<string>",
"ContactPhone": "<string>",
"ContactEmail": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.post(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}/trips/{tripId}/carrier-quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'CarrierId' => '<string>',
'Amount' => 123,
'Notes' => '<string>',
'ContactPhone' => '<string>',
'ContactEmail' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json-patch+json"
],
]);
$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}/trips/{tripId}/carrier-quotes"
payload := strings.NewReader("{\n \"CarrierId\": \"<string>\",\n \"Amount\": 123,\n \"Notes\": \"<string>\",\n \"ContactPhone\": \"<string>\",\n \"ContactEmail\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json-patch+json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/carrier-quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"CarrierId\": \"<string>\",\n \"Amount\": 123,\n \"Notes\": \"<string>\",\n \"ContactPhone\": \"<string>\",\n \"ContactEmail\": \"<string>\"\n}")
.asString();{
"Id": "<string>",
"CarrierId": "<string>",
"Amount": 123,
"CreatedAt": "2023-11-07T05:31:56Z",
"Source": "<string>",
"Notes": "<string>",
"ContactPhone": "<string>",
"ContactEmail": "<string>",
"CreatedBy": "<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>"
}