Composition

Describes train's locomotives and wagons

TransportationOpen DataGovernmentTrafficRailwaysMaritimeRoadsFinlandReal-Time

Properties

Name Type Description
trainNumber integer Identifies the train inside a single departure date
departureDate string Date of the train's first departure
operatorUICCode integer Official UIC code of the operator
operatorShortCode string Short code of the operator
trainCategory string
trainType string
version integer When was this data last modified
journeySections array
View JSON Schema on GitHub

JSON Schema

digitraffic-fi-composition-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/digitraffic-fi/json-schema/digitraffic-fi-composition-schema.json",
  "title": "Composition",
  "description": "Describes train's locomotives and wagons",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/digitraffic-fi-rail-api-openapi.yml#/components/schemas/Composition",
  "required": [
    "departureDate",
    "trainCategory",
    "trainNumber",
    "trainType"
  ],
  "type": "object",
  "properties": {
    "trainNumber": {
      "type": "integer",
      "description": "Identifies the train inside a single departure date",
      "format": "int64"
    },
    "departureDate": {
      "type": "string",
      "description": "Date of the train's first departure",
      "format": "date"
    },
    "operatorUICCode": {
      "type": "integer",
      "description": "Official UIC code of the operator",
      "format": "int32"
    },
    "operatorShortCode": {
      "type": "string",
      "description": "Short code of the operator"
    },
    "trainCategory": {
      "type": "string"
    },
    "trainType": {
      "type": "string"
    },
    "version": {
      "type": "integer",
      "description": "When was this data last modified",
      "format": "int64"
    },
    "journeySections": {
      "uniqueItems": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/JourneySection"
      }
    }
  },
  "$defs": {
    "CompositionTimeTableRow": {
      "title": "CompositionTimeTableRow",
      "type": "object",
      "properties": {
        "stationShortCode": {
          "type": "string"
        },
        "stationUICCode": {
          "type": "integer",
          "format": "int32"
        },
        "countryCode": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "enum": [
            "ARRIVAL",
            "DEPARTURE"
          ]
        },
        "scheduledTime": {
          "type": "string",
          "format": "date-time"
        }
      },
      "description": "Describes a point in a trains schedule where its composition changes"
    },
    "JourneySection": {
      "title": "JourneySection",
      "type": "object",
      "properties": {
        "beginTimeTableRow": {
          "$ref": "#/$defs/CompositionTimeTableRow"
        },
        "endTimeTableRow": {
          "$ref": "#/$defs/CompositionTimeTableRow"
        },
        "locomotives": {
          "uniqueItems": true,
          "type": "array",
          "description": "List of locomotives used on this leg",
          "items": {
            "$ref": "#/$defs/Locomotive"
          }
        },
        "wagons": {
          "uniqueItems": true,
          "type": "array",
          "description": "List of wagons used on this leg",
          "items": {
            "$ref": "#/$defs/Wagon"
          }
        },
        "totalLength": {
          "type": "integer",
          "description": "Total length of the train with an accuracy of 1 m",
          "format": "int32"
        },
        "maximumSpeed": {
          "type": "integer",
          "description": "Maximum with an accuracy of 1 km/h",
          "format": "int32"
        }
      },
      "description": "Describes a leg where train's composition is in effect"
    },
    "Locomotive": {
      "title": "Locomotive",
      "type": "object",
      "properties": {
        "location": {
          "type": "integer",
          "description": "Location of the locomotive in the train. 1=start of the train",
          "format": "int32"
        },
        "locomotiveType": {
          "type": "string"
        },
        "powerType": {
          "type": "string"
        },
        "vehicleNumber": {
          "type": "string"
        }
      },
      "description": "List of locomotives used on this leg"
    },
    "Wagon": {
      "title": "Wagon",
      "type": "object",
      "properties": {
        "wagonType": {
          "type": "string"
        },
        "location": {
          "type": "integer",
          "format": "int32"
        },
        "salesNumber": {
          "type": "integer",
          "description": "Wagon number in customer's ticket",
          "format": "int32"
        },
        "length": {
          "type": "integer",
          "description": "Wagon length in centimeters",
          "format": "int32"
        },
        "playground": {
          "type": "boolean"
        },
        "pet": {
          "type": "boolean"
        },
        "catering": {
          "type": "boolean"
        },
        "video": {
          "type": "boolean"
        },
        "luggage": {
          "type": "boolean"
        },
        "smoking": {
          "type": "boolean"
        },
        "disabled": {
          "type": "boolean"
        },
        "vehicleNumber": {
          "type": "string"
        }
      },
      "description": "List of wagons used on this leg"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/digitraffic-fi-composition"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.