> ## 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 Departure

> Modify departure timing, capacity, status, or metadata.

## Method

`PATCH` `/v1/departures/:id`

## Path Parameters

<ParamField path="id" type="uuid">Departure ID.</ParamField>

## Body Parameters

<ParamField name="productId" type="uuid">Owning product (required).</ParamField>
<ParamField name="startAt" type="datetime">Updated start timestamp.</ParamField>
<ParamField name="endAt" type="datetime">Updated end timestamp.</ParamField>
<ParamField name="capacity" type="integer">Revised capacity.</ParamField>
<ParamField name="status" type="string">`planned`, `scheduled`, `cancelled`, or `completed`.</ParamField>
<ParamField name="meetingPoint" type="string | object">Free-text or structured meeting point.</ParamField>
<ParamField name="transportModeId" type="uuid">Transport mode reference.</ParamField>
<ParamField name="transportConfigId" type="uuid">Transport configuration reference.</ParamField>
<ParamField name="itineraryId" type="uuid">Pinned itinerary ID.</ParamField>
<ParamField name="itineraryVersionId" type="uuid">Pinned itinerary version.</ParamField>
<ParamField name="shipId" type="uuid">Ship/vessel reference.</ParamField>
<ParamField name="isDirectionReverse" type="boolean">Flag to reverse itinerary direction.</ParamField>
<ParamField name="externalCodes" type="object">Integration identifiers.</ParamField>
<ParamField name="attributes" type="object">Custom metadata.</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</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/departures/dep_456" \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{
      "productId": "prod_123",
      "status": "scheduled",
      "capacity": 32,
      "meetingPoint": "Port of Piraeus"
    }'
  ```

  ```javascript Node.js theme={null}
  await fetch("https://api.voyantcloud.com/v1/departures/dep_456", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({
      productId: "prod_123",
      endAt: "2025-06-05T20:00:00Z",
      attributes: { channel: "early-bird" },
    }),
  })
  ```

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

  resp = requests.patch(
    "https://api.voyantcloud.com/v1/departures/dep_456",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json={
      "productId": "prod_123",
      "status": "cancelled",
    },
  )
  updated = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": "dep_456",
      "productId": "prod_123",
      "startAt": "2025-06-01T08:00:00.000Z",
      "endAt": "2025-06-05T20:00:00.000Z",
      "capacity": 32,
      "status": "scheduled",
      "meetingPoint": "Port of Piraeus",
      "transportModeId": null,
      "transportConfigId": null,
      "itineraryId": "iti_001",
      "itineraryVersionId": "itv_010",
      "shipId": null,
      "isDirectionReverse": false,
      "externalCodes": null,
      "attributes": { "channel": "early-bird" },
      "createdAt": "2025-02-20T12:34:56.000Z"
    }
  }
  ```
</ResponseExample>
