---
title: "Update a paced train"
method: PUT
path: "/train_schedules/{id}"
tags: ["timetable", "train_schedule"]
---

# Update a paced train

`PUT /train_schedules/{id}`

## Path parameters

- `id` integer, required

## Request body

- TrainSchedule
  - `category` union
    - object
      - `main_category` 'HIGH_SPEED_TRAIN' | 'INTERCITY_TRAIN' | 'REGIONAL_TRAIN' | 'NIGHT_TRAIN' | 'COMMUTER_TRAIN' | 'FREIGHT_TRAIN' | 'FAST_FREIGHT_TRAIN' | 'TRAM_TRAIN' | 'TOURISTIC_TRAIN' | 'WORK_TRAIN', required
    - object
      - `sub_category_code` string, required
  - `comfort` 'STANDARD' | 'AIR_CONDITIONING' | 'HEATING'
  - `constraint_distribution` 'STANDARD' | 'MARECO', required
  - `initial_speed` number, double
  - `labels` string[]
  - `margins` Margins
    - `boundaries` NonBlankString[], required
    - `values` string[], required — The values of the margins. Must contains one more element than the boundaries Can be a percentage `X%` or a time in minutes per 100 kilometer `Xmin/100km`
  - `options` TrainScheduleOptions
    - `stops_at_end_of_block` boolean
    - `use_electrical_profiles` boolean
    - `use_speed_limits_for_simulation` boolean
  - `path` PathItem[], required
    - `id` string, required — The unique identifier of the path item. This is used to reference path items in the train schedule.
    - `location` union, required — The location of a path waypoint
      - object
        - `offset` integer, required — Offset in mm
        - `track` string, required — Track section identifier
        - `type` 'track_offset', required
      - object
        - `local_track_name` string, nullable
        - `operational_point` union, required
          - object
            - `operational_point` string, required — The object id of an operational point
            - `type` 'id', required
          - object
            - `country_code` string, required
            - `main_code` string, required — The operational point main code
            - `secondary_code` string, nullable — An optional secondary code to identify a more specific location
            - `type` 'domestic', required
          - object
            - `secondary_code` string, nullable — An optional secondary code to identify a more specific location
            - `type` 'uic', required
            - `uic` integer, required — The [UIC](https://en.wikipedia.org/wiki/List_of_UIC_country_codes) code of an operational point
        - `type` 'operational_point_part_reference', required
  - `power_restrictions` object[]
    - `from` string, required
    - `to` string, required
    - `value` string, required
  - `rolling_stock_name` string, required
  - `schedule` ScheduleItem[]
    - `arrival` string, duration — Duration in ISO 8601 format (e.g. PT2H for 2 hours)
    - `at` string, required — Position on the path of the schedule item.
    - `reception_signal` 'OPEN' | 'STOP' | 'SHORT_SLIP_STOP' — State of the signal where the train is received for its stop. For (important) details, see <https://osrd.fr/en/docs/reference/design-docs/timetable/#modifiable-fields>.
    - `reference_base_arrival` string, duration — Duration in ISO 8601 format (e.g. PT2H for 2 hours)
    - `reference_position` integer, nullable
    - `stop_for` string, duration — Duration in ISO 8601 format (e.g. PT2H for 2 hours)
  - `speed_limit_tag` string, nullable
  - `start_time` integer, required — For calendar timetables: elapsed ms since 1970-01-01T00:00:00Z. For hourly timetables: elapsed ms since the timetable start.
  - `train_name` string, required
  - `paced` object, nullable
    - `exceptions` PacedTrainException[], required
      - `occurrence_index` integer
      - `constraint_distribution` ConstraintDistributionChangeGroup
        - `value` 'STANDARD' | 'MARECO', required
      - `initial_speed` InitialSpeedChangeGroup
        - `value` number, double, required
      - `labels` LabelsChangeGroup
        - `value` string[], required
      - `options` OptionsChangeGroup
        - `value` TrainScheduleOptions, required
          - `stops_at_end_of_block` boolean
          - `use_electrical_profiles` boolean
          - `use_speed_limits_for_simulation` boolean
      - `path_and_schedule` PathAndScheduleChangeGroup
        - `margins` Margins, required
          - `boundaries` NonBlankString[], required
          - `values` string[], required — The values of the margins. Must contains one more element than the boundaries Can be a percentage `X%` or a time in minutes per 100 kilometer `Xmin/100km`
        - `path` PathItem[], required
          - `id` string, required — The unique identifier of the path item. This is used to reference path items in the train schedule.
          - `location` union, required — The location of a path waypoint
            - object
              - …
            - object
              - …
        - `power_restrictions` PowerRestrictionItem[], required
          - `from` string, required
          - `to` string, required
          - `value` string, required
        - `schedule` ScheduleItem[], required
          - `arrival` string, duration — Duration in ISO 8601 format (e.g. PT2H for 2 hours)
          - `at` string, required — Position on the path of the schedule item.
          - `reception_signal` 'OPEN' | 'STOP' | 'SHORT_SLIP_STOP' — State of the signal where the train is received for its stop. For (important) details, see <https://osrd.fr/en/docs/reference/design-docs/timetable/#modifiable-fields>.
          - `reference_base_arrival` string, duration — Duration in ISO 8601 format (e.g. PT2H for 2 hours)
          - `reference_position` integer, nullable
          - `stop_for` string, duration — Duration in ISO 8601 format (e.g. PT2H for 2 hours)
      - `rolling_stock` RollingStockChangeGroup
        - `comfort` 'STANDARD' | 'AIR_CONDITIONING' | 'HEATING', required
        - `rolling_stock_name` string, required
      - `rolling_stock_category` RollingStockCategoryChangeGroup
        - `value` union
          - object
            - `main_category` 'HIGH_SPEED_TRAIN' | 'INTERCITY_TRAIN' | 'REGIONAL_TRAIN' | 'NIGHT_TRAIN' | 'COMMUTER_TRAIN' | 'FREIGHT_TRAIN' | 'FAST_FREIGHT_TRAIN' | 'TRAM_TRAIN' | 'TOURISTIC_TRAIN' | 'WORK_TRAIN', required
          - object
            - `sub_category_code` string, required
      - `speed_limit_tag` SpeedLimitTagChangeGroup
        - `value` string, nullable
      - `start_time` StartTimeChangeGroup
        - `value` integer, required — For calendar timetables: elapsed ms since 1970-01-01T00:00:00Z. For hourly timetables: elapsed ms since the timetable start.
      - `train_name` TrainNameChangeGroup
        - `value` string, required
      - `disabled` boolean
      - `id` integer, nullable — TODO The new exception table id (for incremental migration)
      - `key` string, required — Unique key for the exception within the paced train, required and generated by the frontend.
    - `interval` string, duration, required — Duration in ISO 8601 format (e.g. PT2H for 2 hours)
    - `time_window` string, duration, required — Duration in ISO 8601 format (e.g. PT2H for 2 hours)

## Response `204`

The paced train has been updated

---

[API](https://skmtc.net/openrailassociation/apis/osrd-editoast.md) · [All operations](https://skmtc.net/openrailassociation/apis/osrd-editoast/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openrailassociation/osrd-editoast/versions/1840dbbd64ac/schema)
