### GET /stops/{stopId}/schedule Source: https://api.winnipegtransit.com/home/api/v4/example Retrieves real-time schedule information for a specific transit stop. The results are updated based on live vehicle data and provide estimated and scheduled departure times. ```APIDOC ## GET /stops/{stopId}/schedule ### Description Retrieves real-time schedule information for a specific transit stop. The results are updated based on live vehicle data and provide estimated and scheduled departure times. ### Method GET ### Endpoint /stops/{stopId}/schedule ### Parameters #### Path Parameters - **stopId** (integer) - Required - The unique identifier for the transit stop. #### Query Parameters - **max-results-per-route** (integer) - Optional - The maximum number of results to return for each route. - **api-key** (string) - Required - Your API key for authentication. ### Request Example ``` https://api.winnipegtransit.com/v4/stops/10541/schedule?max-results-per-route=2&api-key=YOUR-API-KEY ``` ### Response #### Success Response (200) - **stop** (object) - Information about the stop. - **stopId** (integer) - The ID of the stop. - **name** (string) - The name of the stop. - **latitude** (number) - The latitude coordinate of the stop. - **longitude** (number) - The longitude coordinate of the stop. - **route_id** (integer) - The ID of the route. - **route_name** (string) - The name of the route. - **route_type** (string) - The type of route (e.g., "Normal", "Limited"). - **direction** (string) - The direction of the route. - **is_accessible** (boolean) - Indicates if the stop is accessible. - **route_schedules** (array) - A list of schedules for different routes serving this stop. - **route** (object) - Information about the route. - **route_id** (integer) - The ID of the route. - **route_name** (string) - The name of the route. - **route_type** (string) - The type of route. - **direction** (string) - The direction of the route. - **scheduled_stops** (array) - A list of scheduled departures for this route at this stop. - **estimated_departure_time** (string) - The estimated departure time in ISO 8601 format. - **scheduled_departure_time** (string) - The scheduled departure time in ISO 8601 format. - **variant** (string) - The route variant identifier. - **bus** (object) - Information about the bus. - **bus_id** (integer) - The ID of the bus. - **has_bike_rack** (boolean) - Indicates if the bus has a bike rack. - **has_wifi** (boolean) - Indicates if the bus has WiFi. #### Response Example ```json { "stop": { "stopId": 10541, "name": "Osborne Blvd at Gertrude Ave", "latitude": 49.87887, "longitude": -97.13096, "route_id": 1, "route_name": "1-Osborne", "route_type": "Normal", "direction": "Northbound", "is_accessible": true }, "route_schedules": [ { "route": { "route_id": 1, "route_name": "1-Osborne", "route_type": "Normal", "direction": "Northbound" }, "scheduled_stops": [ { "estimated_departure_time": "2023-10-27T10:05:00Z", "scheduled_departure_time": "2023-10-27T10:05:00Z", "variant": "WB", "bus": { "bus_id": 123, "has_bike_rack": true, "has_wifi": false } }, { "estimated_departure_time": "2023-10-27T10:20:00Z", "scheduled_departure_time": "2023-10-27T10:20:00Z", "variant": "WB", "bus": { "bus_id": 456, "has_bike_rack": false, "has_wifi": true } } ] } ] } ``` ``` -------------------------------- ### GET /stops/{stopId}/schedule Source: https://api.winnipegtransit.com/home/api/v4/services/stop-schedules Retrieves schedule information for a specified stop. You can filter by time range, specific routes, and the number of results per route. ```APIDOC ## GET /stops/{stopId}/schedule ### Description Returns the schedule information for the requested stop. ### Method GET ### Endpoint /stops/{stopId}/schedule ### Parameters #### Path Parameters - **stopId** (string) - Required - The identifier of the stop. #### Query Parameters - **start** (string) - Optional - The start time in YYYY-mm-ddTHH:MM:SS or HH:MM:SS format. Defaults to now. - **end** (string) - Optional - The end time in YYYY-mm-ddTHH:MM:SS or HH:MM:SS format. Defaults to two hours after the start time. - **route** (string) - Optional - The route or comma-delimited list of routes to display. By default, returns all routes at this stop. - **max-results-per-route** (integer) - Optional - The maximum number of scheduled stop times to return for each route at this stop. - **usage** (string) - Optional - The style of names to return. Options: 'long' (default), 'short'. - **json-camel-case** (boolean) - Optional - Return camelCase keys when returning data in JSON format. Options: 'true', 'false' (default). ### Request Example ``` GET /stops/10171/schedule?start=2025-11-22T00:16:21&route=D19 ``` ### Response #### Success Response (200) - **stop** (object) - The stop that the schedule information is for. - **route-schedules** (array) - A route schedule is returned for each route that observes the stop. - **route-schedule/route** (object) - Basic route information. - **route-schedule/scheduled-stops** (array) - Each route-schedule contains a list of scheduled-stops. - **scheduled-stop/key** (string) - A unique identifier for this scheduled-stop. - **scheduled-stop/trip-key** (string) - A unique identifier for the trip the bus is on. - **scheduled-stop/cancelled** (boolean) - A boolean indicating whether this scheduled stop has been cancelled. - **scheduled-stop/times/arrival/scheduled** (string) - The time that the bus is scheduled to arrive at the stop. - **scheduled-stop/times/arrival/estimated** (string) - The current estimated arrival time of the bus at the stop. - **scheduled-stop/times/departure/scheduled** (string) - The time that the bus is scheduled to leave the stop. - **scheduled-stop/times/departure/estimated** (string) - The current estimated time that the bus will leave the stop. - **scheduled-stop/variant** (object) - The variant of the route which the passing bus belongs to. - **scheduled-stop/bus** (object) - Information about the passing bus. - **bus/key** (string) - A unique identifier for the bus. - **bus/bike-rack** (boolean) - Boolean field describing whether or not the bus has a bike rack. - **bus/wifi** (boolean) - Boolean field describing whether or not the bus has wifi. #### Response Example ```json { "stop": { "route-schedules": [ { "route-schedule": { "route": { "xlink:href": "/routes/D19" }, "scheduled-stops": [ { "scheduled-stop": { "key": "12345", "trip-key": "trip67890", "cancelled": false, "times": { "arrival": { "scheduled": "2025-11-22T01:00:00", "estimated": "2025-11-22T01:02:00" }, "departure": { "scheduled": "2025-11-22T01:01:00", "estimated": "2025-11-22T01:03:00" } }, "variant": { "xlink:href": "/variants/short-turn" }, "bus": { "key": "busABC", "bike-rack": true, "wifi": false } } } ] } } ] } } ``` ``` -------------------------------- ### API Overview (v4) Source: https://api.winnipegtransit.com/home/api/v4/index Provides an overview of the Winnipeg Transit Open Data Web Service API (v4) and how to access real-time transit data. ```APIDOC ## API Overview (v4) Winnipeg Transit's Open Data Web Service provides a way for you to retrieve live information about Winnipeg Transit's services by sending GET requests to URLs like: `https://api.winnipegtransit.com/web-service-path?and=parameters`. Data is returned in XML format by default. JSON data can be requested by appending ".json" to the path. Real-time information includes: * The status of city-wide service * Which individual buses are delayed and by how much * Estimated arrival times of buses at stops ## Static Schedule Data All static schedule data is available for download in a single file, updated daily and adhering to the General Transit Feed Specification. ``` -------------------------------- ### API Key and Request Throttling Source: https://api.winnipegtransit.com/home/api/v4/index Information on how to obtain and use an API key, and details on request throttling limits. ```APIDOC ## API Key Once you've signed up for an account, you will be given an API key. This key must be included in all requests you make. Example: `https://api.winnipegtransit.com/v4/stops/10064?api-key=YOUR-API-KEY` ## Request Throttling Each API key is allowed 100 requests per IP address per minute to prevent server overload. ``` -------------------------------- ### URL Types and Query Parameters Source: https://api.winnipegtransit.com/home/api/v4/index Explains the three types of URL requests (identity, filter, wildcard) and common URL parameters. ```APIDOC ## URL Types ### Identity Queries Identity queries return a single result by specifying the unique identifier (ID) of the desired resource. Example: `https://api.winnipegtransit.com/v4/stops/10064?api-key=YOUR-API-KEY` ### Filter Queries Filter queries return results according to specified URL parameters, such as filtering stops by coordinates and distance. Example: `https://api.winnipegtransit.com/v4/stops?x=633861&y=5525798&distance=100&api-key=YOUR-API-KEY` ### Wildcard Queries Wildcard queries match on a string, useful for looking up resources by name. Can return multiple results. Example: `https://api.winnipegtransit.com/v4/stops:glas?api-key=YOUR-API-KEY` ## Common URL Parameters * **usage** (string): The style of names to return. * `long`: The default, yields more verbose names. * `short`: Yields terser names. * **json-camel-case** (boolean): Return camelCase keys when returning data in JSON format. * `false`: The default, legacy behavior. Returns hyphenated keys (e.g., 'stop-schedule'). * `true`: Returns camelCase keys (e.g., 'stopSchedule'). ``` -------------------------------- ### API Versions Source: https://api.winnipegtransit.com/home/api/v4/index How to specify the API version (v4, v3, v2) in your requests. ```APIDOC ## API Versions To specify the version of our API you wish to use, prepend the version key to the beginning of a request. * **Version v4:** `https://api.winnipegtransit.com/v4/stops/10064?api-key=YOUR-API-KEY` * **Version v3:** `https://api.winnipegtransit.com/v3/stops/10064?api-key=YOUR-API-KEY` * **Version v2:** `https://api.winnipegtransit.com/v2/stops/10064?api-key=YOUR-API-KEY` ``` -------------------------------- ### JSON Response Format Source: https://api.winnipegtransit.com/home/api/v4/index How to request and format JSON responses, including the use of camelCase keys. ```APIDOC ## JSON You can retrieve JSON results for any web service by adding ".json" to the end of the path (before the URL parameters). Examples: * `https://api.winnipegtransit.com/v4/stops/10064.json?api-key=YOUR-API-KEY` * `https://api.winnipegtransit.com/v4/stops.json?x=633861&y=5525798&radius=100&api-key=YOUR-API-KEY` * `https://api.winnipegtransit.com/v4/stops:glas.json?api-key=YOUR-API-KEY` Beginning in API v4, return JSON result keys in camelCase by passing `json-camel-case=true` in your request. ``` -------------------------------- ### Stops API - Overview Source: https://api.winnipegtransit.com/home/api/v4/services/stops This section outlines the core functionality of the Stops API within version 4 of the Winnipeg Transit Open Data Web Service. It details the introduction of 'effective-from' and 'effective-to' attributes for results and the 'effective-on' query parameter. ```APIDOC ## Stops API (v4) ### Description Provides information about bus stops. This version introduces effective times for service data, allowing queries based on when specific service information is valid. ### Method GET ### Endpoint `/stops` ### Query Parameters - **effective-on** (string) - Optional - Return stop(s) in effect at the provided time. Allows querying for stops in future service that hasn't started yet. - **street** (string) - Optional - Only return stops on the street identified by the given street key. - **route** (string) - Optional - Only return stops observed by the route identified by the given route number. - **variant** (string) - Optional - Only return stops observed by the variant identified by the given variant key. - **x** (number) - Optional - Find stops near the given UTM X coordinate. Use with 'y' and 'distance'. - **y** (number) - Optional - Find stops near the given UTM Y coordinate. Use in conjunction with 'x' and 'distance'. - **lat** (number) - Optional - Find stops near the given latitude. Use with 'lon' and 'distance'. - **lon** (number) - Optional - Find stops near the given longitude. Use with 'lat' and 'distance'. - **distance** (number) - Optional - The maximum distance (in metres) from the given point that returned stops can be. (default: 100) - **walking** (boolean) - Optional - If set to true, the distance is calculated as walking distance. If set to false, the distance is as-the-crow-flies. (default: false) - **usage** (string) - Optional - The style of names to return. Options: 'long' (default, verbose names), 'short' (terser names). - **json-camel-case** (boolean) - Optional - Return camelCase keys when returning data in JSON format. (default: false, returns hyphenated keys like 'stop-schedule') ### Request Example `GET /stops?distance=150&x=633861&y=5525798` `GET /stops?route=BLUE` `GET /stops?effective-on=2025-06-29T00:00:00` ### Response #### Success Response (200) - **stops** (array) - An array of stop objects. - **stop-id** (integer) - The unique identifier for the stop. - **stop-name** (string) - The name of the stop. - **effective-from** (string) - The date and time from which this stop information is effective. - **effective-to** (string) - The date and time until which this stop information is effective. - ... (other stop details) #### Response Example ```json { "stops": [ { "stop-id": 10064, "stop-name": "Portage Ave at Vaughn St", "effective-from": "2024-01-01T00:00:00", "effective-to": "2024-12-31T23:59:59", "location": { "lat": 49.89000, "lon": -97.14000 } } ] } ``` ``` -------------------------------- ### Trip Planner API Source: https://api.winnipegtransit.com/home/api/v4/services/trip-planner The Trip Planner API uses the Navigo engine to plan trips. Users can specify origins and destinations using various formats like addresses, intersections, monuments, stops, or geographical coordinates. Various parameters can be set to customize the trip plan, including date, time, travel mode, walking speed, and transfer preferences. ```APIDOC ## GET /trip-planner ### Description Plans a trip from a specified origin to a destination using various parameters to customize the journey. ### Method GET ### Endpoint /trip-planner ### Parameters #### Query Parameters - **origin** (string) - Required - The trip origin. Supported formats: 'addresses/{key}', 'intersections/{key}', 'monuments/{key}', 'stops/{key}', 'utm/{x},{y}', or 'geo/{lat},{lon}'. Location keys are obtained from the Locations service. - **destination** (string) - Required - The trip destination. Supported formats: 'addresses/{key}', 'intersections/{key}', 'monuments/{key}', 'stops/{key}', 'utm/{x},{y}', or 'geo/{lat},{lon}'. Location keys are obtained from the Locations service. - **date** (string) - Optional - The date of the trip in 'YYYY-mm-dd' format. Defaults to the current date. - **time** (string) - Optional - The time of the trip in 'HH:MM' or 'HH:MM:SS' format. Defaults to the current time. - **mode** (string) - Optional - Specifies how the time parameter should be interpreted. Possible values: 'depart-before', 'depart-after', 'arrive-before', 'arrive-after'. - **walk-speed** (float) - Optional - The walking speed in km/h. - **max-walk-time** (integer) - Optional - The maximum number of minutes to spend walking. - **min-transfer-wait** (integer) - Optional - The minimum number of minutes to wait for a transfer. - **max-transfer-wait** (integer) - Optional - The maximum number of minutes to wait for a transfer. - **max-transfers** (integer) - Optional - The maximum number of transfers allowed. - **usage** (string) - Optional - The style of names to return. Possible values: 'long' (default, verbose names), 'short' (terser names). - **json-camel-case** (boolean) - Optional - If true, returns camelCase keys in JSON format. Defaults to false (hyphenated keys). ### Request Example ``` GET /trip-planner?origin=addresses/136590&destination=intersections/123172:378@954&date=2025-11-16&time=17:00&mode=arrive-before ``` ### Response #### Success Response (200) - **plan** (array) - An array of trip plan options. - **segments** (array) - A plan consists of one or more segments representing parts of the trip (walk, ride, transfer). - **segment/@type** (string) - The type of the segment (e.g., 'walk', 'ride', 'transfer'). - **segment/route** (object) - Route information for a ride segment. - **segment/variant** (object) - Variant information for a ride segment. - **segment/from** (object) / **segment/to** (object) - Start and end points for walk and transfer segments. - **from/origin** (object) / **to/destination** (object) - Location details for walk segments starting at the trip origin or ending at the trip destination. - **(from|to)/stop** (object) - Basic stop information for walk or transfer segments ending or starting at a stop. Includes an 'xlink:href' attribute pointing to more detailed stop information. - **(plan|segment)/times** (object) - Contains start and end times for the plan or segment, including total duration in minutes. - **segment/bus** (object) - Information about the bus servicing a ride segment (if available for the date). - **segment/bus/key** (string) - Unique identifier for the bus. - **segment/bus/bike-rack** (boolean) - Indicates if the bus has a bike rack. #### Response Example ```json { "plan": [ { "segments": [ { "@type": "walk", "from": { "origin": { "street": "100 Main St", "city": "Winnipeg" } }, "to": { "stop": { "name": "SB Portage at Polo Park", "stop-id": "1234", "@xlink:href": "/stops/1234" } }, "times": { "start": "2025-11-16T17:05:00", "end": "2025-11-16T17:15:00", "duration": 10 } }, { "@type": "ride", "route": { "route-no": "22", "name": "Westbound Portage" }, "variant": { "variant-name": "Westbound" }, "segment/bus": { "key": "BUS123", "bike-rack": true }, "times": { "start": "2025-11-16T17:15:00", "end": "2025-11-16T17:30:00", "duration": 15 } } ], "times": { "start": "2025-11-16T17:05:00", "end": "2025-11-16T17:30:00", "duration": 25 } } ] } ``` ``` -------------------------------- ### System Messages API Source: https://api.winnipegtransit.com/home/api/v4/services/system-messages Retrieves urgent notices that apply to all Winnipeg Transit services. Supports filtering and wildcard searches. ```APIDOC ## GET /api/v4/system-messages ### Description Retrieves urgent notices that apply to all Winnipeg Transit services. Supports filtering and wildcard searches. ### Method GET ### Endpoint /api/v4/system-messages ### Parameters #### Query Parameters - **usage** (string) - Optional - The style of names to return. Options: 'long' (default, verbose names), 'short' (terser names). - **json-camel-case** (boolean) - Optional - Controls the format of JSON keys. 'false' (default, hyphenated keys like 'stop-schedule') or 'true' (camelCase keys like 'stopSchedule'). ### Request Example ```json { "example": "/api/v4/system-messages?usage=long&json-camel-case=true" } ``` ### Response #### Success Response (200) - **type** (string) - The type of message (e.g., Information, Warning, Emergency, PSA, Weather). - **message** (string) - The content of the message. #### Response Example ```json { "example": [ { "type": "Information", "message": "Service Alert: Route 15 is experiencing delays due to construction on Main Street." } ] } ``` ### Examples - **Specific message ID:** `/api/v4/system-messages/1` - **Filter by type:** `/api/v4/system-messages?type=Emergency` - **Wildcard search:** `/api/v4/system-messages?filter=system-messages:*` or `/api/v4/system-messages?filter=system-messages:go` ``` -------------------------------- ### Stops API - Wildcard Search Source: https://api.winnipegtransit.com/home/api/v4/services/stops Perform a wildcard search for stops based on a partial name. This allows for flexible searching when the exact stop name or ID is unknown. ```APIDOC ## GET /stops:/{wildcard_search} ### Description Performs a wildcard search for stops whose names contain the provided `wildcard_search` string. This is useful for finding stops when you only know a part of their name. ### Method GET ### Endpoint `/stops:/{wildcard_search}` #### Path Parameters - **wildcard_search** (string) - Required - The partial string to search for within stop names. ### Request Example `GET /stops:osborne` `GET /stops:mcgreg` ### Response #### Success Response (200) - **stops** (array) - An array of stop objects matching the wildcard search. - **stop-id** (integer) - The unique identifier for the stop. - **stop-name** (string) - The name of the stop. - **effective-from** (string) - The date and time from which this stop information is effective. - **effective-to** (string) - The date and time until which this stop information is effective. - ... (other stop details) #### Response Example ```json { "stops": [ { "stop-id": 50123, "stop-name": "Osborne St at River Ave", "effective-from": "2024-01-01T00:00:00", "effective-to": "2024-12-31T23:59:59" } ] } ``` ``` -------------------------------- ### Trip Schedules API Source: https://api.winnipegtransit.com/home/api/v4/services/trip-schedules Retrieves the schedule for a specific bus trip along a variant. Supports querying for trips in future service and customizing output format. ```APIDOC ## GET /trips/{trip_key} ### Description Returns the schedule for a specific trip that a bus travels along a variant. Allows querying for trips in future service and customizing output format. ### Method GET ### Endpoint /trips/{trip_key} ### Parameters #### Path Parameters - **trip_key** (string) - Required - The unique identifier for the trip. #### Query Parameters - **effective-on** (string) - Optional - Return a trip in effect at the provided time (e.g., YYYY-MM-DDTHH:MM:SS). - **usage** (string) - Optional - The style of names to return. Accepts 'long' (default) or 'short'. - **json-camel-case** (boolean) - Optional - Return camelCase keys when returning data in JSON format. Accepts 'true' or 'false' (default). ### Request Example ```json { "example": "/trips/30981257?effective-on=2023-10-27T10:00:00&usage=long&json-camel-case=true" } ``` ### Response #### Success Response (200) - **previous-trip-key** (string) - The trip key of the previous trip performed by the bus. - **next-trip-key** (string) - The trip key of the next trip performed by the bus. - **schedule-type** (string) - The schedule type for the day (e.g., Weekday, Saturday, Sunday, Holiday). - **variant** (object) - Information about the variant being operated on this trip. - **key** (string) - Unique identifier for the variant. - **name** (string) - Name of the variant. - **effective-from** (string) - The date and time when this trip begins operating. - **effective-to** (string) - The date and time when this trip ends operating. - **bus** (object) - Information about the bus performing this trip (may be present for active trips). - **key** (string) - Unique identifier for the bus. - **bike-rack** (boolean) - Indicates if the bus has a bike rack. - **wifi** (boolean) - Indicates if the bus has WiFi. - **scheduled-stops** (array) - A list of scheduled stops for the trip. - **stop** (object) - Information about the stop. - **key** (string) - Unique identifier for the stop. - **name** (string) - Name of the stop. - **direction** (string) - Direction of the stop. - **key** (string) - Unique identifier for this scheduled stop. - **cancelled** (boolean) - Indicates if the scheduled stop has been cancelled. - **times** (object) - Scheduled and estimated times for the stop. - **arrival** (object) - Arrival times. - **scheduled** (string) - Scheduled arrival time. - **estimated** (string) - Estimated arrival time. - **departure** (object) - Departure times. - **scheduled** (string) - Scheduled departure time. - **estimated** (string) - Estimated departure time. #### Response Example ```json { "example": { "previous-trip-key": "some-previous-trip-key", "next-trip-key": "some-next-trip-key", "schedule-type": "Weekday", "variant": { "key": "some-variant-key", "name": "Downtown Express" }, "effective-from": "2023-01-01T00:00:00", "effective-to": "2023-12-31T23:59:59", "bus": { "key": "some-bus-key", "bike-rack": true, "wifi": false }, "scheduled-stops": [ { "stop": { "key": "some-stop-key", "name": "Main St. & 1st Ave", "direction": "Northbound" }, "key": "some-scheduled-stop-key", "cancelled": false, "times": { "arrival": { "scheduled": "2023-10-27T10:15:00", "estimated": "2023-10-27T10:16:00" }, "departure": { "scheduled": "2023-10-27T10:17:00", "estimated": "2023-10-27T10:18:00" } } } ] } } ``` ``` -------------------------------- ### Routes API Source: https://api.winnipegtransit.com/home/api/v4/services/routes Retrieve information about transit routes. Routes represent patterns of service covering specific geographic areas. This API supports filtering by stop, effective dates, and naming conventions. ```APIDOC ## GET /routes ### Description Retrieves a list of all available transit routes. You can filter these routes based on various criteria such as stops they service, their effective dates, and the desired naming format. ### Method GET ### Endpoint /routes ### Parameters #### Query Parameters - **effective-on** (string) - Optional - Return route(s) in service at the provided time. Allows querying for routes in future service that hasn't started yet. - **stop** (string) - Optional - Only return routes passing through this stop. - **usage** (string) - Optional - The style of names to return. Accepts 'long' (default, verbose names) or 'short' (terser names). - **json-camel-case** (boolean) - Optional - Return camelCase keys when returning data in JSON format. Defaults to 'false' (legacy hyphenated keys like 'stop-schedule'). Set to 'true' for camelCase keys like 'stopSchedule'. ### Request Example ```json { "example": "GET /routes?stop=10066&usage=short&json-camel-case=true" } ``` ### Response #### Success Response (200) - **key** (string) - A unique identifier for this route. - **number** (string) - The route "number", e.g., BLUE, FX4, D15, 224. - **name** (string) - The route name, which may be blank. See the usage parameter for formatting options. - **effective-from** (string) - The date and time when this route will begin operating. - **effective-to** (string) - The date and time when this route will end operating. - **customer-type** (string) - The type of service provided by this route. - **coverage** (string) - Categorizes how a route services stops along its path. Can be one of: 'regular', 'express', 'super express'. - **badge-label** (string) - A shorthand version of the route number, in cases where the route number exceeds 3 characters. - **badge-style** (object) - The CSS style properties for this route's badge element. Includes class names to use with the routes stylesheet. Also includes individual style properties: 'background-color', 'border-color' and 'color'. - **variants** (array) - An array containing keys for route variants. Use the xlink:href attribute to call the corresponding Variants service. #### Response Example ```json { "example": "{\n \"key\": \"some-route-key\",\n \"number\": \"224\",\n \"name\": \"Example Route Name\",\n \"effective-from\": \"2024-06-15T00:00:00\",\n \"effective-to\": \"2024-09-15T00:00:00\",\n \"customer-type\": \"regular\",\n \"coverage\": \"regular\",\n \"badge-label\": \"224\",\n \"badge-style\": {\n \"background-color\": \"#0000FF\",\n \"border-color\": \"#000000\",\n \"color\": \"#FFFFFF\",\n \"class\": \"route-badge-blue\"\n },\n \"variants\": [\n {\n \"xlink:href\": \"/variants/variant-key-1\"\n }\n ]\n}" } ``` ## GET /routes/{route-key} ### Description Retrieves a specific transit route by its unique key. ### Method GET ### Endpoint /routes/{route-key} ### Parameters #### Path Parameters - **route-key** (string) - Required - The unique identifier for the route. #### Query Parameters - **effective-on** (string) - Optional - Return route(s) in service at the provided time. Allows querying for routes in future service that hasn't started yet. - **usage** (string) - Optional - The style of names to return. Accepts 'long' (default, verbose names) or 'short' (terser names). - **json-camel-case** (boolean) - Optional - Return camelCase keys when returning data in JSON format. Defaults to 'false' (legacy hyphenated keys like 'stop-schedule'). Set to 'true' for camelCase keys like 'stopSchedule'. ### Request Example ```json { "example": "GET /routes/224" } ``` ### Response #### Success Response (200) - **key** (string) - A unique identifier for this route. - **number** (string) - The route "number", e.g., BLUE, FX4, D15, 224. - **name** (string) - The route name, which may be blank. See the usage parameter for formatting options. - **effective-from** (string) - The date and time when this route will begin operating. - **effective-to** (string) - The date and time when this route will end operating. - **customer-type** (string) - The type of service provided by this route. - **coverage** (string) - Categorizes how a route services stops along its path. Can be one of: 'regular', 'express', 'super express'. - **badge-label** (string) - A shorthand version of the route number, in cases where the route number exceeds 3 characters. - **badge-style** (object) - The CSS style properties for this route's badge element. Includes class names to use with the routes stylesheet. Also includes individual style properties: 'background-color', 'border-color' and 'color'. - **variants** (array) - An array containing keys for route variants. Use the xlink:href attribute to call the corresponding Variants service. #### Response Example ```json { "example": "{\n \"key\": \"224\",\n \"number\": \"224\",\n \"name\": \"Downtown - North\",\n \"effective-from\": \"2024-06-15T00:00:00\",\n \"effective-to\": \"2024-09-15T00:00:00\",\n \"customer-type\": \"regular\",\n \"coverage\": \"regular\",\n \"badge-label\": \"224\",\n \"badge-style\": {\n \"background-color\": \"#FF0000\",\n \"border-color\": \"#000000\",\n \"color\": \"#FFFFFF\",\n \"class\": \"route-badge-red\"\n },\n \"variants\": [\n {\n \"xlink:href\": \"/variants/variant-key-abc\"\n }\n ]\n}" } ``` ``` -------------------------------- ### Service Advisories API Source: https://api.winnipegtransit.com/home/api/v4/services/service-advisories Retrieves service advisories currently in effect at Winnipeg Transit. Supports filtering by priority, category, age, and limit. ```APIDOC ## GET /service-advisories ### Description Returns any service advisories currently in effect at Winnipeg Transit. ### Method GET ### Endpoint /service-advisories ### Parameters #### Query Parameters - **priority** (integer) - Optional - Only return advisories of this priority or higher (where 1 is high, and 5 is low). - **category** (string) - Optional - Only return service advisories of this category. Supported values: 'all', 'transit'. - **max-age** (integer) - Optional - Only return advisories newer than max-age days. Includes advisories created or updated since max-age days ago. - **limit** (integer) - Optional - The maximum number of advisories to return. - **usage** (string) - Optional - The style of names to return. Supported values: 'long' (default), 'short'. - **json-camel-case** (boolean) - Optional - Return camelCase keys when returning data in JSON format. Supported values: 'false' (default), 'true'. ### Response #### Success Response (200) - **priority** (integer) - A numerical indicator of how urgent the advisory is. The lower the number, the more urgent it is. - **title** (string) - The title of the advisory. - **body** (string) - The content of the advisory. - **category** (string) - The type of advisory. 'transit' for fixed route service, or 'all' for global advisories. - **updated-at** (string) - Timestamp of when the advisory was last updated. #### Response Example ```json { "advisories": [ { "priority": 1, "title": "Service Disruption on Route 55", "body": "Due to construction, Route 55 is experiencing delays.", "category": "transit", "updated-at": "2023-10-27T10:00:00Z" } ] } ``` ``` -------------------------------- ### Destinations API Source: https://api.winnipegtransit.com/home/api/v4/services/destinations Retrieves destinations for a specified transit variant. Destinations are points of interest that buses on the variant will pass. This API supports effective times and common query parameters for usage and JSON formatting. ```APIDOC ## GET /variants/{variant-id}/destinations ### Description Returns destinations for the requested variant. Destinations are points of interest that buses on the variant will pass. This service includes 'effective-from' and 'effective-to' attributes and accepts an 'effective-on' query parameter. ### Method GET ### Endpoint `/variants/{variant-id}/destinations` ### Parameters #### Path Parameters - **variant-id** (string) - Required - The unique identifier for the transit variant. #### Query Parameters - **effective-on** (string) - Required - The date to fetch the correct variant for its destinations. - **usage** (string) - Optional - The style of names to return. Options: 'long' (default, verbose names), 'short' (terse names). - **json-camel-case** (boolean) - Optional - If true, returns camelCase keys. Defaults to false (legacy behavior with hyphenated keys). ### Request Example ```json { "example": "/variants/F5-1-F/destinations?effective-on=2024-01-01&usage=long&json-camel-case=true" } ``` ### Response #### Success Response (200) - **key** (string) - A unique identifier for this destination. - **name** (string) - The destination name. Formatting depends on the 'usage' parameter. - **effective-from** (string) - The start date/time when the destination information is valid. - **effective-to** (string) - The end date/time when the destination information is valid. #### Response Example ```json { "example": [ { "key": "123e4567-e89b-12d3-a456-426614174000", "name": "Downtown", "effective-from": "2024-06-29T00:00:00", "effective-to": "2025-06-28T23:59:59" } ] } ``` ``` -------------------------------- ### Service Status API Source: https://api.winnipegtransit.com/home/api/v4/example Checks the current service status of Winnipeg Transit. It's recommended to check this first to ensure data reliability, especially during potential emergency service plans. ```APIDOC ## GET /v4/statuses/schedule ### Description Retrieves the current service status of Winnipeg Transit. This is crucial for determining the reliability of other API data, particularly during emergency service plans (e.g., 'esp-1', 'esp-2', 'esp-3'). ### Method GET ### Endpoint /v4/statuses/schedule ### Parameters #### Query Parameters - **api-key** (string) - Required - Your unique API key for authentication. ### Request Example ``` https://api.winnipegtransit.com/v4/statuses/schedule?api-key=YOUR-API-KEY ``` ### Response #### Success Response (200) - **status** (string) - The current service status (e.g., 'regular', 'esp-1'). #### Response Example ```json { "status": "regular" } ``` ``` -------------------------------- ### Statuses API Source: https://api.winnipegtransit.com/home/api/v4/services/statuses Retrieves the current status of Winnipeg Transit services. Supports filtering and custom response formatting. ```APIDOC ## GET /Statuses API ### Description Returns the current status of Winnipeg Transit services. You can filter the results and specify the naming convention for the returned data. ### Method GET ### Endpoint /statuses ### Parameters #### Query Parameters - **usage** (string) - Optional - Specifies the style of names to return. Options: 'long' (default, verbose names), 'short' (terse names). - **json-camel-case** (boolean) - Optional - If true, returns camelCase keys (e.g., 'stopSchedule'). If false (default), returns hyphenated keys (e.g., 'stop-schedule'). ### Request Example ``` /statuses?usage=long&json-camel-case=true ``` ### Response #### Success Response (200) - **name** (string) - The name of the service. - **value** (string) - The value of the service's status. - **message** (string) - A user-friendly message describing the status. - **description** (string) - A description of the status. - **updated-at** (string) - Timestamp of when the status was last updated or checked. #### Response Example ```json { "name": "Service Status", "value": "Operational", "message": "All services are running normally.", "description": "The overall operational status of Winnipeg Transit services.", "updated-at": "2023-10-27T10:00:00Z" } ``` ``` -------------------------------- ### Stop Features API Source: https://api.winnipegtransit.com/home/api/v4/services/stop-features Retrieves information about features associated with a specific transit stop. ```APIDOC ## GET /stops/{stopId}/features ### Description Returns information about any features related to the requested stop. ### Method GET ### Endpoint /stops/{stopId}/features ### Parameters #### Path Parameters - **stopId** (string) - Required - The ID of the stop to query. #### Query Parameters - **usage** (string) - Optional - The style of names to return. Supported values: 'long' (default), 'short'. - **json-camel-case** (boolean) - Optional - If true, returns camelCase keys in JSON responses. Defaults to false (hyphenated keys). ### Request Example ``` GET /stops/10064/features?usage=long&json-camel-case=true ``` ### Response #### Success Response (200) - **name** (string) - The name of the stop feature. - **count** (integer) - The number of occurrences of the feature at this stop. #### Response Example ```json { "features": [ { "name": "Shelter", "count": 1 }, { "name": "Bench", "count": 1 } ] } ``` ```