Method
POST /v1/products/:id/transport/options
Path Parameters
uuid
Product ID that owns the departure.
Body Parameters
Show Pricing override
Show Pricing override
Show Leg object
Show Leg object
Headers
string
Bearer token (requires
products:write).string
application/jsonRequest Example
curl -X POST "https://api.voyantcloud.com/v1/products/prod_123/transport/options" \
-H "Authorization: Bearer $VOYANT_API_KEY" \
-H "content-type: application/json" \
-d '{
"departure_id": "dep_456",
"key": "athens-flight",
"name": "Athens morning flight",
"seats_total": 40,
"pricing_override": {
"price_delta": { "mode": "flat", "amount": 45 }
},
"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
}
]
}'
const res = await fetch("https://api.voyantcloud.com/v1/products/prod_123/transport/options", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
"content-type": "application/json",
},
body: JSON.stringify({
departure_id: "dep_456",
key: "coach",
name: "Coach transfer",
}),
})
const payload = await res.json()
import os, requests
payload = {
"departure_id": "dep_456",
"key": "athens-flight",
"name": "Athens morning flight",
"seats_total": 40
}
resp = requests.post(
"https://api.voyantcloud.com/v1/products/prod_123/transport/options",
headers={
"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
"content-type": "application/json",
},
json=payload,
)
option = resp.json()
Response
{
"item": {
"id": "opt_001",
"departure_id": "dep_456",
"key": "athens-flight",
"name": "Athens morning flight",
"description": null,
"seats_total": 40,
"seats_available": null,
"pricing_override": {
"price_delta": { "mode": "flat", "amount": 45 }
},
"attributes": {}
}
}
Legs are optional. If omitted, the option references the main departure segments.