Trips
Generate carrier rate confirmation
Generate a trip’s carrier rate confirmation from your own system and get a download link, with an optional Idempotency-Key so a retry never stores it twice.
POST
/
api
/
p
/
v
{version}
/
trips
/
{tripId}
/
rate-confirmation
Generate carrier rate confirmation
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/rate-confirmation \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/rate-confirmation', 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}/rate-confirmation"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, 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}/rate-confirmation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/rate-confirmation"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/rate-confirmation")
.header("Authorization", "Bearer <token>")
.asString();{
"id": "<string>",
"AttachmentPath": "<string>",
"AttachmentType": "<string>",
"ParentId": "<string>",
"ParentType": "<string>",
"AttachmentSize": 123,
"UploadedAt": "2023-11-07T05:31:56Z",
"UploadedBy": "<string>",
"DownloadUrl": "<string>",
"ExpiresAt": "2023-11-07T05:31:56Z"
}{
"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 Generate Carrier Rate Confirmation endpoint creates the carrier rate confirmation for a trip, the same document as Generate in the Tender panel in Alvys, and returns it with a download link. For more information on how versioning works and how to include it in your requests, please refer to the Versioning page.
It does not email the carrier or request a signature. Download the PDF from
The request has no body.
Fields with no value are left out of the response.
DownloadUrl and send it the way you already do.
This endpoint requires the
trip:update scope. See Authentication.Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| version | path | String | Yes | API version to use. |
| tripId | path | String | Yes | The trip’s Id, as returned by Search trips. |
| Idempotency-Key | header | String | No | 1 to 100 characters. Makes a retry safe: see Retry safely. |
Before you call it
The trip must be ready for a carrier rate confirmation. Each of these returns422 Unprocessable Content and stores nothing:
- The trip has no carrier. Assign one first.
- The trip is run by an owner operator. Only carrier rate confirmations can be generated through the API.
- The trip is tendered to one of your own carrier subsidiaries. Rate confirmations can be generated here for brokered carriers only.
- The trip has no dispatcher, or its dispatcher is no longer an active user. Set one with
dispatcherIdon Assign trip.
Where the document is stored
The rate confirmation is stored on the trip’s load, not on the trip:ParentType is Load and ParentId is the load number. List load documents lists it and List trip documents does not.
Retry safely
Without anIdempotency-Key, every call stores a new rate confirmation, so a retry after a timeout can leave two on the load.
With an Idempotency-Key, the key is tied to this trip:
- The first call generates and stores the rate confirmation.
- A call with the same key returns that rate confirmation with a new download link and generates nothing.
- The key is also tied to the trip’s carrier, owner operator and carrier rate. After any of them changes, the same key goes through every check again and generates a new rate confirmation.
- Other trip edits do not change what the key returns. Send a new key to get a rate confirmation that shows them.
- If the rate confirmation stored for a key was deleted, the same key returns
409 Conflictwith atypeending inIdempotencyKeyReused. Send a new key.
400 Bad Request.
Response
200 OK with the rate confirmation.
| Name | Type | Description |
|---|---|---|
| id | string | The document’s id. |
| AttachmentPath | string | The file name of the PDF. |
| AttachmentType | string | Carrier Rate Confirmation. |
| AttachmentSize | integer | Size of the file in bytes. |
| UploadedAt | string | When the document was stored (ISO 8601). |
| ParentId | string | The load number of the trip’s load. |
| ParentType | string | Load. |
| UploadedBy | string | Who stored the document. |
| DownloadUrl | string | A link to download the PDF. It works for 10 minutes. |
| ExpiresAt | string | When DownloadUrl stops working (ISO 8601). |
Errors
| Status | When |
|---|---|
400 Bad Request | The Idempotency-Key is empty or over 100 characters. |
401 Unauthorized | The access token is missing, invalid or expired. |
403 Forbidden | Your credential does not have the trip:update scope. |
404 Not Found | The trip does not exist or your credential cannot see it. |
409 Conflict | The type ends in IdempotencyKeyReused: the rate confirmation stored for this key was deleted. Send a new key. |
422 Unprocessable Content | The trip is not ready: see Before you call it. Also returned when the document is too large to generate through the API (generate it in Alvys instead), and when generating PDFs through the API is not turned on for your account (contact Alvys support). The detail says which. |
429 Too Many Requests | You are rate limited. See Rate limits. |
503 Service Unavailable | PDF generation is busy. Retry after the number of seconds in the Retry-After header, with the same Idempotency-Key. |
Example cURL request
curl --location --request POST 'https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/rate-confirmation' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Idempotency-Key: tms-ratecon-58213'
Example response (200 OK)
{
"id": "6c1f0e2d9a8b4c7d8e5f4a3b2c1d0e9f",
"AttachmentPath": "CarrierRateConfirmation-1764775200.pdf",
"AttachmentType": "Carrier Rate Confirmation",
"AttachmentSize": 91234,
"UploadedAt": "2026-12-03T15:20:00+00:00",
"ParentId": "1001",
"ParentType": "Load",
"UploadedBy": "Example Integration",
"DownloadUrl": "https://files.alvys.com/...",
"ExpiresAt": "2026-12-03T15:30:00+00:00"
}
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
⌘I
Generate carrier rate confirmation
curl --request POST \
--url https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/rate-confirmation \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/rate-confirmation', 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}/rate-confirmation"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, 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}/rate-confirmation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/rate-confirmation"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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}/rate-confirmation")
.header("Authorization", "Bearer <token>")
.asString();{
"id": "<string>",
"AttachmentPath": "<string>",
"AttachmentType": "<string>",
"ParentId": "<string>",
"ParentType": "<string>",
"AttachmentSize": 123,
"UploadedAt": "2023-11-07T05:31:56Z",
"UploadedBy": "<string>",
"DownloadUrl": "<string>",
"ExpiresAt": "2023-11-07T05:31:56Z"
}{
"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>"
}