@voyant-travel/openapi 0.2.6 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/package.json +8 -5
  2. package/spec/admin/accommodations.json +1395 -0
  3. package/spec/admin/action-ledger.json +6202 -0
  4. package/spec/admin/booking-requirements.json +5689 -0
  5. package/spec/admin/bookings.json +18794 -0
  6. package/spec/admin/catalog.json +690 -0
  7. package/spec/admin/distribution.json +19581 -0
  8. package/spec/admin/external-refs.json +1382 -0
  9. package/spec/admin/extras.json +4648 -0
  10. package/spec/admin/finance.json +35506 -0
  11. package/spec/admin/identity.json +4072 -0
  12. package/spec/admin/legal.json +14339 -0
  13. package/spec/admin/markets.json +5286 -0
  14. package/spec/admin/notifications.json +8409 -0
  15. package/spec/admin/operations.json +39806 -0
  16. package/spec/admin/operator-settings.json +1389 -0
  17. package/spec/admin/pricing.json +10640 -0
  18. package/spec/admin/products.json +22131 -0
  19. package/spec/admin/promotions.json +2730 -0
  20. package/spec/admin/quotes.json +7033 -0
  21. package/spec/admin/relationships.json +13911 -0
  22. package/spec/admin/sellability.json +4840 -0
  23. package/spec/admin/storefront.json +1953 -0
  24. package/spec/admin/suppliers.json +5850 -0
  25. package/spec/admin/trips.json +9357 -0
  26. package/spec/framework-admin.json +2812 -552
  27. package/spec/framework-openapi.json +2710 -276
  28. package/spec/framework-storefront.json +178 -4
  29. package/spec/storefront/booking-requirements.json +367 -0
  30. package/spec/storefront/bookings.json +6137 -0
  31. package/spec/storefront/catalog.json +690 -0
  32. package/spec/storefront/customer-portal.json +6038 -0
  33. package/spec/storefront/finance.json +4824 -0
  34. package/spec/storefront/legal.json +2082 -0
  35. package/spec/storefront/markets.json +256 -0
  36. package/spec/storefront/operator-settings.json +309 -0
  37. package/spec/storefront/pricing.json +585 -0
  38. package/spec/storefront/products.json +2910 -0
  39. package/spec/storefront/storefront-verification.json +909 -0
  40. package/spec/storefront/storefront.json +4067 -0
  41. package/spec/storefront/trips.json +9357 -0
