> ## Documentation Index
> Fetch the complete documentation index at: https://stage-docs.getswitch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Station by ID

> Get one station by ID.

**Failure Modes:**
- **401**: Token is missing or invalid
- **403**: Insufficient permissions, or the station belongs to a company you cannot access
- **404**: No station with this ID

**Required Auth Scopes:**
- `stations:read`



## OpenAPI

````yaml /api-reference/openapi.json get /operations/stations/{station_id}
openapi: 3.1.0
info:
  title: SWITCH API
  version: '1.0'
  description: >-
    The SWITCH API gives mobility and logistics teams programmatic access to
    SWITCH forecasts, fleet operations, routing and analytics. Every request is
    authenticated with an API key sent as a bearer token.
servers:
  - url: https://stage-api.getswitch.io
    description: Stage
security: []
tags:
  - name: Forecast
    description: Demand forecasts per zone and time window.
  - name: Operations
    description: Fleet imbalance, rebalancing suggestions and generated tasks.
  - name: Routing
    description: Route optimisation for single and multiple fleets.
  - name: Routing Sessions
    description: Saved routing sessions, their routes and drivers.
  - name: Routing Operations
    description: Complete, undo and re-route the stops of a route.
  - name: Fleet Management
    description: Your depots, stations, drivers and cargo vehicles.
  - name: Integrations
    description: Vehicles, statuses and commands on your fleet platform.
  - name: Station Based Analytics
    description: Analytics for station-based (docked) services.
  - name: Zone Based Analytics
    description: Analytics for free-floating services, by zone.
  - name: Free Float Analytics
    description: Trip history for free-floating services.
  - name: Transit Analytics
    description: Punctuality and service delivery for public transit.
  - name: Live
    description: Real-time fleet, delivery and transit status.
  - name: Grids
    description: Spatial grids used by forecasts and analytics.
  - name: API Keys
    description: Create and manage the API keys you call this API with.
paths:
  /operations/stations/{station_id}:
    get:
      tags:
        - Fleet Management
      summary: Get Station by ID
      description: >-
        Get one station by ID.


        **Failure Modes:**

        - **401**: Token is missing or invalid

        - **403**: Insufficient permissions, or the station belongs to a company
        you cannot access

        - **404**: No station with this ID


        **Required Auth Scopes:**

        - `stations:read`
      operationId: get_station_by_id
      parameters:
        - name: station_id
          in: path
          required: true
          schema:
            type: integer
            description: ID of the station.
            title: Station Id
          description: ID of the station.
      responses:
        '200':
          description: >-
            Station retrieved successfully. Returns the complete station profile
            including coordinates, capacity, optional polygon boundary, and
            company ownership.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StationPublic'
        '401':
          description: >-
            Unauthorized. Token is missing, invalid, malformed, expired, or
            revoked.
        '403':
          description: >-
            Forbidden. The authenticated user does not have sufficient
            permissions to read stations.
        '404':
          description: Not Found. No station exists with the specified ID in the system.
        '422':
          description: >-
            Unprocessable Entity. Request validation failed due to malformed
            data, missing required fields, or invalid field types.
        '500':
          description: Internal Server Error.
      security:
        - HTTPBearer: []
        - HTTPBearer: []
components:
  schemas:
    StationPublic:
      properties:
        id:
          type: integer
          title: Id
          description: Unique ID.
          examples:
            - 1
        name:
          type: string
          title: Name
          description: Station name.
          examples:
            - Duomo
        address:
          type: string
          title: Address
          description: Full address.
          examples:
            - Piazza del Duomo, 20122 Milano MI
        max_capacity:
          type: integer
          title: Max Capacity
          description: Maximum number of vehicles the station holds.
          examples:
            - 20
        latitude:
          type: number
          title: Latitude
          description: Latitude.
          examples:
            - 45.4642
        longitude:
          type: number
          title: Longitude
          description: Longitude.
          examples:
            - 9.19
        polygon:
          items:
            items:
              type: number
            type: array
          type:
            - array
            - 'null'
          title: Polygon
          description: >-
            Station area as a closed ring of `[longitude, latitude]` pairs;
            absent when the station has none.
          examples:
            - - - 9.1893
                - 45.4638
              - - 9.1907
                - 45.4638
              - - 9.1907
                - 45.4647
              - - 9.1893
                - 45.4647
              - - 9.1893
                - 45.4638
        company_slug:
          type: string
          title: Company Slug
          description: Owning company slug.
          examples:
            - acme-mobility
        company_name:
          type: string
          title: Company Name
          description: Owning company display name.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Datetime when the record was created.
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
          title: Updated At
          description: Datetime when the record was last updated, if ever.
      type: object
      required:
        - id
        - name
        - address
        - max_capacity
        - latitude
        - longitude
        - company_slug
        - company_name
        - created_at
      title: StationPublic
      description: |-
        Public schema for a station resource.

        Exposes station details to API consumers, including coordinates,
        capacity, optional polygon boundary, and company ownership.
      examples:
        - address: Piazza del Duomo, 20122 Milano MI
          company_name: Acme Mobility
          company_slug: acme-mobility
          created_at: '2026-09-18T10:05:00Z'
          id: 21
          latitude: 45.4642
          longitude: 9.19
          max_capacity: 20
          name: Duomo
          polygon:
            - - 9.1893
              - 45.4638
            - - 9.1907
              - 45.4638
            - - 9.1907
              - 45.4647
            - - 9.1893
              - 45.4647
            - - 9.1893
              - 45.4638
          updated_at: '2026-11-03T08:31:00Z'
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: >-
        An API key, sent as `Authorization: Bearer <key>`. Create one in the
        SWITCH Copilot under **Settings → API keys** (needs the API keys
        permission in your company), or with `POST /auth/api-keys`. The key is
        shown once, at creation.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.