> ## 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 Calendar Event Impact Analysis

> Measure how local events (concerts, sports, festivals) impact mobility demand. Returns event-day vs baseline comparisons, impact analysis by event type, station-level impact during events, and demand multiplier forecasts for future event planning.

**Failure Modes:**
- **401**: Token is missing or invalid
- **403**: Insufficient permissions
- **404**: `no_data_binding` when the provider or location is not enabled for your company, or no data for that location and period
- **422**: Invalid filter parameters
- **500**: Internal server error

**Required Auth Scopes:**
- `copilot:analytics`



## OpenAPI

````yaml /api-reference/openapi.json get /copilot/station-based/{provider}/calendar_events
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:
  /copilot/station-based/{provider}/calendar_events:
    get:
      tags:
        - Station Based Analytics
      summary: Get Calendar Event Impact Analysis
      description: >-
        Measure how local events (concerts, sports, festivals) impact mobility
        demand. Returns event-day vs baseline comparisons, impact analysis by
        event type, station-level impact during events, and demand multiplier
        forecasts for future event planning.


        **Failure Modes:**

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

        - **403**: Insufficient permissions

        - **404**: `no_data_binding` when the provider or location is not
        enabled for your company, or no data for that location and period

        - **422**: Invalid filter parameters

        - **500**: Internal server error


        **Required Auth Scopes:**

        - `copilot:analytics`
      operationId: get_calendar_events
      parameters:
        - name: provider
          in: path
          required: true
          schema:
            type: string
            description: >-
              Identifier of the mobility provider whose data you analyse, e.g.
              `acme-bikes`. It must be the provider of a data source enabled for
              your company's station-based analytics; any other value is refused
              with 404 `no_data_binding` (`kind: source`). Your SWITCH contact
              tells you the provider identifiers and locations enabled for your
              company.
            title: Provider
          description: >-
            Identifier of the mobility provider whose data you analyse, e.g.
            `acme-bikes`. It must be the provider of a data source enabled for
            your company's station-based analytics; any other value is refused
            with 404 `no_data_binding` (`kind: source`). Your SWITCH contact
            tells you the provider identifiers and locations enabled for your
            company.
        - name: geolabel
          in: query
          required: true
          schema:
            type: string
            description: >-
              Location to analyse, e.g. `milan`: one of the locations (or their
              geolabels) that your company's station-based analytics are enabled
              for with this provider. Any other value is refused with 404
              `no_data_binding` (`kind: location`).
            title: Geolabel
          description: >-
            Location to analyse, e.g. `milan`: one of the locations (or their
            geolabels) that your company's station-based analytics are enabled
            for with this provider. Any other value is refused with 404
            `no_data_binding` (`kind: location`).
        - name: start_date
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: >-
              Start of the analysis period, an ISO 8601 date-time with a time
              zone, e.g. `2026-10-01T00:00:00Z`.
            title: Start Date
          description: >-
            Start of the analysis period, an ISO 8601 date-time with a time
            zone, e.g. `2026-10-01T00:00:00Z`.
        - name: end_date
          in: query
          required: true
          schema:
            type: string
            format: date-time
            description: >-
              End of the analysis period, an ISO 8601 date-time with a time
              zone, e.g. `2026-10-31T23:59:59Z`. Must be after `start_date`, at
              most 366 days later.
            title: End Date
          description: >-
            End of the analysis period, an ISO 8601 date-time with a time zone,
            e.g. `2026-10-31T23:59:59Z`. Must be after `start_date`, at most 366
            days later.
        - name: start_hour
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            maximum: 23
            minimum: 0
            description: >-
              First hour of the day to include (0-23, local time of the city).
              Set together with `end_hour`; both bounds are included.
            title: Start Hour
          description: >-
            First hour of the day to include (0-23, local time of the city). Set
            together with `end_hour`; both bounds are included.
        - name: end_hour
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            maximum: 23
            minimum: 0
            description: >-
              Last hour of the day to include (0-23, local time of the city),
              not before `start_hour`. Set together with `start_hour`.
            title: End Hour
          description: >-
            Last hour of the day to include (0-23, local time of the city), not
            before `start_hour`. Set together with `start_hour`.
      responses:
        '200':
          description: >-
            Event impact data retrieved. Returns system-wide impact summary,
            per-event-type analysis, station-level impact metrics, and demand
            multiplier forecasts.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalendarEventsResponse'
        '401':
          description: Unauthorized. Token is missing or invalid.
        '403':
          description: Forbidden. Insufficient permissions.
        '422':
          description: Unprocessable Entity. Validation failed.
        '500':
          description: Internal Server Error.
      security:
        - HTTPBearer: []
        - HTTPBearer: []