@@ -0,0 +1,4840 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Voyant Framework API",
5
+ "version": "0.0.0",
6
+ "description": "Generated from the Voyant framework's standard module composition. Do not edit by hand."
7
+ },
8
+ "components": {
9
+ "schemas": {
10
+ "CatalogSearchFilter": {
11
+ "anyOf": [
12
+ {
13
+ "type": "object",
14
+ "properties": {
15
+ "kind": {
16
+ "type": "string",
17
+ "enum": [
18
+ "eq"
19
+ ]
20
+ },
21
+ "field": {
22
+ "type": "string",
23
+ "minLength": 1
24
+ },
25
+ "value": {
26
+ "anyOf": [
27
+ {
28
+ "type": "string"
29
+ },
30
+ {
31
+ "type": "number"
32
+ },
33
+ {
34
+ "type": "boolean"
35
+ }
36
+ ]
37
+ }
38
+ },
39
+ "required": [
40
+ "kind",
41
+ "field",
42
+ "value"
43
+ ]
44
+ },
45
+ {
46
+ "type": "object",
47
+ "properties": {
48
+ "kind": {
49
+ "type": "string",
50
+ "enum": [
51
+ "in"
52
+ ]
53
+ },
54
+ "field": {
55
+ "type": "string",
56
+ "minLength": 1
57
+ },
58
+ "values": {
59
+ "type": "array",
60
+ "items": {
61
+ "anyOf": [
62
+ {
63
+ "type": "string"
64
+ },
65
+ {
66
+ "type": "number"
67
+ }
68
+ ]
69
+ }
70
+ }
71
+ },
72
+ "required": [
73
+ "kind",
74
+ "field",
75
+ "values"
76
+ ]
77
+ },
78
+ {
79
+ "type": "object",
80
+ "properties": {
81
+ "kind": {
82
+ "type": "string",
83
+ "enum": [
84
+ "range"
85
+ ]
86
+ },
87
+ "field": {
88
+ "type": "string",
89
+ "minLength": 1
90
+ },
91
+ "gte": {
92
+ "type": "number"
93
+ },
94
+ "lte": {
95
+ "type": "number"
96
+ }
97
+ },
98
+ "required": [
99
+ "kind",
100
+ "field"
101
+ ]
102
+ },
103
+ {
104
+ "type": "object",
105
+ "properties": {
106
+ "kind": {
107
+ "type": "string",
108
+ "enum": [
109
+ "and"
110
+ ]
111
+ },
112
+ "clauses": {
113
+ "type": "array",
114
+ "items": {
115
+ "$ref": "#/components/schemas/CatalogSearchFilter"
116
+ }
117
+ }
118
+ },
119
+ "required": [
120
+ "kind",
121
+ "clauses"
122
+ ]
123
+ },
124
+ {
125
+ "type": "object",
126
+ "properties": {
127
+ "kind": {
128
+ "type": "string",
129
+ "enum": [
130
+ "or"
131
+ ]
132
+ },
133
+ "clauses": {
134
+ "type": "array",
135
+ "items": {
136
+ "$ref": "#/components/schemas/CatalogSearchFilter"
137
+ }
138
+ }
139
+ },
140
+ "required": [
141
+ "kind",
142
+ "clauses"
143
+ ]
144
+ }
145
+ ]
146
+ }
147
+ },
148
+ "parameters": {}
149
+ },
150
+ "paths": {
151
+ "/v1/admin/sellability/resolve": {
152
+ "post": {
153
+ "requestBody": {
154
+ "required": true,
155
+ "content": {
156
+ "application/json": {
157
+ "schema": {
158
+ "type": "object",
159
+ "properties": {
160
+ "productId": {
161
+ "type": "string"
162
+ },
163
+ "optionId": {
164
+ "type": "string"
165
+ },
166
+ "slotId": {
167
+ "type": "string"
168
+ },
169
+ "dateLocal": {
170
+ "type": "string",
171
+ "format": "date"
172
+ },
173
+ "startTimeId": {
174
+ "type": "string"
175
+ },
176
+ "marketId": {
177
+ "type": "string"
178
+ },
179
+ "channelId": {
180
+ "type": "string"
181
+ },
182
+ "pickupPointId": {
183
+ "type": "string"
184
+ },
185
+ "currencyCode": {
186
+ "type": "string",
187
+ "minLength": 3,
188
+ "maxLength": 3
189
+ },
190
+ "requestedUnits": {
191
+ "type": "array",
192
+ "items": {
193
+ "type": "object",
194
+ "properties": {
195
+ "requestRef": {
196
+ "type": "string",
197
+ "minLength": 1,
198
+ "maxLength": 100
199
+ },
200
+ "unitId": {
201
+ "type": [
202
+ "string",
203
+ "null"
204
+ ]
205
+ },
206
+ "pricingCategoryId": {
207
+ "type": [
208
+ "string",
209
+ "null"
210
+ ]
211
+ },
212
+ "quantity": {
213
+ "type": "integer",
214
+ "minimum": 1
215
+ }
216
+ },
217
+ "required": [
218
+ "quantity"
219
+ ]
220
+ },
221
+ "default": []
222
+ },
223
+ "limit": {
224
+ "type": "integer",
225
+ "minimum": 1,
226
+ "maximum": 100,
227
+ "default": 25
228
+ }
229
+ }
230
+ }
231
+ }
232
+ }
233
+ },
234
+ "responses": {
235
+ "200": {
236
+ "description": "Resolved sellability candidates",
237
+ "content": {
238
+ "application/json": {
239
+ "schema": {
240
+ "type": "object",
241
+ "properties": {
242
+ "data": {
243
+ "type": "array",
244
+ "items": {}
245
+ },
246
+ "meta": {
247
+ "type": "object",
248
+ "properties": {
249
+ "total": {
250
+ "type": "number"
251
+ }
252
+ },
253
+ "required": [
254
+ "total"
255
+ ]
256
+ }
257
+ },
258
+ "required": [
259
+ "data",
260
+ "meta"
261
+ ]
262
+ }
263
+ }
264
+ }
265
+ },
266
+ "400": {
267
+ "description": "invalid_request: request body failed validation",
268
+ "content": {
269
+ "application/json": {
270
+ "schema": {
271
+ "type": "object",
272
+ "properties": {
273
+ "error": {
274
+ "type": "string"
275
+ }
276
+ },
277
+ "required": [
278
+ "error"
279
+ ]
280
+ }
281
+ }
282
+ }
283
+ }
284
+ }
285
+ }
286
+ },
287
+ "/v1/admin/sellability/resolve-and-persist": {
288
+ "post": {
289
+ "requestBody": {
290
+ "required": true,
291
+ "content": {
292
+ "application/json": {
293
+ "schema": {
294
+ "type": "object",
295
+ "properties": {
296
+ "query": {
297
+ "type": "object",
298
+ "properties": {
299
+ "productId": {
300
+ "type": "string"
301
+ },
302
+ "optionId": {
303
+ "type": "string"
304
+ },
305
+ "slotId": {
306
+ "type": "string"
307
+ },
308
+ "dateLocal": {
309
+ "type": "string",
310
+ "format": "date"
311
+ },
312
+ "startTimeId": {
313
+ "type": "string"
314
+ },
315
+ "marketId": {
316
+ "type": "string"
317
+ },
318
+ "channelId": {
319
+ "type": "string"
320
+ },
321
+ "pickupPointId": {
322
+ "type": "string"
323
+ },
324
+ "currencyCode": {
325
+ "type": "string",
326
+ "minLength": 3,
327
+ "maxLength": 3
328
+ },
329
+ "requestedUnits": {
330
+ "type": "array",
331
+ "items": {
332
+ "type": "object",
333
+ "properties": {
334
+ "requestRef": {
335
+ "type": "string",
336
+ "minLength": 1,
337
+ "maxLength": 100
338
+ },
339
+ "unitId": {
340
+ "type": [
341
+ "string",
342
+ "null"
343
+ ]
344
+ },
345
+ "pricingCategoryId": {
346
+ "type": [
347
+ "string",
348
+ "null"
349
+ ]
350
+ },
351
+ "quantity": {
352
+ "type": "integer",
353
+ "minimum": 1
354
+ }
355
+ },
356
+ "required": [
357
+ "quantity"
358
+ ]
359
+ },
360
+ "default": []
361
+ },
362
+ "limit": {
363
+ "type": "integer",
364
+ "minimum": 1,
365
+ "maximum": 100,
366
+ "default": 25
367
+ }
368
+ }
369
+ },
370
+ "expiresAt": {
371
+ "type": [
372
+ "string",
373
+ "null"
374
+ ],
375
+ "format": "date-time"
376
+ }
377
+ },
378
+ "required": [
379
+ "query"
380
+ ]
381
+ }
382
+ }
383
+ }
384
+ },
385
+ "responses": {
386
+ "201": {
387
+ "description": "Resolved candidates plus the persisted snapshot",
388
+ "content": {
389
+ "application/json": {
390
+ "schema": {
391
+ "type": "object",
392
+ "properties": {
393
+ "snapshot": {
394
+ "type": "object",
395
+ "properties": {
396
+ "id": {
397
+ "type": "string"
398
+ },
399
+ "offerId": {
400
+ "type": [
401
+ "string",
402
+ "null"
403
+ ]
404
+ },
405
+ "marketId": {
406
+ "type": [
407
+ "string",
408
+ "null"
409
+ ]
410
+ },
411
+ "channelId": {
412
+ "type": [
413
+ "string",
414
+ "null"
415
+ ]
416
+ },
417
+ "productId": {
418
+ "type": [
419
+ "string",
420
+ "null"
421
+ ]
422
+ },
423
+ "optionId": {
424
+ "type": [
425
+ "string",
426
+ "null"
427
+ ]
428
+ },
429
+ "slotId": {
430
+ "type": [
431
+ "string",
432
+ "null"
433
+ ]
434
+ },
435
+ "requestedCurrencyCode": {
436
+ "type": [
437
+ "string",
438
+ "null"
439
+ ]
440
+ },
441
+ "sourceCurrencyCode": {
442
+ "type": [
443
+ "string",
444
+ "null"
445
+ ]
446
+ },
447
+ "fxRateSetId": {
448
+ "type": [
449
+ "string",
450
+ "null"
451
+ ]
452
+ },
453
+ "status": {
454
+ "type": "string",
455
+ "enum": [
456
+ "resolved",
457
+ "offer_constructed",
458
+ "expired"
459
+ ]
460
+ },
461
+ "queryPayload": {
462
+ "type": "object",
463
+ "additionalProperties": {}
464
+ },
465
+ "pricingSummary": {
466
+ "type": "object",
467
+ "additionalProperties": {}
468
+ },
469
+ "expiresAt": {
470
+ "type": [
471
+ "string",
472
+ "null"
473
+ ]
474
+ },
475
+ "createdAt": {
476
+ "type": "string"
477
+ },
478
+ "updatedAt": {
479
+ "type": "string"
480
+ }
481
+ },
482
+ "required": [
483
+ "id",
484
+ "offerId",
485
+ "marketId",
486
+ "channelId",
487
+ "productId",
488
+ "optionId",
489
+ "slotId",
490
+ "requestedCurrencyCode",
491
+ "sourceCurrencyCode",
492
+ "fxRateSetId",
493
+ "status",
494
+ "queryPayload",
495
+ "pricingSummary",
496
+ "expiresAt",
497
+ "createdAt",
498
+ "updatedAt"
499
+ ]
500
+ },
501
+ "resolved": {
502
+ "type": "object",
503
+ "properties": {
504
+ "data": {
505
+ "type": "array",
506
+ "items": {}
507
+ },
508
+ "meta": {
509
+ "type": "object",
510
+ "properties": {
511
+ "total": {
512
+ "type": "number"
513
+ }
514
+ },
515
+ "required": [
516
+ "total"
517
+ ]
518
+ }
519
+ },
520
+ "required": [
521
+ "data",
522
+ "meta"
523
+ ]
524
+ }
525
+ },
526
+ "required": [
527
+ "snapshot",
528
+ "resolved"
529
+ ]
530
+ }
531
+ }
532
+ }
533
+ },
534
+ "400": {
535
+ "description": "invalid_request: request body failed validation",
536
+ "content": {
537
+ "application/json": {
538
+ "schema": {
539
+ "type": "object",
540
+ "properties": {
541
+ "error": {
542
+ "type": "string"
543
+ }
544
+ },
545
+ "required": [
546
+ "error"
547
+ ]
548
+ }
549
+ }
550
+ }
551
+ }
552
+ }
553
+ }
554
+ },
555
+ "/v1/admin/sellability/snapshots": {
556
+ "get": {
557
+ "parameters": [
558
+ {
559
+ "schema": {
560
+ "type": "integer",
561
+ "minimum": 1,
562
+ "maximum": 200,
563
+ "default": 50
564
+ },
565
+ "required": false,
566
+ "name": "limit",
567
+ "in": "query"
568
+ },
569
+ {
570
+ "schema": {
571
+ "type": [
572
+ "integer",
573
+ "null"
574
+ ],
575
+ "minimum": 0,
576
+ "default": 0
577
+ },
578
+ "required": false,
579
+ "name": "offset",
580
+ "in": "query"
581
+ },
582
+ {
583
+ "schema": {
584
+ "type": "string"
585
+ },
586
+ "required": false,
587
+ "name": "offerId",
588
+ "in": "query"
589
+ },
590
+ {
591
+ "schema": {
592
+ "type": "string"
593
+ },
594
+ "required": false,
595
+ "name": "marketId",
596
+ "in": "query"
597
+ },
598
+ {
599
+ "schema": {
600
+ "type": "string"
601
+ },
602
+ "required": false,
603
+ "name": "channelId",
604
+ "in": "query"
605
+ },
606
+ {
607
+ "schema": {
608
+ "type": "string"
609
+ },
610
+ "required": false,
611
+ "name": "productId",
612
+ "in": "query"
613
+ },
614
+ {
615
+ "schema": {
616
+ "type": "string"
617
+ },
618
+ "required": false,
619
+ "name": "optionId",
620
+ "in": "query"
621
+ },
622
+ {
623
+ "schema": {
624
+ "type": "string"
625
+ },
626
+ "required": false,
627
+ "name": "slotId",
628
+ "in": "query"
629
+ },
630
+ {
631
+ "schema": {
632
+ "type": "string",
633
+ "enum": [
634
+ "resolved",
635
+ "offer_constructed",
636
+ "expired"
637
+ ]
638
+ },
639
+ "required": false,
640
+ "name": "status",
641
+ "in": "query"
642
+ }
643
+ ],
644
+ "responses": {
645
+ "200": {
646
+ "description": "Paginated list of sellability snapshots",
647
+ "content": {
648
+ "application/json": {
649
+ "schema": {
650
+ "type": "object",
651
+ "properties": {
652
+ "data": {
653
+ "type": "array",
654
+ "items": {
655
+ "type": "object",
656
+ "properties": {
657
+ "id": {
658
+ "type": "string"
659
+ },
660
+ "offerId": {
661
+ "type": [
662
+ "string",
663
+ "null"
664
+ ]
665
+ },
666
+ "marketId": {
667
+ "type": [
668
+ "string",
669
+ "null"
670
+ ]
671
+ },
672
+ "channelId": {
673
+ "type": [
674
+ "string",
675
+ "null"
676
+ ]
677
+ },
678
+ "productId": {
679
+ "type": [
680
+ "string",
681
+ "null"
682
+ ]
683
+ },
684
+ "optionId": {
685
+ "type": [
686
+ "string",
687
+ "null"
688
+ ]
689
+ },
690
+ "slotId": {
691
+ "type": [
692
+ "string",
693
+ "null"
694
+ ]
695
+ },
696
+ "requestedCurrencyCode": {
697
+ "type": [
698
+ "string",
699
+ "null"
700
+ ]
701
+ },
702
+ "sourceCurrencyCode": {
703
+ "type": [
704
+ "string",
705
+ "null"
706
+ ]
707
+ },
708
+ "fxRateSetId": {
709
+ "type": [
710
+ "string",
711
+ "null"
712
+ ]
713
+ },
714
+ "status": {
715
+ "type": "string",
716
+ "enum": [
717
+ "resolved",
718
+ "offer_constructed",
719
+ "expired"
720
+ ]
721
+ },
722
+ "queryPayload": {
723
+ "type": "object",
724
+ "additionalProperties": {}
725
+ },
726
+ "pricingSummary": {
727
+ "type": "object",
728
+ "additionalProperties": {}
729
+ },
730
+ "expiresAt": {
731
+ "type": [
732
+ "string",
733
+ "null"
734
+ ]
735
+ },
736
+ "createdAt": {
737
+ "type": "string"
738
+ },
739
+ "updatedAt": {
740
+ "type": "string"
741
+ }
742
+ },
743
+ "required": [
744
+ "id",
745
+ "offerId",
746
+ "marketId",
747
+ "channelId",
748
+ "productId",
749
+ "optionId",
750
+ "slotId",
751
+ "requestedCurrencyCode",
752
+ "sourceCurrencyCode",
753
+ "fxRateSetId",
754
+ "status",
755
+ "queryPayload",
756
+ "pricingSummary",
757
+ "expiresAt",
758
+ "createdAt",
759
+ "updatedAt"
760
+ ]
761
+ }
762
+ },
763
+ "total": {
764
+ "type": "integer"
765
+ },
766
+ "limit": {
767
+ "type": "integer"
768
+ },
769
+ "offset": {
770
+ "type": "integer"
771
+ }
772
+ },
773
+ "required": [
774
+ "data",
775
+ "total",
776
+ "limit",
777
+ "offset"
778
+ ]
779
+ }
780
+ }
781
+ }
782
+ }
783
+ }
784
+ }
785
+ },
786
+ "/v1/admin/sellability/snapshots/{id}": {
787
+ "get": {
788
+ "parameters": [
789
+ {
790
+ "schema": {
791
+ "type": "string"
792
+ },
793
+ "required": true,
794
+ "name": "id",
795
+ "in": "path"
796
+ }
797
+ ],
798
+ "responses": {
799
+ "200": {
800
+ "description": "A sellability snapshot by id",
801
+ "content": {
802
+ "application/json": {
803
+ "schema": {
804
+ "type": "object",
805
+ "properties": {
806
+ "data": {
807
+ "type": "object",
808
+ "properties": {
809
+ "id": {
810
+ "type": "string"
811
+ },
812
+ "offerId": {
813
+ "type": [
814
+ "string",
815
+ "null"
816
+ ]
817
+ },
818
+ "marketId": {
819
+ "type": [
820
+ "string",
821
+ "null"
822
+ ]
823
+ },
824
+ "channelId": {
825
+ "type": [
826
+ "string",
827
+ "null"
828
+ ]
829
+ },
830
+ "productId": {
831
+ "type": [
832
+ "string",
833
+ "null"
834
+ ]
835
+ },
836
+ "optionId": {
837
+ "type": [
838
+ "string",
839
+ "null"
840
+ ]
841
+ },
842
+ "slotId": {
843
+ "type": [
844
+ "string",
845
+ "null"
846
+ ]
847
+ },
848
+ "requestedCurrencyCode": {
849
+ "type": [
850
+ "string",
851
+ "null"
852
+ ]
853
+ },
854
+ "sourceCurrencyCode": {
855
+ "type": [
856
+ "string",
857
+ "null"
858
+ ]
859
+ },
860
+ "fxRateSetId": {
861
+ "type": [
862
+ "string",
863
+ "null"
864
+ ]
865
+ },
866
+ "status": {
867
+ "type": "string",
868
+ "enum": [
869
+ "resolved",
870
+ "offer_constructed",
871
+ "expired"
872
+ ]
873
+ },
874
+ "queryPayload": {
875
+ "type": "object",
876
+ "additionalProperties": {}
877
+ },
878
+ "pricingSummary": {
879
+ "type": "object",
880
+ "additionalProperties": {}
881
+ },
882
+ "expiresAt": {
883
+ "type": [
884
+ "string",
885
+ "null"
886
+ ]
887
+ },
888
+ "createdAt": {
889
+ "type": "string"
890
+ },
891
+ "updatedAt": {
892
+ "type": "string"
893
+ }
894
+ },
895
+ "required": [
896
+ "id",
897
+ "offerId",
898
+ "marketId",
899
+ "channelId",
900
+ "productId",
901
+ "optionId",
902
+ "slotId",
903
+ "requestedCurrencyCode",
904
+ "sourceCurrencyCode",
905
+ "fxRateSetId",
906
+ "status",
907
+ "queryPayload",
908
+ "pricingSummary",
909
+ "expiresAt",
910
+ "createdAt",
911
+ "updatedAt"
912
+ ]
913
+ }
914
+ },
915
+ "required": [
916
+ "data"
917
+ ]
918
+ }
919
+ }
920
+ }
921
+ },
922
+ "404": {
923
+ "description": "Sellability snapshot not found",
924
+ "content": {
925
+ "application/json": {
926
+ "schema": {
927
+ "type": "object",
928
+ "properties": {
929
+ "error": {
930
+ "type": "string"
931
+ }
932
+ },
933
+ "required": [
934
+ "error"
935
+ ]
936
+ }
937
+ }
938
+ }
939
+ }
940
+ }
941
+ }
942
+ },
943
+ "/v1/admin/sellability/snapshot-items": {
944
+ "get": {
945
+ "parameters": [
946
+ {
947
+ "schema": {
948
+ "type": "integer",
949
+ "minimum": 1,
950
+ "maximum": 200,
951
+ "default": 100
952
+ },
953
+ "required": false,
954
+ "name": "limit",
955
+ "in": "query"
956
+ },
957
+ {
958
+ "schema": {
959
+ "type": [
960
+ "integer",
961
+ "null"
962
+ ],
963
+ "minimum": 0,
964
+ "default": 0
965
+ },
966
+ "required": false,
967
+ "name": "offset",
968
+ "in": "query"
969
+ },
970
+ {
971
+ "schema": {
972
+ "type": "string"
973
+ },
974
+ "required": false,
975
+ "name": "snapshotId",
976
+ "in": "query"
977
+ },
978
+ {
979
+ "schema": {
980
+ "type": "string"
981
+ },
982
+ "required": false,
983
+ "name": "productId",
984
+ "in": "query"
985
+ },
986
+ {
987
+ "schema": {
988
+ "type": "string"
989
+ },
990
+ "required": false,
991
+ "name": "optionId",
992
+ "in": "query"
993
+ },
994
+ {
995
+ "schema": {
996
+ "type": "string"
997
+ },
998
+ "required": false,
999
+ "name": "slotId",
1000
+ "in": "query"
1001
+ },
1002
+ {
1003
+ "schema": {
1004
+ "type": "string"
1005
+ },
1006
+ "required": false,
1007
+ "name": "unitId",
1008
+ "in": "query"
1009
+ }
1010
+ ],
1011
+ "responses": {
1012
+ "200": {
1013
+ "description": "Paginated list of sellability snapshot items",
1014
+ "content": {
1015
+ "application/json": {
1016
+ "schema": {
1017
+ "type": "object",
1018
+ "properties": {
1019
+ "data": {
1020
+ "type": "array",
1021
+ "items": {
1022
+ "type": "object",
1023
+ "properties": {
1024
+ "id": {
1025
+ "type": "string"
1026
+ },
1027
+ "snapshotId": {
1028
+ "type": "string"
1029
+ },
1030
+ "candidateIndex": {
1031
+ "type": "number"
1032
+ },
1033
+ "componentIndex": {
1034
+ "type": "number"
1035
+ },
1036
+ "productId": {
1037
+ "type": [
1038
+ "string",
1039
+ "null"
1040
+ ]
1041
+ },
1042
+ "optionId": {
1043
+ "type": [
1044
+ "string",
1045
+ "null"
1046
+ ]
1047
+ },
1048
+ "slotId": {
1049
+ "type": [
1050
+ "string",
1051
+ "null"
1052
+ ]
1053
+ },
1054
+ "unitId": {
1055
+ "type": [
1056
+ "string",
1057
+ "null"
1058
+ ]
1059
+ },
1060
+ "requestRef": {
1061
+ "type": [
1062
+ "string",
1063
+ "null"
1064
+ ]
1065
+ },
1066
+ "componentKind": {
1067
+ "type": "string",
1068
+ "enum": [
1069
+ "base",
1070
+ "unit",
1071
+ "pickup",
1072
+ "start_time_adjustment"
1073
+ ]
1074
+ },
1075
+ "title": {
1076
+ "type": "string"
1077
+ },
1078
+ "quantity": {
1079
+ "type": "number"
1080
+ },
1081
+ "pricingMode": {
1082
+ "type": "string"
1083
+ },
1084
+ "pricingCategoryId": {
1085
+ "type": [
1086
+ "string",
1087
+ "null"
1088
+ ]
1089
+ },
1090
+ "pricingCategoryName": {
1091
+ "type": [
1092
+ "string",
1093
+ "null"
1094
+ ]
1095
+ },
1096
+ "unitName": {
1097
+ "type": [
1098
+ "string",
1099
+ "null"
1100
+ ]
1101
+ },
1102
+ "unitType": {
1103
+ "type": [
1104
+ "string",
1105
+ "null"
1106
+ ]
1107
+ },
1108
+ "currencyCode": {
1109
+ "type": "string"
1110
+ },
1111
+ "sellAmountCents": {
1112
+ "type": "number"
1113
+ },
1114
+ "costAmountCents": {
1115
+ "type": "number"
1116
+ },
1117
+ "sourceRuleId": {
1118
+ "type": [
1119
+ "string",
1120
+ "null"
1121
+ ]
1122
+ },
1123
+ "tierId": {
1124
+ "type": [
1125
+ "string",
1126
+ "null"
1127
+ ]
1128
+ },
1129
+ "isSelected": {
1130
+ "type": "boolean"
1131
+ },
1132
+ "createdAt": {
1133
+ "type": "string"
1134
+ }
1135
+ },
1136
+ "required": [
1137
+ "id",
1138
+ "snapshotId",
1139
+ "candidateIndex",
1140
+ "componentIndex",
1141
+ "productId",
1142
+ "optionId",
1143
+ "slotId",
1144
+ "unitId",
1145
+ "requestRef",
1146
+ "componentKind",
1147
+ "title",
1148
+ "quantity",
1149
+ "pricingMode",
1150
+ "pricingCategoryId",
1151
+ "pricingCategoryName",
1152
+ "unitName",
1153
+ "unitType",
1154
+ "currencyCode",
1155
+ "sellAmountCents",
1156
+ "costAmountCents",
1157
+ "sourceRuleId",
1158
+ "tierId",
1159
+ "isSelected",
1160
+ "createdAt"
1161
+ ]
1162
+ }
1163
+ },
1164
+ "total": {
1165
+ "type": "integer"
1166
+ },
1167
+ "limit": {
1168
+ "type": "integer"
1169
+ },
1170
+ "offset": {
1171
+ "type": "integer"
1172
+ }
1173
+ },
1174
+ "required": [
1175
+ "data",
1176
+ "total",
1177
+ "limit",
1178
+ "offset"
1179
+ ]
1180
+ }
1181
+ }
1182
+ }
1183
+ }
1184
+ }
1185
+ }
1186
+ },
1187
+ "/v1/admin/sellability/policies": {
1188
+ "get": {
1189
+ "parameters": [
1190
+ {
1191
+ "schema": {
1192
+ "type": "integer",
1193
+ "minimum": 1,
1194
+ "maximum": 200,
1195
+ "default": 50
1196
+ },
1197
+ "required": false,
1198
+ "name": "limit",
1199
+ "in": "query"
1200
+ },
1201
+ {
1202
+ "schema": {
1203
+ "type": [
1204
+ "integer",
1205
+ "null"
1206
+ ],
1207
+ "minimum": 0,
1208
+ "default": 0
1209
+ },
1210
+ "required": false,
1211
+ "name": "offset",
1212
+ "in": "query"
1213
+ },
1214
+ {
1215
+ "schema": {
1216
+ "type": "string",
1217
+ "enum": [
1218
+ "global",
1219
+ "product",
1220
+ "option",
1221
+ "market",
1222
+ "channel"
1223
+ ]
1224
+ },
1225
+ "required": false,
1226
+ "name": "scope",
1227
+ "in": "query"
1228
+ },
1229
+ {
1230
+ "schema": {
1231
+ "type": "string",
1232
+ "enum": [
1233
+ "capability",
1234
+ "occupancy",
1235
+ "pickup",
1236
+ "question",
1237
+ "allotment",
1238
+ "availability_window",
1239
+ "currency",
1240
+ "custom"
1241
+ ]
1242
+ },
1243
+ "required": false,
1244
+ "name": "policyType",
1245
+ "in": "query"
1246
+ },
1247
+ {
1248
+ "schema": {
1249
+ "type": "string"
1250
+ },
1251
+ "required": false,
1252
+ "name": "productId",
1253
+ "in": "query"
1254
+ },
1255
+ {
1256
+ "schema": {
1257
+ "type": "string"
1258
+ },
1259
+ "required": false,
1260
+ "name": "optionId",
1261
+ "in": "query"
1262
+ },
1263
+ {
1264
+ "schema": {
1265
+ "type": "string"
1266
+ },
1267
+ "required": false,
1268
+ "name": "marketId",
1269
+ "in": "query"
1270
+ },
1271
+ {
1272
+ "schema": {
1273
+ "type": "string"
1274
+ },
1275
+ "required": false,
1276
+ "name": "channelId",
1277
+ "in": "query"
1278
+ },
1279
+ {
1280
+ "schema": {
1281
+ "type": "string",
1282
+ "enum": [
1283
+ "0",
1284
+ "1",
1285
+ "true",
1286
+ "false"
1287
+ ]
1288
+ },
1289
+ "required": false,
1290
+ "name": "active",
1291
+ "in": "query"
1292
+ }
1293
+ ],
1294
+ "responses": {
1295
+ "200": {
1296
+ "description": "Paginated list of sellability policies",
1297
+ "content": {
1298
+ "application/json": {
1299
+ "schema": {
1300
+ "type": "object",
1301
+ "properties": {
1302
+ "data": {
1303
+ "type": "array",
1304
+ "items": {
1305
+ "type": "object",
1306
+ "properties": {
1307
+ "id": {
1308
+ "type": "string"
1309
+ },
1310
+ "name": {
1311
+ "type": "string"
1312
+ },
1313
+ "scope": {
1314
+ "type": "string",
1315
+ "enum": [
1316
+ "global",
1317
+ "product",
1318
+ "option",
1319
+ "market",
1320
+ "channel"
1321
+ ]
1322
+ },
1323
+ "policyType": {
1324
+ "type": "string",
1325
+ "enum": [
1326
+ "capability",
1327
+ "occupancy",
1328
+ "pickup",
1329
+ "question",
1330
+ "allotment",
1331
+ "availability_window",
1332
+ "currency",
1333
+ "custom"
1334
+ ]
1335
+ },
1336
+ "productId": {
1337
+ "type": [
1338
+ "string",
1339
+ "null"
1340
+ ]
1341
+ },
1342
+ "optionId": {
1343
+ "type": [
1344
+ "string",
1345
+ "null"
1346
+ ]
1347
+ },
1348
+ "marketId": {
1349
+ "type": [
1350
+ "string",
1351
+ "null"
1352
+ ]
1353
+ },
1354
+ "channelId": {
1355
+ "type": [
1356
+ "string",
1357
+ "null"
1358
+ ]
1359
+ },
1360
+ "priority": {
1361
+ "type": "number"
1362
+ },
1363
+ "active": {
1364
+ "type": "boolean"
1365
+ },
1366
+ "conditions": {
1367
+ "type": "object",
1368
+ "additionalProperties": {}
1369
+ },
1370
+ "effects": {
1371
+ "type": "object",
1372
+ "additionalProperties": {}
1373
+ },
1374
+ "notes": {
1375
+ "type": [
1376
+ "string",
1377
+ "null"
1378
+ ]
1379
+ },
1380
+ "metadata": {
1381
+ "type": [
1382
+ "object",
1383
+ "null"
1384
+ ],
1385
+ "additionalProperties": {}
1386
+ },
1387
+ "createdAt": {
1388
+ "type": "string"
1389
+ },
1390
+ "updatedAt": {
1391
+ "type": "string"
1392
+ }
1393
+ },
1394
+ "required": [
1395
+ "id",
1396
+ "name",
1397
+ "scope",
1398
+ "policyType",
1399
+ "productId",
1400
+ "optionId",
1401
+ "marketId",
1402
+ "channelId",
1403
+ "priority",
1404
+ "active",
1405
+ "conditions",
1406
+ "effects",
1407
+ "notes",
1408
+ "metadata",
1409
+ "createdAt",
1410
+ "updatedAt"
1411
+ ]
1412
+ }
1413
+ },
1414
+ "total": {
1415
+ "type": "integer"
1416
+ },
1417
+ "limit": {
1418
+ "type": "integer"
1419
+ },
1420
+ "offset": {
1421
+ "type": "integer"
1422
+ }
1423
+ },
1424
+ "required": [
1425
+ "data",
1426
+ "total",
1427
+ "limit",
1428
+ "offset"
1429
+ ]
1430
+ }
1431
+ }
1432
+ }
1433
+ }
1434
+ }
1435
+ },
1436
+ "post": {
1437
+ "requestBody": {
1438
+ "required": true,
1439
+ "content": {
1440
+ "application/json": {
1441
+ "schema": {
1442
+ "type": "object",
1443
+ "properties": {
1444
+ "name": {
1445
+ "type": "string",
1446
+ "minLength": 1,
1447
+ "maxLength": 255
1448
+ },
1449
+ "scope": {
1450
+ "type": "string",
1451
+ "enum": [
1452
+ "global",
1453
+ "product",
1454
+ "option",
1455
+ "market",
1456
+ "channel"
1457
+ ],
1458
+ "default": "global"
1459
+ },
1460
+ "policyType": {
1461
+ "type": "string",
1462
+ "enum": [
1463
+ "capability",
1464
+ "occupancy",
1465
+ "pickup",
1466
+ "question",
1467
+ "allotment",
1468
+ "availability_window",
1469
+ "currency",
1470
+ "custom"
1471
+ ],
1472
+ "default": "custom"
1473
+ },
1474
+ "productId": {
1475
+ "type": [
1476
+ "string",
1477
+ "null"
1478
+ ]
1479
+ },
1480
+ "optionId": {
1481
+ "type": [
1482
+ "string",
1483
+ "null"
1484
+ ]
1485
+ },
1486
+ "marketId": {
1487
+ "type": [
1488
+ "string",
1489
+ "null"
1490
+ ]
1491
+ },
1492
+ "channelId": {
1493
+ "type": [
1494
+ "string",
1495
+ "null"
1496
+ ]
1497
+ },
1498
+ "priority": {
1499
+ "type": "integer",
1500
+ "default": 0
1501
+ },
1502
+ "active": {
1503
+ "type": "boolean",
1504
+ "default": true
1505
+ },
1506
+ "conditions": {
1507
+ "type": "object",
1508
+ "additionalProperties": {},
1509
+ "default": {}
1510
+ },
1511
+ "effects": {
1512
+ "type": "object",
1513
+ "additionalProperties": {},
1514
+ "default": {}
1515
+ },
1516
+ "notes": {
1517
+ "type": [
1518
+ "string",
1519
+ "null"
1520
+ ]
1521
+ },
1522
+ "metadata": {
1523
+ "type": [
1524
+ "object",
1525
+ "null"
1526
+ ],
1527
+ "additionalProperties": {}
1528
+ }
1529
+ },
1530
+ "required": [
1531
+ "name"
1532
+ ]
1533
+ }
1534
+ }
1535
+ }
1536
+ },
1537
+ "responses": {
1538
+ "201": {
1539
+ "description": "The created sellability policy",
1540
+ "content": {
1541
+ "application/json": {
1542
+ "schema": {
1543
+ "type": "object",
1544
+ "properties": {
1545
+ "data": {
1546
+ "type": "object",
1547
+ "properties": {
1548
+ "id": {
1549
+ "type": "string"
1550
+ },
1551
+ "name": {
1552
+ "type": "string"
1553
+ },
1554
+ "scope": {
1555
+ "type": "string",
1556
+ "enum": [
1557
+ "global",
1558
+ "product",
1559
+ "option",
1560
+ "market",
1561
+ "channel"
1562
+ ]
1563
+ },
1564
+ "policyType": {
1565
+ "type": "string",
1566
+ "enum": [
1567
+ "capability",
1568
+ "occupancy",
1569
+ "pickup",
1570
+ "question",
1571
+ "allotment",
1572
+ "availability_window",
1573
+ "currency",
1574
+ "custom"
1575
+ ]
1576
+ },
1577
+ "productId": {
1578
+ "type": [
1579
+ "string",
1580
+ "null"
1581
+ ]
1582
+ },
1583
+ "optionId": {
1584
+ "type": [
1585
+ "string",
1586
+ "null"
1587
+ ]
1588
+ },
1589
+ "marketId": {
1590
+ "type": [
1591
+ "string",
1592
+ "null"
1593
+ ]
1594
+ },
1595
+ "channelId": {
1596
+ "type": [
1597
+ "string",
1598
+ "null"
1599
+ ]
1600
+ },
1601
+ "priority": {
1602
+ "type": "number"
1603
+ },
1604
+ "active": {
1605
+ "type": "boolean"
1606
+ },
1607
+ "conditions": {
1608
+ "type": "object",
1609
+ "additionalProperties": {}
1610
+ },
1611
+ "effects": {
1612
+ "type": "object",
1613
+ "additionalProperties": {}
1614
+ },
1615
+ "notes": {
1616
+ "type": [
1617
+ "string",
1618
+ "null"
1619
+ ]
1620
+ },
1621
+ "metadata": {
1622
+ "type": [
1623
+ "object",
1624
+ "null"
1625
+ ],
1626
+ "additionalProperties": {}
1627
+ },
1628
+ "createdAt": {
1629
+ "type": "string"
1630
+ },
1631
+ "updatedAt": {
1632
+ "type": "string"
1633
+ }
1634
+ },
1635
+ "required": [
1636
+ "id",
1637
+ "name",
1638
+ "scope",
1639
+ "policyType",
1640
+ "productId",
1641
+ "optionId",
1642
+ "marketId",
1643
+ "channelId",
1644
+ "priority",
1645
+ "active",
1646
+ "conditions",
1647
+ "effects",
1648
+ "notes",
1649
+ "metadata",
1650
+ "createdAt",
1651
+ "updatedAt"
1652
+ ]
1653
+ }
1654
+ },
1655
+ "required": [
1656
+ "data"
1657
+ ]
1658
+ }
1659
+ }
1660
+ }
1661
+ },
1662
+ "400": {
1663
+ "description": "invalid_request: request body failed validation",
1664
+ "content": {
1665
+ "application/json": {
1666
+ "schema": {
1667
+ "type": "object",
1668
+ "properties": {
1669
+ "error": {
1670
+ "type": "string"
1671
+ }
1672
+ },
1673
+ "required": [
1674
+ "error"
1675
+ ]
1676
+ }
1677
+ }
1678
+ }
1679
+ }
1680
+ }
1681
+ }
1682
+ },
1683
+ "/v1/admin/sellability/policies/{id}": {
1684
+ "get": {
1685
+ "parameters": [
1686
+ {
1687
+ "schema": {
1688
+ "type": "string"
1689
+ },
1690
+ "required": true,
1691
+ "name": "id",
1692
+ "in": "path"
1693
+ }
1694
+ ],
1695
+ "responses": {
1696
+ "200": {
1697
+ "description": "A sellability policy by id",
1698
+ "content": {
1699
+ "application/json": {
1700
+ "schema": {
1701
+ "type": "object",
1702
+ "properties": {
1703
+ "data": {
1704
+ "type": "object",
1705
+ "properties": {
1706
+ "id": {
1707
+ "type": "string"
1708
+ },
1709
+ "name": {
1710
+ "type": "string"
1711
+ },
1712
+ "scope": {
1713
+ "type": "string",
1714
+ "enum": [
1715
+ "global",
1716
+ "product",
1717
+ "option",
1718
+ "market",
1719
+ "channel"
1720
+ ]
1721
+ },
1722
+ "policyType": {
1723
+ "type": "string",
1724
+ "enum": [
1725
+ "capability",
1726
+ "occupancy",
1727
+ "pickup",
1728
+ "question",
1729
+ "allotment",
1730
+ "availability_window",
1731
+ "currency",
1732
+ "custom"
1733
+ ]
1734
+ },
1735
+ "productId": {
1736
+ "type": [
1737
+ "string",
1738
+ "null"
1739
+ ]
1740
+ },
1741
+ "optionId": {
1742
+ "type": [
1743
+ "string",
1744
+ "null"
1745
+ ]
1746
+ },
1747
+ "marketId": {
1748
+ "type": [
1749
+ "string",
1750
+ "null"
1751
+ ]
1752
+ },
1753
+ "channelId": {
1754
+ "type": [
1755
+ "string",
1756
+ "null"
1757
+ ]
1758
+ },
1759
+ "priority": {
1760
+ "type": "number"
1761
+ },
1762
+ "active": {
1763
+ "type": "boolean"
1764
+ },
1765
+ "conditions": {
1766
+ "type": "object",
1767
+ "additionalProperties": {}
1768
+ },
1769
+ "effects": {
1770
+ "type": "object",
1771
+ "additionalProperties": {}
1772
+ },
1773
+ "notes": {
1774
+ "type": [
1775
+ "string",
1776
+ "null"
1777
+ ]
1778
+ },
1779
+ "metadata": {
1780
+ "type": [
1781
+ "object",
1782
+ "null"
1783
+ ],
1784
+ "additionalProperties": {}
1785
+ },
1786
+ "createdAt": {
1787
+ "type": "string"
1788
+ },
1789
+ "updatedAt": {
1790
+ "type": "string"
1791
+ }
1792
+ },
1793
+ "required": [
1794
+ "id",
1795
+ "name",
1796
+ "scope",
1797
+ "policyType",
1798
+ "productId",
1799
+ "optionId",
1800
+ "marketId",
1801
+ "channelId",
1802
+ "priority",
1803
+ "active",
1804
+ "conditions",
1805
+ "effects",
1806
+ "notes",
1807
+ "metadata",
1808
+ "createdAt",
1809
+ "updatedAt"
1810
+ ]
1811
+ }
1812
+ },
1813
+ "required": [
1814
+ "data"
1815
+ ]
1816
+ }
1817
+ }
1818
+ }
1819
+ },
1820
+ "404": {
1821
+ "description": "Sellability policy not found",
1822
+ "content": {
1823
+ "application/json": {
1824
+ "schema": {
1825
+ "type": "object",
1826
+ "properties": {
1827
+ "error": {
1828
+ "type": "string"
1829
+ }
1830
+ },
1831
+ "required": [
1832
+ "error"
1833
+ ]
1834
+ }
1835
+ }
1836
+ }
1837
+ }
1838
+ }
1839
+ },
1840
+ "patch": {
1841
+ "parameters": [
1842
+ {
1843
+ "schema": {
1844
+ "type": "string"
1845
+ },
1846
+ "required": true,
1847
+ "name": "id",
1848
+ "in": "path"
1849
+ }
1850
+ ],
1851
+ "requestBody": {
1852
+ "required": true,
1853
+ "content": {
1854
+ "application/json": {
1855
+ "schema": {
1856
+ "type": "object",
1857
+ "properties": {
1858
+ "name": {
1859
+ "type": "string",
1860
+ "minLength": 1,
1861
+ "maxLength": 255
1862
+ },
1863
+ "scope": {
1864
+ "type": "string",
1865
+ "enum": [
1866
+ "global",
1867
+ "product",
1868
+ "option",
1869
+ "market",
1870
+ "channel"
1871
+ ],
1872
+ "default": "global"
1873
+ },
1874
+ "policyType": {
1875
+ "type": "string",
1876
+ "enum": [
1877
+ "capability",
1878
+ "occupancy",
1879
+ "pickup",
1880
+ "question",
1881
+ "allotment",
1882
+ "availability_window",
1883
+ "currency",
1884
+ "custom"
1885
+ ],
1886
+ "default": "custom"
1887
+ },
1888
+ "productId": {
1889
+ "type": [
1890
+ "string",
1891
+ "null"
1892
+ ]
1893
+ },
1894
+ "optionId": {
1895
+ "type": [
1896
+ "string",
1897
+ "null"
1898
+ ]
1899
+ },
1900
+ "marketId": {
1901
+ "type": [
1902
+ "string",
1903
+ "null"
1904
+ ]
1905
+ },
1906
+ "channelId": {
1907
+ "type": [
1908
+ "string",
1909
+ "null"
1910
+ ]
1911
+ },
1912
+ "priority": {
1913
+ "type": "integer",
1914
+ "default": 0
1915
+ },
1916
+ "active": {
1917
+ "type": "boolean",
1918
+ "default": true
1919
+ },
1920
+ "conditions": {
1921
+ "type": "object",
1922
+ "additionalProperties": {},
1923
+ "default": {}
1924
+ },
1925
+ "effects": {
1926
+ "type": "object",
1927
+ "additionalProperties": {},
1928
+ "default": {}
1929
+ },
1930
+ "notes": {
1931
+ "type": [
1932
+ "string",
1933
+ "null"
1934
+ ]
1935
+ },
1936
+ "metadata": {
1937
+ "type": [
1938
+ "object",
1939
+ "null"
1940
+ ],
1941
+ "additionalProperties": {}
1942
+ }
1943
+ }
1944
+ }
1945
+ }
1946
+ }
1947
+ },
1948
+ "responses": {
1949
+ "200": {
1950
+ "description": "The updated sellability policy",
1951
+ "content": {
1952
+ "application/json": {
1953
+ "schema": {
1954
+ "type": "object",
1955
+ "properties": {
1956
+ "data": {
1957
+ "type": "object",
1958
+ "properties": {
1959
+ "id": {
1960
+ "type": "string"
1961
+ },
1962
+ "name": {
1963
+ "type": "string"
1964
+ },
1965
+ "scope": {
1966
+ "type": "string",
1967
+ "enum": [
1968
+ "global",
1969
+ "product",
1970
+ "option",
1971
+ "market",
1972
+ "channel"
1973
+ ]
1974
+ },
1975
+ "policyType": {
1976
+ "type": "string",
1977
+ "enum": [
1978
+ "capability",
1979
+ "occupancy",
1980
+ "pickup",
1981
+ "question",
1982
+ "allotment",
1983
+ "availability_window",
1984
+ "currency",
1985
+ "custom"
1986
+ ]
1987
+ },
1988
+ "productId": {
1989
+ "type": [
1990
+ "string",
1991
+ "null"
1992
+ ]
1993
+ },
1994
+ "optionId": {
1995
+ "type": [
1996
+ "string",
1997
+ "null"
1998
+ ]
1999
+ },
2000
+ "marketId": {
2001
+ "type": [
2002
+ "string",
2003
+ "null"
2004
+ ]
2005
+ },
2006
+ "channelId": {
2007
+ "type": [
2008
+ "string",
2009
+ "null"
2010
+ ]
2011
+ },
2012
+ "priority": {
2013
+ "type": "number"
2014
+ },
2015
+ "active": {
2016
+ "type": "boolean"
2017
+ },
2018
+ "conditions": {
2019
+ "type": "object",
2020
+ "additionalProperties": {}
2021
+ },
2022
+ "effects": {
2023
+ "type": "object",
2024
+ "additionalProperties": {}
2025
+ },
2026
+ "notes": {
2027
+ "type": [
2028
+ "string",
2029
+ "null"
2030
+ ]
2031
+ },
2032
+ "metadata": {
2033
+ "type": [
2034
+ "object",
2035
+ "null"
2036
+ ],
2037
+ "additionalProperties": {}
2038
+ },
2039
+ "createdAt": {
2040
+ "type": "string"
2041
+ },
2042
+ "updatedAt": {
2043
+ "type": "string"
2044
+ }
2045
+ },
2046
+ "required": [
2047
+ "id",
2048
+ "name",
2049
+ "scope",
2050
+ "policyType",
2051
+ "productId",
2052
+ "optionId",
2053
+ "marketId",
2054
+ "channelId",
2055
+ "priority",
2056
+ "active",
2057
+ "conditions",
2058
+ "effects",
2059
+ "notes",
2060
+ "metadata",
2061
+ "createdAt",
2062
+ "updatedAt"
2063
+ ]
2064
+ }
2065
+ },
2066
+ "required": [
2067
+ "data"
2068
+ ]
2069
+ }
2070
+ }
2071
+ }
2072
+ },
2073
+ "400": {
2074
+ "description": "invalid_request: request body failed validation",
2075
+ "content": {
2076
+ "application/json": {
2077
+ "schema": {
2078
+ "type": "object",
2079
+ "properties": {
2080
+ "error": {
2081
+ "type": "string"
2082
+ }
2083
+ },
2084
+ "required": [
2085
+ "error"
2086
+ ]
2087
+ }
2088
+ }
2089
+ }
2090
+ },
2091
+ "404": {
2092
+ "description": "Sellability policy not found",
2093
+ "content": {
2094
+ "application/json": {
2095
+ "schema": {
2096
+ "type": "object",
2097
+ "properties": {
2098
+ "error": {
2099
+ "type": "string"
2100
+ }
2101
+ },
2102
+ "required": [
2103
+ "error"
2104
+ ]
2105
+ }
2106
+ }
2107
+ }
2108
+ }
2109
+ }
2110
+ },
2111
+ "delete": {
2112
+ "parameters": [
2113
+ {
2114
+ "schema": {
2115
+ "type": "string"
2116
+ },
2117
+ "required": true,
2118
+ "name": "id",
2119
+ "in": "path"
2120
+ }
2121
+ ],
2122
+ "responses": {
2123
+ "200": {
2124
+ "description": "Sellability policy deleted",
2125
+ "content": {
2126
+ "application/json": {
2127
+ "schema": {
2128
+ "type": "object",
2129
+ "properties": {
2130
+ "success": {
2131
+ "type": "boolean"
2132
+ }
2133
+ },
2134
+ "required": [
2135
+ "success"
2136
+ ]
2137
+ }
2138
+ }
2139
+ }
2140
+ },
2141
+ "404": {
2142
+ "description": "Sellability policy not found",
2143
+ "content": {
2144
+ "application/json": {
2145
+ "schema": {
2146
+ "type": "object",
2147
+ "properties": {
2148
+ "error": {
2149
+ "type": "string"
2150
+ }
2151
+ },
2152
+ "required": [
2153
+ "error"
2154
+ ]
2155
+ }
2156
+ }
2157
+ }
2158
+ }
2159
+ }
2160
+ }
2161
+ },
2162
+ "/v1/admin/sellability/policy-results": {
2163
+ "get": {
2164
+ "parameters": [
2165
+ {
2166
+ "schema": {
2167
+ "type": "integer",
2168
+ "minimum": 1,
2169
+ "maximum": 200,
2170
+ "default": 100
2171
+ },
2172
+ "required": false,
2173
+ "name": "limit",
2174
+ "in": "query"
2175
+ },
2176
+ {
2177
+ "schema": {
2178
+ "type": [
2179
+ "integer",
2180
+ "null"
2181
+ ],
2182
+ "minimum": 0,
2183
+ "default": 0
2184
+ },
2185
+ "required": false,
2186
+ "name": "offset",
2187
+ "in": "query"
2188
+ },
2189
+ {
2190
+ "schema": {
2191
+ "type": "string"
2192
+ },
2193
+ "required": false,
2194
+ "name": "snapshotId",
2195
+ "in": "query"
2196
+ },
2197
+ {
2198
+ "schema": {
2199
+ "type": "string"
2200
+ },
2201
+ "required": false,
2202
+ "name": "snapshotItemId",
2203
+ "in": "query"
2204
+ },
2205
+ {
2206
+ "schema": {
2207
+ "type": "string"
2208
+ },
2209
+ "required": false,
2210
+ "name": "policyId",
2211
+ "in": "query"
2212
+ },
2213
+ {
2214
+ "schema": {
2215
+ "type": "string",
2216
+ "enum": [
2217
+ "passed",
2218
+ "blocked",
2219
+ "warning",
2220
+ "adjusted"
2221
+ ]
2222
+ },
2223
+ "required": false,
2224
+ "name": "status",
2225
+ "in": "query"
2226
+ }
2227
+ ],
2228
+ "responses": {
2229
+ "200": {
2230
+ "description": "Paginated list of sellability policy results",
2231
+ "content": {
2232
+ "application/json": {
2233
+ "schema": {
2234
+ "type": "object",
2235
+ "properties": {
2236
+ "data": {
2237
+ "type": "array",
2238
+ "items": {
2239
+ "type": "object",
2240
+ "properties": {
2241
+ "id": {
2242
+ "type": "string"
2243
+ },
2244
+ "snapshotId": {
2245
+ "type": "string"
2246
+ },
2247
+ "snapshotItemId": {
2248
+ "type": [
2249
+ "string",
2250
+ "null"
2251
+ ]
2252
+ },
2253
+ "policyId": {
2254
+ "type": [
2255
+ "string",
2256
+ "null"
2257
+ ]
2258
+ },
2259
+ "candidateIndex": {
2260
+ "type": "number"
2261
+ },
2262
+ "status": {
2263
+ "type": "string",
2264
+ "enum": [
2265
+ "passed",
2266
+ "blocked",
2267
+ "warning",
2268
+ "adjusted"
2269
+ ]
2270
+ },
2271
+ "message": {
2272
+ "type": [
2273
+ "string",
2274
+ "null"
2275
+ ]
2276
+ },
2277
+ "details": {
2278
+ "type": [
2279
+ "object",
2280
+ "null"
2281
+ ],
2282
+ "additionalProperties": {}
2283
+ },
2284
+ "createdAt": {
2285
+ "type": "string"
2286
+ }
2287
+ },
2288
+ "required": [
2289
+ "id",
2290
+ "snapshotId",
2291
+ "snapshotItemId",
2292
+ "policyId",
2293
+ "candidateIndex",
2294
+ "status",
2295
+ "message",
2296
+ "details",
2297
+ "createdAt"
2298
+ ]
2299
+ }
2300
+ },
2301
+ "total": {
2302
+ "type": "integer"
2303
+ },
2304
+ "limit": {
2305
+ "type": "integer"
2306
+ },
2307
+ "offset": {
2308
+ "type": "integer"
2309
+ }
2310
+ },
2311
+ "required": [
2312
+ "data",
2313
+ "total",
2314
+ "limit",
2315
+ "offset"
2316
+ ]
2317
+ }
2318
+ }
2319
+ }
2320
+ }
2321
+ }
2322
+ },
2323
+ "post": {
2324
+ "requestBody": {
2325
+ "required": true,
2326
+ "content": {
2327
+ "application/json": {
2328
+ "schema": {
2329
+ "type": "object",
2330
+ "properties": {
2331
+ "snapshotId": {
2332
+ "type": "string"
2333
+ },
2334
+ "snapshotItemId": {
2335
+ "type": [
2336
+ "string",
2337
+ "null"
2338
+ ]
2339
+ },
2340
+ "policyId": {
2341
+ "type": [
2342
+ "string",
2343
+ "null"
2344
+ ]
2345
+ },
2346
+ "candidateIndex": {
2347
+ "type": "integer",
2348
+ "minimum": 0,
2349
+ "default": 0
2350
+ },
2351
+ "status": {
2352
+ "type": "string",
2353
+ "enum": [
2354
+ "passed",
2355
+ "blocked",
2356
+ "warning",
2357
+ "adjusted"
2358
+ ],
2359
+ "default": "passed"
2360
+ },
2361
+ "message": {
2362
+ "type": [
2363
+ "string",
2364
+ "null"
2365
+ ]
2366
+ },
2367
+ "details": {
2368
+ "type": [
2369
+ "object",
2370
+ "null"
2371
+ ],
2372
+ "additionalProperties": {}
2373
+ }
2374
+ },
2375
+ "required": [
2376
+ "snapshotId"
2377
+ ]
2378
+ }
2379
+ }
2380
+ }
2381
+ },
2382
+ "responses": {
2383
+ "201": {
2384
+ "description": "The created sellability policy result",
2385
+ "content": {
2386
+ "application/json": {
2387
+ "schema": {
2388
+ "type": "object",
2389
+ "properties": {
2390
+ "data": {
2391
+ "type": "object",
2392
+ "properties": {
2393
+ "id": {
2394
+ "type": "string"
2395
+ },
2396
+ "snapshotId": {
2397
+ "type": "string"
2398
+ },
2399
+ "snapshotItemId": {
2400
+ "type": [
2401
+ "string",
2402
+ "null"
2403
+ ]
2404
+ },
2405
+ "policyId": {
2406
+ "type": [
2407
+ "string",
2408
+ "null"
2409
+ ]
2410
+ },
2411
+ "candidateIndex": {
2412
+ "type": "number"
2413
+ },
2414
+ "status": {
2415
+ "type": "string",
2416
+ "enum": [
2417
+ "passed",
2418
+ "blocked",
2419
+ "warning",
2420
+ "adjusted"
2421
+ ]
2422
+ },
2423
+ "message": {
2424
+ "type": [
2425
+ "string",
2426
+ "null"
2427
+ ]
2428
+ },
2429
+ "details": {
2430
+ "type": [
2431
+ "object",
2432
+ "null"
2433
+ ],
2434
+ "additionalProperties": {}
2435
+ },
2436
+ "createdAt": {
2437
+ "type": "string"
2438
+ }
2439
+ },
2440
+ "required": [
2441
+ "id",
2442
+ "snapshotId",
2443
+ "snapshotItemId",
2444
+ "policyId",
2445
+ "candidateIndex",
2446
+ "status",
2447
+ "message",
2448
+ "details",
2449
+ "createdAt"
2450
+ ]
2451
+ }
2452
+ },
2453
+ "required": [
2454
+ "data"
2455
+ ]
2456
+ }
2457
+ }
2458
+ }
2459
+ },
2460
+ "400": {
2461
+ "description": "invalid_request: request body failed validation",
2462
+ "content": {
2463
+ "application/json": {
2464
+ "schema": {
2465
+ "type": "object",
2466
+ "properties": {
2467
+ "error": {
2468
+ "type": "string"
2469
+ }
2470
+ },
2471
+ "required": [
2472
+ "error"
2473
+ ]
2474
+ }
2475
+ }
2476
+ }
2477
+ }
2478
+ }
2479
+ }
2480
+ },
2481
+ "/v1/admin/sellability/policy-results/{id}": {
2482
+ "get": {
2483
+ "parameters": [
2484
+ {
2485
+ "schema": {
2486
+ "type": "string"
2487
+ },
2488
+ "required": true,
2489
+ "name": "id",
2490
+ "in": "path"
2491
+ }
2492
+ ],
2493
+ "responses": {
2494
+ "200": {
2495
+ "description": "A sellability policy result by id",
2496
+ "content": {
2497
+ "application/json": {
2498
+ "schema": {
2499
+ "type": "object",
2500
+ "properties": {
2501
+ "data": {
2502
+ "type": "object",
2503
+ "properties": {
2504
+ "id": {
2505
+ "type": "string"
2506
+ },
2507
+ "snapshotId": {
2508
+ "type": "string"
2509
+ },
2510
+ "snapshotItemId": {
2511
+ "type": [
2512
+ "string",
2513
+ "null"
2514
+ ]
2515
+ },
2516
+ "policyId": {
2517
+ "type": [
2518
+ "string",
2519
+ "null"
2520
+ ]
2521
+ },
2522
+ "candidateIndex": {
2523
+ "type": "number"
2524
+ },
2525
+ "status": {
2526
+ "type": "string",
2527
+ "enum": [
2528
+ "passed",
2529
+ "blocked",
2530
+ "warning",
2531
+ "adjusted"
2532
+ ]
2533
+ },
2534
+ "message": {
2535
+ "type": [
2536
+ "string",
2537
+ "null"
2538
+ ]
2539
+ },
2540
+ "details": {
2541
+ "type": [
2542
+ "object",
2543
+ "null"
2544
+ ],
2545
+ "additionalProperties": {}
2546
+ },
2547
+ "createdAt": {
2548
+ "type": "string"
2549
+ }
2550
+ },
2551
+ "required": [
2552
+ "id",
2553
+ "snapshotId",
2554
+ "snapshotItemId",
2555
+ "policyId",
2556
+ "candidateIndex",
2557
+ "status",
2558
+ "message",
2559
+ "details",
2560
+ "createdAt"
2561
+ ]
2562
+ }
2563
+ },
2564
+ "required": [
2565
+ "data"
2566
+ ]
2567
+ }
2568
+ }
2569
+ }
2570
+ },
2571
+ "404": {
2572
+ "description": "Sellability policy result not found",
2573
+ "content": {
2574
+ "application/json": {
2575
+ "schema": {
2576
+ "type": "object",
2577
+ "properties": {
2578
+ "error": {
2579
+ "type": "string"
2580
+ }
2581
+ },
2582
+ "required": [
2583
+ "error"
2584
+ ]
2585
+ }
2586
+ }
2587
+ }
2588
+ }
2589
+ }
2590
+ },
2591
+ "patch": {
2592
+ "parameters": [
2593
+ {
2594
+ "schema": {
2595
+ "type": "string"
2596
+ },
2597
+ "required": true,
2598
+ "name": "id",
2599
+ "in": "path"
2600
+ }
2601
+ ],
2602
+ "requestBody": {
2603
+ "required": true,
2604
+ "content": {
2605
+ "application/json": {
2606
+ "schema": {
2607
+ "type": "object",
2608
+ "properties": {
2609
+ "snapshotId": {
2610
+ "type": "string"
2611
+ },
2612
+ "snapshotItemId": {
2613
+ "type": [
2614
+ "string",
2615
+ "null"
2616
+ ]
2617
+ },
2618
+ "policyId": {
2619
+ "type": [
2620
+ "string",
2621
+ "null"
2622
+ ]
2623
+ },
2624
+ "candidateIndex": {
2625
+ "type": "integer",
2626
+ "minimum": 0,
2627
+ "default": 0
2628
+ },
2629
+ "status": {
2630
+ "type": "string",
2631
+ "enum": [
2632
+ "passed",
2633
+ "blocked",
2634
+ "warning",
2635
+ "adjusted"
2636
+ ],
2637
+ "default": "passed"
2638
+ },
2639
+ "message": {
2640
+ "type": [
2641
+ "string",
2642
+ "null"
2643
+ ]
2644
+ },
2645
+ "details": {
2646
+ "type": [
2647
+ "object",
2648
+ "null"
2649
+ ],
2650
+ "additionalProperties": {}
2651
+ }
2652
+ }
2653
+ }
2654
+ }
2655
+ }
2656
+ },
2657
+ "responses": {
2658
+ "200": {
2659
+ "description": "The updated sellability policy result",
2660
+ "content": {
2661
+ "application/json": {
2662
+ "schema": {
2663
+ "type": "object",
2664
+ "properties": {
2665
+ "data": {
2666
+ "type": "object",
2667
+ "properties": {
2668
+ "id": {
2669
+ "type": "string"
2670
+ },
2671
+ "snapshotId": {
2672
+ "type": "string"
2673
+ },
2674
+ "snapshotItemId": {
2675
+ "type": [
2676
+ "string",
2677
+ "null"
2678
+ ]
2679
+ },
2680
+ "policyId": {
2681
+ "type": [
2682
+ "string",
2683
+ "null"
2684
+ ]
2685
+ },
2686
+ "candidateIndex": {
2687
+ "type": "number"
2688
+ },
2689
+ "status": {
2690
+ "type": "string",
2691
+ "enum": [
2692
+ "passed",
2693
+ "blocked",
2694
+ "warning",
2695
+ "adjusted"
2696
+ ]
2697
+ },
2698
+ "message": {
2699
+ "type": [
2700
+ "string",
2701
+ "null"
2702
+ ]
2703
+ },
2704
+ "details": {
2705
+ "type": [
2706
+ "object",
2707
+ "null"
2708
+ ],
2709
+ "additionalProperties": {}
2710
+ },
2711
+ "createdAt": {
2712
+ "type": "string"
2713
+ }
2714
+ },
2715
+ "required": [
2716
+ "id",
2717
+ "snapshotId",
2718
+ "snapshotItemId",
2719
+ "policyId",
2720
+ "candidateIndex",
2721
+ "status",
2722
+ "message",
2723
+ "details",
2724
+ "createdAt"
2725
+ ]
2726
+ }
2727
+ },
2728
+ "required": [
2729
+ "data"
2730
+ ]
2731
+ }
2732
+ }
2733
+ }
2734
+ },
2735
+ "400": {
2736
+ "description": "invalid_request: request body failed validation",
2737
+ "content": {
2738
+ "application/json": {
2739
+ "schema": {
2740
+ "type": "object",
2741
+ "properties": {
2742
+ "error": {
2743
+ "type": "string"
2744
+ }
2745
+ },
2746
+ "required": [
2747
+ "error"
2748
+ ]
2749
+ }
2750
+ }
2751
+ }
2752
+ },
2753
+ "404": {
2754
+ "description": "Sellability policy result not found",
2755
+ "content": {
2756
+ "application/json": {
2757
+ "schema": {
2758
+ "type": "object",
2759
+ "properties": {
2760
+ "error": {
2761
+ "type": "string"
2762
+ }
2763
+ },
2764
+ "required": [
2765
+ "error"
2766
+ ]
2767
+ }
2768
+ }
2769
+ }
2770
+ }
2771
+ }
2772
+ },
2773
+ "delete": {
2774
+ "parameters": [
2775
+ {
2776
+ "schema": {
2777
+ "type": "string"
2778
+ },
2779
+ "required": true,
2780
+ "name": "id",
2781
+ "in": "path"
2782
+ }
2783
+ ],
2784
+ "responses": {
2785
+ "200": {
2786
+ "description": "Sellability policy result deleted",
2787
+ "content": {
2788
+ "application/json": {
2789
+ "schema": {
2790
+ "type": "object",
2791
+ "properties": {
2792
+ "success": {
2793
+ "type": "boolean"
2794
+ }
2795
+ },
2796
+ "required": [
2797
+ "success"
2798
+ ]
2799
+ }
2800
+ }
2801
+ }
2802
+ },
2803
+ "404": {
2804
+ "description": "Sellability policy result not found",
2805
+ "content": {
2806
+ "application/json": {
2807
+ "schema": {
2808
+ "type": "object",
2809
+ "properties": {
2810
+ "error": {
2811
+ "type": "string"
2812
+ }
2813
+ },
2814
+ "required": [
2815
+ "error"
2816
+ ]
2817
+ }
2818
+ }
2819
+ }
2820
+ }
2821
+ }
2822
+ }
2823
+ },
2824
+ "/v1/admin/sellability/offer-refresh-runs": {
2825
+ "get": {
2826
+ "parameters": [
2827
+ {
2828
+ "schema": {
2829
+ "type": "integer",
2830
+ "minimum": 1,
2831
+ "maximum": 200,
2832
+ "default": 50
2833
+ },
2834
+ "required": false,
2835
+ "name": "limit",
2836
+ "in": "query"
2837
+ },
2838
+ {
2839
+ "schema": {
2840
+ "type": [
2841
+ "integer",
2842
+ "null"
2843
+ ],
2844
+ "minimum": 0,
2845
+ "default": 0
2846
+ },
2847
+ "required": false,
2848
+ "name": "offset",
2849
+ "in": "query"
2850
+ },
2851
+ {
2852
+ "schema": {
2853
+ "type": "string"
2854
+ },
2855
+ "required": false,
2856
+ "name": "offerId",
2857
+ "in": "query"
2858
+ },
2859
+ {
2860
+ "schema": {
2861
+ "type": "string"
2862
+ },
2863
+ "required": false,
2864
+ "name": "snapshotId",
2865
+ "in": "query"
2866
+ },
2867
+ {
2868
+ "schema": {
2869
+ "type": "string",
2870
+ "enum": [
2871
+ "pending",
2872
+ "running",
2873
+ "completed",
2874
+ "failed",
2875
+ "expired"
2876
+ ]
2877
+ },
2878
+ "required": false,
2879
+ "name": "status",
2880
+ "in": "query"
2881
+ }
2882
+ ],
2883
+ "responses": {
2884
+ "200": {
2885
+ "description": "Paginated list of offer refresh runs",
2886
+ "content": {
2887
+ "application/json": {
2888
+ "schema": {
2889
+ "type": "object",
2890
+ "properties": {
2891
+ "data": {
2892
+ "type": "array",
2893
+ "items": {
2894
+ "type": "object",
2895
+ "properties": {
2896
+ "id": {
2897
+ "type": "string"
2898
+ },
2899
+ "offerId": {
2900
+ "type": "string"
2901
+ },
2902
+ "snapshotId": {
2903
+ "type": [
2904
+ "string",
2905
+ "null"
2906
+ ]
2907
+ },
2908
+ "status": {
2909
+ "type": "string",
2910
+ "enum": [
2911
+ "pending",
2912
+ "running",
2913
+ "completed",
2914
+ "failed",
2915
+ "expired"
2916
+ ]
2917
+ },
2918
+ "startedAt": {
2919
+ "type": "string"
2920
+ },
2921
+ "completedAt": {
2922
+ "type": [
2923
+ "string",
2924
+ "null"
2925
+ ]
2926
+ },
2927
+ "notes": {
2928
+ "type": [
2929
+ "string",
2930
+ "null"
2931
+ ]
2932
+ },
2933
+ "metadata": {
2934
+ "type": [
2935
+ "object",
2936
+ "null"
2937
+ ],
2938
+ "additionalProperties": {}
2939
+ },
2940
+ "createdAt": {
2941
+ "type": "string"
2942
+ },
2943
+ "updatedAt": {
2944
+ "type": "string"
2945
+ }
2946
+ },
2947
+ "required": [
2948
+ "id",
2949
+ "offerId",
2950
+ "snapshotId",
2951
+ "status",
2952
+ "startedAt",
2953
+ "completedAt",
2954
+ "notes",
2955
+ "metadata",
2956
+ "createdAt",
2957
+ "updatedAt"
2958
+ ]
2959
+ }
2960
+ },
2961
+ "total": {
2962
+ "type": "integer"
2963
+ },
2964
+ "limit": {
2965
+ "type": "integer"
2966
+ },
2967
+ "offset": {
2968
+ "type": "integer"
2969
+ }
2970
+ },
2971
+ "required": [
2972
+ "data",
2973
+ "total",
2974
+ "limit",
2975
+ "offset"
2976
+ ]
2977
+ }
2978
+ }
2979
+ }
2980
+ }
2981
+ }
2982
+ },
2983
+ "post": {
2984
+ "requestBody": {
2985
+ "required": true,
2986
+ "content": {
2987
+ "application/json": {
2988
+ "schema": {
2989
+ "type": "object",
2990
+ "properties": {
2991
+ "offerId": {
2992
+ "type": "string"
2993
+ },
2994
+ "snapshotId": {
2995
+ "type": [
2996
+ "string",
2997
+ "null"
2998
+ ]
2999
+ },
3000
+ "status": {
3001
+ "type": "string",
3002
+ "enum": [
3003
+ "pending",
3004
+ "running",
3005
+ "completed",
3006
+ "failed",
3007
+ "expired"
3008
+ ],
3009
+ "default": "pending"
3010
+ },
3011
+ "startedAt": {
3012
+ "type": [
3013
+ "string",
3014
+ "null"
3015
+ ],
3016
+ "format": "date-time"
3017
+ },
3018
+ "completedAt": {
3019
+ "type": [
3020
+ "string",
3021
+ "null"
3022
+ ],
3023
+ "format": "date-time"
3024
+ },
3025
+ "notes": {
3026
+ "type": [
3027
+ "string",
3028
+ "null"
3029
+ ]
3030
+ },
3031
+ "metadata": {
3032
+ "type": [
3033
+ "object",
3034
+ "null"
3035
+ ],
3036
+ "additionalProperties": {}
3037
+ }
3038
+ },
3039
+ "required": [
3040
+ "offerId"
3041
+ ]
3042
+ }
3043
+ }
3044
+ }
3045
+ },
3046
+ "responses": {
3047
+ "201": {
3048
+ "description": "The created offer refresh run",
3049
+ "content": {
3050
+ "application/json": {
3051
+ "schema": {
3052
+ "type": "object",
3053
+ "properties": {
3054
+ "data": {
3055
+ "type": "object",
3056
+ "properties": {
3057
+ "id": {
3058
+ "type": "string"
3059
+ },
3060
+ "offerId": {
3061
+ "type": "string"
3062
+ },
3063
+ "snapshotId": {
3064
+ "type": [
3065
+ "string",
3066
+ "null"
3067
+ ]
3068
+ },
3069
+ "status": {
3070
+ "type": "string",
3071
+ "enum": [
3072
+ "pending",
3073
+ "running",
3074
+ "completed",
3075
+ "failed",
3076
+ "expired"
3077
+ ]
3078
+ },
3079
+ "startedAt": {
3080
+ "type": "string"
3081
+ },
3082
+ "completedAt": {
3083
+ "type": [
3084
+ "string",
3085
+ "null"
3086
+ ]
3087
+ },
3088
+ "notes": {
3089
+ "type": [
3090
+ "string",
3091
+ "null"
3092
+ ]
3093
+ },
3094
+ "metadata": {
3095
+ "type": [
3096
+ "object",
3097
+ "null"
3098
+ ],
3099
+ "additionalProperties": {}
3100
+ },
3101
+ "createdAt": {
3102
+ "type": "string"
3103
+ },
3104
+ "updatedAt": {
3105
+ "type": "string"
3106
+ }
3107
+ },
3108
+ "required": [
3109
+ "id",
3110
+ "offerId",
3111
+ "snapshotId",
3112
+ "status",
3113
+ "startedAt",
3114
+ "completedAt",
3115
+ "notes",
3116
+ "metadata",
3117
+ "createdAt",
3118
+ "updatedAt"
3119
+ ]
3120
+ }
3121
+ },
3122
+ "required": [
3123
+ "data"
3124
+ ]
3125
+ }
3126
+ }
3127
+ }
3128
+ },
3129
+ "400": {
3130
+ "description": "invalid_request: request body failed validation",
3131
+ "content": {
3132
+ "application/json": {
3133
+ "schema": {
3134
+ "type": "object",
3135
+ "properties": {
3136
+ "error": {
3137
+ "type": "string"
3138
+ }
3139
+ },
3140
+ "required": [
3141
+ "error"
3142
+ ]
3143
+ }
3144
+ }
3145
+ }
3146
+ }
3147
+ }
3148
+ }
3149
+ },
3150
+ "/v1/admin/sellability/offer-refresh-runs/{id}": {
3151
+ "get": {
3152
+ "parameters": [
3153
+ {
3154
+ "schema": {
3155
+ "type": "string"
3156
+ },
3157
+ "required": true,
3158
+ "name": "id",
3159
+ "in": "path"
3160
+ }
3161
+ ],
3162
+ "responses": {
3163
+ "200": {
3164
+ "description": "An offer refresh run by id",
3165
+ "content": {
3166
+ "application/json": {
3167
+ "schema": {
3168
+ "type": "object",
3169
+ "properties": {
3170
+ "data": {
3171
+ "type": "object",
3172
+ "properties": {
3173
+ "id": {
3174
+ "type": "string"
3175
+ },
3176
+ "offerId": {
3177
+ "type": "string"
3178
+ },
3179
+ "snapshotId": {
3180
+ "type": [
3181
+ "string",
3182
+ "null"
3183
+ ]
3184
+ },
3185
+ "status": {
3186
+ "type": "string",
3187
+ "enum": [
3188
+ "pending",
3189
+ "running",
3190
+ "completed",
3191
+ "failed",
3192
+ "expired"
3193
+ ]
3194
+ },
3195
+ "startedAt": {
3196
+ "type": "string"
3197
+ },
3198
+ "completedAt": {
3199
+ "type": [
3200
+ "string",
3201
+ "null"
3202
+ ]
3203
+ },
3204
+ "notes": {
3205
+ "type": [
3206
+ "string",
3207
+ "null"
3208
+ ]
3209
+ },
3210
+ "metadata": {
3211
+ "type": [
3212
+ "object",
3213
+ "null"
3214
+ ],
3215
+ "additionalProperties": {}
3216
+ },
3217
+ "createdAt": {
3218
+ "type": "string"
3219
+ },
3220
+ "updatedAt": {
3221
+ "type": "string"
3222
+ }
3223
+ },
3224
+ "required": [
3225
+ "id",
3226
+ "offerId",
3227
+ "snapshotId",
3228
+ "status",
3229
+ "startedAt",
3230
+ "completedAt",
3231
+ "notes",
3232
+ "metadata",
3233
+ "createdAt",
3234
+ "updatedAt"
3235
+ ]
3236
+ }
3237
+ },
3238
+ "required": [
3239
+ "data"
3240
+ ]
3241
+ }
3242
+ }
3243
+ }
3244
+ },
3245
+ "404": {
3246
+ "description": "Offer refresh run not found",
3247
+ "content": {
3248
+ "application/json": {
3249
+ "schema": {
3250
+ "type": "object",
3251
+ "properties": {
3252
+ "error": {
3253
+ "type": "string"
3254
+ }
3255
+ },
3256
+ "required": [
3257
+ "error"
3258
+ ]
3259
+ }
3260
+ }
3261
+ }
3262
+ }
3263
+ }
3264
+ },
3265
+ "patch": {
3266
+ "parameters": [
3267
+ {
3268
+ "schema": {
3269
+ "type": "string"
3270
+ },
3271
+ "required": true,
3272
+ "name": "id",
3273
+ "in": "path"
3274
+ }
3275
+ ],
3276
+ "requestBody": {
3277
+ "required": true,
3278
+ "content": {
3279
+ "application/json": {
3280
+ "schema": {
3281
+ "type": "object",
3282
+ "properties": {
3283
+ "offerId": {
3284
+ "type": "string"
3285
+ },
3286
+ "snapshotId": {
3287
+ "type": [
3288
+ "string",
3289
+ "null"
3290
+ ]
3291
+ },
3292
+ "status": {
3293
+ "type": "string",
3294
+ "enum": [
3295
+ "pending",
3296
+ "running",
3297
+ "completed",
3298
+ "failed",
3299
+ "expired"
3300
+ ],
3301
+ "default": "pending"
3302
+ },
3303
+ "startedAt": {
3304
+ "type": [
3305
+ "string",
3306
+ "null"
3307
+ ],
3308
+ "format": "date-time"
3309
+ },
3310
+ "completedAt": {
3311
+ "type": [
3312
+ "string",
3313
+ "null"
3314
+ ],
3315
+ "format": "date-time"
3316
+ },
3317
+ "notes": {
3318
+ "type": [
3319
+ "string",
3320
+ "null"
3321
+ ]
3322
+ },
3323
+ "metadata": {
3324
+ "type": [
3325
+ "object",
3326
+ "null"
3327
+ ],
3328
+ "additionalProperties": {}
3329
+ }
3330
+ }
3331
+ }
3332
+ }
3333
+ }
3334
+ },
3335
+ "responses": {
3336
+ "200": {
3337
+ "description": "The updated offer refresh run",
3338
+ "content": {
3339
+ "application/json": {
3340
+ "schema": {
3341
+ "type": "object",
3342
+ "properties": {
3343
+ "data": {
3344
+ "type": "object",
3345
+ "properties": {
3346
+ "id": {
3347
+ "type": "string"
3348
+ },
3349
+ "offerId": {
3350
+ "type": "string"
3351
+ },
3352
+ "snapshotId": {
3353
+ "type": [
3354
+ "string",
3355
+ "null"
3356
+ ]
3357
+ },
3358
+ "status": {
3359
+ "type": "string",
3360
+ "enum": [
3361
+ "pending",
3362
+ "running",
3363
+ "completed",
3364
+ "failed",
3365
+ "expired"
3366
+ ]
3367
+ },
3368
+ "startedAt": {
3369
+ "type": "string"
3370
+ },
3371
+ "completedAt": {
3372
+ "type": [
3373
+ "string",
3374
+ "null"
3375
+ ]
3376
+ },
3377
+ "notes": {
3378
+ "type": [
3379
+ "string",
3380
+ "null"
3381
+ ]
3382
+ },
3383
+ "metadata": {
3384
+ "type": [
3385
+ "object",
3386
+ "null"
3387
+ ],
3388
+ "additionalProperties": {}
3389
+ },
3390
+ "createdAt": {
3391
+ "type": "string"
3392
+ },
3393
+ "updatedAt": {
3394
+ "type": "string"
3395
+ }
3396
+ },
3397
+ "required": [
3398
+ "id",
3399
+ "offerId",
3400
+ "snapshotId",
3401
+ "status",
3402
+ "startedAt",
3403
+ "completedAt",
3404
+ "notes",
3405
+ "metadata",
3406
+ "createdAt",
3407
+ "updatedAt"
3408
+ ]
3409
+ }
3410
+ },
3411
+ "required": [
3412
+ "data"
3413
+ ]
3414
+ }
3415
+ }
3416
+ }
3417
+ },
3418
+ "400": {
3419
+ "description": "invalid_request: request body failed validation",
3420
+ "content": {
3421
+ "application/json": {
3422
+ "schema": {
3423
+ "type": "object",
3424
+ "properties": {
3425
+ "error": {
3426
+ "type": "string"
3427
+ }
3428
+ },
3429
+ "required": [
3430
+ "error"
3431
+ ]
3432
+ }
3433
+ }
3434
+ }
3435
+ },
3436
+ "404": {
3437
+ "description": "Offer refresh run not found",
3438
+ "content": {
3439
+ "application/json": {
3440
+ "schema": {
3441
+ "type": "object",
3442
+ "properties": {
3443
+ "error": {
3444
+ "type": "string"
3445
+ }
3446
+ },
3447
+ "required": [
3448
+ "error"
3449
+ ]
3450
+ }
3451
+ }
3452
+ }
3453
+ }
3454
+ }
3455
+ },
3456
+ "delete": {
3457
+ "parameters": [
3458
+ {
3459
+ "schema": {
3460
+ "type": "string"
3461
+ },
3462
+ "required": true,
3463
+ "name": "id",
3464
+ "in": "path"
3465
+ }
3466
+ ],
3467
+ "responses": {
3468
+ "200": {
3469
+ "description": "Offer refresh run deleted",
3470
+ "content": {
3471
+ "application/json": {
3472
+ "schema": {
3473
+ "type": "object",
3474
+ "properties": {
3475
+ "success": {
3476
+ "type": "boolean"
3477
+ }
3478
+ },
3479
+ "required": [
3480
+ "success"
3481
+ ]
3482
+ }
3483
+ }
3484
+ }
3485
+ },
3486
+ "404": {
3487
+ "description": "Offer refresh run not found",
3488
+ "content": {
3489
+ "application/json": {
3490
+ "schema": {
3491
+ "type": "object",
3492
+ "properties": {
3493
+ "error": {
3494
+ "type": "string"
3495
+ }
3496
+ },
3497
+ "required": [
3498
+ "error"
3499
+ ]
3500
+ }
3501
+ }
3502
+ }
3503
+ }
3504
+ }
3505
+ }
3506
+ },
3507
+ "/v1/admin/sellability/offer-expiration-events": {
3508
+ "get": {
3509
+ "parameters": [
3510
+ {
3511
+ "schema": {
3512
+ "type": "integer",
3513
+ "minimum": 1,
3514
+ "maximum": 200,
3515
+ "default": 50
3516
+ },
3517
+ "required": false,
3518
+ "name": "limit",
3519
+ "in": "query"
3520
+ },
3521
+ {
3522
+ "schema": {
3523
+ "type": [
3524
+ "integer",
3525
+ "null"
3526
+ ],
3527
+ "minimum": 0,
3528
+ "default": 0
3529
+ },
3530
+ "required": false,
3531
+ "name": "offset",
3532
+ "in": "query"
3533
+ },
3534
+ {
3535
+ "schema": {
3536
+ "type": "string"
3537
+ },
3538
+ "required": false,
3539
+ "name": "offerId",
3540
+ "in": "query"
3541
+ },
3542
+ {
3543
+ "schema": {
3544
+ "type": "string"
3545
+ },
3546
+ "required": false,
3547
+ "name": "snapshotId",
3548
+ "in": "query"
3549
+ },
3550
+ {
3551
+ "schema": {
3552
+ "type": "string",
3553
+ "enum": [
3554
+ "scheduled",
3555
+ "expired",
3556
+ "cancelled",
3557
+ "superseded"
3558
+ ]
3559
+ },
3560
+ "required": false,
3561
+ "name": "status",
3562
+ "in": "query"
3563
+ }
3564
+ ],
3565
+ "responses": {
3566
+ "200": {
3567
+ "description": "Paginated list of offer expiration events",
3568
+ "content": {
3569
+ "application/json": {
3570
+ "schema": {
3571
+ "type": "object",
3572
+ "properties": {
3573
+ "data": {
3574
+ "type": "array",
3575
+ "items": {
3576
+ "type": "object",
3577
+ "properties": {
3578
+ "id": {
3579
+ "type": "string"
3580
+ },
3581
+ "offerId": {
3582
+ "type": "string"
3583
+ },
3584
+ "snapshotId": {
3585
+ "type": [
3586
+ "string",
3587
+ "null"
3588
+ ]
3589
+ },
3590
+ "expiresAt": {
3591
+ "type": "string"
3592
+ },
3593
+ "expiredAt": {
3594
+ "type": [
3595
+ "string",
3596
+ "null"
3597
+ ]
3598
+ },
3599
+ "status": {
3600
+ "type": "string",
3601
+ "enum": [
3602
+ "scheduled",
3603
+ "expired",
3604
+ "cancelled",
3605
+ "superseded"
3606
+ ]
3607
+ },
3608
+ "reason": {
3609
+ "type": [
3610
+ "string",
3611
+ "null"
3612
+ ]
3613
+ },
3614
+ "metadata": {
3615
+ "type": [
3616
+ "object",
3617
+ "null"
3618
+ ],
3619
+ "additionalProperties": {}
3620
+ },
3621
+ "createdAt": {
3622
+ "type": "string"
3623
+ },
3624
+ "updatedAt": {
3625
+ "type": "string"
3626
+ }
3627
+ },
3628
+ "required": [
3629
+ "id",
3630
+ "offerId",
3631
+ "snapshotId",
3632
+ "expiresAt",
3633
+ "expiredAt",
3634
+ "status",
3635
+ "reason",
3636
+ "metadata",
3637
+ "createdAt",
3638
+ "updatedAt"
3639
+ ]
3640
+ }
3641
+ },
3642
+ "total": {
3643
+ "type": "integer"
3644
+ },
3645
+ "limit": {
3646
+ "type": "integer"
3647
+ },
3648
+ "offset": {
3649
+ "type": "integer"
3650
+ }
3651
+ },
3652
+ "required": [
3653
+ "data",
3654
+ "total",
3655
+ "limit",
3656
+ "offset"
3657
+ ]
3658
+ }
3659
+ }
3660
+ }
3661
+ }
3662
+ }
3663
+ },
3664
+ "post": {
3665
+ "requestBody": {
3666
+ "required": true,
3667
+ "content": {
3668
+ "application/json": {
3669
+ "schema": {
3670
+ "type": "object",
3671
+ "properties": {
3672
+ "offerId": {
3673
+ "type": "string"
3674
+ },
3675
+ "snapshotId": {
3676
+ "type": [
3677
+ "string",
3678
+ "null"
3679
+ ]
3680
+ },
3681
+ "expiresAt": {
3682
+ "type": "string",
3683
+ "format": "date-time"
3684
+ },
3685
+ "expiredAt": {
3686
+ "type": [
3687
+ "string",
3688
+ "null"
3689
+ ],
3690
+ "format": "date-time"
3691
+ },
3692
+ "status": {
3693
+ "type": "string",
3694
+ "enum": [
3695
+ "scheduled",
3696
+ "expired",
3697
+ "cancelled",
3698
+ "superseded"
3699
+ ],
3700
+ "default": "scheduled"
3701
+ },
3702
+ "reason": {
3703
+ "type": [
3704
+ "string",
3705
+ "null"
3706
+ ]
3707
+ },
3708
+ "metadata": {
3709
+ "type": [
3710
+ "object",
3711
+ "null"
3712
+ ],
3713
+ "additionalProperties": {}
3714
+ }
3715
+ },
3716
+ "required": [
3717
+ "offerId",
3718
+ "expiresAt"
3719
+ ]
3720
+ }
3721
+ }
3722
+ }
3723
+ },
3724
+ "responses": {
3725
+ "201": {
3726
+ "description": "The created offer expiration event",
3727
+ "content": {
3728
+ "application/json": {
3729
+ "schema": {
3730
+ "type": "object",
3731
+ "properties": {
3732
+ "data": {
3733
+ "type": "object",
3734
+ "properties": {
3735
+ "id": {
3736
+ "type": "string"
3737
+ },
3738
+ "offerId": {
3739
+ "type": "string"
3740
+ },
3741
+ "snapshotId": {
3742
+ "type": [
3743
+ "string",
3744
+ "null"
3745
+ ]
3746
+ },
3747
+ "expiresAt": {
3748
+ "type": "string"
3749
+ },
3750
+ "expiredAt": {
3751
+ "type": [
3752
+ "string",
3753
+ "null"
3754
+ ]
3755
+ },
3756
+ "status": {
3757
+ "type": "string",
3758
+ "enum": [
3759
+ "scheduled",
3760
+ "expired",
3761
+ "cancelled",
3762
+ "superseded"
3763
+ ]
3764
+ },
3765
+ "reason": {
3766
+ "type": [
3767
+ "string",
3768
+ "null"
3769
+ ]
3770
+ },
3771
+ "metadata": {
3772
+ "type": [
3773
+ "object",
3774
+ "null"
3775
+ ],
3776
+ "additionalProperties": {}
3777
+ },
3778
+ "createdAt": {
3779
+ "type": "string"
3780
+ },
3781
+ "updatedAt": {
3782
+ "type": "string"
3783
+ }
3784
+ },
3785
+ "required": [
3786
+ "id",
3787
+ "offerId",
3788
+ "snapshotId",
3789
+ "expiresAt",
3790
+ "expiredAt",
3791
+ "status",
3792
+ "reason",
3793
+ "metadata",
3794
+ "createdAt",
3795
+ "updatedAt"
3796
+ ]
3797
+ }
3798
+ },
3799
+ "required": [
3800
+ "data"
3801
+ ]
3802
+ }
3803
+ }
3804
+ }
3805
+ },
3806
+ "400": {
3807
+ "description": "invalid_request: request body failed validation",
3808
+ "content": {
3809
+ "application/json": {
3810
+ "schema": {
3811
+ "type": "object",
3812
+ "properties": {
3813
+ "error": {
3814
+ "type": "string"
3815
+ }
3816
+ },
3817
+ "required": [
3818
+ "error"
3819
+ ]
3820
+ }
3821
+ }
3822
+ }
3823
+ }
3824
+ }
3825
+ }
3826
+ },
3827
+ "/v1/admin/sellability/offer-expiration-events/{id}": {
3828
+ "get": {
3829
+ "parameters": [
3830
+ {
3831
+ "schema": {
3832
+ "type": "string"
3833
+ },
3834
+ "required": true,
3835
+ "name": "id",
3836
+ "in": "path"
3837
+ }
3838
+ ],
3839
+ "responses": {
3840
+ "200": {
3841
+ "description": "An offer expiration event by id",
3842
+ "content": {
3843
+ "application/json": {
3844
+ "schema": {
3845
+ "type": "object",
3846
+ "properties": {
3847
+ "data": {
3848
+ "type": "object",
3849
+ "properties": {
3850
+ "id": {
3851
+ "type": "string"
3852
+ },
3853
+ "offerId": {
3854
+ "type": "string"
3855
+ },
3856
+ "snapshotId": {
3857
+ "type": [
3858
+ "string",
3859
+ "null"
3860
+ ]
3861
+ },
3862
+ "expiresAt": {
3863
+ "type": "string"
3864
+ },
3865
+ "expiredAt": {
3866
+ "type": [
3867
+ "string",
3868
+ "null"
3869
+ ]
3870
+ },
3871
+ "status": {
3872
+ "type": "string",
3873
+ "enum": [
3874
+ "scheduled",
3875
+ "expired",
3876
+ "cancelled",
3877
+ "superseded"
3878
+ ]
3879
+ },
3880
+ "reason": {
3881
+ "type": [
3882
+ "string",
3883
+ "null"
3884
+ ]
3885
+ },
3886
+ "metadata": {
3887
+ "type": [
3888
+ "object",
3889
+ "null"
3890
+ ],
3891
+ "additionalProperties": {}
3892
+ },
3893
+ "createdAt": {
3894
+ "type": "string"
3895
+ },
3896
+ "updatedAt": {
3897
+ "type": "string"
3898
+ }
3899
+ },
3900
+ "required": [
3901
+ "id",
3902
+ "offerId",
3903
+ "snapshotId",
3904
+ "expiresAt",
3905
+ "expiredAt",
3906
+ "status",
3907
+ "reason",
3908
+ "metadata",
3909
+ "createdAt",
3910
+ "updatedAt"
3911
+ ]
3912
+ }
3913
+ },
3914
+ "required": [
3915
+ "data"
3916
+ ]
3917
+ }
3918
+ }
3919
+ }
3920
+ },
3921
+ "404": {
3922
+ "description": "Offer expiration event not found",
3923
+ "content": {
3924
+ "application/json": {
3925
+ "schema": {
3926
+ "type": "object",
3927
+ "properties": {
3928
+ "error": {
3929
+ "type": "string"
3930
+ }
3931
+ },
3932
+ "required": [
3933
+ "error"
3934
+ ]
3935
+ }
3936
+ }
3937
+ }
3938
+ }
3939
+ }
3940
+ },
3941
+ "patch": {
3942
+ "parameters": [
3943
+ {
3944
+ "schema": {
3945
+ "type": "string"
3946
+ },
3947
+ "required": true,
3948
+ "name": "id",
3949
+ "in": "path"
3950
+ }
3951
+ ],
3952
+ "requestBody": {
3953
+ "required": true,
3954
+ "content": {
3955
+ "application/json": {
3956
+ "schema": {
3957
+ "type": "object",
3958
+ "properties": {
3959
+ "offerId": {
3960
+ "type": "string"
3961
+ },
3962
+ "snapshotId": {
3963
+ "type": [
3964
+ "string",
3965
+ "null"
3966
+ ]
3967
+ },
3968
+ "expiresAt": {
3969
+ "type": "string",
3970
+ "format": "date-time"
3971
+ },
3972
+ "expiredAt": {
3973
+ "type": [
3974
+ "string",
3975
+ "null"
3976
+ ],
3977
+ "format": "date-time"
3978
+ },
3979
+ "status": {
3980
+ "type": "string",
3981
+ "enum": [
3982
+ "scheduled",
3983
+ "expired",
3984
+ "cancelled",
3985
+ "superseded"
3986
+ ],
3987
+ "default": "scheduled"
3988
+ },
3989
+ "reason": {
3990
+ "type": [
3991
+ "string",
3992
+ "null"
3993
+ ]
3994
+ },
3995
+ "metadata": {
3996
+ "type": [
3997
+ "object",
3998
+ "null"
3999
+ ],
4000
+ "additionalProperties": {}
4001
+ }
4002
+ }
4003
+ }
4004
+ }
4005
+ }
4006
+ },
4007
+ "responses": {
4008
+ "200": {
4009
+ "description": "The updated offer expiration event",
4010
+ "content": {
4011
+ "application/json": {
4012
+ "schema": {
4013
+ "type": "object",
4014
+ "properties": {
4015
+ "data": {
4016
+ "type": "object",
4017
+ "properties": {
4018
+ "id": {
4019
+ "type": "string"
4020
+ },
4021
+ "offerId": {
4022
+ "type": "string"
4023
+ },
4024
+ "snapshotId": {
4025
+ "type": [
4026
+ "string",
4027
+ "null"
4028
+ ]
4029
+ },
4030
+ "expiresAt": {
4031
+ "type": "string"
4032
+ },
4033
+ "expiredAt": {
4034
+ "type": [
4035
+ "string",
4036
+ "null"
4037
+ ]
4038
+ },
4039
+ "status": {
4040
+ "type": "string",
4041
+ "enum": [
4042
+ "scheduled",
4043
+ "expired",
4044
+ "cancelled",
4045
+ "superseded"
4046
+ ]
4047
+ },
4048
+ "reason": {
4049
+ "type": [
4050
+ "string",
4051
+ "null"
4052
+ ]
4053
+ },
4054
+ "metadata": {
4055
+ "type": [
4056
+ "object",
4057
+ "null"
4058
+ ],
4059
+ "additionalProperties": {}
4060
+ },
4061
+ "createdAt": {
4062
+ "type": "string"
4063
+ },
4064
+ "updatedAt": {
4065
+ "type": "string"
4066
+ }
4067
+ },
4068
+ "required": [
4069
+ "id",
4070
+ "offerId",
4071
+ "snapshotId",
4072
+ "expiresAt",
4073
+ "expiredAt",
4074
+ "status",
4075
+ "reason",
4076
+ "metadata",
4077
+ "createdAt",
4078
+ "updatedAt"
4079
+ ]
4080
+ }
4081
+ },
4082
+ "required": [
4083
+ "data"
4084
+ ]
4085
+ }
4086
+ }
4087
+ }
4088
+ },
4089
+ "400": {
4090
+ "description": "invalid_request: request body failed validation",
4091
+ "content": {
4092
+ "application/json": {
4093
+ "schema": {
4094
+ "type": "object",
4095
+ "properties": {
4096
+ "error": {
4097
+ "type": "string"
4098
+ }
4099
+ },
4100
+ "required": [
4101
+ "error"
4102
+ ]
4103
+ }
4104
+ }
4105
+ }
4106
+ },
4107
+ "404": {
4108
+ "description": "Offer expiration event not found",
4109
+ "content": {
4110
+ "application/json": {
4111
+ "schema": {
4112
+ "type": "object",
4113
+ "properties": {
4114
+ "error": {
4115
+ "type": "string"
4116
+ }
4117
+ },
4118
+ "required": [
4119
+ "error"
4120
+ ]
4121
+ }
4122
+ }
4123
+ }
4124
+ }
4125
+ }
4126
+ },
4127
+ "delete": {
4128
+ "parameters": [
4129
+ {
4130
+ "schema": {
4131
+ "type": "string"
4132
+ },
4133
+ "required": true,
4134
+ "name": "id",
4135
+ "in": "path"
4136
+ }
4137
+ ],
4138
+ "responses": {
4139
+ "200": {
4140
+ "description": "Offer expiration event deleted",
4141
+ "content": {
4142
+ "application/json": {
4143
+ "schema": {
4144
+ "type": "object",
4145
+ "properties": {
4146
+ "success": {
4147
+ "type": "boolean"
4148
+ }
4149
+ },
4150
+ "required": [
4151
+ "success"
4152
+ ]
4153
+ }
4154
+ }
4155
+ }
4156
+ },
4157
+ "404": {
4158
+ "description": "Offer expiration event not found",
4159
+ "content": {
4160
+ "application/json": {
4161
+ "schema": {
4162
+ "type": "object",
4163
+ "properties": {
4164
+ "error": {
4165
+ "type": "string"
4166
+ }
4167
+ },
4168
+ "required": [
4169
+ "error"
4170
+ ]
4171
+ }
4172
+ }
4173
+ }
4174
+ }
4175
+ }
4176
+ }
4177
+ },
4178
+ "/v1/admin/sellability/explanations": {
4179
+ "get": {
4180
+ "parameters": [
4181
+ {
4182
+ "schema": {
4183
+ "type": "integer",
4184
+ "minimum": 1,
4185
+ "maximum": 200,
4186
+ "default": 100
4187
+ },
4188
+ "required": false,
4189
+ "name": "limit",
4190
+ "in": "query"
4191
+ },
4192
+ {
4193
+ "schema": {
4194
+ "type": [
4195
+ "integer",
4196
+ "null"
4197
+ ],
4198
+ "minimum": 0,
4199
+ "default": 0
4200
+ },
4201
+ "required": false,
4202
+ "name": "offset",
4203
+ "in": "query"
4204
+ },
4205
+ {
4206
+ "schema": {
4207
+ "type": "string"
4208
+ },
4209
+ "required": false,
4210
+ "name": "snapshotId",
4211
+ "in": "query"
4212
+ },
4213
+ {
4214
+ "schema": {
4215
+ "type": "string"
4216
+ },
4217
+ "required": false,
4218
+ "name": "snapshotItemId",
4219
+ "in": "query"
4220
+ },
4221
+ {
4222
+ "schema": {
4223
+ "type": "string",
4224
+ "enum": [
4225
+ "sellable",
4226
+ "blocked",
4227
+ "warning",
4228
+ "pricing",
4229
+ "allotment",
4230
+ "pickup",
4231
+ "policy"
4232
+ ]
4233
+ },
4234
+ "required": false,
4235
+ "name": "explanationType",
4236
+ "in": "query"
4237
+ }
4238
+ ],
4239
+ "responses": {
4240
+ "200": {
4241
+ "description": "Paginated list of sellability explanations",
4242
+ "content": {
4243
+ "application/json": {
4244
+ "schema": {
4245
+ "type": "object",
4246
+ "properties": {
4247
+ "data": {
4248
+ "type": "array",
4249
+ "items": {
4250
+ "type": "object",
4251
+ "properties": {
4252
+ "id": {
4253
+ "type": "string"
4254
+ },
4255
+ "snapshotId": {
4256
+ "type": "string"
4257
+ },
4258
+ "snapshotItemId": {
4259
+ "type": [
4260
+ "string",
4261
+ "null"
4262
+ ]
4263
+ },
4264
+ "candidateIndex": {
4265
+ "type": "number"
4266
+ },
4267
+ "explanationType": {
4268
+ "type": "string",
4269
+ "enum": [
4270
+ "sellable",
4271
+ "blocked",
4272
+ "warning",
4273
+ "pricing",
4274
+ "allotment",
4275
+ "pickup",
4276
+ "policy"
4277
+ ]
4278
+ },
4279
+ "code": {
4280
+ "type": [
4281
+ "string",
4282
+ "null"
4283
+ ]
4284
+ },
4285
+ "message": {
4286
+ "type": "string"
4287
+ },
4288
+ "details": {
4289
+ "type": [
4290
+ "object",
4291
+ "null"
4292
+ ],
4293
+ "additionalProperties": {}
4294
+ },
4295
+ "createdAt": {
4296
+ "type": "string"
4297
+ }
4298
+ },
4299
+ "required": [
4300
+ "id",
4301
+ "snapshotId",
4302
+ "snapshotItemId",
4303
+ "candidateIndex",
4304
+ "explanationType",
4305
+ "code",
4306
+ "message",
4307
+ "details",
4308
+ "createdAt"
4309
+ ]
4310
+ }
4311
+ },
4312
+ "total": {
4313
+ "type": "integer"
4314
+ },
4315
+ "limit": {
4316
+ "type": "integer"
4317
+ },
4318
+ "offset": {
4319
+ "type": "integer"
4320
+ }
4321
+ },
4322
+ "required": [
4323
+ "data",
4324
+ "total",
4325
+ "limit",
4326
+ "offset"
4327
+ ]
4328
+ }
4329
+ }
4330
+ }
4331
+ }
4332
+ }
4333
+ },
4334
+ "post": {
4335
+ "requestBody": {
4336
+ "required": true,
4337
+ "content": {
4338
+ "application/json": {
4339
+ "schema": {
4340
+ "type": "object",
4341
+ "properties": {
4342
+ "snapshotId": {
4343
+ "type": "string"
4344
+ },
4345
+ "snapshotItemId": {
4346
+ "type": [
4347
+ "string",
4348
+ "null"
4349
+ ]
4350
+ },
4351
+ "candidateIndex": {
4352
+ "type": "integer",
4353
+ "minimum": 0,
4354
+ "default": 0
4355
+ },
4356
+ "explanationType": {
4357
+ "type": "string",
4358
+ "enum": [
4359
+ "sellable",
4360
+ "blocked",
4361
+ "warning",
4362
+ "pricing",
4363
+ "allotment",
4364
+ "pickup",
4365
+ "policy"
4366
+ ],
4367
+ "default": "policy"
4368
+ },
4369
+ "code": {
4370
+ "type": [
4371
+ "string",
4372
+ "null"
4373
+ ]
4374
+ },
4375
+ "message": {
4376
+ "type": "string",
4377
+ "minLength": 1
4378
+ },
4379
+ "details": {
4380
+ "type": [
4381
+ "object",
4382
+ "null"
4383
+ ],
4384
+ "additionalProperties": {}
4385
+ }
4386
+ },
4387
+ "required": [
4388
+ "snapshotId",
4389
+ "message"
4390
+ ]
4391
+ }
4392
+ }
4393
+ }
4394
+ },
4395
+ "responses": {
4396
+ "201": {
4397
+ "description": "The created sellability explanation",
4398
+ "content": {
4399
+ "application/json": {
4400
+ "schema": {
4401
+ "type": "object",
4402
+ "properties": {
4403
+ "data": {
4404
+ "type": "object",
4405
+ "properties": {
4406
+ "id": {
4407
+ "type": "string"
4408
+ },
4409
+ "snapshotId": {
4410
+ "type": "string"
4411
+ },
4412
+ "snapshotItemId": {
4413
+ "type": [
4414
+ "string",
4415
+ "null"
4416
+ ]
4417
+ },
4418
+ "candidateIndex": {
4419
+ "type": "number"
4420
+ },
4421
+ "explanationType": {
4422
+ "type": "string",
4423
+ "enum": [
4424
+ "sellable",
4425
+ "blocked",
4426
+ "warning",
4427
+ "pricing",
4428
+ "allotment",
4429
+ "pickup",
4430
+ "policy"
4431
+ ]
4432
+ },
4433
+ "code": {
4434
+ "type": [
4435
+ "string",
4436
+ "null"
4437
+ ]
4438
+ },
4439
+ "message": {
4440
+ "type": "string"
4441
+ },
4442
+ "details": {
4443
+ "type": [
4444
+ "object",
4445
+ "null"
4446
+ ],
4447
+ "additionalProperties": {}
4448
+ },
4449
+ "createdAt": {
4450
+ "type": "string"
4451
+ }
4452
+ },
4453
+ "required": [
4454
+ "id",
4455
+ "snapshotId",
4456
+ "snapshotItemId",
4457
+ "candidateIndex",
4458
+ "explanationType",
4459
+ "code",
4460
+ "message",
4461
+ "details",
4462
+ "createdAt"
4463
+ ]
4464
+ }
4465
+ },
4466
+ "required": [
4467
+ "data"
4468
+ ]
4469
+ }
4470
+ }
4471
+ }
4472
+ },
4473
+ "400": {
4474
+ "description": "invalid_request: request body failed validation",
4475
+ "content": {
4476
+ "application/json": {
4477
+ "schema": {
4478
+ "type": "object",
4479
+ "properties": {
4480
+ "error": {
4481
+ "type": "string"
4482
+ }
4483
+ },
4484
+ "required": [
4485
+ "error"
4486
+ ]
4487
+ }
4488
+ }
4489
+ }
4490
+ }
4491
+ }
4492
+ }
4493
+ },
4494
+ "/v1/admin/sellability/explanations/{id}": {
4495
+ "get": {
4496
+ "parameters": [
4497
+ {
4498
+ "schema": {
4499
+ "type": "string"
4500
+ },
4501
+ "required": true,
4502
+ "name": "id",
4503
+ "in": "path"
4504
+ }
4505
+ ],
4506
+ "responses": {
4507
+ "200": {
4508
+ "description": "A sellability explanation by id",
4509
+ "content": {
4510
+ "application/json": {
4511
+ "schema": {
4512
+ "type": "object",
4513
+ "properties": {
4514
+ "data": {
4515
+ "type": "object",
4516
+ "properties": {
4517
+ "id": {
4518
+ "type": "string"
4519
+ },
4520
+ "snapshotId": {
4521
+ "type": "string"
4522
+ },
4523
+ "snapshotItemId": {
4524
+ "type": [
4525
+ "string",
4526
+ "null"
4527
+ ]
4528
+ },
4529
+ "candidateIndex": {
4530
+ "type": "number"
4531
+ },
4532
+ "explanationType": {
4533
+ "type": "string",
4534
+ "enum": [
4535
+ "sellable",
4536
+ "blocked",
4537
+ "warning",
4538
+ "pricing",
4539
+ "allotment",
4540
+ "pickup",
4541
+ "policy"
4542
+ ]
4543
+ },
4544
+ "code": {
4545
+ "type": [
4546
+ "string",
4547
+ "null"
4548
+ ]
4549
+ },
4550
+ "message": {
4551
+ "type": "string"
4552
+ },
4553
+ "details": {
4554
+ "type": [
4555
+ "object",
4556
+ "null"
4557
+ ],
4558
+ "additionalProperties": {}
4559
+ },
4560
+ "createdAt": {
4561
+ "type": "string"
4562
+ }
4563
+ },
4564
+ "required": [
4565
+ "id",
4566
+ "snapshotId",
4567
+ "snapshotItemId",
4568
+ "candidateIndex",
4569
+ "explanationType",
4570
+ "code",
4571
+ "message",
4572
+ "details",
4573
+ "createdAt"
4574
+ ]
4575
+ }
4576
+ },
4577
+ "required": [
4578
+ "data"
4579
+ ]
4580
+ }
4581
+ }
4582
+ }
4583
+ },
4584
+ "404": {
4585
+ "description": "Sellability explanation not found",
4586
+ "content": {
4587
+ "application/json": {
4588
+ "schema": {
4589
+ "type": "object",
4590
+ "properties": {
4591
+ "error": {
4592
+ "type": "string"
4593
+ }
4594
+ },
4595
+ "required": [
4596
+ "error"
4597
+ ]
4598
+ }
4599
+ }
4600
+ }
4601
+ }
4602
+ }
4603
+ },
4604
+ "patch": {
4605
+ "parameters": [
4606
+ {
4607
+ "schema": {
4608
+ "type": "string"
4609
+ },
4610
+ "required": true,
4611
+ "name": "id",
4612
+ "in": "path"
4613
+ }
4614
+ ],
4615
+ "requestBody": {
4616
+ "required": true,
4617
+ "content": {
4618
+ "application/json": {
4619
+ "schema": {
4620
+ "type": "object",
4621
+ "properties": {
4622
+ "snapshotId": {
4623
+ "type": "string"
4624
+ },
4625
+ "snapshotItemId": {
4626
+ "type": [
4627
+ "string",
4628
+ "null"
4629
+ ]
4630
+ },
4631
+ "candidateIndex": {
4632
+ "type": "integer",
4633
+ "minimum": 0,
4634
+ "default": 0
4635
+ },
4636
+ "explanationType": {
4637
+ "type": "string",
4638
+ "enum": [
4639
+ "sellable",
4640
+ "blocked",
4641
+ "warning",
4642
+ "pricing",
4643
+ "allotment",
4644
+ "pickup",
4645
+ "policy"
4646
+ ],
4647
+ "default": "policy"
4648
+ },
4649
+ "code": {
4650
+ "type": [
4651
+ "string",
4652
+ "null"
4653
+ ]
4654
+ },
4655
+ "message": {
4656
+ "type": "string",
4657
+ "minLength": 1
4658
+ },
4659
+ "details": {
4660
+ "type": [
4661
+ "object",
4662
+ "null"
4663
+ ],
4664
+ "additionalProperties": {}
4665
+ }
4666
+ }
4667
+ }
4668
+ }
4669
+ }
4670
+ },
4671
+ "responses": {
4672
+ "200": {
4673
+ "description": "The updated sellability explanation",
4674
+ "content": {
4675
+ "application/json": {
4676
+ "schema": {
4677
+ "type": "object",
4678
+ "properties": {
4679
+ "data": {
4680
+ "type": "object",
4681
+ "properties": {
4682
+ "id": {
4683
+ "type": "string"
4684
+ },
4685
+ "snapshotId": {
4686
+ "type": "string"
4687
+ },
4688
+ "snapshotItemId": {
4689
+ "type": [
4690
+ "string",
4691
+ "null"
4692
+ ]
4693
+ },
4694
+ "candidateIndex": {
4695
+ "type": "number"
4696
+ },
4697
+ "explanationType": {
4698
+ "type": "string",
4699
+ "enum": [
4700
+ "sellable",
4701
+ "blocked",
4702
+ "warning",
4703
+ "pricing",
4704
+ "allotment",
4705
+ "pickup",
4706
+ "policy"
4707
+ ]
4708
+ },
4709
+ "code": {
4710
+ "type": [
4711
+ "string",
4712
+ "null"
4713
+ ]
4714
+ },
4715
+ "message": {
4716
+ "type": "string"
4717
+ },
4718
+ "details": {
4719
+ "type": [
4720
+ "object",
4721
+ "null"
4722
+ ],
4723
+ "additionalProperties": {}
4724
+ },
4725
+ "createdAt": {
4726
+ "type": "string"
4727
+ }
4728
+ },
4729
+ "required": [
4730
+ "id",
4731
+ "snapshotId",
4732
+ "snapshotItemId",
4733
+ "candidateIndex",
4734
+ "explanationType",
4735
+ "code",
4736
+ "message",
4737
+ "details",
4738
+ "createdAt"
4739
+ ]
4740
+ }
4741
+ },
4742
+ "required": [
4743
+ "data"
4744
+ ]
4745
+ }
4746
+ }
4747
+ }
4748
+ },
4749
+ "400": {
4750
+ "description": "invalid_request: request body failed validation",
4751
+ "content": {
4752
+ "application/json": {
4753
+ "schema": {
4754
+ "type": "object",
4755
+ "properties": {
4756
+ "error": {
4757
+ "type": "string"
4758
+ }
4759
+ },
4760
+ "required": [
4761
+ "error"
4762
+ ]
4763
+ }
4764
+ }
4765
+ }
4766
+ },
4767
+ "404": {
4768
+ "description": "Sellability explanation not found",
4769
+ "content": {
4770
+ "application/json": {
4771
+ "schema": {
4772
+ "type": "object",
4773
+ "properties": {
4774
+ "error": {
4775
+ "type": "string"
4776
+ }
4777
+ },
4778
+ "required": [
4779
+ "error"
4780
+ ]
4781
+ }
4782
+ }
4783
+ }
4784
+ }
4785
+ }
4786
+ },
4787
+ "delete": {
4788
+ "parameters": [
4789
+ {
4790
+ "schema": {
4791
+ "type": "string"
4792
+ },
4793
+ "required": true,
4794
+ "name": "id",
4795
+ "in": "path"
4796
+ }
4797
+ ],
4798
+ "responses": {
4799
+ "200": {
4800
+ "description": "Sellability explanation deleted",
4801
+ "content": {
4802
+ "application/json": {
4803
+ "schema": {
4804
+ "type": "object",
4805
+ "properties": {
4806
+ "success": {
4807
+ "type": "boolean"
4808
+ }
4809
+ },
4810
+ "required": [
4811
+ "success"
4812
+ ]
4813
+ }
4814
+ }
4815
+ }
4816
+ },
4817
+ "404": {
4818
+ "description": "Sellability explanation not found",
4819
+ "content": {
4820
+ "application/json": {
4821
+ "schema": {
4822
+ "type": "object",
4823
+ "properties": {
4824
+ "error": {
4825
+ "type": "string"
4826
+ }
4827
+ },
4828
+ "required": [
4829
+ "error"
4830
+ ]
4831
+ }
4832
+ }
4833
+ }
4834
+ }
4835
+ }
4836
+ }
4837
+ }
4838
+ },
4839
+ "webhooks": {}
4840
+ }