-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathVehicles.apib
85 lines (57 loc) · 2.21 KB
/
Vehicles.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
# Group Vehicles
Parking Vehicle resources
## Vehicles [/public/parking/accounts/{userAccountId}/vehicles]
The vehicles root resource
+ Parameters
+ userAccountId (required, string, `8d21a912-561a-48ff-b31b-00d600a2544e`) ... `userAccountId` of the UserAccount in the form of a GUID.
+ Model (application/json)
JSON representation of Vehicles.
+ Body
[{
"id": "abc-234",
"userAccountId" : "8d21a912-561a-48ff-b31b-00d600a2544e",
"licensePlate": "ZZZ 666",
"province" : "BC",
"vehicleType" : 3
}]
## Vehicle [/public/parking/accounts/{userAccountId}/vehicles/{vehicleId}]
An individual vehicle resource
+ Parameters
+ userAccountId (required, string, `8d21a912-561a-48ff-b31b-00d600a2544e`) ... `userAccountId` of the UserAccount in the form of a GUID.
+ vehicleId (required, string, `fff-gr34-fff`) ... `vehicleId` of the Vehicle Resource to perform action with. Has example value.
+ Model (application/json)
JSON representation of A Vehicle.
+ Body
{
"id": "abc-234",
"userAccountId" : "8d21a912-561a-48ff-b31b-00d600a2544e",
"licensePlate": "ZZZ 666",
"province" : "BC",
"vehicleType" : 3
}
### Retrieve an individual vehicle for user [GET]
Get an individual vehicle from a User's Account.
User is identified by the `userAccountId`.
Vehicle is identified by the `vehicleId`.
**Request Contract**
Header: Authorization: Bearer <token>
**Response Contract**
Content-Type: application/json
{
"id": "",
"userAccountId" : "",
"licensePlate": "",
"province" : "",
"vehicleType" :
}
The *id* is assigned by the API at the moment of creation.
**Possible Response Codes**
- 200
- 404
+ Request vehicleId Exists
/public/parking/accounts/{userAccountId}/vehicles/{vehicleId}
+ Response 200
[Vehicle][]
+ Request vehicleId Does Not Exists
/public/parking/accounts/{userAccountId}/vehicles/{vehicleId}
+ Response 404