-
Notifications
You must be signed in to change notification settings - Fork 0
/
swagger.yaml
326 lines (326 loc) · 10.9 KB
/
swagger.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
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
swagger: "2.0"
info:
description: Virtuoso MyMarketing Notification API
version: 1.0.0
title: MyMarketing Notifications
contact:
email: [email protected]
host: virtserver.swaggerhub.com
basePath: /cgseattle/Notification/1.0.0
schemes:
- https
paths:
/login:
get:
tags:
- Login
summary: Authentication
description: 'Generate an encrpted token as described by the JavaScript on this fiddle: https://jsfiddle.net/VirtuosoEngineering/xyrzc06n/. Confirm the token generated by the JavaScript matches the token generated by your programming language before proceeding. See https://api.virtuoso.com/documentation for more information.'
consumes:
- application/json
produces:
- application/json
parameters:
- name: user
in: query
description: API user name
required: true
type: string
- name: authToken
in: query
description: Encrypted auth token generated as per instructions above
required: true
type: string
responses:
200:
description: 'OK: The request was successful, we updated the resource and the response body contains the representation.'
schema:
$ref: '#/definitions/LoginResponse'
400:
description: Bad request
401:
description: Unauthorized
/notifications:
post:
tags:
- Notification
summary: Queue a notification
description: Queues a notification to be sent on sendDate
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: Notification that needs to be added to the queue
required: true
schema:
$ref: '#/definitions/Notification'
responses:
201:
description: 'OK: The request was successful, we updated the resource and the response body contains the representation.'
schema:
$ref: '#/definitions/NotificationResponse'
400:
description: Bad request
401:
description: Unauthorized
/consumers:
post:
tags:
- Consumer
summary: Create a consumer
description: Create a consumer record
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: body
description: Create a consumer record
required: true
schema:
$ref: '#/definitions/ConsumerCreate'
responses:
201:
description: 'OK: The request was successful, we updated the resource and the response body contains the representation.'
schema:
$ref: '#/definitions/ConsumerResponse'
400:
description: Bad request
401:
description: Unauthorized
/consumers/{virtuosoId}:
put:
tags:
- Consumer
summary: Update a consumer
description: Update a consumer record based on virtuosoId.
consumes:
- application/json
produces:
- application/json
parameters:
- in: path
name: virtuosoId
type: number
format: int64
required: true
description: Virtuoso ID for this consumer that was received as part of /consumer POST response
- in: body
name: body
description: Update an existing Consumer record
required: true
schema:
$ref: '#/definitions/ConsumerUpdate'
responses:
201:
description: 'OK: The request was successful, we updated the resource and the response body contains the representation.'
schema:
$ref: '#/definitions/ConsumerResponse'
400:
description: Bad request
401:
description: Unauthorized
definitions:
Notification:
type: object
required:
- advisorEmail
- memberNumber
- campaignName
- consumerEmails
- correlationId
- sendDate
- templateId
- token
properties:
correlationId:
type: string
format: uuid
example: BB90B7F5-2C61-4ABF-9A70-29976B5C7453
advisorEmail:
type: string
format: email
example: [email protected]
memberNumber:
type: number
format: int32
example: 12345
consumerEmails:
type: array
example:
items:
type: string
sendDate:
type: string
format: date
example: 2019-05-29
templateId:
type: number
format: int32
example: 555.0
campaignName:
type: string
example: 'Consumer Notification: Wanderlist Reminder'
customData:
type: array
items:
$ref: '#/definitions/CustomData'
token:
type: string
example: ap51e1R1uy7Detf2pzU5ORxQ2O2Az0FRA4ANHDGS2YQIZhtMtJt486ffyEXOn+NNC74+IX1Hv/RB/vsEq9obS2mgyElLljZGBLXYC1lrvX0zB5ICQ/ebUoNPyX+kumCJ4UBAXAZitDkwkwPXClobLr/xjN1lgaqOPYfT9ky3n5N/tSYS5I4aCZexe2reo0ETMdum+ykDjHULWwEWUVYSKBEsG0Ouj6Fpp1GPziWS9qBv7CRF0njhfuyz1PNYJ5iGEXZa7+/VDdjfB8mVVscg7QtFANJE72IiQOyDLc7zmfQAG5niekZqZ1jjBgWMNRMGSFIOUnmwkvAdfGZvfi6KiMu4XBu4J2DSb6j6DMyyLgGpgw4quLWzWdgbnb5RtUbgEzG1d7A/6+bo3X7hTUbi3JCw==
description: Token to be passed on the next API call.
CustomData:
type: object
required:
- key
- value
properties:
key:
type: string
example: first_name
value:
type: string
example: Bob
NotificationResponse:
type: object
properties:
serverUtcTime:
type: string
format: date-time
example: 2019-06-02T22:52:55.6486485Z
description: Server time when this request was executed
token:
type: string
example: apH+qR38Jzevp9KkK65jHEWDH5PSx1nERbRHFnROyNx1eqOubasgex2jLtK/aMfez66jFUVjKLruSCMQ5p6HI7/gY32+BruQYTfjmzKcygUOPNVFcLnC99rCr3tKDRepH/uBVqxZP1C879cuLqj/TKnbYd7jD19wz+VYuAeu0AeNsxjgVZlNtzsN9nBVfoWUXFNHpbRlcw+bS4vbnu04yuPXNjn+X6gGYb7Qv64ieFiLUPOKl6ojBqtbiMksrwecJmSQo/qrU0VRKYh0b28uOoSz8QuXqsKRxgNNiulI1fejk7W6o4gobkDEP1ZeVYMxuQ/pgjnk6DcJLeHozA5EAt9erWHtHjaw3/1Wcpg7Nzz6Ld3H00yyh8cwYhmEvfTMR147onWKQ3wNvStZKaVqEkenIwtZUWz6OtBjzW4MCNzRRg0ouEDrR0h98fDdGbxT8GmVPab3WI18XqIWThVGM8Qw==
description: Bearer token to be used on the next request if executed within a minute
status:
type: number
format: int32
example: 201.0
ConsumerResponse:
type: object
properties:
serverUtcTime:
type: string
format: date-time
example: 2019-06-02T22:52:55.6486485Z
description: Server time when this request was executed
token:
type: string
example: apH+qR38Jzevp9KkK65jHEWDH5PSx1nERbRHFnROyNx1eqOubasgex2jLtK/aMfez66jFUVjKLruSCMQ5p6HI7/gY32+BruQYTfjmzKcygUOPNVFcLnC99rCr3tKDRepH/uBVqxZP1C879cuLqj/TKnbYd7jD19wz+VYuAeu0AeNsxjgVZlNtzsN9nBVfoWUXFNHpbRlcw+bS4vbnu04yuPXNjn+X6gGYb7Qv64ieFiLUPOKl6ojBqtbiMksrwecJmSQo/qrU0VRKYh0b28uOoSz8QuXqsKRxgNNiulI1fejk7W6o4gobkDEP1ZeVYMxuQ/pgjnk6DcJLeHozA5EAt9erWHtHjaw3/1Wcpg7Nzz6Ld3H00yyh8cwYhmEvfTMR147onWKQ3wNvStZKaVqEkenIwtZUWz6OtBjzW4MCNzRRg0ouEDrR0h98fDdGbxT8GmVPab3WI18XqIWThVGM8Qw==
description: Bearer token to be used on the next request if executed within a minute
status:
type: number
format: int32
example: 201.0
result:
$ref: '#/definitions/ConsumerResult'
ConsumerResult:
type: object
properties:
virtuosoId:
type: number
format: int64
example: 1.2345678904293924E16
ConsumerCreate:
type: object
required:
- advisorEmail
- memberNumber
- correlationId
- email
- firstName
- lastName
- token
properties:
correlationId:
type: string
format: uuid
example: BB90B7F5-2C61-4ABF-9A70-29976B5C7453
firstName:
type: string
example: Bob
lastName:
type: string
example: Smith
email:
type: string
format: email
example: [email protected]
advisorEmail:
type: string
format: email
example: [email protected]
memberNumber:
type: number
format: int32
example: 12345
token:
type: string
example: ap51e1R1uy7Detf2pzU5ORxQ2O2Az0FRA4ANHDGS2YQIZhtMtJt486ffyEXOn+NNC74+IX1Hv/RB/vsEq9obS2mgyElLljZGBLXYC1lrvX0zB5ICQ/ebUoNPyX+kumCJ4UBAXAZitDkwkwPXClobLr/xjN1lgaqOPYfT9ky3n5N/tSYS5I4aCZexe2reo0ETMdum+ykDjHULWwEWUVYSKBEsG0Ouj6Fpp1GPziWS9qBv7CRF0njhfuyz1PNYJ5iGEXZa7+/VDdjfB8mVVscg7QtFANJE72IiQOyDLc7zmfQAG5niekZqZ1jjBgWMNRMGSFIOUnmwkvAdfGZvfi6KiMu4XBu4J2DSb6j6DMyyLgGpgw4quLWzWdgbnb5RtUbgEzG1d7A/6+bo3X7hTUbi3JCw==
description: Token to be passed on the next API call.
ConsumerUpdate:
type: object
required:
- correlationId
- token
properties:
correlationId:
type: string
format: uuid
example: BB90B7F5-2C61-4ABF-9A70-29976B5C7453
firstName:
type: string
example: Bob
lastName:
type: string
example: Smith
email:
type: string
format: email
example: [email protected]
advisorEmail:
type: string
format: email
example: [email protected]
memberNumber:
type: number
format: int32
example: 12345
status:
type: string
default: active
enum:
- active
- inactive
token:
type: string
example: ap51e1R1uy7Detf2pzU5ORxQ2O2Az0FRA4ANHDGS2YQIZhtMtJt486ffyEXOn+NNC74+IX1Hv/RB/vsEq9obS2mgyElLljZGBLXYC1lrvX0zB5ICQ/ebUoNPyX+kumCJ4UBAXAZitDkwkwPXClobLr/xjN1lgaqOPYfT9ky3n5N/tSYS5I4aCZexe2reo0ETMdum+ykDjHULWwEWUVYSKBEsG0Ouj6Fpp1GPziWS9qBv7CRF0njhfuyz1PNYJ5iGEXZa7+/VDdjfB8mVVscg7QtFANJE72IiQOyDLc7zmfQAG5niekZqZ1jjBgWMNRMGSFIOUnmwkvAdfGZvfi6KiMu4XBu4J2DSb6j6DMyyLgGpgw4quLWzWdgbnb5RtUbgEzG1d7A/6+bo3X7hTUbi3JCw==
description: Token to be passed on the next API call.
LoginResponse:
type: object
properties:
serverUtcTime:
type: string
format: date-time
example: 2019-06-02T22:52:55.6486485Z
description: Server time when this request was executed
status:
type: number
format: int32
example: 201.0
result:
$ref: '#/definitions/LoginResult'
LoginResult:
type: object
properties:
bearerToken:
type: string
example: ap51e1R1uy7Detf2pzU5ORxQ2O2Az0FRA4ANHDGS2YQIZhtMtJt486ffyEXOn+NNC74+IX1Hv/RB/vsEq9obS2mgyElLljZGBLXYC1lrvX0zB5ICQ/ebUoNPyX+kumCJ4UBAXAZitDkwkwPXClobLr/xjN1lgaqOPYfT9ky3n5N/tSYS5I4aCZexe2reo0ETMdum+ykDjHULWwEWUVYSKBEsG0Ouj6Fpp1GPziWS9qBv7CRF0njhfuyz1PNYJ5iGEXZa7+/VDdjfB8mVVscg7QtFANJE72IiQOyDLc7zmfQAG5niekZqZ1jjBgWMNRMGSFIOUnmwkvAdfGZvfi6KiMu4XBu4J2DSb6j6DMyyLgGpgw4quLWzWdgbnb5RtUbgEzG1d7A/6+bo3X7hTUbi3JCw==
description: Token to be passed on the next API call.