---
title: "GET /sub_category"
method: GET
path: "/sub_category"
tags: ["sub_categories"]
---

# GET /sub_category

`GET /sub_category`

## Query parameters

- `page` integer
- `page_size` integer

## Response `200`

The list of sub categories

- SubCategoryPage — Statistics about a paginated editoast response Provides the pagination settings issued in the request alongside a few convenience fields useful to navigate the paginated results. # Expected usage This struct is meant to be used and flattened in the response of a paginated query. ``` #[derive(Serialize, ToSchema)] struct MyPaginatedResponse { #[schema(flatten)] pagination: PaginationStats, result: Vec<MyData>, // any other field that makes sense in a paginated response } ``` We named the data field `result` to cope with the old pagination schema which enforced this name. For new paginated responses, the field name is up to your imagination :)
  - `count` integer, required — The total number of items
  - `current` integer, required — The current page number
  - `next` integer, nullable, required — The next page number, if any
  - `page_count` integer, required — The total number of pages
  - `page_size` integer, required — The number of items per page
  - `previous` integer, nullable, required — The previous page number, if any
  - `results` SubCategory[], required
    - `background_color` string, required — Represents a color for a sub-category in hexadecimal format #RRGGBB.
    - `code` string, required
    - `color` string, required — Represents a color for a sub-category in hexadecimal format #RRGGBB.
    - `hovered_color` string, required — Represents a color for a sub-category in hexadecimal format #RRGGBB.
    - `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
    - `name` string, 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)
