---
title: "Updates a segment plan details"
method: PATCH
path: "/shipments/v4/plans/{shipmentPlanId}/{segmentPlanId}"
tags: ["Shipments"]
---

# Updates a segment plan details

`PATCH /shipments/v4/plans/{shipmentPlanId}/{segmentPlanId}`

Updates details of a segment plan identified by the `segmentPlanId`.

This is a partial update, meaning that only the provided
fields will be updated.

***Note***: Updating `origin` and `destination` is prohibited to prevent breaking the chain
of locations.

## Request body

- object — A segment of a shipment plan.
  - `description` string — Description of the segment
  - `durationS` integer — Segment duration in seconds.
  - `name` string — Name of the segment
  - `trackingId` string — ID of the tracking device that produces data for this segment
  - `transportMode` 'car' | 'truck' | 'sea' | 'air' | 'undefined' — Transport mode of the segment

## Response `204`

Successful (no content)

The segment plan information was updated

## Other responses

- `400` — Bad request The request object is in an incorrect format or has values that are invalid or out of range. If available, further error details are provided in the response body.
- `401` — Unauthorized The request did not provide correct authentication details
- `403` — Forbidden The account does not have the correct privileges
- `404` — Not Found The specified resource was not found

---

[API](https://skmtc.net/here/apis/tracking.md) · [All operations](https://skmtc.net/here/apis/tracking/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/here/tracking/versions/efa162f7023c/schema)
