---
title: "POST /train_schedules/track_occupancy"
method: POST
path: "/train_schedules/track_occupancy"
tags: ["train_schedule"]
---

# POST /train_schedules/track_occupancy

`POST /train_schedules/track_occupancy`

## Request body

- object
  - `electrical_profile_set_id` integer, nullable
  - `infra_id` integer, required
  - `operational_point_reference` 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
  - `timetable_id` integer, required
  - `train_schedule_ids` integer[], required
  - `use_simulation` boolean, required

## Response `200`

Track section occupancy periods for train schedules

- object[]
  - `local_track_name` string, nullable — Local track name. Unset if trains occupy the operational point but the specific track is unknown.
  - `trains` union[], required
    - union
      - object
        - `index` integer, required
        - `train_schedule_id` integer, required
        - `type` 'base', required
        - `duration` string, required
        - `time_begin` integer, required
        - `path_item_relative_location` union, required — Position of an operational point on a path, relative to the input path items. If the OP matches an input path item, it is located using this path item's ID, else, if the path just passes by the OP, it is located using its previous and following path items IDs
          - object
            - `path_item_id` string, required
            - `type` 'exact_path_item', required
          - object
            - `following_path_item_id` string, required
            - `previous_path_item_id` string, required
            - `type` 'between_path_items', required
      - object
        - `exception_id` integer, required
        - `index` integer, required
        - `train_schedule_id` integer, required
        - `type` 'modified', required
        - `duration` string, required
        - `time_begin` integer, required
        - `path_item_relative_location` union, required — Position of an operational point on a path, relative to the input path items. If the OP matches an input path item, it is located using this path item's ID, else, if the path just passes by the OP, it is located using its previous and following path items IDs
          - object
            - `path_item_id` string, required
            - `type` 'exact_path_item', required
          - object
            - `following_path_item_id` string, required
            - `previous_path_item_id` string, required
            - `type` 'between_path_items', required
      - object
        - `exception_id` integer, required
        - `train_schedule_id` integer, required
        - `type` 'created', required
        - `duration` string, required
        - `time_begin` integer, required
        - `path_item_relative_location` union, required — Position of an operational point on a path, relative to the input path items. If the OP matches an input path item, it is located using this path item's ID, else, if the path just passes by the OP, it is located using its previous and following path items IDs
          - object
            - `path_item_id` string, required
            - `type` 'exact_path_item', required
          - object
            - `following_path_item_id` string, required
            - `previous_path_item_id` string, required
            - `type` 'between_path_items', required

---

[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)
