Method
POST /v1/products/:id/transport/configs
Path Parameters
uuid
Product ID that will own the transport config.
Body Parameters
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/configs" \
-H "Authorization: Bearer $VOYANT_API_KEY" \
-H "content-type: application/json" \
-d '{
"key": "default-coach",
"name": "Coach transfer",
"description": "Coach transfer between airport and hotel",
"legs": [
{
"mode_id": "mode_bus",
"operator_org_id": "org_transport",
"from_place_id": "ChIJ8UNwppk4j4ARzWPaN9xq_9o",
"to_place_id": "ChIJGaK-SZcYtUYR0Y1DSXB6QrM",
"duration_minutes": 45,
"luggage": { "checked_bag": 1 }
}
]
}'
const res = await fetch("https://api.voyantcloud.com/v1/products/prod_123/transport/configs", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
"content-type": "application/json",
},
body: JSON.stringify({
key: "default-coach",
name: "Coach transfer",
legs: [{ mode_id: "mode_bus", operator_org_id: "org_transport" }],
}),
})
const payload = await res.json()
import os, requests
payload = {
"key": "default-coach",
"name": "Coach transfer",
"legs": [
{
"mode_id": "mode_bus",
"operator_org_id": "org_transport",
"duration_minutes": 45
}
]
}
resp = requests.post(
"https://api.voyantcloud.com/v1/products/prod_123/transport/configs",
headers={
"Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
"content-type": "application/json",
},
json=payload,
)
data = resp.json()
Response
{
"item": {
"id": "cfg_001",
"product_id": "prod_123",
"key": "default-coach",
"name": "Coach transfer",
"description": "Coach transfer between airport and hotel",
"created_at": "2025-01-05T10:22:41.000Z",
"updated_at": "2025-01-05T10:22:41.000Z"
}
}
Config keys must be unique per product. Attempting to reuse a key returns
409 Conflict.