---
title: "## Important:
The following train schedules are **excluded** from the result:
- train schedules for which pathfinding fails
- train schedules for which the simulation fails
- train schedules for which the simulation does not respect schedule times"
method: POST
path: "/train_schedules/occupancy_blocks"
tags: ["train_schedule"]
---

# ## Important:
The following train schedules are **excluded** from the result:
- train schedules for which pathfinding fails
- train schedules for which the simulation fails
- train schedules for which the simulation does not respect schedule times

`POST /train_schedules/occupancy_blocks`

## Request body

- OccupancyBlockForm
  - `electrical_profile_set_id` integer, nullable
  - `ids` integer[], required
  - `infra_id` integer, required
  - `path` CoreTrainPath, required — A valid train path, as returned from the pathfinding. Can be used as-is as input for other endpoints.
    - `blocks` CoreObjectRange[], required — Block ranges, in order.
      - `begin` integer, required — The beginning of the range in mm.
      - `end` integer, required — The end of the range in mm.
      - `id` string, required — The object identifier.
    - `routes` CoreObjectRange[], required — Route ranges, in order.
      - `begin` integer, required — The beginning of the range in mm.
      - `end` integer, required — The end of the range in mm.
      - `id` string, required — The object identifier.
    - `track_section_ranges` CoreTrackRange[], required — Track section ranges, in order.
      - `begin` integer, required — The beginning of the range in mm.
      - `direction` 'START_TO_STOP' | 'STOP_TO_START', required
      - `end` integer, required — The end of the range in mm.
      - `track_section` string, required — The track section identifier.
  - `timetable_id` integer, required

## Response `200`

- object

---

[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/revisions/1840dbbd64ac/schema)
