Method
PATCH /v1/products/:id/transport/options/:optionId
Path Parameters
uuid
Product ID that owns the option.
uuid
Transport option ID.
Body Parameters
Show Leg object
Show Leg object
Headers
string
Bearer token (requires
products:write).string
application/jsonRequest Example
curl -X PATCH "https://api.voyantcloud.com/v1/products/prod_123/transport/options/opt_001" \
-H "Authorization: Bearer $VOYANT_API_KEY" \
-H "content-type: application/json" \
-d '{
"name": "Athens morning flight",
"seats_available": 18,
"legs": [
{
"mode_id": "mode_flight",
"operator_org_id": "org_airline",
"from_place_id": "ChIJ8UNwppk4j4ARzWPaN9xq_9o",
"to_place_id": "ChIJGaK-SZcYtUYR0Y1DSXB6QrM",
"flight_number": "RO381",
"airline_code": "RO",
"duration_minutes": 160
}
]
}'
await fetch("https://api.voyantcloud.com/v1/products/prod_123/transport/options/opt_001", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
"content-type": "application/json",
},
body: JSON.stringify({ pricing_override: { price_delta: { mode: "flat", amount: 35 } } }),
})
import os, requests
payload = {
"description": "Morning flight with 20kg luggage included"
}
resp = requests.patch(
"https://api.voyantcloud.com/v1/products/prod_123/transport/options/opt_001",
headers={
"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
"content-type": "application/json",
},
json=payload,
)
updated = resp.json()
Response
{
"item": {
"id": "opt_001",
"departure_id": "dep_456",
"key": "athens-flight",
"name": "Athens morning flight",
"description": "Morning flight with 20kg luggage included",
"seats_total": 40,
"seats_available": 18,
"pricing_override": {
"price_delta": { "mode": "flat", "amount": 35 }
},
"attributes": {}
}
}
Providing
legs replaces the entire leg set. Include every leg you want to keep in the payload.