Skip to content

Commit e8165e0

Browse files
avatarneilthekaveman
authored andcommitted
First pass at consolidating Stop definitions for Agency & Provider
1 parent 36355fc commit e8165e0

3 files changed

Lines changed: 54 additions & 97 deletions

File tree

agency/README.md

Lines changed: 10 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ This specification contains a collection of RESTful APIs used to specify the dig
1414
* [Vehicle Events](#vehicle---event)
1515
* [Vehicles Telemetry](#vehicles---telemetry)
1616
* [Telemetry Data](#telemetry-data)
17+
* [Stops](#stops)
1718

1819
## General information
1920

@@ -240,76 +241,27 @@ The `/stops` endpoint allows an agency to register Stops.
240241
**Endpoint:** `/stops`
241242
**Method:** `POST`
242243
**[Beta feature](/general-information.md#beta-features):** Yes (as of 1.0.0)
243-
244-
245-
| Field | Type | Required/Optional | Description |
246-
|---------------------|-----------------------------------------------------------------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
247-
| stop_id | UUID | Required | Unique ID for stop |
248-
| stop_name | String | Required | Name of stop |
249-
| lat | Double | Required | Latitude of the location |
250-
| lng | Double | Required | Longitude of the location |
251-
| capacity | {vehicle_type: number} | Required | Number of total spots per vehicle_type |
252-
| geography_id | UUID | Optional | Pointer to the Geography that represents the stop geospatially |
253-
| region_id | string | Optional | ID of the region where station is located, see [GBFS Station Information](https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_informationjson) |
254-
| short_name | String | Optional | Abbreviated stop name |
255-
| address | String | Optional | Postal address (useful for directions) |
256-
| post_code | String | Optional | Postal code (e.g. `10036`) |
257-
| rental_methods | [Enum](https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_informationjson) | Optional | Payment methods accepted at stop, see [GBFS Rental Methods](https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_informationjson) |
258-
| timezone | String | Optional | Timezone stop is located in |
259-
| cross_street | String | Optional | Cross street of where the station is located. |
260-
| wheelchair_boarding | Boolean | Optional | Is this stop handicap accessible? |
261-
| parent_stop | UUID | Optional | Describe a basic hierarchy of stops (e.g.a stop inside of a greater stop) |
244+
**Request Body**: An array of [Stops](../general-information.md/#stop) |
262245

263246
**Endpoint:** `/stops`
264247
**Method:** `PUT`
265248
**[Beta feature](/general-information.md#beta-features):** Yes (as of 1.0.0)
249+
**Request Body**: An array of subsets of [Stop](../general-information.md/#stop) information, where the permitted subset fields are defined as:
250+
| Field | Required/Optional | Description |
251+
|---------------------|-------------------|---------------------------------------------|
252+
| stop_id | Required |See [Stops](../general-information.md/#stop) |
253+
| status | Optional |See [Stops](../general-information.md/#stop) |
254+
| num_spots_disabled | Optional |See [Stops](../general-information.md/#stop) |
266255

267-
| Field | Type | Required/Optional | Description |
268-
|---------------------|------------------------|-------------------|-------------------------------------------------------------------------|
269-
| stop_id | UUID | Required | Unique ID for stop |
270-
| status | Enum | Required | Status of the Stop. See [Stop Statuses](#stop-statuses) table. |
271-
| num_spots_available | {vehicle_type: number} | Optional | How many spots are free to be populated with vehicles at this stop? |
272-
| num_spots_disabled | {vehicle_type: number} | Optional | How many docks are disabled and unable to accept vehicles at this stop? |
256+
TBD -- Are there additional fields that should be permitted to update with a PUT?
273257

274258
**Endpoint:** `/stops/:stop_id`
275259
**Method:** `GET`
276260
**[Beta feature](/general-information.md#beta-features):** Yes (as of 1.0.0)
277-
**`data` Payload:** `{ "stops": [] }`, an array of objects with the following structure
278-
279-
| Field | Type | Required/Optional | Description |
280-
|------------------------|-----------------------------------------------------------------------------------|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------|
281-
| stop_id | UUID | Required | Unique ID for stop |
282-
| stop_name | String | Required | Name of stop |
283-
| lat | Double | Required | Latitude of the location |
284-
| lng | Double | Required | Longitude of the location |
285-
| status | Enum | Required | Status of the Stop. See [Stop Statuses](#stop-statuses) table. |
286-
| capacity | {vehicle_type: number} | Required | Number of total spots per vehicle_type |
287-
| num_vehicles_available | {vehicle_type: number} | Required | How many vehicles are available per vehicle_type at this stop? |
288-
| num_vehicles_disabled | {vehicle_type: number} | Required | How many vehicles are unavailable/reserved per vehicle_type at this stop? |
289-
| geography_id | UUID | Optional | Pointer to the Geography that represents the Stop geospatially |
290-
| region_id | string | Optional | ID of the region where station is located, see [GBFS Station Information](https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_informationjson) |
291-
| short_name | String | Optional | Abbreviated stop name |
292-
| address | String | Optional | Postal address (useful for directions) |
293-
| post_code | String | Optional | Postal code (e.g. `10036`) |
294-
| rental_methods | [Enum](https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_informationjson) | Optional | Payment methods accepted at stop, see [GBFS Rental Methods](https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_informationjson) |
295-
| cross_street | String | Optional | Cross street of where the station is located. |
296-
| num_spots_available | {vehicle_type: number} | Optional | How many spots are free to be populated with vehicles at this stop? |
297-
| num_spots_disabled | {vehicle_type: number} | Optional | How many docks are disabled and unable to accept vehicles at this stop? |
298-
| parent_stop | UUID | Optional | Describe a basic hierarchy of stops (e.g.a stop inside of a greater stop) |
261+
**`data` Payload:** `{ "stops": [] }`, an array of [Stops](../general-information.md/#stop)
299262

300263
In the case that a `stop_id` query parameter is specified, the `stops` array returned will only have one entry. In the case that no `stop_id` query parameter is specified, all stops will be returned.
301264

302-
#### Stop Statuses
303-
304-
| `status` | Description |
305-
| ---------------- | ---------------------------------------------------------------------------------------- |
306-
| `open` | The station is open and available to rent out or accept vehicles |
307-
| `closed` | The station is closed. Either because of operating hours, repairs, or a seasonal closure |
308-
| `decommissioned` | The station is permanently closed and will be removed from the system | |
309-
310-
### GBFS Compatibility
311-
Some of the fields in the `Stops` definition are using notions which are currently not in MDS, such as `rental_methods`. These fields are included for compatibility with GBFS.
312-
313265
## Enum Definitions
314266

315267
### Area Types

0 commit comments

Comments
 (0)