Trips
Set stop appointment
Set or update the appointment window on a trip stop by trip and stop ID, including scheduled date, start and end time, and appointment type.
PUT
/
api
/
p
/
v
{version}
/
trips
/
{tripId}
/
stops
/
{stopId}
/
appointment
Set stop appointment
curl --request PUT \
--url https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/stops/{stopId}/appointment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"ScheduleType": "<string>",
"LoadingType": "<string>",
"AppointmentRequested": true,
"AppointmentConfirmed": true,
"AppointmentDate": "<string>",
"WindowBegin": "<string>",
"WindowEnd": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
ScheduleType: '<string>',
LoadingType: '<string>',
AppointmentRequested: true,
AppointmentConfirmed: true,
AppointmentDate: '<string>',
WindowBegin: '<string>',
WindowEnd: '<string>'
})
};
fetch('https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/stops/{stopId}/appointment', 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}/stops/{stopId}/appointment"
payload = {
"ScheduleType": "<string>",
"LoadingType": "<string>",
"AppointmentRequested": True,
"AppointmentConfirmed": True,
"AppointmentDate": "<string>",
"WindowBegin": "<string>",
"WindowEnd": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.put(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}/stops/{stopId}/appointment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'ScheduleType' => '<string>',
'LoadingType' => '<string>',
'AppointmentRequested' => true,
'AppointmentConfirmed' => true,
'AppointmentDate' => '<string>',
'WindowBegin' => '<string>',
'WindowEnd' => '<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}/stops/{stopId}/appointment"
payload := strings.NewReader("{\n \"ScheduleType\": \"<string>\",\n \"LoadingType\": \"<string>\",\n \"AppointmentRequested\": true,\n \"AppointmentConfirmed\": true,\n \"AppointmentDate\": \"<string>\",\n \"WindowBegin\": \"<string>\",\n \"WindowEnd\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/stops/{stopId}/appointment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"ScheduleType\": \"<string>\",\n \"LoadingType\": \"<string>\",\n \"AppointmentRequested\": true,\n \"AppointmentConfirmed\": true,\n \"AppointmentDate\": \"<string>\",\n \"WindowBegin\": \"<string>\",\n \"WindowEnd\": \"<string>\"\n}")
.asString();{
"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>"
},
"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>"
}{
"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>"
}Updates the scheduling information for a specific stop within a trip.
This endpoint allows updating the stop appointment details including:
Replace:
- schedule type
- loading type
- appointment date
- appointment request / confirmation flags
- delivery window (for FCFS stops)
Endpoint
PUT /api/p/v{version}/trips/{tripId}/stops/{stopId}/appointment
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| version | string | Yes | API version (e.g. 1.0). |
| tripId | string | Yes | Unique identifier of the trip. |
| stopId | string | Yes | Unique identifier of the stop. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| ScheduleType | string | Yes | Schedule type of the stop (APPT or FCFS). |
| LoadingType | string | Yes | Loading type (Live, Drop, Hook, Drop&Hook). |
| AppointmentDate | string (datetime) | Conditional | Appointment date and time in ISO-8601 UTC format. Required when ScheduleType = APPT. |
| AppointmentRequested | boolean | Yes | Indicates whether an appointment has been requested. |
| AppointmentConfirmed | boolean | Yes | Indicates whether the appointment has been confirmed. |
| WindowBegin | string (datetime) | Conditional | Start of the delivery window in ISO-8601 UTC format. Required when ScheduleType = FCFS. |
| WindowEnd | string (datetime) | No | End of the delivery window in ISO-8601 UTC format. Used when ScheduleType = FCFS. If provided alongside WindowBegin, must be after WindowBegin. |
Conditional validation rules:
- If
ScheduleType = APPT, you must provideAppointmentDate. - If
ScheduleType = FCFS, you must provideWindowBegin. - If both
WindowBeginandWindowEndare provided,WindowBeginmust be earlier thanWindowEnd.
Example Request Body
{
"ScheduleType": "string",
"LoadingType": "string",
"AppointmentDate": "string",
"AppointmentRequested": true,
"AppointmentConfirmed": true,
"WindowBegin": "string",
"WindowEnd": "string"
}
Example CURL request
curl --location --request PUT 'https://integrations.alvys.com/api/p/v1/trips/{tripId}/stops/{stopId}/appointment' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"ScheduleType": "APPT",
"LoadingType": "Live",
"AppointmentDate": "2026-03-16T12:45:43.262Z",
"AppointmentRequested": true,
"AppointmentConfirmed": true
}'
{version}with the API version (for example1){tripId}with the actual trip ID{stopId}with the stop IDYOUR_ACCESS_TOKENwith your Bearer token
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| Id | string | Unique identifier of the stop. |
| Address.Street | string | Street address of the stop location. |
| Address.City | string | City of the stop location. |
| Address.State | string | State of the stop location. |
| Address.ZipCode | string | ZIP code of the stop location. |
| AppointmentConfirmed | boolean | Indicates whether the appointment has been confirmed. |
| AppointmentDate | string (datetime) | Appointment date and time for the stop. |
| AppointmentRequested | boolean | Indicates whether an appointment has been requested. |
| ArrivedAt | string (datetime) | Timestamp when the stop was marked as arrived (UTC). |
| DepartedAt | string (datetime) | Timestamp when the stop was marked as departed (UTC). |
| ScheduleType | string | Schedule type (APPT or FCFS). |
| LoadingType | string | Loading type (Live, Drop, Hook, etc.). |
| StopType | string | Type of stop (Pickup, Delivery, Waypoint). |
| Status | string | Operational status of the stop. |
| Coordinates.Latitude | string | Latitude of the stop location. |
| Coordinates.Longitude | string | Longitude of the stop location. |
| References[] | array | List of references associated with the stop. |
| References[].Id | string | Reference identifier. |
| References[].ReferenceId | string | External reference identifier. |
| References[].Name | string | Name of the reference field. |
| References[].Value | string | Value of the reference. |
| References[].Type | string | Type of reference. |
| References[].Access | string | Access level (Public, Internal). |
| References[].Origin | string | Origin of the reference. |
| CompanyId | string | Identifier of the company associated with the stop. |
| CompanyNumber | string | Company registration or identification number. |
| CompanyName | string | Company name associated with the stop. |
Example Response
{
"AppointmentRequested": true,
"AppointmentConfirmed": true,
"AppointmentDate": "2026-03-16T12:45:43.262Z",
"ScheduleType": "string",
"LoadingType": "string",
"Id": "string",
"Address": {
"Street": "string",
"City": "string",
"State": "string",
"ZipCode": "string"
},
"Coordinates": {
"Latitude": "string",
"Longitude": "string"
},
"Status": "string",
"StopType": "string",
"ArrivedAt": "2026-03-16T12:45:43.262Z",
"DepartedAt": "2026-03-16T12:45:43.262Z",
"References": [
{
"Id": "string",
"ReferenceId": "string",
"Name": "string",
"Value": "string",
"Type": "string",
"Access": "string",
"Origin": "string"
}
],
"CompanyId": "string",
"CompanyNumber": "string",
"CompanyName": "string"
}
Status Codes
| Status Code | Description |
|---|---|
| 200 OK | Stop appointment successfully updated. |
| 400 Bad Request | Invalid request body. |
| 404 Not Found | Trip or stop could not be found. |
Rate Limits
All endpoints are subject to API rate limits to ensure service stability and protect against traffic spikes. Refer to the Rate Limits documentation for more information.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
API version (e.g., 1.0)
Example:
"1.0"
Body
application/json-patch+jsonapplication/jsontext/jsonapplication/*+json
Response
OK
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Type discriminator for polymorphic serialization
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Set stop appointment
curl --request PUT \
--url https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/stops/{stopId}/appointment \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '
{
"ScheduleType": "<string>",
"LoadingType": "<string>",
"AppointmentRequested": true,
"AppointmentConfirmed": true,
"AppointmentDate": "<string>",
"WindowBegin": "<string>",
"WindowEnd": "<string>"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json-patch+json'},
body: JSON.stringify({
ScheduleType: '<string>',
LoadingType: '<string>',
AppointmentRequested: true,
AppointmentConfirmed: true,
AppointmentDate: '<string>',
WindowBegin: '<string>',
WindowEnd: '<string>'
})
};
fetch('https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/stops/{stopId}/appointment', 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}/stops/{stopId}/appointment"
payload = {
"ScheduleType": "<string>",
"LoadingType": "<string>",
"AppointmentRequested": True,
"AppointmentConfirmed": True,
"AppointmentDate": "<string>",
"WindowBegin": "<string>",
"WindowEnd": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json-patch+json"
}
response = requests.put(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}/stops/{stopId}/appointment",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'ScheduleType' => '<string>',
'LoadingType' => '<string>',
'AppointmentRequested' => true,
'AppointmentConfirmed' => true,
'AppointmentDate' => '<string>',
'WindowBegin' => '<string>',
'WindowEnd' => '<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}/stops/{stopId}/appointment"
payload := strings.NewReader("{\n \"ScheduleType\": \"<string>\",\n \"LoadingType\": \"<string>\",\n \"AppointmentRequested\": true,\n \"AppointmentConfirmed\": true,\n \"AppointmentDate\": \"<string>\",\n \"WindowBegin\": \"<string>\",\n \"WindowEnd\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://integrations.alvys.com/api/p/v{version}/trips/{tripId}/stops/{stopId}/appointment")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json-patch+json")
.body("{\n \"ScheduleType\": \"<string>\",\n \"LoadingType\": \"<string>\",\n \"AppointmentRequested\": true,\n \"AppointmentConfirmed\": true,\n \"AppointmentDate\": \"<string>\",\n \"WindowBegin\": \"<string>\",\n \"WindowEnd\": \"<string>\"\n}")
.asString();{
"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>"
},
"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>"
}{
"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>"
}