components:
  schemas:
    CalendarEventsResponse:
      properties:
        impact_summary:
          additionalProperties: true
          type: object
          title: Impact Summary
          description: System-wide impact summary comparing event vs normal days
          examples:
            - overall_comparison:
                - avg_vehicles_available: 12.5
                  is_event_day: false
                - avg_vehicles_available: 10.8
                  is_event_day: true
              percentage_changes:
                avg_vehicles_available: -0.136
              total_event_days: 25
              total_normal_days: 340
        event_type_analysis:
          additionalProperties: true
          type: object
          title: Event Type Analysis
          description: Analysis of impact by different event types
          examples:
            - impact_ranking:
                - - Concert
                  - impact_magnitude: 1.45
                    shortage_increase: 0.12
                - - Sports
                  - impact_magnitude: 1.23
                    shortage_increase: 0.08
        station_impact:
          additionalProperties:
            items:
              $ref: '#/components/schemas/StationEventImpactData'
            type: array
          type: object
          title: Station Impact
          description: Station-level impact analysis during events
          examples:
            - station_data:
                - event_avg_shortage_rate: 0.18
                  normal_avg_shortage_rate: 0.12
                  station_id: 123
                  station_name: Central Station
        event_forecasts:
          additionalProperties:
            additionalProperties:
              additionalProperties:
                type: number
              type: object
            type: object
          type: object
          title: Event Forecasts
          description: Demand multipliers by event type and hour for forecasting
          examples:
            - event_multipliers:
                Concert:
                  '8': 1.2
                  '9': 1.4
                  '18': 1.8
                  '19': 2.1
                Sports:
                  '14': 1.5
                  '15': 1.7
                  '16': 1.3
        events_covered:
          type: integer
          minimum: 0
          title: Events Covered
          description: Number of unique events found within the analysis period
          examples:
            - 15
            - 32
            - 8
        total_event_days:
          type: integer
          exclusiveMinimum: 0
          title: Total Event Days
          description: Total number of days in the analysis period
          examples:
            - 365
            - 180
            - 90
        events_in_period:
          items:
            $ref: '#/components/schemas/EventInPeriodData'
          type: array
          title: Events In Period
          description: List of all events occurring within the analysis period
          examples:
            - - end_date: '2024-09-20'
                event_name: Milan Fashion Week
                event_type: Fashion
                start_date: '2024-09-15'
                total_event_days: 6
        feasibility:
          type: string
          title: Feasibility
          description: Analysis feasibility status
          examples:
            - feasible
            - limited_data
            - insufficient_data
        message:
          type: string
          minLength: 1
          title: Message
          description: Detailed message about the analysis results and methodology
          examples:
            - Calendar events analysis using optimized single-query approach
            - Limited data available for comprehensive event analysis
      type: object
      required:
        - impact_summary
        - event_type_analysis
        - station_impact
        - event_forecasts
        - events_covered
        - total_event_days
        - events_in_period
        - feasibility
        - message
      title: CalendarEventsResponse
      description: Calendar events impact analysis response with comprehensive metrics.
      examples:
        - event_forecasts:
            event_multipliers:
              Concert:
                '18': 0.82
                '19': 0.71
                '23': 0.64
              Sports:
                '15': 0.88
                '17': 0.79
          event_type_analysis:
            impact_ranking:
              - - Concert
                - ebike_ratio_impact_pct: -9.7
                  impact_magnitude: 62.1
                  metrics:
                    avg_vehicles_available:
                      event: 5.8
                      normal: 6.9
                    capacity_stress:
                      event: 0.47
                      normal: 0.41
                    ebike_ratio:
                      event: 0.28
                      normal: 0.31
                    sample_size: 31200
                    shortage_rate:
                      event: 0.19
                      normal: 0.13
                  shortage_rate_impact_pct: 46.2
                  vehicle_availability_impact_pct: -15.9
              - - Sports
                - ebike_ratio_impact_pct: -3.2
                  impact_magnitude: 22.6
                  metrics:
                    avg_vehicles_available:
                      event: 6.4
                      normal: 6.9
                    capacity_stress:
                      event: 0.44
                      normal: 0.41
                    ebike_ratio:
                      event: 0.3
                      normal: 0.31
                    sample_size: 43100
                    shortage_rate:
                      event: 0.15
                      normal: 0.13
                  shortage_rate_impact_pct: 15.4
                  vehicle_availability_impact_pct: -7.2
          events_covered: 2
          events_in_period:
            - end_date: '2026-10-04'
              event_name: City Marathon
              event_type: Sports
              start_date: '2026-10-04'
              total_event_days: 1
            - end_date: '2026-10-18'
              event_name: Stadium Concert
              event_type: Concert
              start_date: '2026-10-17'
              total_event_days: 2
          feasibility: feasible
          impact_summary:
            overall_comparison:
              - avg_capacity_stress_mean: 0.41
                avg_ebike_ratio_mean: 0.31
                avg_shortage_rate_mean: 0.13
                avg_vehicles_available_mean: 6.9
                is_event_day: false
                total_records_sum: 812400
              - avg_capacity_stress_mean: 0.46
                avg_ebike_ratio_mean: 0.29
                avg_shortage_rate_mean: 0.17
                avg_vehicles_available_mean: 6.1
                is_event_day: true
                total_records_sum: 74300
            percentage_changes:
              avg_capacity_stress: 12.2
              avg_ebike_ratio: -6.5
              avg_shortage_rate: 30.8
              avg_vehicles_available: -11.6
            total_event_days: 74300
            total_normal_days: 812400
          message: >-
            Calendar events analysis using optimized single-query approach with
            comprehensive impact assessment.
          station_impact:
            station_data:
              - ebike_ratio: 0.3
                event_avg_ebike_ratio: 0.22
                event_avg_shortage_rate: 0.38
                event_avg_vehicles: 3.2
                normal_avg_shortage_rate: 0.11
                normal_avg_vehicles: 7.4
                station_id: 412
                station_latitude: 45.4781
                station_longitude: 9.124
                station_name: San Siro Stadio
          total_event_days: 31
    StationEventImpactData:
      properties:
        station_id:
          anyOf:
            - type: integer
            - type: string
          title: Station Id
          description: Unique identifier for the bike sharing station
          examples:
            - 123
            - station_456
            - ST_789
        station_name:
          type: string
          minLength: 1
          title: Station Name
          description: Human-readable name of the station
          examples:
            - Central Station
            - Park Avenue
            - Main Square
        station_latitude:
          type: number
          maximum: 90
          minimum: -90
          title: Station Latitude
          description: Station latitude in decimal degrees
          examples:
            - 45.464664
            - 40.7128
            - 51.5074
        station_longitude:
          type: number
          maximum: 180
          minimum: -180
          title: Station Longitude
          description: Station longitude in decimal degrees
          examples:
            - 9.18854
            - -74.006
            - -0.1278
        normal_avg_shortage_rate:
          type: number
          maximum: 1
          minimum: 0
          title: Normal Avg Shortage Rate
          description: Average shortage rate on normal days
          examples:
            - 0.12
            - 0.08
            - 0.25
        event_avg_shortage_rate:
          type: number
          maximum: 1
          minimum: 0
          title: Event Avg Shortage Rate
          description: Average shortage rate during events
          examples:
            - 0.18
            - 0.15
            - 0.42
        normal_avg_vehicles:
          type: number
          minimum: 0
          title: Normal Avg Vehicles
          description: Average vehicles available on normal days
          examples:
            - 8.5
            - 12.3
            - 15.7
        event_avg_vehicles:
          type: number
          minimum: 0
          title: Event Avg Vehicles
          description: Average vehicles available during events
          examples:
            - 6.2
            - 9.8
            - 12.4
        ebike_ratio:
          type: number
          maximum: 1
          minimum: 0
          title: Ebike Ratio
          description: Average e-bike ratio on normal days
          examples:
            - 0.35
            - 0.42
            - 0.58
        event_avg_ebike_ratio:
          type: number
          maximum: 1
          minimum: 0
          title: Event Avg Ebike Ratio
          description: Average e-bike ratio during events
          examples:
            - 0.28
            - 0.38
            - 0.52
      type: object
      required:
        - station_id
        - station_name
        - station_latitude
        - station_longitude
        - normal_avg_shortage_rate
        - event_avg_shortage_rate
        - normal_avg_vehicles
        - event_avg_vehicles
        - ebike_ratio
        - event_avg_ebike_ratio
      title: StationEventImpactData
      description: Station-level event impact metrics.
    EventInPeriodData:
      properties:
        event_name:
          type: string
          minLength: 1
          title: Event Name
          description: Name of the event
          examples:
            - Milan Fashion Week
            - Salone del Mobile
            - Christmas Markets
        event_type:
          type: string
          minLength: 1
          title: Event Type
          description: Category of the event
          examples:
            - Fashion
            - Design
            - Holiday
        start_date:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          title: Start Date
          description: Event start date in YYYY-MM-DD format
          examples:
            - '2024-09-15'
            - '2024-04-10'
            - '2024-12-01'
        end_date:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          title: End Date
          description: Event end date in YYYY-MM-DD format
          examples:
            - '2024-09-20'
            - '2024-04-15'
            - '2024-12-25'
        total_event_days:
          type: integer
          minimum: 1
          title: Total Event Days
          description: Total duration of the event in days
          examples:
            - 6
            - 5
            - 25
      type: object
      required:
        - event_name
        - event_type
        - start_date
        - end_date
        - total_event_days
      title: EventInPeriodData
      description: Event occurrence data within the analysis period.
  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.