Skip to main content

Method

POST /v1/products/:id/transport/configs

Path Parameters

id
uuid
Product ID that will own the transport config.

Body Parameters

Headers

Authorization
string
Bearer token (requires products:write).
content-type
string
application/json

Request 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 }
      }
    ]
  }'

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.