> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Transport Config

> Update metadata or replace legs for an existing transport config.

## Method

`PATCH` `/v1/products/:id/transport/configs/:configId`

## Path Parameters

<ParamField path="id" type="uuid">Product ID that owns the transport config.</ParamField>
<ParamField path="configId" type="uuid">Transport config ID to update.</ParamField>

## Body Parameters

<ParamField name="name" type="string">Updated name.</ParamField>
<ParamField name="description" type="string">Updated description (set `null` to clear).</ParamField>
<ParamField name="legs" type="array">Optional replacement legs. When provided, all existing legs are replaced.</ParamField>

<Expandable title="Leg object">
  <ParamField name="legs[].seq" type="integer">Ordering of the leg (defaults to array index).</ParamField>
  <ParamField name="legs[].mode_id" type="uuid" required>Transport mode ID.</ParamField>
  <ParamField name="legs[].operator_org_id" type="uuid">Provider organization ID (required for non-air modes).</ParamField>
  <ParamField name="legs[].from_place_id" type="string">Origin Google Place ID.</ParamField>
  <ParamField name="legs[].to_place_id" type="string">Destination Google Place ID.</ParamField>
  <ParamField name="legs[].airline_code" type="string">IATA airline code.</ParamField>
  <ParamField name="legs[].flight_number" type="string">Flight number.</ParamField>
  <ParamField name="legs[].cabin_class" type="string">Cabin class label.</ParamField>
  <ParamField name="legs[].fare_class_code" type="string">Fare class code.</ParamField>
  <ParamField name="legs[].duration_minutes" type="integer">Duration in minutes.</ParamField>
  <ParamField name="legs[].luggage" type="object">JSON luggage information.</ParamField>
</Expandable>

## Headers

<ParamField header="Authorization" type="string">Bearer token (requires `products:write`).</ParamField>
<ParamField header="content-type" type="string">`application/json`</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.voyantcloud.com/v1/products/prod_123/transport/configs/cfg_001" \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "name": "Coach transfer (updated)",
      "legs": [
        {
          "mode_id": "mode_bus",
          "operator_org_id": "org_transport",
          "from_place_id": "ChIJ8UNwppk4j4ARzWPaN9xq_9o",
          "to_place_id": "ChIJGaK-SZcYtUYR0Y1DSXB6QrM",
          "duration_minutes": 50
        }
      ]
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/products/prod_123/transport/configs/cfg_001", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({ description: null }),
  })
  ```

  ```python Python theme={null}
  import os, requests

  payload = {
    "name": "Coach transfer (updated)",
    "description": "Includes welcome signage"
  }

  resp = requests.patch(
    "https://api.voyantcloud.com/v1/products/prod_123/transport/configs/cfg_001",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  updated = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "item": {
      "id": "cfg_001",
      "product_id": "prod_123",
      "key": "default-coach",
      "name": "Coach transfer (updated)",
      "description": "Includes welcome signage",
      "created_at": "2025-01-05T10:22:41.000Z",
      "updated_at": "2025-01-12T07:15:02.000Z"
    }
  }
  ```
</ResponseExample>

<Warning>
  When `legs` is provided, existing legs are deleted and replaced. Include the full set you want to persist.
</Warning>
