Update Stay On Trip
curl --request PATCH \
--url https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"check_in_date": "2023-12-25",
"check_out_date": "2023-12-25",
"check_in_time": "<string>",
"check_out_time": "<string>",
"total_price": 123,
"currency": "<string>",
"confirmation_number": "<string>",
"is_booked": true
}
'import requests
url = "https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}"
payload = {
"name": "<string>",
"check_in_date": "2023-12-25",
"check_out_date": "2023-12-25",
"check_in_time": "<string>",
"check_out_time": "<string>",
"total_price": 123,
"currency": "<string>",
"confirmation_number": "<string>",
"is_booked": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
check_in_date: '2023-12-25',
check_out_date: '2023-12-25',
check_in_time: '<string>',
check_out_time: '<string>',
total_price: 123,
currency: '<string>',
confirmation_number: '<string>',
is_booked: true
})
};
fetch('https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}",
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([
'name' => '<string>',
'check_in_date' => '2023-12-25',
'check_out_date' => '2023-12-25',
'check_in_time' => '<string>',
'check_out_time' => '<string>',
'total_price' => 123,
'currency' => '<string>',
'confirmation_number' => '<string>',
'is_booked' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/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://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"check_in_date\": \"2023-12-25\",\n \"check_out_date\": \"2023-12-25\",\n \"check_in_time\": \"<string>\",\n \"check_out_time\": \"<string>\",\n \"total_price\": 123,\n \"currency\": \"<string>\",\n \"confirmation_number\": \"<string>\",\n \"is_booked\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"check_in_date\": \"2023-12-25\",\n \"check_out_date\": \"2023-12-25\",\n \"check_in_time\": \"<string>\",\n \"check_out_time\": \"<string>\",\n \"total_price\": 123,\n \"currency\": \"<string>\",\n \"confirmation_number\": \"<string>\",\n \"is_booked\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"check_in_date\": \"2023-12-25\",\n \"check_out_date\": \"2023-12-25\",\n \"check_in_time\": \"<string>\",\n \"check_out_time\": \"<string>\",\n \"total_price\": 123,\n \"currency\": \"<string>\",\n \"confirmation_number\": \"<string>\",\n \"is_booked\": true\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}mcp-server
Update Stay On Trip
Change a booking in place — dates, price, or its confirmation number.
Without this a stay could be recorded and never corrected: the confirmation number could only be set at creation, and a booking whose dates moved had no path back short of leaving a stale one behind, since removing was not possible either.
PATCH
/
v1
/
trips
/
{trip_id}
/
stays
/
{stay_id}
Update Stay On Trip
curl --request PATCH \
--url https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"check_in_date": "2023-12-25",
"check_out_date": "2023-12-25",
"check_in_time": "<string>",
"check_out_time": "<string>",
"total_price": 123,
"currency": "<string>",
"confirmation_number": "<string>",
"is_booked": true
}
'import requests
url = "https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}"
payload = {
"name": "<string>",
"check_in_date": "2023-12-25",
"check_out_date": "2023-12-25",
"check_in_time": "<string>",
"check_out_time": "<string>",
"total_price": 123,
"currency": "<string>",
"confirmation_number": "<string>",
"is_booked": True
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
check_in_date: '2023-12-25',
check_out_date: '2023-12-25',
check_in_time: '<string>',
check_out_time: '<string>',
total_price: 123,
currency: '<string>',
confirmation_number: '<string>',
is_booked: true
})
};
fetch('https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}",
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([
'name' => '<string>',
'check_in_date' => '2023-12-25',
'check_out_date' => '2023-12-25',
'check_in_time' => '<string>',
'check_out_time' => '<string>',
'total_price' => 123,
'currency' => '<string>',
'confirmation_number' => '<string>',
'is_booked' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/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://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"check_in_date\": \"2023-12-25\",\n \"check_out_date\": \"2023-12-25\",\n \"check_in_time\": \"<string>\",\n \"check_out_time\": \"<string>\",\n \"total_price\": 123,\n \"currency\": \"<string>\",\n \"confirmation_number\": \"<string>\",\n \"is_booked\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"check_in_date\": \"2023-12-25\",\n \"check_out_date\": \"2023-12-25\",\n \"check_in_time\": \"<string>\",\n \"check_out_time\": \"<string>\",\n \"total_price\": 123,\n \"currency\": \"<string>\",\n \"confirmation_number\": \"<string>\",\n \"is_booked\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://stardrift.ai/api/v1/trips/{trip_id}/stays/{stay_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"check_in_date\": \"2023-12-25\",\n \"check_out_date\": \"2023-12-25\",\n \"check_in_time\": \"<string>\",\n \"check_out_time\": \"<string>\",\n \"total_price\": 123,\n \"currency\": \"<string>\",\n \"confirmation_number\": \"<string>\",\n \"is_booked\": true\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Fields to change on an existing stay. Omit one to leave it alone.
A check-in or check-out time sent as an explicit null is cleared; every other field sent as null is left alone, matching UpdateStayAction.
Response
Successful Response
The response is of type Response Update Stay On Trip V1 Trips Trip Id Stays Stay Id Patch · object.
