-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbc-ferries.yaml
58 lines (57 loc) · 1.94 KB
/
bc-ferries.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
openapi: 3.0.3
info:
title: BC Ferries - OpenAPI 3.0
description: |-
The only public API for retrieving current data on BC Ferries sailings.
This API uses the route codes used by BC Ferries, they are:
- "TSA" -> Tsawwassen
- "SWB" -> Swartz Bay
- "SGI" -> Southern Gulf Islands
- "DUK" -> Duke Point (Nanaimo)
- "FUL" -> Fulford Harbour (Salt Spring Island)
- "HSB" -> Horseshoe Bay
- "NAN" -> Departure Bay (Nanaimo)
- "LNG" -> Langford
- "BOW" -> Bowen Island
version: 1.0.11
servers:
- url: https://www.bcferriesapi.ca/api
paths:
/{departure_terminal}/{destination_terminal}:
get:
summary: Ferries Sailing times
description: Get departure times from departure terminal, optionally filter by destination terminal
operationId: getDepartures
parameters:
- name: departure_terminal
in: path
required: true
description: Use a terminal code from the list above, case-sensitive
schema:
type: string
- name: destination_terminal
in: path
required: true
description: Optionally filter by destination terminal, pass an empty string otherwise. If no ferries sail from departure terminal to this terminal, an error is returned.
schema:
type: string
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: array
items:
type: object
properties:
date:
type: string
example: 2023-02
stop-and-search:
type: array
items:
type: string
example: ["bedfordshire", "btp", "cambridgeshire"]
'400':
description: Missing parameter