Betriebsstellen icon

Betriebsstellen

This REST-API enables you to query station and stop infos

COMMUNITYNO AUTH0 INSTALLS
OpenAPI Specificationv3.0
{
  "swagger": "2.0",
  "schemes": [
    "https",
    "http"
  ],
  "host": "api.deutschebahn.com",
  "basePath": "/betriebsstellen/v1",
  "info": {
    "contact": {
      "email": "Joachim.Schirrmacher@deutschebahn.com",
      "name": "DB Systel GmbH"
    },
    "description": "This REST-API enables you to query station and stop infos",
    "termsOfService": "https://developer.deutschebahn.com/store/",
    "title": "Betriebsstellen",
    "version": "v1",
    "x-apisguru-categories": [
      "transport",
      "open_data"
    ],
    "x-logo": {
      "backgroundColor": "#FFFFFF",
      "url": "https://api.apis.guru/v2/cache/logo/https_pbs.twimg.com_profile_images_591140150413025280_Cjcqjl2J.png"
    },
    "x-origin": [
      {
        "format": "swagger",
        "url": "https://developer.deutschebahn.com/store/api-docs/DBOpenData/Betriebsstellen/v1",
        "version": "2.0"
      }
    ],
    "x-providerName": "deutschebahn.com",
    "x-serviceName": "betriebsstellen"
  },
  "securityDefinitions": {},
  "tags": [
    {
      "name": "API"
    }
  ],
  "paths": {
    "/betriebsstellen": {
      "get": {
        "description": "Get all station and stop infos",
        "parameters": [
          {
            "description": "A station name or part of it",
            "in": "query",
            "name": "name",
            "required": false,
            "type": "string"
          }
        ],
        "produces": [
          "application/json"
        ],
        "responses": {
          "200": {
            "description": "List was generated",
            "schema": {
              "$ref": "#/definitions/StationList"
            }
          },
          "404": {
            "description": "No stations or stops could be found matching the given name",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "416": {
            "description": "Filtering required - specify a name fragment of at least 3 characters",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "summary": "Get information of stations matching a given text",
        "x-auth-type": "Application & Application User",
        "x-throttling-tier": "Unlimited"
      }
    },
    "/betriebsstellen/{abbrev}": {
      "get": {
        "description": "Get information about a specific station or stop by abbrevation",
        "parameters": [
          {
            "description": "Station or stop abbrevation",
            "in": "path",
            "name": "abbrev",
            "required": true,
            "type": "string"
          }
        ],
        "responses": {
          "200": {
            "description": "Entry found",
            "schema": {
              "$ref": "#/definitions/Station"
            }
          },
          "404": {
            "description": "Entry not found",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        },
        "summary": "Get information about a specific station or stop by abbrevation",
        "x-auth-type": "Application & Application User",
        "x-throttling-tier": "Unlimited"
      }
    }
  },
  "definitions": {
    "Error": {
      "properties": {
        "code": {
          "format": "int32",
          "type": "integer"
        },
        "message": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "Station": {
      "properties": {
        "RB": {
          "description": "Regional code",
          "type": "integer"
        },
        "UIC": {
          "description": "UIC RICS code",
          "type": "string"
        },
        "abbrev": {
          "description": "Abbrevation name of station or halt",
          "type": "string"
        },
        "borderStation": {
          "description": "Station is at a country border",
          "type": "boolean"
        },
        "id": {
          "description": "Identifying number",
          "type": "integer"
        },
        "locationCode": {
          "description": "Primary location code",
          "type": "string"
        },
        "name": {
          "description": "Long name of station or halt",
          "type": "string"
        },
        "short": {
          "description": "Short name of station or halt",
          "type": "string"
        },
        "status": {
          "description": "State of operation",
          "enum": [
            "in use",
            "out of service",
            "formerly",
            "planned",
            "study"
          ],
          "type": "string"
        },
        "timeTableRelevant": {
          "description": "Relevant for time table",
          "type": "boolean"
        },
        "type": {
          "description": "Type of station or halt",
          "enum": [
            "Abzw",
            "Anst",
            "Awanst",
            "Bf"
          ],
          "type": "string"
        },
        "validFrom": {
          "description": "Start date for validity",
          "type": "string"
        },
        "validTill": {
          "description": "End date for validity or null if still valid",
          "type": "string"
        }
      },
      "type": "object"
    },
    "StationList": {
      "items": {
        "$ref": "#/definitions/Station"
      },
      "type": "array"
    }
  }
}