-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathParking.apib
1134 lines (934 loc) · 43.5 KB
/
Parking.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Group Parking
## Versioning
This API documentation relates to Parking API version 2.
All requests made to this version of the Parking API must add the following HTTP Header to the request: `X-Pbp-Version: 2`
## Get current or historic parking sessions [/parking/accounts/{accountId}/sessions/?periodType=Current]
## Get a user's current/historic parking sessions [GET]
**Possible Response Codes**
- 200 - OK
- 400 - Bad Request
- 401 - Unauthorized
- 403 - Forbidden
+ Request
+ Header
Authorization: Bearer <token>
+ Parameters
+ accountId: `1b98d239-8de8-4111-9d7d-562fc31c193a` (required, string) - Parking account id.
+ periodType: 'Current' (required, enum[string]) -
+ Members
+ `Current`
+ `Historic`
+ since: `2015-09-01T16:16:00Z` (optional, string) - Date and time when to retrieve the parking sessions from. If provided, it must be compliant with RFC 3339.
+ offset: '0' (optional, int) - Offset should be more than 0.
+ limit: '10' (optional, int) - Limit should be more than 0 and less than 50.
+ Response 200
+ Attributes (application/json)
+ `parkingSessionId`:`de9bd239-44f3-483e-9fd4-7c98567da200` (string) - The parking session ID, this is needed if you want to extend an existing parking session (NOTE: this property will soon be renamed to parkingSessionId)
+ `locationId`: `5594` (string) - The Lot ID where the user is parked
+ `vehicle`: (required) - The vehicle information associated with the parking session
+ `id`: 1234 (required, int) - The ID of the vehicle that is parked.
+ `licensePlate`: `ABC123` (string) - The license plate of the vehicle that is parked
+ `jurisdiction`: `BC` (required, string) - Jurisdiciton the parked vehicle is registered in. Valid jurisdictions are Countries and Regions supported by API#Provinces
+ `countryCode`: `CA` (optional, string) - Country ISO 3166 code of the location.
+ `type`: `motorcycle` (required, string) - Vehicle Type. Valid types are: car, motorcycle, electricMotorcycle, heavyGoodsVehicle
+ `startTime`: `2015-09-01T16:16:00Z` (string) - The start time of the parking session, in an RFC 3339 compliant format.
+ `stall`: `82445` (string) - Stall where the vehicle is parked if the parking session took place in a stall, null otherwise.
+ `rateOption`: (required) - The rate option details associated with the parking session
+ `rateOptionId`: `5594` (required, string) - The identifier of the rate option applied to the parking session
+ `type`: `VIS` (required, string) - The eligibility type applied to the parking session
+ Body
[
{
"parkingSessionId": "de9bd239-44f3-483e-9fd4-7c98567da200",
"locationId": "5594",
"vehicle": {
"id":1234,
"licensePlate": "ABC123",
"jurisdiction": "BC",
"countryCode": "CA",
"type": "motorcycle"
},
"startTime": "2015-09-01T16:16:00Z",
"stall": "82445",
"rateOption": {
"rateOptionId": "5594",
"type": "VIS"
}
}
]
## Start parking [/parking/accounts/{accountId}/sessions]
### Start a new parking session[POST]
**Possible Payment Method types**
It's possible to pay for parking session using following Payment Methods:
- Payment Account (using associated credit or debit card)
- Android Pay token
Example of Payment Method request parameter type for Payment Acccount
{
"paymentMethodType": "PaymentAccount",
"payload": {
"PaymentAccountId": "23fccd39-70c2-446f-915c-6d2362b64e58"
}
}
Example of Payment Method request parameter type for Android Pay
{
"paymentMethodType": "AndroidPayToken",
"payload": {
"token": "wjwqjf;wqfsdfoweutrm,ebdzaiiotrl/. zm,hxfpweti45ym56uj5e",
"publicKey": "sdkfj;;wlegfqw0-9 wqrcip43;i5r",
"paymentInstruments": {
"ccType": "VISA",
"ccMaskedValue": "1111"
}
}
}
**Possible Response Codes**
- 202 - Accepted
- 400 - Bad Request
- 401 - Unauthorized
- 403 - Forbidden
**Possible Validation Errors**
- ParkingAccountIdInvalidFormat
- LocationNotFound
- CvvRequired
- CvvInvalidFormat
- LicensePlateRequired
- LicensePlateInvalidFormat
- DurationInvalidFormat
- JsonReaderException
**Possible events**
- ParkingSessionCreated
{
"ParkingSessionId": "23fccd39-70c2-446f-915c-6d2362b64e58",
"VehicleId": "12793707",
"LocationId": "64123",
"VehiclePlate": "GGG328",
"Stall": "",
"vehicleType": "car",
"StartTime": "2015-01-28T20:54:00Z",
"ExpireTime": "2015-01-28T21:54:00Z",
"$type": "ParkingSessionCreated"
}
- StartParkingFailed
{
"Data": [ ],
"FailureReason": "VehicleAlreadyParked",
"$type": "StartParkingFailed"
}
+ Parameters
+ accountId: `1b98d239-8de8-4111-9d7d-562fc31c193a` (required, string) - Parking account id.
+ Request
+ Attributes (application/json)
+ `locationId`:`70000` (required, string) - The lot ID of the location where the user wants to park
+ `stall`:`1` (required, string) - The stall number of the location where the user wants to park
+ `licensePlate`:`ABC123` (required, string) - The license plate of the vehicle that is parked
+ `duration`: (required, duration) - The duration of the parking session
+ `timeUnit`: `Minutes` (required, string) - TimeUnit Enumeration name or value. "Minutes", "Hours", "Days", "Weeks", "Months", "HalfHour", "MidnightCurrentDay", "CalendarDays", "TimeBucket", "SingleHour", "WeekdaysStartMonday", "CalendarWeeks", "NotSpecified", "Unknown"
+ `quantity`: `1` (required, string) - How many minutes or hours the user wants to park
+ `cvv`:`111` (required, string) - The CV2 code from the user's payment card
+ `startTime`:`2015-07-28T20:40:00Z` (required, string) - The start time of the transaction to be started. Must be within 3 minutes of the current time. Must be compliant with RFC 3339.
+ `rateOptionId`:`70000` (required, string) - The rate option Id for a personalized parking session.
+ `paymentMethod`:(required, paymentmethod) - The paymentMethod used of the parking session.
+ `paymentMethodType`:`PaymentAccount` (required, string) - PaymentMethod type used for the parking session.
+ `payload`:(required, payload) - Additional information for the selected payment.
+ `paymentAccountId`:`23fccd39-70c2-446f-915c-6d2362b64e58` (required, string) - Payment Account Id.
+ Body
[
{
"locationId": "70000",
"stall": "1",
"licensePlate": "ABC123",
"duration": {
"timeUnit": "Hours",
"quantity": "1"
},
"cvv": "111",
"startTime": "2015-07-28T20:40:00Z",
"rateOptionId": "70000",
"paymentMethod": {
"paymentMethodType": "PaymentAccount",
"payload": {
"paymentAccountId": "23fccd39-70c2-446f-915c-6d2362b64e58"
}
}
}
]
+ Response 202
+ Headers
Location: https://api.paybyphone.com/events/workflow/d92cfe7d-dd59-49d6-be1a-a3b3bb5d3e6a
### Extend an existing parking session [PUT /parking/accounts/{accountId}/sessions/{activeParkingSessionId}]
**Possible Payment Method types**
It's possible to pay for parking session using following Payment Methods:
- Payment Account (using associated credit or debit card)
- Android Pay token
Example of Payment Method request parameter type for Payment Acccount
{
"paymentMethodType": "PaymentAccount",
"payload": {
"PaymentAccountId": "23fccd39-70c2-446f-915c-6d2362b64e58"
}
}
Example of Payment Method request parameter type for Android Pay
{
"paymentMethodType": "AndroidPayToken",
"payload": {
"token": "wjwqjf;wqfsdfoweutrm,ebdzaiiotrl/. zm,hxfpweti45ym56uj5e",
"publicKey": "sdkfj;;wlegfqw0-9 wqrcip43;i5r",
"paymentInstruments": {
"ccType": "VISA",
"ccMaskedValue": "1111"
}
}
}
**Possible Response Codes**
- 202 - Accepted
- 400 - Bad Request
- 401 - Unauthorized
**Possible Validation Errors**
- ParkingAccountIdInvalidFormat
- LocationNotFound
- CvvRequired
- CvvInvalidFormat
- DurationInvalidFormat
- JsonReaderException
**Possible events**
- ParkingSessionExtended
{
"ParkingSessionId": "23fccd39-70c2-446f-915c-6d2362b64e58",
"VehicleId": "12793707",
"LocationId": "64123",
"VehiclePlate": "GGG328",
"Stall": "",
"vehicleType": "car",
"OldExpiryTime": "2015-01-28T20:54:00Z",
"NewExpiryTime": "2015-01-28T21:54:00Z",
"$type": "ParkingSessionExtended"
}
- ExtendParkingFailed
{
"Data": [ ],
"FailureReason": "PaymentDeclinedByGateway",
"$type": "ExtendParkingFailed"
}
+ Parameters
+ accountId: `1b98d239-8de8-4111-9d7d-562fc31c193a` (required, string) - Parking account id.
+ parkingSessionId: `2bf49b64-28cd-4fc7-96e4-a44b010bf6ea` (required, string) - The ID of the parking session to be extended, this must be an active session
+ Request
+ Attributes (application/json)
+ `duration`: (required, duration) - The duration of the parking session
+ `timeUnit`: `Minutes` (required, string) - TimeUnit Enumeration name or value. "Minutes", "Hours", "Days", "Weeks", "Months", "HalfHour", "MidnightCurrentDay", "CalendarDays", "TimeBucket", "SingleHour", "WeekdaysStartMonday", "CalendarWeeks", "NotSpecified", "Unknown"
+ `quantity`: `1` (required, string) - How many minutes or hours the user wants to park
+ `cvv`:`111` (required, string) - The CV2 code from the user's payment card
+ `paymentMethod`:(required, paymentmethod) - The paymentMethod used of the parking session.
+ `paymentMethodType`:`PaymentAccount` (required, string) - PaymentMethod type used for the parking session.
+ `payload`:(required, payload) - Additional information for the selected payment.
+ `paymentAccountId`:`23fccd39-70c2-446f-915c-6d2362b64e58` (required, string) - Payment Account Id.
+ Headers
Authorization: Bearer <token>
+ Body
[
{
"parkingSessionId": "2bf49b64-28cd-4fc7-96e4-a44b010bf6ea",
"duration": {
"timeUnit":Hours",
"quantity": "1"
},
"cvv": "111",
"paymentMethod": {
"paymentMethodType": "PaymentAccount",
"payload": {
"paymentAccountId": "23fccd39-70c2-446f-915c-6d2362b64e58"
}
}
}
]
+ Response 202
+ Headers
Location: https://api.paybyphone.com/events/workflow/d92cfe7d-dd59-49d6-be1a-a3b3bb5d3e6a
## Manage vehicles [/parking/accounts/{accountId}/vehicles]
### Get all vehicles belonging to a parking account [GET]
Get all vehicles from a User's Account.
**Possible Response Codes**
- 200 - Ok
- 401 - Unauthorized
- 403 - Forbidden
+ Request Contract
Header: Authorization: Bearer <token>
+ Response 200
[
{
"id": "1234",
"licensePlate": "ABC123",
"jurisdiction": "BC",
"countryCode": "CA",
"type": "car"
},
{
"id": "1235",
"licensePlate": "ABC123",
"jurisdiction": "AB",
"countryCode": "CA",
"type": "car"
}
]
### Add a vehicle to a parking account [POST]
**Possible Response Codes**
- 202 - Accepted
- 400 - Bad Request
- 401 - Unauthorized
- 403 - Forbidden
**Possible events**
- VehicleAdded
{
"parkingAccountId": "23fccd39-70c2-446f-915c-6d2362b64e28",
"vehicleId": "12793707",
"countryCode": "CA",
"licensePlate": "GGG328",
"jurisdiction": "MB",
"vehicleType": "car",
"$type": "VehicleAdded"
}
- AddVehicleFailed
{
"Data": [ {"jurisdiction": "BC"}, {"CountryCode": "AU"} ],
"FailureReason": "JurisdictionInvalidForCountryCode",
"$type": "AddVehicleFailed"
}
**Possible Validation Errors**
- LicensePlateInvalidFormat - License Plate is not a valid format. Minimum 2 characters, maximum 10 characters. A-Z and 0-9 characters only.
- LicensePlateRequired - License plate is required.
- JurisdictionNotFound - Jurisdiction not found. Valid jurisdictions are Countries and Regions supported by API#Provinces
- CountryCodeRequired - Country Code required.
- CountryCodeNotFound - Country Code not found. Valid country ids are: CA, US, GB, AU, FR, CH. See Countries and Regions supported by API#Countries
- VehicleTypeRequired - Vehicle Type is required.
- VehicleTypeNotFound - Vehicle Type not found. Valid types are: car, motorcycle, electricMotorcycle, heavyGoodsVehicle
- JsonReaderException - Provided json is in an invalid format
- JurisdictionInvalidForCountryCode - Provided country does not contain provided jurisdiction.
+ Request
{
"licensePlate": "TEST9233",
"jurisdiction": "BC",
"countryCode": "CA",
"vehicleType": "car"
}
+ Response 202 (application/json)
+ Headers
Location: https://api.paybyphone.com/events/workflow/d92cfe7d-dd59-49d6-be1a-a3b3bb5d3e6a
## Manage a vehicle belonging to a parking account [/parking/accounts/{accountId}/vehicles/{vehicleId}]
### Update a vehicle on a parking account [PUT]
**Possible Response Codes**
- 403 - Forbidden
**Possible events**
- VehicleUpdated
{
"parkingAccountId": "23fccd39-70c2-446f-915c-6d2362b64e28",
"vehicleId": "12793707",
"countryCode": "CA",
"licensePlate": "GGG328",
"jurisdiction": "MB",
"vehicleType": "motorcycle",
"$type": "VehicleUpdated"
}
- UpdateVehicleFailed
{
"Data": [ {"jurisdiction": "BC"}, {"CountryCode": "AU"} ],
"FailureReason": "JurisdictionInvalidForCountryCode",
"$type": "AddVehicleFailed"
}
**Validation Errors**
- VehicleNotFound - Vehicle with vehicle Id not found.
- LicensePlateInvalidFormat - License Plate is not a valid format. Minimum 2 characters, maximum 10 characters. A-Z and 0-9 characters only.
- LicensePlateRequired - License plate is required.
- JurisdictionNotFound - Jurisdiction not found. Valid jurisdictions are Countries and Regions supported by API#Provinces
- CountryCodeRequired - Country Code required.
- CountryCodeNotFound - Country Code not found. Valid country ids are: CA, US, GB, AU, FR, CH. See Countries and Regions supported by API#Countries
- VehicleTypeRequired - Vehicle Type is required.
- VehicleTypeNotFound - Vehicle Type not found. Valid types are: car, motorcycle, electricMotorcycle, heavyGoodsVehicle
- VehicleIdInvalidFormat - Vehicle Id must be an integer.
- MemberAccountNotFound - Member account could not be found.
- JsonReaderException - Provided json is in an invalid format.
- JurisdictionInvalidForCountryCode - Provided country does not contain provided jurisdiction.
+ Request
Body:
{
"licensePlate": "TEST9233",
"jurisdiction": "BC",
"countryCode": "CA",
"vehicleType": "car"
}
+ Response 202 (application/json)
+ Headers
Location: https://api.paybyphone.com/events/workflow/d92cfe7d-dd59-49d6-be1a-a3b3bb5d3e6a
### Delete a vehicle [DELETE]
Delete a vehicle from a parking account
**Possible Response Codes**
- 202 - Accepted
- 401 - Unauthorized
- 403 - Forbidden
**Possible events**
- VehicleDeleted
{
"parkingAccountId": "23fccd39-70c2-446f-915c-6d2362b64e28",
"vehicleId": "12793707",
"LegacyMemberUid": "18789426",
"$type": "VehicleDeleted"
}
- DeleteVehicleFailed
{
"Data": [ ],
"FailureReason": "MemberAccountNotFound",
"$type": "DeleteVehicleFailed"
}
**Validation Errors**
- VehicleNotFound - Vehicle with vehicle Id not found.
- JsonReaderException - Provided json is in an invalid format.
- MemberAccountNotFound - Member account could not be found.
- VehicleIdInvalidFormat - Vehicle Id must be an integer.
+ Response 202 (application/json)
+ Headers
Location: https://api.paybyphone.com/events/workflow/d92cfe7d-dd59-49d6-be1a-a3b3bb5d3e6a
## Get parking preferences for the parking account [GET /parking/accounts/{accountId}/preferences]
**Possible Response Codes**
- 200 - OK
- 400 - Bad Request
- 401 - Unauthorized
- 403 - Forbidden
**Possible Error Codes**
- EmailInvalidFormat
- JsonReaderException
+ Parameters
+ accountId: `00000000-0000-0000-0000-000000000000` (required, string) - Parking account id.
+ Response 200
+ Attributes (application/json)
+ `parkingAccountId`:`00000000-0000-0000-0000-000000000000` (string) - The parking account ID
+ `sendEmailReceipts`:`false` (string) - Does account holder wishes to get receipts from email
+ `sendTextReminders`:`false` (string) - Does account holder wishes to receive text reminder
+ `sendTextReceipts`:`false` (string) - Does account holder wishes to get receipts from text
+ `email`:`null` (string) - Email account for account holder
+ Body
{
"parkingAccountId": "00000000-0000-0000-0000-000000000000",
"sendEmailReceipts": false,
"sendTextReminders": false,
"sendTextReceipts": false,
"email": null
}
## Set parking preferences for the parking account [PUT /parking/accounts/{accountId}/preferences or POST /parking/accounts/{accountId}/preferences]
**Response Codes**
- 202 - OK
- 400 - Bad Request
- 401 - Unauthorized
- 403 - Forbidden
**Possible events**
- PreferencesCreated/PreferencesUpdated
{
"parkingAccountId": "23fccd39-70c2-446f-915c-6d2362b64e28",
"Email": "test@server.com",
"SendTextReceipts": "true",
"SendTextReminders": "true",
"SendEmailReceipts": "true",
"$type": "PreferencesCreated"
}
- AddMemberPreferencesFailed or UpdateMemberPreferencesFailed
{
"FailureReason": "MemberAccountNotFound",
"$type": "AddMemberPreferencesFailed"
}
+ Request (application/json)
+ Body
{
"email": "email@-domain.com",
"sendEmailReceipts": true,
"sendTextReceipts": true,
"sendTextReminders": true
}
+ Response 202 (application/json)
+ Headers
Location: https://api.paybyphone.com/events/workflow/d92cfe7d-dd59-49d6-be1a-a3b3bb5d3e6a
## Get or Create a parking account [/parking/accounts]
### Create a parking account for the member [POST]
**Response Codes**
- 202 - OK
- 401 - Unauthorized
**Possible events**
- ParkingAccountCreated
{
"ParkingAccountId": "23fccd39-70c2-446f-915c-6d2362b64e28",
"MemberId": "23fccd39-70c2-446f-915c-6d2362b64e58",
"$type": "ParkingAccountCreated"
}
- CreateParkingAccountFailed
{
"Data": [ ],
"FailureReason": "MemberAccountNotFound",
"$type": "CreateParkingAccountFailed"
}
+ Response 202 (application/json)
+ Headers
Location: https://api.paybyphone.com/events/workflow/d92cfe7d-dd59-49d6-be1a-a3b3bb5d3e6a
### Get all parking accounts for the member [GET]
**Response Codes**
- 200 - OK
- 401 - Unauthorized
+ Response 200 (application/json)
[
{
"id": "d6d1817e-98ee-4600-b82b-f1aace2abea5"
}
]
## Get a parking quote [/parking/accounts/{parkingAccountGuid}/quote?locationId={locationId}&durationTimeUnit={TimeUnit}&durationQuantity={Quantity}&licensePlate={LicensePlate}&stall={stall}&rateOptionId={rateOptionId}]
### Retrieve a parking quote detail [GET]
Retrieve a parking quote detail
**Response Codes**
- 200 - Ok.
- 400 - Bad request.
- 404 - Not Found.
**Response Failure Reasons**
- LocationIdInvalidFormat - LocationId could not be converted to an integer format.
- LocationIdRequired - LocationId is required.
- LocationNotFound - No location could be found having the provided locationId.
- DurationTimeUnitRequired - You forgot you provide DurationTimeUnit
- DurationTimeUnitInvalidFormat - Time unit is not in the accepted time units enumeration.
- Value is not valid for Quantity - Error thrown when the quantity parameter could not be converted to an integer format.
- QuantityInvalidFormat - Quantity can not be zero.
- LicensePlateRequired - When getting a quote in a location that has a wait-time-after-max-stay restriction, you need to provide the license plate. This is to enforce the wait-time-after-max-stay restriction.
- CannotExtendBecauseOfNoReturnRule - When getting a quote in a location that has a wait-time-after-max-stay restriction, if you parked for the maximum stay you will need to wait until you can start parking again in
that location.
- RateOptionNotFound - Rate Option Id specified is not associated with the location or the license plate.
- VehicleNotFound - Vehicle with vehicle Id not found.
- RateOptionIdRequired - Missing RateOptionId on the request for Start Parking
- RateOptionIdInvalidFormat - RateOptionId in a unsupported format such as negative number or characters
- LicensePlateRequired - License plate is required.
- LicensePlateInvalidFormat - LicensePlateInvalidFormat in a unsupported format such as negative number or characters
- StallInvalidFormat - Stall number is in an unsupported format such as a negative number or alphabetic characters
- LocationIdMustBeNullWhenParkingSessionIdSpecified - Remove LocationId from the request and keep ParkingSessionId
- RateOptionIdMustBeNullWhenParkingSessionIdSpecified - Remove RateOptionId from the request and keep ParkingSessionId
- LicensePlateMustBeNullWhenParkingSessionIdSpecified - Remove LicensePlate from the request and keep ParkingSessionId
- StallMustBeNullWhenParkingSessionIdSpecified - Remove Stall from the request and keep ParkingSessionId
+ Parameters
+ parkingAccountGuid: `b12e8e08-ee59-4774-8062-a40401272436` (required, guid) - GUID of the user parking account.
+ locationId: `40002` (optional, string) - Location ID. Note that this can not be a reverse lookup stall, such as in the location details endpoint
+ durationTimeUnit: `Minutes` (required, string) - Time unit enumeration string, as described in Time Units table below. Either the name or the value.
+ 1 (string) - Minutes
+ 2 (string) - Hours
+ 3 (string) - Days
+ 4 (string) - Weeks
+ 5 (string) - Months
+ 6 (string) - HalfHour
+ 7 (string) - MidnightCurrentDay
+ 8 (string) - CalendarDays
+ 9 (string) - TimeBucket
+ 10 (string) - SingleHour
+ 11 (string) - WeekdaysStartMonday
+ 12 (string) - CalendarWeeks
+ 0 (string) - NotSpecified/Unknown
+ Minutes (string)
+ Hours (string)
+ Days (string)
+ Weeks (string)
+ Months (string)
+ HalfHour (string)
+ MidnightCurrentDay (string)
+ CalendarDays (string)
+ TimeBucket (string)
+ SingleHour (string)
+ WeekdaysStartMonday (string)
+ CalendarWeeks (string)
+ NotSpecified (string)
+ Unknown (string)
+ durationQuantity: `60` (required, int) - Number of time units.
+ licensePlate: `273cvn` (optional, string) - License plate being parked. Used to calculate promotion discounts.
+ stall: `52444` (optional, string) - Stall number of the current parking session. Used for extensions to ensure the app is extending the right session.
+ rateOptionId: `75001` (optional, int) - The ID of the rate option you want to use
+ Response
+ Attributes
+ locationId: `40006` (int) - The Location ID where the user is parked.
+ stall: `123` (string) - Stall where the vehicle is parked if the parking session took place in a stall, null otherwise.
+ quoteDate: `2015-06-25T18:00:00Z` (dateTime) - Quote Time of the rate calculation, in an RFC 3339 compliant format.
+ totalCost: (money) - Total cost of the parkfig session
+ amount
+ currency
+ parkingAccountId: `56514ff5-44fc-463b-820f-1d47393e1703` (guid)
+ parkingStartTime: `2014-12-29T22:00:00Z` (dateTime) - Parking Start Time of the rate calculation, in an RFC 3339 compliant format.
+ parkingExpiryTime: `2014-12-29T23:00:00Z` (dateTime) - Parking Expiry Time of the rate calculation, in an RFC 3339 compliant format.
+ parkingDurationAdjustment: `NotAdjusted` (enum)
+ NotAdjusted
+ DurationIncreased
+ DurationDecreased
+ licensePlate: `ABC123` (string) - The license plate of the vehicle that is parked
+ quoteItems : (array[string])
+ quoteItemType
+ promotion
+ name
+ costAmount
+ amount
+ currency
+ Response 200 (application/json)
Content-Type: application/json
{
"locationId": "40006",
"stall": "123",
"quoteDate": "2015-06-25T18:00:00Z",
"totalCost": {
"amount": 5.00,
"currency": "CAD"
},
"parkingAccountId": "56514ff5-44fc-463b-820f-1d47393e1703",
"parkingStartTime": "2014-12-29T22:00:00Z",
"parkingExpiryTime": "2014-12-29T23:00:00Z",
"patrkingDurationAdjustment": "NotAdjusted",
"licensePlate": "ABC123",
"quoteItems":[{
"quoteItemType": "parking",
"name": "Parking",
"costAmout": {
"amount":9.00,
"currency": "CAD"
}
},{
"quoteItemType": "convenienceFee",
"name": "Convenience Fee",
"costAmount": {
"amount": 1.00,
"currency": "CAD"
}
},{
"quoteItemType": "promotion",
"name": "COV electric vehicle discount.",
"costAmount": {
"amount": -5.00,
"currency": "CAD"
}
}]
}
## Get a parking extension quote [/parking/accounts/{parkingAccountGuid}/quote?durationTimeUnit={DurationTimeUnit}&durationQuantity={DurationQuantity}&parkingSessionId={parkingSessionId}]
### Retrieve a parking extension quote [GET]
Retrieve a parking extension quote detail
**Response Codes**
- 200 - Ok
- 400 - Bad request
- 404 - Not Found
**Response Failure Reasons**
- DurationTimeUnitRequired - You forgot you provide DurationTimeUnit
- DurationTimeUnitInvalidFormat - Time unit is not in the accepted time units enumeration.
- Value is not valid for Quantity - Error thrown when the quantity parameter could not be converted to an integer format.
- QuantityInvalidFormat - Quantity can not be zero.
- LocationIdMustBeNullWhenParkingSessionIdSpecified - Remove LocationId from the request and keep ParkingSessionId
- RateOptionIdMustBeNullWhenParkingSessionIdSpecified - Remove RateOptionId from the request and keep ParkingSessionId
- LicensePlateMustBeNullWhenParkingSessionIdSpecified - Remove LicensePlate from the request and keep ParkingSessionId
- StallMustBeNullWhenParkingSessionIdSpecified - Remove Stall from the request and keep ParkingSessionId
+ Parameters
+ parkingAccountGuid: `b12e8e08-ee59-4774-8062-a40401272436` (required, guid) - GUID of the user parking account.
+ durationTimeUnit: `Minutes` (required, string) - Time unit enumeration string, as described in Time Units table below. Either the name or the value.
+ 1 (string) - Minutes
+ 2 (string) - Hours
+ 3 (string) - Days
+ 4 (string) - Weeks
+ 5 (string) - Months
+ 6 (string) - HalfHour
+ 7 (string) - MidnightCurrentDay
+ 8 (string) - CalendarDays
+ 9 (string) - TimeBucket
+ 10 (string) - SingleHour
+ 11 (string) - WeekdaysStartMonday
+ 12 (string) - CalendarWeeks
+ 0 (string) - NotSpecified/Unknown
+ Minutes (string)
+ Hours (string)
+ Days (string)
+ Weeks (string)
+ Months (string)
+ HalfHour (string)
+ MidnightCurrentDay (string)
+ CalendarDays (string)
+ TimeBucket (string)
+ SingleHour (string)
+ WeekdaysStartMonday (string)
+ CalendarWeeks (string)
+ NotSpecified (string)
+ Unknown (string)
+ durationQuantity: `60` (required, int) - Number of time units.
+ parkingSessionId: `b12e8e08-ee59-4774-8062-a40401272436` (optional, Guid) - The parkingSessionId used for extension. Is present, means it's an Extension Quote. Location, Stall, RateOptionId,
+ Response
+ Attributes
+ locationId: `40006` (int) - The Location ID where the user is parked.
+ stall: `123` (string) - Stall where the vehicle is parked if the parking session took place in a stall, null otherwise.
+ quoteDate: `2015-06-25T18:00:00Z` (dateTime) - Quote Time of the rate calculation, in an RFC 3339 compliant format.
+ totalCost: (money) - Total cost of the parkfig session
+ amount
+ currency
+ parkingAccountId: `56514ff5-44fc-463b-820f-1d47393e1703` (guid)
+ parkingStartTime: `2014-12-29T22:00:00Z` (dateTime) - Parking Start Time of the rate calculation, in an RFC 3339 compliant format.
+ parkingExpiryTime: `2014-12-29T23:00:00Z` (dateTime) - Parking Expiry Time of the rate calculation, in an RFC 3339 compliant format.
+ parkingDurationAdjustment: `NotAdjusted` (enum)
+ NotAdjusted
+ DurationIncreased
+ DurationDecreased
+ licensePlate: `ABC123` (string) - The license plate of the vehicle that is parked
+ quoteItems : (array[string])
+ quoteItemType
+ promotion
+ name
+ costAmount
+ amount
+ currency
+ Response 200 (application/json)
Content-Type: application/json
{
"locationId": "40006",
"stall": "123",
"quoteDate": "2015-06-25T18:00:00Z",
"totalCost": {
"amount": 5.00,
"currency": "CAD"
},
"parkingAccountId": "56514ff5-44fc-463b-820f-1d47393e1703",
"parkingStartTime": "2014-12-29T22:00:00Z",
"parkingExpiryTime": "2014-12-29T23:00:00Z",
"patrkingDurationAdjustment": "NotAdjusted",
"licensePlate": "ABC123",
"quoteItems":[{
"quoteItemType": "parking",
"name": "Parking",
"costAmout": {
"amount":9.00,
"currency": "CAD"
}
},{
"quoteItemType": "convenienceFee",
"name": "Convenience Fee",
"costAmount": {
"amount": 1.00,
"currency": "CAD"
}
},{
"quoteItemType": "promotion",
"name": "COV electric vehicle discount.",
"costAmount": {
"amount": -5.00,
"currency": "CAD"
}
}]
}
## Get details parking rates [/parking/locations/{locationId}/ratePolicies?plates={list of license plates}]
### Get details about what rate policies can be applied at a location to the user's vehicles [GET]
**Response Failure Reasons**
-LocationIdInvalidFormat - LocationId could not be converted to an integer format.
+ Request
Header: Authorization: Bearer <token>
+ Parameters
+ plates: `ABC123` (required, string) - License plates to get the rate policies for (different vehicles may be eligible for different parking rates).
+ Response 200 (application/json)
Content-Type: application/json
[
{
"rateOptionId": 75001,
"name": "Visiteur",
"eligibilityType": "VIS",
"isDefault": true,
"eligiblePlates": [
{
"plate": "ABC123",
"eligibleSectors": [
"1E"
]
}
]
}
]
## Parking location search [/parking/locations/?advertisedLocationNumber={advertisedLocationNumber}&countryCode={countryCode}&stall={stall}&nfcKey={nfcKey}]
### Find zero or more locations' details [GET]
**Response codes**
- 200 - OK
- 400 - Bad Request
- 500 - Internal Server Error
**Max Stays Remarks and Examples**
- MaxStayCouldNotBeVerified - The maximum stay could not be accurately determined. The app should not show any message regarding max stay at the parking step, before the user enters duration.
- NoMaxStay - The location does not have a max stay. User can park for any duration. The app should not show any message regarding max stay at the parking step, before the user enters duration.
- ParkingAllowed currentMaxStayInSeconds: 7200 - User can only park for 7200 seconds. The app is safe to show a message regarding this limit.
- ParkingAllowed currentMaxStayInSeconds: 0 - Even though parking is allowed, we could not accurately determine the exact maximum allowed duration. The app should not show any message regarding max stay at the parking step, before the user enters duration.
- ParkingNotAllowed - Parking is not allowed at the time of calling this endpoint. The app is safe to show a "no parking at this time" message.
+ Request
Header: Authorization: Bearer <token>
+ Parameters
+ advertisedLocationNumber: `10` (optional, string) - Can either be a Lot ID or a Stall, if the location supports reverse lookup.
+ countryCode: `CA` (optional, string) - Country ISO 3166 code of the location.
+ stall: `1` (optional, string) - If the location is stallbased then you can pass the stall number either to verify its existence or to get the location in case the stall belongs to another lot in the same group.
+ nfcKey: `62LQ` (optional, string) - NFC sticker id for the location. If nfcKey is provided then, all the other search parameters must be empty.
+ Response
+ Attributes
+ status: `lotOpen` (enum) - Enumeration. Valid items are
+ lotOpen
+ lotClosed
+ lotYetToBeActivated
+ lotMessages: (string) - A collection if key/value pairs that contain messages and the culture they belong to.
+ Response 200 (application/json)
[{
"locationId": "12345",
"name": "344th Street",
"vendorName": "COV",
"status": "lotOpen",
"allowExtend": "false",
"isStallBased": "true",
"isPlateBased": "false",
"currency": "CAD",
"countryCode": "CA",
"promptForCvv": "true",
"lotMessages": [],
"stall": 123,
"isReverseLookup": "true",
"acceptedPaymentTypes": [
"Visa",
"Mastercard",
"Amex",
"DebitCard",
"Discover",
"PaypointCash"
]
}]
+ Response 200 (application/json)
[]
## Parking location details [/parking/locations/{locationId}]
### Get an individual location's details [GET]
**Response codes**
- 200 - OK
- 400 - Bad Request
- 404 - Not Found
- 500 - Internal Server Error
**Max Stays Remarks and Examples**
- MaxStayCouldNotBeVerified - The maximum stay could not be accurately determined. The app should not show any message regarding max stay at the parking step, before the user enters duration.
- NoMaxStay - The location does not have a max stay. User can park for any duration. The app should not show any message regarding max stay at the parking step, before the user enters duration.
- ParkingAllowed currentMaxStayInSeconds: 7200 - User can only park for 7200 seconds. The app is safe to show a message regarding this limit.
- ParkingAllowed currentMaxStayInSeconds: 0 - Even though parking is allowed, we could not accurately determine the exact maximum allowed duration. The app should not show any message regarding max stay at the parking step, before the user enters duration.
- ParkingNotAllowed - Parking is not allowed at the time of calling this endpoint. The app is safe to show a "no parking at this time" message.
+ Request
Header: Authorization: Bearer <token>
+ Parameters
+ locationId: `10` (required, string) - Must be a valid locationId.
+ stall: `1` (optional, string) - provide a specific stall for locations with multiple stalls
+ Response
+ Attributes
+ status: `lotOpen` (enum) - Enumeration. Valid items are
+ lotOpen
+ lotClosed
+ lotYetToBeActivated
+ lotMessages: (string) - A collection if key/value pairs that contain messages and the culture they belong to.
+ Response 200
Content-Type: application/json
{