-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathLocations.apib
171 lines (130 loc) · 4.5 KB
/
Locations.apib
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# Group Locations
Parking Location resources
## Locations [/public/parking/locations]
The locations root resource
+ Model (application/json)
JSON representation of Locations.
+ Body
[{
"locationNumber" : 10202990,
"name" : "12TH STREET NORTH",
"vendor" : "SFMTA",
"vendorRegion" : "PORT",
"status" : "LotStatus_LotIsOpen",
"extendNotAllowed" : false,
"isStallBased" : true,
"isPlateBased" : true,
"currency" : "USD",
"country" : "us",
"defaultTimeUnit" : "TimeUnit_Hours",
"promptForCvv" : false,
"currentMaxStay" : 120,
"latitude" : 19.235135,
"longitude" : 23.445135,
"validIn" : ["ca","us"],
"lotMessage" : "Some custom message for this lot 10202990."
}]
### Retrieve location for location number [GET]
Get location from a location number.
Location is identified by the `locationNumber`.
**Request Contract**
Header: Authorization: Bearer <token>
**Response Contract**
Content-Type: application/json
[{
"locationNumber" : "",
"name" : "",
"vendor" : "",
"vendorRegion" : "",
"status" : "",
"extendNotAllowed" : "",
"isStallBased" : "",
"isPlateBased" : "",
"currency" : "",
"country" : "",
"defaultTimeUnit" : "",
"altTimeUnit" : "",
"promptForCvv" : "",
"currentMaxStay" : "",
"latitude" : "",
"longitude" : "",
"validIn" : [],
"lotMessage" : ""
}]
The *id* is assigned by the API at the moment of creation.
**Possible Response Codes**
- 200
- 404
+ Request userAccountId Exists
/public/parking/locations/
+ Response 200
[Locations][]
+ Request userAccountId Does Not Exists
/public/parking/locations/
+ Response 404
## Location [/public/parking/locations/{locationNumber}?country={country}]
An individual location resource
+ Parameters
+ locationNumber (required, string, `fff-gr34-fff`) ... `locationNumber` of the Location Resource to perform action with. Has example value.
+ country (required, string, `us`) ... `country` of the Location in the form of a 2-letter abbreviation.
+ Model (application/json)
JSON representation of A Location.
+ Body
{
"locationNumber" : 10202990,
"name" : "12TH STREET NORTH",
"vendor" : "SFMTA",
"vendorRegion" : "PORT",
"status" : "LotStatus_LotIsOpen",
"extendNotAllowed" : false,
"isStallBased" : true,
"isPlateBased" : true,
"currency" : "USD",
"country" : "us",
"defaultTimeUnit" : "TimeUnit_Hours",
"promptForCvv" : false,
"currentMaxStay" : 120,
"latitude" : 19.235135,
"longitude" : 23.445135,
"validIn" : ["ca","us"],
"lotMessage" : "Some custom message for this lot 10202990."
}
### Retrieve an individual location for user [GET]
Get an individual location from a User's Account.
User is identified by the `userAccountId`.
Location is identified by the `locationNumber`.
**Request Contract**
Header: Authorization: Bearer <token>
**Response Contract**
Content-Type: application/json
[{
"locationNumber" : "",
"name" : "",
"vendor" : "",
"vendorRegion" : "",
"status" : "",
"extendNotAllowed" : "",
"isStallBased" : "",
"isPlateBased" : "",
"currency" : "",
"country" : "",
"defaultTimeUnit" : "",
"altTimeUnit" : "",
"promptForCvv" : "",
"currentMaxStay" : "",
"latitude" : "",
"longitude" : "",
"validIn" : [],
"lotMessage" : ""
}]
The *locationNumber* is assigned by the API at the moment of creation.
**Possible Response Codes**
- 200
- 404
+ Request locationId Exists
/public/parking/locations/{locationNumber}
+ Response 200
[Location][]
+ Request locationId Does Not Exists
/public/parking/locations/{locationNumber}
+ Response 404