-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecommendation_Management.admin.swagger.json
executable file
·652 lines (652 loc) · 25 KB
/
Recommendation_Management.admin.swagger.json
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
{
"swagger": "2.0",
"info": {
"title": "RecommendationManagement",
"description": "This is Swagger UI environment generated for the TMF Recommendation Management specification",
"version": "2.0"
},
"host": "serverRoot",
"basePath": "/tmf-api/recommendationManagement/v2/",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/recommendation": {
"get": {
"operationId": "listRecommendation",
"summary": "List or find 'Recommendation' objects",
"tags": [
"recommendation"
],
"parameters": [
{
"type": "string",
"required": false,
"in": "query",
"name": "fields",
"description": "Comma separated properties to display in response"
},
{
"type": "integer",
"required": false,
"in": "query",
"name": "offset",
"description": "Requested index for start of resources to be provided in response"
},
{
"type": "integer",
"required": false,
"in": "query",
"name": "limit",
"description": "Requested number of resources to be provided in response"
}
],
"responses": {
"200": {
"description": "Ok",
"schema": {
"items": {
"$ref": "#/definitions/Recommendation"
},
"type": "array"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
},
"405": {
"description": "Method Not allowed",
"schema": {
"$ref": "#/definitions/Error"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/Error"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/recommendation/{id}": {
"get": {
"operationId": "retrieveRecommendation",
"summary": "Retrieves a 'Recommendation' by Id",
"tags": [
"recommendation"
],
"parameters": [
{
"required": true,
"type": "string",
"name": "id",
"in": "path",
"description": "Identifier of the Recommendation"
}
],
"responses": {
"200": {
"description": "Ok",
"schema": {
"items": {
"$ref": "#/definitions/Recommendation"
},
"type": "array"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
},
"405": {
"description": "Method Not allowed",
"schema": {
"$ref": "#/definitions/Error"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/Error"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/hub": {
"post": {
"operationId": "registerListener",
"summary": "Register a listener",
"description": "Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.",
"tags": [
"events subscription"
],
"parameters": [
{
"name": "data",
"schema": {
"$ref": "#/definitions/EventSubscriptionInput"
},
"required": true,
"in": "body",
"description": "Data containing the callback endpoint to deliver the information"
}
],
"responses": {
"201": {
"description": "Subscribed",
"schema": {
"$ref": "#/definitions/EventSubscription"
}
},
"405": {
"description": "Method Not allowed",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/Error"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/Error"
}
},
"409": {
"description": "Conflict",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/hub/{id}": {
"delete": {
"operationId": "unregisterListener",
"summary": "Unregister a listener",
"description": "Resets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.",
"tags": [
"events subscription"
],
"parameters": [
{
"name": "id",
"type": "string",
"required": true,
"in": "path",
"description": "The id of the registered listener"
}
],
"responses": {
"204": {
"description": "Deleted"
},
"405": {
"description": "Method not allowed",
"schema": {
"$ref": "#/definitions/Error"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/Error"
}
},
"403": {
"description": "Forbidden",
"schema": {
"$ref": "#/definitions/Error"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Error"
}
},
"400": {
"description": "Bad request",
"schema": {
"$ref": "#/definitions/Error"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"definitions": {
"Recommendation": {
"type": "object",
"description": "Recommendation API is used to recommend offering quickly based on the history and real-time context of customer. It is a real-time and personalized recommendation API. It is usually provided by e-commerce or BSS, CRM system in omni-channel.",
"properties": {
"description": {
"type": "string"
},
"href": {
"type": "string",
"description": "Hypertext Reference of the recommendation."
},
"id": {
"type": "string",
"description": "Unique identifier of recommendation"
},
"name": {
"type": "string",
"description": "Name of recommendation"
},
"type": {
"type": "string",
"description": "Type of recommendation.\nThe basic type is :\n\u00a1\u00aeAD\u00a1\u00af: it means the recommendation is the advertisement for display\n\u00a1\u00aeOFFER\u00a1\u00af: it means the recommended content is the offer entry page. By clicking it, the user can be forwarded to the details of the offering"
},
"validFor": {
"$ref": "#/definitions/TimePeriod",
"description": "The period in which the recommendation is valid."
},
"order": {
"$ref": "#/definitions/ProductOrderRef"
},
"location": {
"$ref": "#/definitions/Place",
"description": "The place which the recommendation is related with"
},
"channel": {
"$ref": "#/definitions/ChannelRef"
},
"category": {
"$ref": "#/definitions/CategoryRef",
"description": "The category for grouping recommendations"
},
"shoppingCart": {
"$ref": "#/definitions/ShoppingCartRef",
"description": "The shopping cart which the recommendation is related with."
},
"relatedParty": {
"$ref": "#/definitions/RelatedPartyRef"
},
"item": {
"type": "array",
"items": {
"$ref": "#/definitions/RecommendationItem"
}
},
"@type": {
"type": "string",
"description": "The class type of the actual resource (for type extension)."
},
"@schemaLocation": {
"type": "string",
"description": "A link to the schema describing a resource (for type extension)."
},
"@baseType": {
"type": "string",
"description": "The base type for use in polymorphic collections"
}
}
},
"TimePeriod": {
"type": "object",
"description": "A base / value business entity used to represent a period of time between two timepoints.",
"properties": {
"endDateTime": {
"type": "string",
"format": "date-time",
"description": "An instant of time, ending at the TimePeriod."
},
"startDateTime": {
"type": "string",
"format": "date-time",
"description": "An instant of time, starting at the TimePeriod"
}
}
},
"ProductOrderRef": {
"type": "object",
"description": "ProductOrder (ProductOrder) .The product order which the recommendation is related with.",
"properties": {
"href": {
"type": "string",
"description": "Hypertext Reference of the product order."
},
"id": {
"type": "string",
"description": "Unique identifier of product order"
},
"@referredType": {
"type": "string",
"description": "The actual type of the target instance when needed for disambiguation."
}
}
},
"Place": {
"type": "object",
"properties": {
"href": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"role": {
"type": "string"
},
"@referredType": {
"type": "string",
"description": "The actual type of the target instance when needed for disambiguation."
},
"@type": {
"type": "string",
"description": "The class type of the actual resource (for type extension)."
},
"@schemaLocation": {
"type": "string",
"description": "A link to the schema describing a resource (for type extension)."
},
"@baseType": {
"type": "string",
"description": "The base type for use in polymorphic collections"
}
}
},
"ChannelRef": {
"type": "object",
"description": "Channel(ChannelRef)The channel where the recommendation is used. May be online web, mobile app, social ,etc.",
"properties": {
"href": {
"type": "string",
"description": "Hypertext Reference of the channel."
},
"id": {
"type": "string",
"description": "Unique identifier of channel"
},
"name": {
"type": "string",
"description": "Name of the channel."
},
"@referredType": {
"type": "string",
"description": "The actual type of the target instance when needed for disambiguation."
}
}
},
"CategoryRef": {
"type": "object",
"description": "The category for grouping recommendations",
"properties": {
"href": {
"type": "string",
"description": "Hypertext Reference of the category"
},
"id": {
"type": "string",
"description": "Unique identifier of category"
},
"name": {
"type": "string",
"description": "Name of the category."
},
"@referredType": {
"type": "string",
"description": "The actual type of the target instance when needed for disambiguation."
}
}
},
"ShoppingCartRef": {
"type": "object",
"description": "ShoppingCart (ShoppingCartRef) . The shopping cart which the recommendation is related with.",
"properties": {
"href": {
"type": "string",
"description": "Hypertext Reference of the shopping cart."
},
"id": {
"type": "string",
"description": "Unique identifier of shopping cart"
},
"@referredType": {
"type": "string",
"description": "The actual type of the target instance when needed for disambiguation."
}
}
},
"RelatedPartyRef": {
"type": "object",
"description": "RelatedParty reference. A related party defines party or party role linked to a specific entity.",
"properties": {
"href": {
"type": "string",
"description": "Reference of the related party, could be a party reference or a party role reference"
},
"id": {
"type": "string",
"description": "Unique identifier of a related party"
},
"name": {
"type": "string",
"description": "Name of the related party"
},
"role": {
"type": "string",
"description": "Role of the related party."
},
"@referredType": {
"type": "string",
"description": "The actual type of the target instance when needed for disambiguation."
}
}
},
"RecommendationItem": {
"type": "object",
"description": "A list of recommendation items. Every item is a product offering and its rank.",
"properties": {
"priority": {
"type": "integer",
"description": "The rank of the list of recommended offering."
},
"offering": {
"$ref": "#/definitions/ProductOfferingRef",
"description": "Recommended product offering"
},
"@type": {
"type": "string",
"description": "The class type of the actual resource (for type extension)."
},
"@schemaLocation": {
"type": "string",
"description": "A link to the schema describing a resource (for type extension)."
},
"@baseType": {
"type": "string",
"description": "The base type for use in polymorphic collections"
}
}
},
"ProductOfferingRef": {
"type": "object",
"description": "ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information.",
"properties": {
"href": {
"type": "string",
"description": "Reference of the product offering"
},
"id": {
"type": "string",
"description": "Unique identifier of the product offering"
},
"name": {
"type": "string",
"description": "Name of the product offering"
},
"@referredType": {
"type": "string",
"description": "The actual type of the target instance when needed for disambiguation."
}
}
},
"EventSubscription": {
"required": [
"id",
"callback"
],
"properties": {
"id": {
"type": "string",
"description": "Id of the listener"
},
"callback": {
"type": "string",
"description": "The callback being registered."
},
"query": {
"type": "string",
"description": "additional data to be passed"
}
}
},
"EventSubscriptionInput": {
"required": [
"callback"
],
"properties": {
"callback": {
"type": "string",
"description": "The callback being registered."
},
"query": {
"type": "string",
"description": "additional data to be passed"
}
}
},
"Error": {
"required": [
"code",
"reason"
],
"properties": {
"code": {
"type": "integer",
"description": "Application related code."
},
"reason": {
"type": "integer",
"description": "Text that explains the reason for error."
},
"message": {
"type": "string",
"description": "(optional) Text that provide more details and corrective actions related to the error."
},
"status": {
"type": "integer",
"description": "(optional) http error code extension like 400-2"
},
"referenceError": {
"type": "string",
"description": "(optional) A URL to online documentation that provides more information about the error."
},
"@type": {
"type": "string",
"description": "(optional) The class type of a REST resource."
},
"@schemaLocation": {
"type": "string",
"description": "(optional) A link to the schema describing a REST resource."
}
}
}
}
}