-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhm-eligibility-v1.yml
177 lines (169 loc) · 4.75 KB
/
hm-eligibility-v1.yml
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
openapi: 3.0.3
info:
title: Eligibility API
description: |-
This API allows lookups to see if a vehicle is eligible for telematics data.
In order to use the API endpoints you will need to retrieve an access token using the [OAuth API](/api-references/code-references/oauth2/reference/v1/) with `client_credentials` grant
* Sandbox server: `https://sandbox.api.high-mobility.com`
* Production server: `https://api.high-mobility.com`
Note that in production, the brands of the VINs that are being checked have to first be activated for your application before you can do lookups.
contact:
email: [email protected]
version: 1.0.0
externalDocs:
description: High Mobility's Developer Console
url: https://console.high-mobility.com
servers:
- url: https://api.high-mobility.com
- url: https://sandbox.api.high-mobility.com
paths:
/v1/eligibility:
post:
deprecated: false
security:
- EligibilityAuth:
- vehicle:eligibility-check
tags:
- Eligibility
summary: Check vehicle eligibility
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
description: Vehicle eligibility requested successfully
'401':
content:
application/json:
schema:
$ref: '#/components/schemas/EligibilityUnauthorizedErrors'
description: When an invalid ServiceAccountToken is used.
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/GeneralErrors'
description: Errors such as invalid VIN and brand call failed
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Request'
description: >-
Retrieves the eligibility status for a specific VIN. This can be used to
find out if the vehicle has the necessary connectivity to transmit data.
components:
schemas:
SuccessResponse:
type: object
title: SuccessResponse
properties:
vin:
type: string
eligible:
type: boolean
data_delivery:
type: array
items:
type: string
enum:
- pull
- push
connectivity_status:
type: string
enum:
- activated
- deactivated
- unknown
primary_user_assigned:
type: boolean
required:
- vin
- eligible
- data_delivery
example:
vin: EXVETESTVIN000001
eligible: true
data_delivery:
- pull
- push
description: Response of eligibility check
Request:
type: object
properties:
vin:
type: string
description: Vehicle vin.
brand:
type: string
enum:
- mercedes-benz
- ford
- bmw
- mini
- citroen
- peugeot
- opel
- vauxhall
- ds
- jeep
- fiat
- alfaromeo
- renault
- toyota
- lexus
- volvo-cars
- sandbox
required:
- vin
- brand
EligibilityUnauthorizedErrors:
type: object
title: Errors
properties:
errors:
description: List of errors
type: array
items:
$ref: '#/components/schemas/Error'
example:
- detail: >
Missing or invalid authorization header. The token must be
obtained through the service account API and sent as a header with
the format "Authorization: Bearer <token>"
source: Authorization
title: Not authorized
GeneralErrors:
type: object
title: Errors
properties:
errors:
description: List of errors
type: array
items:
$ref: '#/components/schemas/Error'
Error:
type: object
title: Error
required:
- title
properties:
title:
type: string
description: Error title
source:
type: string
description: Field that has problem
detail:
type: string
description: Error detail
description: Error details
securitySchemes:
EligibilityAuth:
flows:
clientCredentials:
scopes:
vehicle:eligibility-check: eligibility check
tokenUrl: https://api.sandbox.high-mobility.com/v1/access_token
type: oauth2