spree_api 4.3.0.rc1 → 4.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/spree/api/v2/caching.rb +33 -0
  3. data/app/controllers/spree/api/v2/base_controller.rb +3 -1
  4. data/app/controllers/spree/api/v2/platform/menu_items_controller.rb +2 -2
  5. data/app/controllers/spree/api/v2/platform/menus_controller.rb +4 -0
  6. data/app/controllers/spree/api/v2/platform/products_controller.rb +12 -0
  7. data/app/controllers/spree/api/v2/platform/resource_controller.rb +3 -0
  8. data/app/controllers/spree/api/v2/resource_controller.rb +6 -1
  9. data/app/controllers/spree/api/v2/storefront/account/addresses_controller.rb +3 -1
  10. data/app/controllers/spree/api/v2/storefront/account/orders_controller.rb +4 -0
  11. data/app/controllers/spree/api/v2/storefront/cart_controller.rb +39 -1
  12. data/app/controllers/spree/api/v2/storefront/countries_controller.rb +7 -0
  13. data/app/controllers/spree/api/v2/storefront/products_controller.rb +12 -0
  14. data/app/models/spree/api_configuration.rb +4 -2
  15. data/app/models/spree/api_dependencies.rb +6 -2
  16. data/app/presenters/spree/api/products/filters_presenter.rb +39 -0
  17. data/app/serializers/concerns/spree/api/v2/image_transformation_concern.rb +15 -0
  18. data/app/serializers/concerns/spree/api/v2/taxon_image_transformation_concern.rb +15 -0
  19. data/app/serializers/spree/api/v2/base_serializer.rb +1 -1
  20. data/app/serializers/spree/api/v2/platform/icon_serializer.rb +16 -0
  21. data/app/serializers/spree/api/v2/platform/image_serializer.rb +3 -1
  22. data/app/serializers/spree/api/v2/platform/menu_item_serializer.rb +28 -5
  23. data/app/serializers/spree/api/v2/platform/product_serializer.rb +11 -11
  24. data/app/serializers/spree/api/v2/platform/taxon_image_serializer.rb +3 -1
  25. data/app/serializers/spree/api/v2/platform/user_serializer.rb +16 -0
  26. data/app/serializers/spree/v2/storefront/icon_serializer.rb +14 -0
  27. data/app/serializers/spree/v2/storefront/image_serializer.rb +3 -1
  28. data/app/serializers/spree/v2/storefront/menu_item_serializer.rb +12 -6
  29. data/app/serializers/spree/v2/storefront/payment_method_serializer.rb +4 -0
  30. data/app/serializers/spree/v2/storefront/product_serializer.rb +18 -12
  31. data/app/serializers/spree/v2/storefront/taxon_image_serializer.rb +3 -1
  32. data/config/locales/en.yml +1 -1
  33. data/config/routes.rb +3 -1
  34. data/docs/oauth/index.yml +2 -2
  35. data/docs/v2/platform/index.yaml +2442 -244
  36. data/docs/v2/storefront/index.yaml +11541 -1152
  37. data/lib/spree/api/testing_support/v2/platform_contexts.rb +15 -5
  38. data/spree_api.gemspec +1 -1
  39. metadata +16 -10
@@ -2,6 +2,10 @@
2
2
  openapi: 3.0.1
3
3
  info:
4
4
  title: Platform API V2
5
+ contact:
6
+ name: Spark Solutions
7
+ url: https://sparksolutions.co
8
+ email: we@sparksolutions.co
5
9
  version: v2
6
10
  paths:
7
11
  "/api/v2/platform/addresses":
@@ -11,6 +15,8 @@ paths:
11
15
  - Addresses
12
16
  security:
13
17
  - bearer_auth: []
18
+ description: Returns a list of Addresses
19
+ operationId: addresses-list
14
20
  parameters:
15
21
  - name: page
16
22
  in: query
@@ -24,14 +30,14 @@ paths:
24
30
  type: integer
25
31
  - name: include
26
32
  in: query
27
- descripton: 'Select which associated resources you would like to fetch, see:
33
+ description: 'Select which associated resources you would like to fetch, see:
28
34
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
29
35
  example: user,country,state
30
36
  schema:
31
37
  type: string
32
38
  - name: filter
33
39
  in: query
34
- descripton: ''
40
+ description: ''
35
41
  example: user_id_eq=1&firstname_cont=Joh
36
42
  schema:
37
43
  type: string
@@ -57,8 +63,8 @@ paths:
57
63
  state_name:
58
64
  alternative_phone: 555-555-0199
59
65
  company: Company
60
- created_at: '2021-08-06T06:53:18.846Z'
61
- updated_at: '2021-08-06T06:53:18.846Z'
66
+ created_at: '2021-08-30T22:29:07.024Z'
67
+ updated_at: '2021-08-30T22:29:07.024Z'
62
68
  deleted_at:
63
69
  label:
64
70
  relationships:
@@ -85,8 +91,8 @@ paths:
85
91
  state_name:
86
92
  alternative_phone: 555-555-0199
87
93
  company: Company
88
- created_at: '2021-08-06T06:53:18.853Z'
89
- updated_at: '2021-08-06T06:53:18.853Z'
94
+ created_at: '2021-08-30T22:29:07.026Z'
95
+ updated_at: '2021-08-30T22:29:07.026Z'
90
96
  deleted_at:
91
97
  label:
92
98
  relationships:
@@ -124,10 +130,12 @@ paths:
124
130
  - Addresses
125
131
  security:
126
132
  - bearer_auth: []
133
+ description: Creates an Address
134
+ operationId: create-address
127
135
  parameters:
128
136
  - name: include
129
137
  in: query
130
- descripton: 'Select which associated resources you would like to fetch, see:
138
+ description: 'Select which associated resources you would like to fetch, see:
131
139
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
132
140
  example: user,country,state
133
141
  schema:
@@ -141,7 +149,7 @@ paths:
141
149
  Example:
142
150
  value:
143
151
  data:
144
- id: '5'
152
+ id: '1'
145
153
  type: address
146
154
  attributes:
147
155
  firstname: John
@@ -154,18 +162,18 @@ paths:
154
162
  state_name:
155
163
  alternative_phone: 555-555-0199
156
164
  company: Company
157
- created_at: '2021-08-06T06:53:19.077Z'
158
- updated_at: '2021-08-06T06:53:19.077Z'
165
+ created_at: '2021-08-30T22:29:07.137Z'
166
+ updated_at: '2021-08-30T22:29:07.137Z'
159
167
  deleted_at:
160
168
  label:
161
169
  relationships:
162
170
  country:
163
171
  data:
164
- id: '4'
172
+ id: '2'
165
173
  type: country
166
174
  state:
167
175
  data:
168
- id: '5'
176
+ id: '1'
169
177
  type: state
170
178
  user:
171
179
  data:
@@ -208,6 +216,8 @@ paths:
208
216
  - Addresses
209
217
  security:
210
218
  - bearer_auth: []
219
+ description: Returns an Address
220
+ operationId: show-address
211
221
  parameters:
212
222
  - name: id
213
223
  in: path
@@ -216,7 +226,7 @@ paths:
216
226
  type: string
217
227
  - name: include
218
228
  in: query
219
- descripton: 'Select which associated resources you would like to fetch, see:
229
+ description: 'Select which associated resources you would like to fetch, see:
220
230
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
221
231
  example: user,country,state
222
232
  schema:
@@ -230,7 +240,7 @@ paths:
230
240
  Example:
231
241
  value:
232
242
  data:
233
- id: '6'
243
+ id: '1'
234
244
  type: address
235
245
  attributes:
236
246
  firstname: John
@@ -243,18 +253,18 @@ paths:
243
253
  state_name:
244
254
  alternative_phone: 555-555-0199
245
255
  company: Company
246
- created_at: '2021-08-06T06:53:19.150Z'
247
- updated_at: '2021-08-06T06:53:19.150Z'
256
+ created_at: '2021-08-30T22:29:07.160Z'
257
+ updated_at: '2021-08-30T22:29:07.160Z'
248
258
  deleted_at:
249
259
  label:
250
260
  relationships:
251
261
  country:
252
262
  data:
253
- id: '6'
263
+ id: '1'
254
264
  type: country
255
265
  state:
256
266
  data:
257
- id: '6'
267
+ id: '1'
258
268
  type: state
259
269
  user:
260
270
  data:
@@ -280,6 +290,8 @@ paths:
280
290
  - Addresses
281
291
  security:
282
292
  - bearer_auth: []
293
+ description: Updates an Address
294
+ operationId: update-address
283
295
  parameters:
284
296
  - name: id
285
297
  in: path
@@ -288,7 +300,7 @@ paths:
288
300
  type: string
289
301
  - name: include
290
302
  in: query
291
- descripton: 'Select which associated resources you would like to fetch, see:
303
+ description: 'Select which associated resources you would like to fetch, see:
292
304
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
293
305
  example: user,country,state
294
306
  schema:
@@ -302,7 +314,7 @@ paths:
302
314
  Example:
303
315
  value:
304
316
  data:
305
- id: '8'
317
+ id: '1'
306
318
  type: address
307
319
  attributes:
308
320
  firstname: Jack
@@ -315,18 +327,18 @@ paths:
315
327
  state_name:
316
328
  alternative_phone: 555-555-0199
317
329
  company: Company
318
- created_at: '2021-08-06T06:53:19.236Z'
319
- updated_at: '2021-08-06T06:53:19.247Z'
330
+ created_at: '2021-08-30T22:29:07.192Z'
331
+ updated_at: '2021-08-30T22:29:07.196Z'
320
332
  deleted_at:
321
333
  label:
322
334
  relationships:
323
335
  country:
324
336
  data:
325
- id: '9'
337
+ id: '1'
326
338
  type: country
327
339
  state:
328
340
  data:
329
- id: '8'
341
+ id: '1'
330
342
  type: state
331
343
  user:
332
344
  data:
@@ -370,6 +382,8 @@ paths:
370
382
  - Addresses
371
383
  security:
372
384
  - bearer_auth: []
385
+ description: Deletes an Address
386
+ operationId: delete-address
373
387
  parameters:
374
388
  - name: id
375
389
  in: path
@@ -402,6 +416,8 @@ paths:
402
416
  - Classifications
403
417
  security:
404
418
  - bearer_auth: []
419
+ description: Returns a list of Classifications
420
+ operationId: classifications-list
405
421
  parameters:
406
422
  - name: page
407
423
  in: query
@@ -415,14 +431,14 @@ paths:
415
431
  type: integer
416
432
  - name: include
417
433
  in: query
418
- descripton: 'Select which associated resources you would like to fetch, see:
434
+ description: 'Select which associated resources you would like to fetch, see:
419
435
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
420
436
  example: product,taxon
421
437
  schema:
422
438
  type: string
423
439
  - name: filter
424
440
  in: query
425
- descripton: ''
441
+ description: ''
426
442
  example: taxon_id_eq=1
427
443
  schema:
428
444
  type: string
@@ -439,8 +455,8 @@ paths:
439
455
  type: classification
440
456
  attributes:
441
457
  position: 1
442
- created_at: '2021-08-06T06:53:19.739Z'
443
- updated_at: '2021-08-06T06:53:19.739Z'
458
+ created_at: '2021-08-30T22:29:07.400Z'
459
+ updated_at: '2021-08-30T22:29:07.400Z'
444
460
  relationships:
445
461
  product:
446
462
  data:
@@ -454,8 +470,8 @@ paths:
454
470
  type: classification
455
471
  attributes:
456
472
  position: 1
457
- created_at: '2021-08-06T06:53:19.836Z'
458
- updated_at: '2021-08-06T06:53:19.836Z'
473
+ created_at: '2021-08-30T22:29:07.447Z'
474
+ updated_at: '2021-08-30T22:29:07.447Z'
459
475
  relationships:
460
476
  product:
461
477
  data:
@@ -489,10 +505,12 @@ paths:
489
505
  - Classifications
490
506
  security:
491
507
  - bearer_auth: []
508
+ description: Creates a Classification
509
+ operationId: create-classification
492
510
  parameters:
493
511
  - name: include
494
512
  in: query
495
- descripton: 'Select which associated resources you would like to fetch, see:
513
+ description: 'Select which associated resources you would like to fetch, see:
496
514
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
497
515
  example: product,taxon
498
516
  schema:
@@ -506,20 +524,20 @@ paths:
506
524
  Example:
507
525
  value:
508
526
  data:
509
- id: '5'
527
+ id: '1'
510
528
  type: classification
511
529
  attributes:
512
530
  position: 1
513
- created_at: '2021-08-06T06:53:20.242Z'
514
- updated_at: '2021-08-06T06:53:20.242Z'
531
+ created_at: '2021-08-30T22:29:07.600Z'
532
+ updated_at: '2021-08-30T22:29:07.600Z'
515
533
  relationships:
516
534
  product:
517
535
  data:
518
- id: '5'
536
+ id: '1'
519
537
  type: product
520
538
  taxon:
521
539
  data:
522
- id: '10'
540
+ id: '2'
523
541
  type: taxon
524
542
  '422':
525
543
  description: invalid request
@@ -546,6 +564,8 @@ paths:
546
564
  - Classifications
547
565
  security:
548
566
  - bearer_auth: []
567
+ description: Returns a Classification
568
+ operationId: show-classification
549
569
  parameters:
550
570
  - name: id
551
571
  in: path
@@ -554,7 +574,7 @@ paths:
554
574
  type: string
555
575
  - name: include
556
576
  in: query
557
- descripton: 'Select which associated resources you would like to fetch, see:
577
+ description: 'Select which associated resources you would like to fetch, see:
558
578
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
559
579
  example: product,taxon
560
580
  schema:
@@ -568,20 +588,20 @@ paths:
568
588
  Example:
569
589
  value:
570
590
  data:
571
- id: '6'
591
+ id: '1'
572
592
  type: classification
573
593
  attributes:
574
594
  position: 1
575
- created_at: '2021-08-06T06:53:20.399Z'
576
- updated_at: '2021-08-06T06:53:20.399Z'
595
+ created_at: '2021-08-30T22:29:07.667Z'
596
+ updated_at: '2021-08-30T22:29:07.667Z'
577
597
  relationships:
578
598
  product:
579
599
  data:
580
- id: '6'
600
+ id: '1'
581
601
  type: product
582
602
  taxon:
583
603
  data:
584
- id: '12'
604
+ id: '2'
585
605
  type: taxon
586
606
  '404':
587
607
  description: Record not found
@@ -605,6 +625,8 @@ paths:
605
625
  - Classifications
606
626
  security:
607
627
  - bearer_auth: []
628
+ description: Updates a Classification
629
+ operationId: update-classification
608
630
  parameters:
609
631
  - name: id
610
632
  in: path
@@ -613,7 +635,7 @@ paths:
613
635
  type: string
614
636
  - name: include
615
637
  in: query
616
- descripton: 'Select which associated resources you would like to fetch, see:
638
+ description: 'Select which associated resources you would like to fetch, see:
617
639
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
618
640
  example: product,taxon
619
641
  schema:
@@ -627,20 +649,20 @@ paths:
627
649
  Example:
628
650
  value:
629
651
  data:
630
- id: '8'
652
+ id: '1'
631
653
  type: classification
632
654
  attributes:
633
655
  position: 1
634
- created_at: '2021-08-06T06:53:20.705Z'
635
- updated_at: '2021-08-06T06:53:20.705Z'
656
+ created_at: '2021-08-30T22:29:07.783Z'
657
+ updated_at: '2021-08-30T22:29:07.783Z'
636
658
  relationships:
637
659
  product:
638
660
  data:
639
- id: '8'
661
+ id: '1'
640
662
  type: product
641
663
  taxon:
642
664
  data:
643
- id: '16'
665
+ id: '2'
644
666
  type: taxon
645
667
  '422':
646
668
  description: invalid request
@@ -680,6 +702,8 @@ paths:
680
702
  - Classifications
681
703
  security:
682
704
  - bearer_auth: []
705
+ description: Deletes a Classification
706
+ operationId: delete-classification
683
707
  parameters:
684
708
  - name: id
685
709
  in: path
@@ -712,6 +736,8 @@ paths:
712
736
  - Classifications
713
737
  security:
714
738
  - bearer_auth: []
739
+ operationId: reposition-classification
740
+ description: Reposition a Classification
715
741
  parameters:
716
742
  - name: id
717
743
  in: path
@@ -720,7 +746,7 @@ paths:
720
746
  type: string
721
747
  - name: include
722
748
  in: query
723
- descripton: 'Select which associated resources you would like to fetch, see:
749
+ description: 'Select which associated resources you would like to fetch, see:
724
750
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
725
751
  example: product,taxon
726
752
  schema:
@@ -734,20 +760,20 @@ paths:
734
760
  Example:
735
761
  value:
736
762
  data:
737
- id: '13'
763
+ id: '1'
738
764
  type: classification
739
765
  attributes:
740
766
  position: 2
741
- created_at: '2021-08-06T06:53:21.437Z'
742
- updated_at: '2021-08-06T06:53:21.461Z'
767
+ created_at: '2021-08-30T22:29:08.086Z'
768
+ updated_at: '2021-08-30T22:29:08.095Z'
743
769
  relationships:
744
770
  product:
745
771
  data:
746
- id: '13'
772
+ id: '1'
747
773
  type: product
748
774
  taxon:
749
775
  data:
750
- id: '26'
776
+ id: '2'
751
777
  type: taxon
752
778
  '422':
753
779
  description: invalid request
@@ -786,6 +812,8 @@ paths:
786
812
  - Countries
787
813
  security:
788
814
  - bearer_auth: []
815
+ operationId: countries-list
816
+ description: Returns a list of Countries
789
817
  responses:
790
818
  '200':
791
819
  description: Records returned
@@ -795,7 +823,7 @@ paths:
795
823
  Example:
796
824
  value:
797
825
  data:
798
- - id: '34'
826
+ - id: '1'
799
827
  type: country
800
828
  attributes:
801
829
  iso_name: UNITED STATES
@@ -804,13 +832,13 @@ paths:
804
832
  name: United States of America
805
833
  numcode: 840
806
834
  states_required: true
807
- updated_at: '2021-08-06T06:53:21.782Z'
835
+ updated_at: '2021-08-30T22:29:08.218Z'
808
836
  zipcode_required: true
809
- created_at: '2021-08-06T06:53:21.782Z'
837
+ created_at: '2021-08-30T22:29:08.218Z'
810
838
  relationships:
811
839
  states:
812
840
  data: []
813
- - id: '35'
841
+ - id: '2'
814
842
  type: country
815
843
  attributes:
816
844
  iso_name: ISO_NAME_2
@@ -819,13 +847,13 @@ paths:
819
847
  name: NAME_2
820
848
  numcode: 840
821
849
  states_required: false
822
- updated_at: '2021-08-06T06:53:21.793Z'
850
+ updated_at: '2021-08-30T22:29:08.222Z'
823
851
  zipcode_required: true
824
- created_at: '2021-08-06T06:53:21.793Z'
852
+ created_at: '2021-08-30T22:29:08.222Z'
825
853
  relationships:
826
854
  states:
827
855
  data: []
828
- - id: '36'
856
+ - id: '3'
829
857
  type: country
830
858
  attributes:
831
859
  iso_name: ISO_NAME_3
@@ -834,9 +862,9 @@ paths:
834
862
  name: NAME_3
835
863
  numcode: 840
836
864
  states_required: false
837
- updated_at: '2021-08-06T06:53:21.796Z'
865
+ updated_at: '2021-08-30T22:29:08.223Z'
838
866
  zipcode_required: true
839
- created_at: '2021-08-06T06:53:21.796Z'
867
+ created_at: '2021-08-30T22:29:08.223Z'
840
868
  relationships:
841
869
  states:
842
870
  data: []
@@ -865,6 +893,8 @@ paths:
865
893
  - Countries
866
894
  security:
867
895
  - bearer_auth: []
896
+ operationId: show-country
897
+ description: Returns a Country
868
898
  parameters:
869
899
  - name: id
870
900
  in: path
@@ -880,7 +910,7 @@ paths:
880
910
  Example:
881
911
  value:
882
912
  data:
883
- id: '41'
913
+ id: '2'
884
914
  type: country
885
915
  attributes:
886
916
  iso_name: ISO_NAME_6
@@ -889,9 +919,9 @@ paths:
889
919
  name: NAME_6
890
920
  numcode: 840
891
921
  states_required: false
892
- updated_at: '2021-08-06T06:53:21.864Z'
922
+ updated_at: '2021-08-30T22:29:08.259Z'
893
923
  zipcode_required: true
894
- created_at: '2021-08-06T06:53:21.864Z'
924
+ created_at: '2021-08-30T22:29:08.259Z'
895
925
  relationships:
896
926
  states:
897
927
  data: []
@@ -911,13 +941,15 @@ paths:
911
941
  Example:
912
942
  value:
913
943
  error: The access token is invalid
914
- "/api/v2/platform/taxons":
944
+ "/api/v2/platform/menu_items":
915
945
  get:
916
- summary: Returns a list of Taxons
946
+ summary: Returns a list of Menu Items
917
947
  tags:
918
- - Taxons
948
+ - Menu Items
919
949
  security:
920
950
  - bearer_auth: []
951
+ description: Returns a list of Menu Items
952
+ operationId: menu-items-list
921
953
  parameters:
922
954
  - name: page
923
955
  in: query
@@ -931,15 +963,15 @@ paths:
931
963
  type: integer
932
964
  - name: include
933
965
  in: query
934
- descripton: 'Select which associated resources you would like to fetch, see:
966
+ description: 'Select which associated resources you would like to fetch, see:
935
967
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
936
- example: taxonomy,parent,children
968
+ example: linked_resource
937
969
  schema:
938
970
  type: string
939
971
  - name: filter
940
972
  in: query
941
- descripton: ''
942
- example: taxonomy_id_eq=1&name_cont=Shirts
973
+ description: ''
974
+ example: menu_item_name_eq=Women
943
975
  schema:
944
976
  type: string
945
977
  responses:
@@ -951,121 +983,322 @@ paths:
951
983
  Example:
952
984
  value:
953
985
  data:
954
- - id: '32'
955
- type: taxon
986
+ - id: '1'
987
+ type: menu_item
956
988
  attributes:
957
- position: 0
958
- name: taxon_16
959
- permalink: taxonomy-16/taxon-16
989
+ name: Corporis deleniti vel necessitatibus laborum aliquid.
990
+ subtitle:
991
+ destination:
992
+ new_window: false
993
+ item_type: Container
994
+ linked_resource_type: URL
995
+ code:
996
+ lft: 1
997
+ rgt: 16
998
+ depth: 0
999
+ created_at: '2021-08-30T22:29:08.302Z'
1000
+ updated_at: '2021-08-30T22:29:08.383Z'
1001
+ link:
1002
+ is_container: true
1003
+ is_root: true
1004
+ is_child: false
1005
+ is_leaf: false
1006
+ relationships:
1007
+ icon:
1008
+ data:
1009
+ menu:
1010
+ data:
1011
+ id: '1'
1012
+ type: menu
1013
+ parent:
1014
+ data:
1015
+ linked_resource:
1016
+ data:
1017
+ children:
1018
+ data:
1019
+ - id: '2'
1020
+ type: menu_item
1021
+ - id: '3'
1022
+ type: menu_item
1023
+ - id: '4'
1024
+ type: menu_item
1025
+ - id: '5'
1026
+ type: menu_item
1027
+ - id: '6'
1028
+ type: menu_item
1029
+ - id: '7'
1030
+ type: menu_item
1031
+ - id: '8'
1032
+ type: menu_item
1033
+ - id: '2'
1034
+ type: menu_item
1035
+ attributes:
1036
+ name: Link no. 1 To Somewhere
1037
+ subtitle:
1038
+ destination:
1039
+ new_window: false
1040
+ item_type: Link
1041
+ linked_resource_type: URL
1042
+ code:
960
1043
  lft: 2
961
1044
  rgt: 3
962
- description:
963
- created_at: '2021-08-06T06:53:21.978Z'
964
- updated_at: '2021-08-06T06:53:21.982Z'
965
- meta_title:
966
- meta_description:
967
- meta_keywords:
968
1045
  depth: 1
969
- pretty_name: taxonomy_16 -> taxon_16
970
- seo_title: taxon_16
1046
+ created_at: '2021-08-30T22:29:08.314Z'
1047
+ updated_at: '2021-08-30T22:29:08.316Z'
1048
+ link:
1049
+ is_container: false
971
1050
  is_root: false
972
1051
  is_child: true
973
1052
  is_leaf: true
974
1053
  relationships:
1054
+ icon:
1055
+ data:
1056
+ id: '1'
1057
+ type: icon
1058
+ menu:
1059
+ data:
1060
+ id: '1'
1061
+ type: menu
975
1062
  parent:
976
1063
  data:
977
- id: '31'
978
- type: taxon
979
- taxonomy:
1064
+ id: '1'
1065
+ type: menu_item
1066
+ linked_resource:
980
1067
  data:
981
- id: '16'
982
- type: taxonomy
983
1068
  children:
984
1069
  data: []
985
- image:
986
- data:
987
- id: '16'
988
- type: taxon_image
989
- - id: '33'
990
- type: taxon
1070
+ - id: '3'
1071
+ type: menu_item
991
1072
  attributes:
992
- position: 0
993
- name: taxon_17
994
- permalink: taxonomy-16/taxon-17
1073
+ name: Link no. 2 To Somewhere
1074
+ subtitle:
1075
+ destination:
1076
+ new_window: false
1077
+ item_type: Link
1078
+ linked_resource_type: URL
1079
+ code:
995
1080
  lft: 4
996
1081
  rgt: 5
997
- description:
998
- created_at: '2021-08-06T06:53:22.008Z'
999
- updated_at: '2021-08-06T06:53:22.013Z'
1000
- meta_title:
1001
- meta_description:
1002
- meta_keywords:
1003
1082
  depth: 1
1004
- pretty_name: taxonomy_16 -> taxon_17
1005
- seo_title: taxon_17
1083
+ created_at: '2021-08-30T22:29:08.325Z'
1084
+ updated_at: '2021-08-30T22:29:08.327Z'
1085
+ link:
1086
+ is_container: false
1006
1087
  is_root: false
1007
1088
  is_child: true
1008
1089
  is_leaf: true
1009
1090
  relationships:
1091
+ icon:
1092
+ data:
1093
+ id: '2'
1094
+ type: icon
1095
+ menu:
1096
+ data:
1097
+ id: '1'
1098
+ type: menu
1010
1099
  parent:
1011
1100
  data:
1012
- id: '31'
1013
- type: taxon
1014
- taxonomy:
1101
+ id: '1'
1102
+ type: menu_item
1103
+ linked_resource:
1015
1104
  data:
1016
- id: '16'
1017
- type: taxonomy
1018
1105
  children:
1019
1106
  data: []
1020
- image:
1107
+ - id: '4'
1108
+ type: menu_item
1109
+ attributes:
1110
+ name: Link no. 3 To Somewhere
1111
+ subtitle:
1112
+ destination:
1113
+ new_window: false
1114
+ item_type: Link
1115
+ linked_resource_type: URL
1116
+ code:
1117
+ lft: 6
1118
+ rgt: 7
1119
+ depth: 1
1120
+ created_at: '2021-08-30T22:29:08.336Z'
1121
+ updated_at: '2021-08-30T22:29:08.337Z'
1122
+ link:
1123
+ is_container: false
1124
+ is_root: false
1125
+ is_child: true
1126
+ is_leaf: true
1127
+ relationships:
1128
+ icon:
1021
1129
  data:
1022
- id: '17'
1023
- type: taxon_image
1024
- - id: '31'
1025
- type: taxon
1130
+ id: '3'
1131
+ type: icon
1132
+ menu:
1133
+ data:
1134
+ id: '1'
1135
+ type: menu
1136
+ parent:
1137
+ data:
1138
+ id: '1'
1139
+ type: menu_item
1140
+ linked_resource:
1141
+ data:
1142
+ children:
1143
+ data: []
1144
+ - id: '5'
1145
+ type: menu_item
1026
1146
  attributes:
1027
- position: 0
1028
- name: taxonomy_16
1029
- permalink: taxonomy-16
1030
- lft: 1
1031
- rgt: 6
1032
- description:
1033
- created_at: '2021-08-06T06:53:21.950Z'
1034
- updated_at: '2021-08-06T06:53:22.027Z'
1035
- meta_title:
1036
- meta_description:
1037
- meta_keywords:
1038
- depth: 0
1039
- pretty_name: taxonomy_16
1040
- seo_title: taxonomy_16
1041
- is_root: true
1042
- is_child: false
1043
- is_leaf: false
1147
+ name: Link no. 4 To Somewhere
1148
+ subtitle:
1149
+ destination:
1150
+ new_window: false
1151
+ item_type: Link
1152
+ linked_resource_type: URL
1153
+ code:
1154
+ lft: 8
1155
+ rgt: 9
1156
+ depth: 1
1157
+ created_at: '2021-08-30T22:29:08.346Z'
1158
+ updated_at: '2021-08-30T22:29:08.348Z'
1159
+ link:
1160
+ is_container: false
1161
+ is_root: false
1162
+ is_child: true
1163
+ is_leaf: true
1044
1164
  relationships:
1165
+ icon:
1166
+ data:
1167
+ id: '4'
1168
+ type: icon
1169
+ menu:
1170
+ data:
1171
+ id: '1'
1172
+ type: menu
1045
1173
  parent:
1046
1174
  data:
1047
- taxonomy:
1175
+ id: '1'
1176
+ type: menu_item
1177
+ linked_resource:
1048
1178
  data:
1049
- id: '16'
1050
- type: taxonomy
1051
1179
  children:
1180
+ data: []
1181
+ - id: '6'
1182
+ type: menu_item
1183
+ attributes:
1184
+ name: Link no. 5 To Somewhere
1185
+ subtitle:
1186
+ destination:
1187
+ new_window: false
1188
+ item_type: Link
1189
+ linked_resource_type: URL
1190
+ code:
1191
+ lft: 10
1192
+ rgt: 11
1193
+ depth: 1
1194
+ created_at: '2021-08-30T22:29:08.356Z'
1195
+ updated_at: '2021-08-30T22:29:08.358Z'
1196
+ link:
1197
+ is_container: false
1198
+ is_root: false
1199
+ is_child: true
1200
+ is_leaf: true
1201
+ relationships:
1202
+ icon:
1052
1203
  data:
1053
- - id: '32'
1054
- type: taxon
1055
- - id: '33'
1056
- type: taxon
1057
- image:
1204
+ id: '5'
1205
+ type: icon
1206
+ menu:
1207
+ data:
1208
+ id: '1'
1209
+ type: menu
1210
+ parent:
1211
+ data:
1212
+ id: '1'
1213
+ type: menu_item
1214
+ linked_resource:
1215
+ data:
1216
+ children:
1217
+ data: []
1218
+ - id: '7'
1219
+ type: menu_item
1220
+ attributes:
1221
+ name: Link no. 6 To Somewhere
1222
+ subtitle:
1223
+ destination:
1224
+ new_window: false
1225
+ item_type: Link
1226
+ linked_resource_type: URL
1227
+ code:
1228
+ lft: 12
1229
+ rgt: 13
1230
+ depth: 1
1231
+ created_at: '2021-08-30T22:29:08.367Z'
1232
+ updated_at: '2021-08-30T22:29:08.369Z'
1233
+ link:
1234
+ is_container: false
1235
+ is_root: false
1236
+ is_child: true
1237
+ is_leaf: true
1238
+ relationships:
1239
+ icon:
1240
+ data:
1241
+ id: '6'
1242
+ type: icon
1243
+ menu:
1244
+ data:
1245
+ id: '1'
1246
+ type: menu
1247
+ parent:
1248
+ data:
1249
+ id: '1'
1250
+ type: menu_item
1251
+ linked_resource:
1058
1252
  data:
1253
+ children:
1254
+ data: []
1255
+ - id: '8'
1256
+ type: menu_item
1257
+ attributes:
1258
+ name: Link no. 7 To Somewhere
1259
+ subtitle:
1260
+ destination:
1261
+ new_window: false
1262
+ item_type: Link
1263
+ linked_resource_type: URL
1264
+ code:
1265
+ lft: 14
1266
+ rgt: 15
1267
+ depth: 1
1268
+ created_at: '2021-08-30T22:29:08.377Z'
1269
+ updated_at: '2021-08-30T22:29:08.379Z'
1270
+ link:
1271
+ is_container: false
1272
+ is_root: false
1273
+ is_child: true
1274
+ is_leaf: true
1275
+ relationships:
1276
+ icon:
1277
+ data:
1278
+ id: '7'
1279
+ type: icon
1280
+ menu:
1281
+ data:
1282
+ id: '1'
1283
+ type: menu
1284
+ parent:
1285
+ data:
1286
+ id: '1'
1287
+ type: menu_item
1288
+ linked_resource:
1289
+ data:
1290
+ children:
1291
+ data: []
1059
1292
  meta:
1060
- count: 3
1061
- total_count: 3
1293
+ count: 8
1294
+ total_count: 8
1062
1295
  total_pages: 1
1063
1296
  links:
1064
- self: http://www.example.com/api/v2/platform/taxons?page=1&per_page=&include=&filter=
1065
- next: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
1066
- prev: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
1067
- last: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
1068
- first: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
1297
+ self: http://www.example.com/api/v2/platform/menu_items?page=1&per_page=&include=&filter=
1298
+ next: http://www.example.com/api/v2/platform/menu_items?include=&page=1&per_page=
1299
+ prev: http://www.example.com/api/v2/platform/menu_items?include=&page=1&per_page=
1300
+ last: http://www.example.com/api/v2/platform/menu_items?include=&page=1&per_page=
1301
+ first: http://www.example.com/api/v2/platform/menu_items?include=&page=1&per_page=
1069
1302
  '401':
1070
1303
  description: Authentication Failed
1071
1304
  content:
@@ -1075,17 +1308,19 @@ paths:
1075
1308
  value:
1076
1309
  error: The access token is invalid
1077
1310
  post:
1078
- summary: Creates a Taxon
1311
+ summary: Creates a Menu Item
1079
1312
  tags:
1080
- - Taxons
1313
+ - Menu Items
1081
1314
  security:
1082
1315
  - bearer_auth: []
1316
+ description: Creates a Menu Item
1317
+ operationId: create-menu-item
1083
1318
  parameters:
1084
1319
  - name: include
1085
1320
  in: query
1086
- descripton: 'Select which associated resources you would like to fetch, see:
1321
+ description: 'Select which associated resources you would like to fetch, see:
1087
1322
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1088
- example: taxonomy,parent,children
1323
+ example: linked_resource
1089
1324
  schema:
1090
1325
  type: string
1091
1326
  responses:
@@ -1097,39 +1332,41 @@ paths:
1097
1332
  Example:
1098
1333
  value:
1099
1334
  data:
1100
- id: '38'
1101
- type: taxon
1335
+ id: '5'
1336
+ type: menu_item
1102
1337
  attributes:
1103
- position: 0
1104
- name: taxon_20
1105
- permalink: taxonomy-18/taxon-20
1106
- lft: 2
1107
- rgt: 3
1108
- description:
1109
- created_at: '2021-08-06T06:53:22.225Z'
1110
- updated_at: '2021-08-06T06:53:22.231Z'
1111
- meta_title:
1112
- meta_description:
1113
- meta_keywords:
1338
+ name: Link no. 18 To Somewhere
1339
+ subtitle:
1340
+ destination:
1341
+ new_window: false
1342
+ item_type: Link
1343
+ linked_resource_type: URL
1344
+ code:
1345
+ lft: 8
1346
+ rgt: 9
1114
1347
  depth: 1
1115
- pretty_name: taxonomy_18 -> taxon_20
1116
- seo_title: taxon_20
1348
+ created_at: '2021-08-30T22:29:08.554Z'
1349
+ updated_at: '2021-08-30T22:29:08.556Z'
1350
+ link:
1351
+ is_container: false
1117
1352
  is_root: false
1118
1353
  is_child: true
1119
1354
  is_leaf: true
1120
1355
  relationships:
1356
+ icon:
1357
+ data:
1358
+ menu:
1359
+ data:
1360
+ id: '1'
1361
+ type: menu
1121
1362
  parent:
1122
1363
  data:
1123
- id: '37'
1124
- type: taxon
1125
- taxonomy:
1364
+ id: '1'
1365
+ type: menu_item
1366
+ linked_resource:
1126
1367
  data:
1127
- id: '18'
1128
- type: taxonomy
1129
1368
  children:
1130
1369
  data: []
1131
- image:
1132
- data:
1133
1370
  '422':
1134
1371
  description: invalid request
1135
1372
  content:
@@ -1137,24 +1374,29 @@ paths:
1137
1374
  examples:
1138
1375
  Example:
1139
1376
  value:
1140
- error: Name can't be blank and Taxonomy can't be blank
1377
+ error: Name can't be blank, Menu can't be blank, and Item type
1378
+ is not included in the list
1141
1379
  errors:
1142
1380
  name:
1143
1381
  - can't be blank
1144
- taxonomy:
1382
+ menu:
1145
1383
  - can't be blank
1384
+ item_type:
1385
+ - is not included in the list
1146
1386
  requestBody:
1147
1387
  content:
1148
1388
  application/json:
1149
1389
  schema:
1150
- "$ref": "#/components/schemas/taxon_params"
1151
- "/api/v2/platform/taxons/{id}":
1390
+ "$ref": "#/components/schemas/menu_item_params"
1391
+ "/api/v2/platform/menu_items/{id}":
1152
1392
  get:
1153
- summary: Returns a Taxon
1393
+ summary: Returns a Menu Item
1154
1394
  tags:
1155
- - Taxons
1395
+ - Menu Items
1156
1396
  security:
1157
1397
  - bearer_auth: []
1398
+ description: Returns a Menu Item
1399
+ operationId: show-menu-item
1158
1400
  parameters:
1159
1401
  - name: id
1160
1402
  in: path
@@ -1163,9 +1405,9 @@ paths:
1163
1405
  type: string
1164
1406
  - name: include
1165
1407
  in: query
1166
- descripton: 'Select which associated resources you would like to fetch, see:
1408
+ description: 'Select which associated resources you would like to fetch, see:
1167
1409
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1168
- example: taxonomy,parent,children
1410
+ example: linked_resource
1169
1411
  schema:
1170
1412
  type: string
1171
1413
  responses:
@@ -1177,43 +1419,43 @@ paths:
1177
1419
  Example:
1178
1420
  value:
1179
1421
  data:
1180
- id: '40'
1181
- type: taxon
1422
+ id: '5'
1423
+ type: menu_item
1182
1424
  attributes:
1183
- position: 0
1184
- name: taxon_21
1185
- permalink: taxonomy-19/taxon-21
1186
- lft: 2
1187
- rgt: 3
1188
- description:
1189
- created_at: '2021-08-06T06:53:22.320Z'
1190
- updated_at: '2021-08-06T06:53:22.324Z'
1191
- meta_title:
1192
- meta_description:
1193
- meta_keywords:
1425
+ name: Link no. 25 To Somewhere
1426
+ subtitle:
1427
+ destination:
1428
+ new_window: false
1429
+ item_type: Link
1430
+ linked_resource_type: URL
1431
+ code:
1432
+ lft: 8
1433
+ rgt: 9
1194
1434
  depth: 1
1195
- pretty_name: taxonomy_19 -> taxon_21
1196
- seo_title: taxon_21
1435
+ created_at: '2021-08-30T22:29:08.665Z'
1436
+ updated_at: '2021-08-30T22:29:08.667Z'
1437
+ link:
1438
+ is_container: false
1197
1439
  is_root: false
1198
1440
  is_child: true
1199
1441
  is_leaf: true
1200
1442
  relationships:
1443
+ icon:
1444
+ data:
1445
+ id: '4'
1446
+ type: icon
1447
+ menu:
1448
+ data:
1449
+ id: '1'
1450
+ type: menu
1201
1451
  parent:
1202
1452
  data:
1203
- id: '39'
1204
- type: taxon
1205
- taxonomy:
1453
+ id: '1'
1454
+ type: menu_item
1455
+ linked_resource:
1206
1456
  data:
1207
- id: '19'
1208
- type: taxonomy
1209
1457
  children:
1210
1458
  data: []
1211
- products:
1212
- data: []
1213
- image:
1214
- data:
1215
- id: '20'
1216
- type: taxon_image
1217
1459
  '404':
1218
1460
  description: Record not found
1219
1461
  content:
@@ -1231,11 +1473,13 @@ paths:
1231
1473
  value:
1232
1474
  error: The access token is invalid
1233
1475
  put:
1234
- summary: Updates a Taxon
1476
+ summary: Updates a Menu Item
1235
1477
  tags:
1236
- - Taxons
1478
+ - Menu Items
1237
1479
  security:
1238
1480
  - bearer_auth: []
1481
+ description: Updates a Menu Item
1482
+ operationId: update-menu-item
1239
1483
  parameters:
1240
1484
  - name: id
1241
1485
  in: path
@@ -1244,9 +1488,9 @@ paths:
1244
1488
  type: string
1245
1489
  - name: include
1246
1490
  in: query
1247
- descripton: 'Select which associated resources you would like to fetch, see:
1491
+ description: 'Select which associated resources you would like to fetch, see:
1248
1492
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1249
- example: taxonomy,parent,children
1493
+ example: linked_resource
1250
1494
  schema:
1251
1495
  type: string
1252
1496
  responses:
@@ -1258,20 +1502,1498 @@ paths:
1258
1502
  Example:
1259
1503
  value:
1260
1504
  data:
1261
- id: '44'
1262
- type: taxon
1505
+ id: '5'
1506
+ type: menu_item
1263
1507
  attributes:
1264
- position: 0
1265
- name: T-Shirts
1266
- permalink: taxonomy-21/taxon-23
1267
- lft: 2
1268
- rgt: 3
1269
- description:
1270
- created_at: '2021-08-06T06:53:22.511Z'
1271
- updated_at: '2021-08-06T06:53:22.542Z'
1272
- meta_title:
1273
- meta_description:
1274
- meta_keywords:
1508
+ name: Menu Item One
1509
+ subtitle:
1510
+ destination:
1511
+ new_window: false
1512
+ item_type: Link
1513
+ linked_resource_type: URL
1514
+ code:
1515
+ lft: 8
1516
+ rgt: 9
1517
+ depth: 1
1518
+ created_at: '2021-08-30T22:29:08.831Z'
1519
+ updated_at: '2021-08-30T22:29:08.843Z'
1520
+ link:
1521
+ is_container: false
1522
+ is_root: false
1523
+ is_child: true
1524
+ is_leaf: true
1525
+ relationships:
1526
+ icon:
1527
+ data:
1528
+ id: '4'
1529
+ type: icon
1530
+ menu:
1531
+ data:
1532
+ id: '1'
1533
+ type: menu
1534
+ parent:
1535
+ data:
1536
+ id: '1'
1537
+ type: menu_item
1538
+ linked_resource:
1539
+ data:
1540
+ children:
1541
+ data: []
1542
+ '422':
1543
+ description: invalid request
1544
+ content:
1545
+ application/vnd.api+json:
1546
+ examples:
1547
+ Example:
1548
+ value:
1549
+ error: Name can't be blank
1550
+ errors:
1551
+ name:
1552
+ - can't be blank
1553
+ '404':
1554
+ description: Record not found
1555
+ content:
1556
+ application/vnd.api+json:
1557
+ examples:
1558
+ Example:
1559
+ value:
1560
+ error: The resource you were looking for could not be found.
1561
+ '401':
1562
+ description: Authentication Failed
1563
+ content:
1564
+ application/vnd.api+json:
1565
+ examples:
1566
+ Example:
1567
+ value:
1568
+ error: The access token is invalid
1569
+ requestBody:
1570
+ content:
1571
+ application/json:
1572
+ schema:
1573
+ "$ref": "#/components/schemas/menu_item_params"
1574
+ delete:
1575
+ summary: Deletes a Menu Item
1576
+ tags:
1577
+ - Menu Items
1578
+ security:
1579
+ - bearer_auth: []
1580
+ description: Deletes a Menu Item
1581
+ operationId: delete-menu-item
1582
+ parameters:
1583
+ - name: id
1584
+ in: path
1585
+ required: true
1586
+ schema:
1587
+ type: string
1588
+ responses:
1589
+ '204':
1590
+ description: Record deleted
1591
+ '404':
1592
+ description: Record not found
1593
+ content:
1594
+ application/vnd.api+json:
1595
+ examples:
1596
+ Example:
1597
+ value:
1598
+ error: The resource you were looking for could not be found.
1599
+ '401':
1600
+ description: Authentication Failed
1601
+ content:
1602
+ application/vnd.api+json:
1603
+ examples:
1604
+ Example:
1605
+ value:
1606
+ error: The access token is invalid
1607
+ "/api/v2/platform/menu_items/{id}/reposition":
1608
+ patch:
1609
+ summary: Reposition a Menu Item
1610
+ tags:
1611
+ - Menu Items
1612
+ security:
1613
+ - bearer_auth: []
1614
+ operationId: reposition-menu-item
1615
+ description: Reposition a Menu Item
1616
+ parameters:
1617
+ - name: id
1618
+ in: path
1619
+ required: true
1620
+ schema:
1621
+ type: string
1622
+ responses:
1623
+ '200':
1624
+ description: record updated
1625
+ content:
1626
+ application/vnd.api+json:
1627
+ examples:
1628
+ Example:
1629
+ value:
1630
+ data:
1631
+ id: '5'
1632
+ type: menu_item
1633
+ attributes:
1634
+ name: Link no. 62 To Somewhere
1635
+ subtitle:
1636
+ destination:
1637
+ new_window: false
1638
+ item_type: Link
1639
+ linked_resource_type: URL
1640
+ code:
1641
+ lft: 5
1642
+ rgt: 6
1643
+ depth: 2
1644
+ created_at: '2021-08-30T22:29:09.230Z'
1645
+ updated_at: '2021-08-30T22:29:09.241Z'
1646
+ link:
1647
+ is_container: false
1648
+ is_root: false
1649
+ is_child: true
1650
+ is_leaf: true
1651
+ relationships:
1652
+ icon:
1653
+ data:
1654
+ id: '4'
1655
+ type: icon
1656
+ menu:
1657
+ data:
1658
+ id: '1'
1659
+ type: menu
1660
+ parent:
1661
+ data:
1662
+ id: '3'
1663
+ type: menu_item
1664
+ linked_resource:
1665
+ data:
1666
+ children:
1667
+ data: []
1668
+ '404':
1669
+ description: Record not found
1670
+ content:
1671
+ application/vnd.api+json:
1672
+ examples:
1673
+ Example:
1674
+ value:
1675
+ error: The resource you were looking for could not be found.
1676
+ '401':
1677
+ description: Authentication Failed
1678
+ content:
1679
+ application/vnd.api+json:
1680
+ examples:
1681
+ Example:
1682
+ value:
1683
+ error: The access token is invalid
1684
+ requestBody:
1685
+ content:
1686
+ application/json:
1687
+ schema:
1688
+ "$ref": "#/components/schemas/menu_item_reposition_params"
1689
+ "/api/v2/platform/menus":
1690
+ get:
1691
+ summary: Returns a list of Menus
1692
+ tags:
1693
+ - Menus
1694
+ security:
1695
+ - bearer_auth: []
1696
+ description: Returns a list of Menus
1697
+ operationId: menus-list
1698
+ parameters:
1699
+ - name: page
1700
+ in: query
1701
+ example: 1
1702
+ schema:
1703
+ type: integer
1704
+ - name: per_page
1705
+ in: query
1706
+ example: 50
1707
+ schema:
1708
+ type: integer
1709
+ - name: include
1710
+ in: query
1711
+ description: 'Select which associated resources you would like to fetch, see:
1712
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1713
+ example: menu_items
1714
+ schema:
1715
+ type: string
1716
+ - name: filter
1717
+ in: query
1718
+ description: ''
1719
+ example: location_eq=header
1720
+ schema:
1721
+ type: string
1722
+ responses:
1723
+ '200':
1724
+ description: Records returned
1725
+ content:
1726
+ application/vnd.api+json:
1727
+ examples:
1728
+ Example:
1729
+ value:
1730
+ data:
1731
+ - id: '1'
1732
+ type: menu
1733
+ attributes:
1734
+ name: Main Menu
1735
+ location: header
1736
+ locale: en
1737
+ created_at: '2021-08-30T22:29:09.361Z'
1738
+ updated_at: '2021-08-30T22:29:09.390Z'
1739
+ relationships:
1740
+ menu_items:
1741
+ data:
1742
+ - id: '1'
1743
+ type: menu_item
1744
+ - id: '3'
1745
+ type: menu_item
1746
+ - id: '4'
1747
+ type: menu_item
1748
+ - id: '2'
1749
+ type: menu
1750
+ attributes:
1751
+ name: Footer Menu
1752
+ location: footer
1753
+ locale: en
1754
+ created_at: '2021-08-30T22:29:09.365Z'
1755
+ updated_at: '2021-08-30T22:29:09.411Z'
1756
+ relationships:
1757
+ menu_items:
1758
+ data:
1759
+ - id: '2'
1760
+ type: menu_item
1761
+ - id: '5'
1762
+ type: menu_item
1763
+ - id: '6'
1764
+ type: menu_item
1765
+ meta:
1766
+ count: 2
1767
+ total_count: 2
1768
+ total_pages: 1
1769
+ links:
1770
+ self: http://www.example.com/api/v2/platform/menus?page=1&per_page=&include=&filter=
1771
+ next: http://www.example.com/api/v2/platform/menus?include=&page=1&per_page=
1772
+ prev: http://www.example.com/api/v2/platform/menus?include=&page=1&per_page=
1773
+ last: http://www.example.com/api/v2/platform/menus?include=&page=1&per_page=
1774
+ first: http://www.example.com/api/v2/platform/menus?include=&page=1&per_page=
1775
+ '401':
1776
+ description: Authentication Failed
1777
+ content:
1778
+ application/vnd.api+json:
1779
+ examples:
1780
+ Example:
1781
+ value:
1782
+ error: The access token is invalid
1783
+ post:
1784
+ summary: Creates a Menu
1785
+ tags:
1786
+ - Menus
1787
+ security:
1788
+ - bearer_auth: []
1789
+ description: Creates a Menu
1790
+ operationId: create-menu
1791
+ parameters:
1792
+ - name: include
1793
+ in: query
1794
+ description: 'Select which associated resources you would like to fetch, see:
1795
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1796
+ example: menu_items
1797
+ schema:
1798
+ type: string
1799
+ responses:
1800
+ '201':
1801
+ description: record created
1802
+ content:
1803
+ application/vnd.api+json:
1804
+ examples:
1805
+ Example:
1806
+ value:
1807
+ data:
1808
+ id: '1'
1809
+ type: menu
1810
+ attributes:
1811
+ name: Main Menu
1812
+ location: header
1813
+ locale: en
1814
+ created_at: '2021-08-30T22:29:09.492Z'
1815
+ updated_at: '2021-08-30T22:29:09.495Z'
1816
+ relationships:
1817
+ menu_items:
1818
+ data:
1819
+ - id: '1'
1820
+ type: menu_item
1821
+ '422':
1822
+ description: invalid request
1823
+ content:
1824
+ application/vnd.api+json:
1825
+ examples:
1826
+ Example:
1827
+ value:
1828
+ error: Name can't be blank, Locale can't be blank, and Location
1829
+ is not included in the list
1830
+ errors:
1831
+ name:
1832
+ - can't be blank
1833
+ locale:
1834
+ - can't be blank
1835
+ location:
1836
+ - is not included in the list
1837
+ requestBody:
1838
+ content:
1839
+ application/json:
1840
+ schema:
1841
+ "$ref": "#/components/schemas/menu_params"
1842
+ "/api/v2/platform/menus/{id}":
1843
+ get:
1844
+ summary: Returns a Menu
1845
+ tags:
1846
+ - Menus
1847
+ security:
1848
+ - bearer_auth: []
1849
+ description: Returns a Menu
1850
+ operationId: show-menu
1851
+ parameters:
1852
+ - name: id
1853
+ in: path
1854
+ required: true
1855
+ schema:
1856
+ type: string
1857
+ - name: include
1858
+ in: query
1859
+ description: 'Select which associated resources you would like to fetch, see:
1860
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1861
+ example: menu_items
1862
+ schema:
1863
+ type: string
1864
+ responses:
1865
+ '200':
1866
+ description: Record found
1867
+ content:
1868
+ application/vnd.api+json:
1869
+ examples:
1870
+ Example:
1871
+ value:
1872
+ data:
1873
+ id: '1'
1874
+ type: menu
1875
+ attributes:
1876
+ name: Main Menu
1877
+ location: header
1878
+ locale: en
1879
+ created_at: '2021-08-30T22:29:09.523Z'
1880
+ updated_at: '2021-08-30T22:29:09.527Z'
1881
+ relationships:
1882
+ menu_items:
1883
+ data:
1884
+ - id: '1'
1885
+ type: menu_item
1886
+ '404':
1887
+ description: Record not found
1888
+ content:
1889
+ application/vnd.api+json:
1890
+ examples:
1891
+ Example:
1892
+ value:
1893
+ error: The resource you were looking for could not be found.
1894
+ '401':
1895
+ description: Authentication Failed
1896
+ content:
1897
+ application/vnd.api+json:
1898
+ examples:
1899
+ Example:
1900
+ value:
1901
+ error: The access token is invalid
1902
+ put:
1903
+ summary: Updates a Menu
1904
+ tags:
1905
+ - Menus
1906
+ security:
1907
+ - bearer_auth: []
1908
+ description: Updates a Menu
1909
+ operationId: update-menu
1910
+ parameters:
1911
+ - name: id
1912
+ in: path
1913
+ required: true
1914
+ schema:
1915
+ type: string
1916
+ - name: include
1917
+ in: query
1918
+ description: 'Select which associated resources you would like to fetch, see:
1919
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1920
+ example: menu_items
1921
+ schema:
1922
+ type: string
1923
+ responses:
1924
+ '200':
1925
+ description: record updated
1926
+ content:
1927
+ application/vnd.api+json:
1928
+ examples:
1929
+ Example:
1930
+ value:
1931
+ data:
1932
+ id: '1'
1933
+ type: menu
1934
+ attributes:
1935
+ name: Main Menu
1936
+ location: header
1937
+ locale: en
1938
+ created_at: '2021-08-30T22:29:09.565Z'
1939
+ updated_at: '2021-08-30T22:29:09.568Z'
1940
+ relationships:
1941
+ menu_items:
1942
+ data:
1943
+ - id: '1'
1944
+ type: menu_item
1945
+ '422':
1946
+ description: invalid request
1947
+ content:
1948
+ application/vnd.api+json:
1949
+ examples:
1950
+ Example:
1951
+ value:
1952
+ error: Name can't be blank, Locale can't be blank, and Location
1953
+ is not included in the list
1954
+ errors:
1955
+ name:
1956
+ - can't be blank
1957
+ locale:
1958
+ - can't be blank
1959
+ location:
1960
+ - is not included in the list
1961
+ '404':
1962
+ description: Record not found
1963
+ content:
1964
+ application/vnd.api+json:
1965
+ examples:
1966
+ Example:
1967
+ value:
1968
+ error: The resource you were looking for could not be found.
1969
+ '401':
1970
+ description: Authentication Failed
1971
+ content:
1972
+ application/vnd.api+json:
1973
+ examples:
1974
+ Example:
1975
+ value:
1976
+ error: The access token is invalid
1977
+ requestBody:
1978
+ content:
1979
+ application/json:
1980
+ schema:
1981
+ "$ref": "#/components/schemas/menu_params"
1982
+ delete:
1983
+ summary: Deletes a Menu
1984
+ tags:
1985
+ - Menus
1986
+ security:
1987
+ - bearer_auth: []
1988
+ description: Deletes a Menu
1989
+ operationId: delete-menu
1990
+ parameters:
1991
+ - name: id
1992
+ in: path
1993
+ required: true
1994
+ schema:
1995
+ type: string
1996
+ responses:
1997
+ '204':
1998
+ description: Record deleted
1999
+ '404':
2000
+ description: Record not found
2001
+ content:
2002
+ application/vnd.api+json:
2003
+ examples:
2004
+ Example:
2005
+ value:
2006
+ error: The resource you were looking for could not be found.
2007
+ '401':
2008
+ description: Authentication Failed
2009
+ content:
2010
+ application/vnd.api+json:
2011
+ examples:
2012
+ Example:
2013
+ value:
2014
+ error: The access token is invalid
2015
+ "/api/v2/platform/option_types":
2016
+ get:
2017
+ summary: Returns a list of Option Types
2018
+ tags:
2019
+ - Option Types
2020
+ security:
2021
+ - bearer_auth: []
2022
+ description: Returns a list of Option Types
2023
+ operationId: option-types-list
2024
+ parameters:
2025
+ - name: page
2026
+ in: query
2027
+ example: 1
2028
+ schema:
2029
+ type: integer
2030
+ - name: per_page
2031
+ in: query
2032
+ example: 50
2033
+ schema:
2034
+ type: integer
2035
+ - name: include
2036
+ in: query
2037
+ description: 'Select which associated resources you would like to fetch, see:
2038
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2039
+ example: ''
2040
+ schema:
2041
+ type: string
2042
+ - name: filter
2043
+ in: query
2044
+ description: ''
2045
+ example: option_type_id_eq=1&name_cont=Size
2046
+ schema:
2047
+ type: string
2048
+ responses:
2049
+ '200':
2050
+ description: Records returned
2051
+ content:
2052
+ application/vnd.api+json:
2053
+ examples:
2054
+ Example:
2055
+ value:
2056
+ data:
2057
+ - id: '1'
2058
+ type: option_type
2059
+ attributes:
2060
+ name: foo-size-1
2061
+ presentation: Size
2062
+ position: 1
2063
+ created_at: '2021-08-30T22:29:09.672Z'
2064
+ updated_at: '2021-08-30T22:29:09.672Z'
2065
+ filterable: true
2066
+ relationships:
2067
+ option_values:
2068
+ data: []
2069
+ - id: '2'
2070
+ type: option_type
2071
+ attributes:
2072
+ name: foo-size-2
2073
+ presentation: Size
2074
+ position: 2
2075
+ created_at: '2021-08-30T22:29:09.673Z'
2076
+ updated_at: '2021-08-30T22:29:09.673Z'
2077
+ filterable: true
2078
+ relationships:
2079
+ option_values:
2080
+ data: []
2081
+ meta:
2082
+ count: 2
2083
+ total_count: 2
2084
+ total_pages: 1
2085
+ links:
2086
+ self: http://www.example.com/api/v2/platform/option_types?page=1&per_page=&include=&filter=
2087
+ next: http://www.example.com/api/v2/platform/option_types?include=&page=1&per_page=
2088
+ prev: http://www.example.com/api/v2/platform/option_types?include=&page=1&per_page=
2089
+ last: http://www.example.com/api/v2/platform/option_types?include=&page=1&per_page=
2090
+ first: http://www.example.com/api/v2/platform/option_types?include=&page=1&per_page=
2091
+ '401':
2092
+ description: Authentication Failed
2093
+ content:
2094
+ application/vnd.api+json:
2095
+ examples:
2096
+ Example:
2097
+ value:
2098
+ error: The access token is invalid
2099
+ post:
2100
+ summary: Creates an Option Type
2101
+ tags:
2102
+ - Option Types
2103
+ security:
2104
+ - bearer_auth: []
2105
+ description: Creates an Option Type
2106
+ operationId: create-option-type
2107
+ parameters:
2108
+ - name: include
2109
+ in: query
2110
+ description: 'Select which associated resources you would like to fetch, see:
2111
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2112
+ example: ''
2113
+ schema:
2114
+ type: string
2115
+ responses:
2116
+ '201':
2117
+ description: record created
2118
+ content:
2119
+ application/vnd.api+json:
2120
+ examples:
2121
+ Example:
2122
+ value:
2123
+ data:
2124
+ id: '1'
2125
+ type: option_type
2126
+ attributes:
2127
+ name: foo-size-5
2128
+ presentation: Size
2129
+ position: 1
2130
+ created_at: '2021-08-30T22:29:09.706Z'
2131
+ updated_at: '2021-08-30T22:29:09.706Z'
2132
+ filterable: true
2133
+ relationships:
2134
+ option_values:
2135
+ data: []
2136
+ '422':
2137
+ description: invalid request
2138
+ content:
2139
+ application/vnd.api+json:
2140
+ examples:
2141
+ Example:
2142
+ value:
2143
+ error: Name can't be blank and Presentation can't be blank
2144
+ errors:
2145
+ name:
2146
+ - can't be blank
2147
+ presentation:
2148
+ - can't be blank
2149
+ requestBody:
2150
+ content:
2151
+ application/json:
2152
+ schema:
2153
+ "$ref": "#/components/schemas/option_type_params"
2154
+ "/api/v2/platform/option_types/{id}":
2155
+ get:
2156
+ summary: Returns an Option Type
2157
+ tags:
2158
+ - Option Types
2159
+ security:
2160
+ - bearer_auth: []
2161
+ description: Returns an Option Type
2162
+ operationId: show-option-type
2163
+ parameters:
2164
+ - name: id
2165
+ in: path
2166
+ required: true
2167
+ schema:
2168
+ type: string
2169
+ - name: include
2170
+ in: query
2171
+ description: 'Select which associated resources you would like to fetch, see:
2172
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2173
+ example: ''
2174
+ schema:
2175
+ type: string
2176
+ responses:
2177
+ '200':
2178
+ description: Record found
2179
+ content:
2180
+ application/vnd.api+json:
2181
+ examples:
2182
+ Example:
2183
+ value:
2184
+ data:
2185
+ id: '1'
2186
+ type: option_type
2187
+ attributes:
2188
+ name: foo-size-6
2189
+ presentation: Size
2190
+ position: 1
2191
+ created_at: '2021-08-30T22:29:09.726Z'
2192
+ updated_at: '2021-08-30T22:29:09.726Z'
2193
+ filterable: true
2194
+ relationships:
2195
+ option_values:
2196
+ data: []
2197
+ '404':
2198
+ description: Record not found
2199
+ content:
2200
+ application/vnd.api+json:
2201
+ examples:
2202
+ Example:
2203
+ value:
2204
+ error: The resource you were looking for could not be found.
2205
+ '401':
2206
+ description: Authentication Failed
2207
+ content:
2208
+ application/vnd.api+json:
2209
+ examples:
2210
+ Example:
2211
+ value:
2212
+ error: The access token is invalid
2213
+ put:
2214
+ summary: Updates an Option Type
2215
+ tags:
2216
+ - Option Types
2217
+ security:
2218
+ - bearer_auth: []
2219
+ description: Updates an Option Type
2220
+ operationId: update-option-type
2221
+ parameters:
2222
+ - name: id
2223
+ in: path
2224
+ required: true
2225
+ schema:
2226
+ type: string
2227
+ - name: include
2228
+ in: query
2229
+ description: 'Select which associated resources you would like to fetch, see:
2230
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2231
+ example: ''
2232
+ schema:
2233
+ type: string
2234
+ responses:
2235
+ '200':
2236
+ description: record updated
2237
+ content:
2238
+ application/vnd.api+json:
2239
+ examples:
2240
+ Example:
2241
+ value:
2242
+ data:
2243
+ id: '1'
2244
+ type: option_type
2245
+ attributes:
2246
+ name: Size-X
2247
+ presentation: Size
2248
+ position: 1
2249
+ created_at: '2021-08-30T22:29:09.758Z'
2250
+ updated_at: '2021-08-30T22:29:09.762Z'
2251
+ filterable: true
2252
+ relationships:
2253
+ option_values:
2254
+ data: []
2255
+ '422':
2256
+ description: invalid request
2257
+ content:
2258
+ application/vnd.api+json:
2259
+ examples:
2260
+ Example:
2261
+ value:
2262
+ error: Name can't be blank
2263
+ errors:
2264
+ name:
2265
+ - can't be blank
2266
+ '404':
2267
+ description: Record not found
2268
+ content:
2269
+ application/vnd.api+json:
2270
+ examples:
2271
+ Example:
2272
+ value:
2273
+ error: The resource you were looking for could not be found.
2274
+ '401':
2275
+ description: Authentication Failed
2276
+ content:
2277
+ application/vnd.api+json:
2278
+ examples:
2279
+ Example:
2280
+ value:
2281
+ error: The access token is invalid
2282
+ requestBody:
2283
+ content:
2284
+ application/json:
2285
+ schema:
2286
+ "$ref": "#/components/schemas/option_type_params"
2287
+ delete:
2288
+ summary: Deletes an Option Type
2289
+ tags:
2290
+ - Option Types
2291
+ security:
2292
+ - bearer_auth: []
2293
+ description: Deletes an Option Type
2294
+ operationId: delete-option-type
2295
+ parameters:
2296
+ - name: id
2297
+ in: path
2298
+ required: true
2299
+ schema:
2300
+ type: string
2301
+ responses:
2302
+ '204':
2303
+ description: Record deleted
2304
+ '404':
2305
+ description: Record not found
2306
+ content:
2307
+ application/vnd.api+json:
2308
+ examples:
2309
+ Example:
2310
+ value:
2311
+ error: The resource you were looking for could not be found.
2312
+ '401':
2313
+ description: Authentication Failed
2314
+ content:
2315
+ application/vnd.api+json:
2316
+ examples:
2317
+ Example:
2318
+ value:
2319
+ error: The access token is invalid
2320
+ "/api/v2/platform/option_values":
2321
+ get:
2322
+ summary: Returns a list of Option Values
2323
+ tags:
2324
+ - Option Values
2325
+ security:
2326
+ - bearer_auth: []
2327
+ description: Returns a list of Option Values
2328
+ operationId: option-values-list
2329
+ parameters:
2330
+ - name: page
2331
+ in: query
2332
+ example: 1
2333
+ schema:
2334
+ type: integer
2335
+ - name: per_page
2336
+ in: query
2337
+ example: 50
2338
+ schema:
2339
+ type: integer
2340
+ - name: include
2341
+ in: query
2342
+ description: 'Select which associated resources you would like to fetch, see:
2343
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2344
+ example: option_type
2345
+ schema:
2346
+ type: string
2347
+ - name: filter
2348
+ in: query
2349
+ description: ''
2350
+ example: option_type_id_eq=1&name_cont=M
2351
+ schema:
2352
+ type: string
2353
+ responses:
2354
+ '200':
2355
+ description: Records returned
2356
+ content:
2357
+ application/vnd.api+json:
2358
+ examples:
2359
+ Example:
2360
+ value:
2361
+ data:
2362
+ - id: '1'
2363
+ type: option_value
2364
+ attributes:
2365
+ position: 1
2366
+ name: Size-1
2367
+ presentation: S
2368
+ created_at: '2021-08-30T22:29:09.842Z'
2369
+ updated_at: '2021-08-30T22:29:09.842Z'
2370
+ relationships:
2371
+ option_type:
2372
+ data:
2373
+ id: '1'
2374
+ type: option_type
2375
+ - id: '2'
2376
+ type: option_value
2377
+ attributes:
2378
+ position: 1
2379
+ name: Size-2
2380
+ presentation: S
2381
+ created_at: '2021-08-30T22:29:09.845Z'
2382
+ updated_at: '2021-08-30T22:29:09.845Z'
2383
+ relationships:
2384
+ option_type:
2385
+ data:
2386
+ id: '2'
2387
+ type: option_type
2388
+ meta:
2389
+ count: 2
2390
+ total_count: 2
2391
+ total_pages: 1
2392
+ links:
2393
+ self: http://www.example.com/api/v2/platform/option_values?page=1&per_page=&include=&filter=
2394
+ next: http://www.example.com/api/v2/platform/option_values?include=&page=1&per_page=
2395
+ prev: http://www.example.com/api/v2/platform/option_values?include=&page=1&per_page=
2396
+ last: http://www.example.com/api/v2/platform/option_values?include=&page=1&per_page=
2397
+ first: http://www.example.com/api/v2/platform/option_values?include=&page=1&per_page=
2398
+ '401':
2399
+ description: Authentication Failed
2400
+ content:
2401
+ application/vnd.api+json:
2402
+ examples:
2403
+ Example:
2404
+ value:
2405
+ error: The access token is invalid
2406
+ post:
2407
+ summary: Creates an Option Value
2408
+ tags:
2409
+ - Option Values
2410
+ security:
2411
+ - bearer_auth: []
2412
+ description: Creates an Option Value
2413
+ operationId: create-option-value
2414
+ parameters:
2415
+ - name: include
2416
+ in: query
2417
+ description: 'Select which associated resources you would like to fetch, see:
2418
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2419
+ example: option_type
2420
+ schema:
2421
+ type: string
2422
+ responses:
2423
+ '201':
2424
+ description: record created
2425
+ content:
2426
+ application/vnd.api+json:
2427
+ examples:
2428
+ Example:
2429
+ value:
2430
+ data:
2431
+ id: '1'
2432
+ type: option_value
2433
+ attributes:
2434
+ position: 1
2435
+ name: Size-5
2436
+ presentation: S
2437
+ created_at: '2021-08-30T22:29:09.880Z'
2438
+ updated_at: '2021-08-30T22:29:09.880Z'
2439
+ relationships:
2440
+ option_type:
2441
+ data:
2442
+ '422':
2443
+ description: invalid request
2444
+ content:
2445
+ application/vnd.api+json:
2446
+ examples:
2447
+ Example:
2448
+ value:
2449
+ error: Name can't be blank and Presentation can't be blank
2450
+ errors:
2451
+ name:
2452
+ - can't be blank
2453
+ presentation:
2454
+ - can't be blank
2455
+ requestBody:
2456
+ content:
2457
+ application/json:
2458
+ schema:
2459
+ "$ref": "#/components/schemas/option_value_params"
2460
+ "/api/v2/platform/option_values/{id}":
2461
+ get:
2462
+ summary: Returns an Option Value
2463
+ tags:
2464
+ - Option Values
2465
+ security:
2466
+ - bearer_auth: []
2467
+ description: Returns an Option Value
2468
+ operationId: show-option-value
2469
+ parameters:
2470
+ - name: id
2471
+ in: path
2472
+ required: true
2473
+ schema:
2474
+ type: string
2475
+ - name: include
2476
+ in: query
2477
+ description: 'Select which associated resources you would like to fetch, see:
2478
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2479
+ example: option_type
2480
+ schema:
2481
+ type: string
2482
+ responses:
2483
+ '200':
2484
+ description: Record found
2485
+ content:
2486
+ application/vnd.api+json:
2487
+ examples:
2488
+ Example:
2489
+ value:
2490
+ data:
2491
+ id: '1'
2492
+ type: option_value
2493
+ attributes:
2494
+ position: 1
2495
+ name: Size-6
2496
+ presentation: S
2497
+ created_at: '2021-08-30T22:29:09.906Z'
2498
+ updated_at: '2021-08-30T22:29:09.906Z'
2499
+ relationships:
2500
+ option_type:
2501
+ data:
2502
+ id: '1'
2503
+ type: option_type
2504
+ '404':
2505
+ description: Record not found
2506
+ content:
2507
+ application/vnd.api+json:
2508
+ examples:
2509
+ Example:
2510
+ value:
2511
+ error: The resource you were looking for could not be found.
2512
+ '401':
2513
+ description: Authentication Failed
2514
+ content:
2515
+ application/vnd.api+json:
2516
+ examples:
2517
+ Example:
2518
+ value:
2519
+ error: The access token is invalid
2520
+ put:
2521
+ summary: Updates an Option Value
2522
+ tags:
2523
+ - Option Values
2524
+ security:
2525
+ - bearer_auth: []
2526
+ description: Updates an Option Value
2527
+ operationId: update-option-value
2528
+ parameters:
2529
+ - name: id
2530
+ in: path
2531
+ required: true
2532
+ schema:
2533
+ type: string
2534
+ - name: include
2535
+ in: query
2536
+ description: 'Select which associated resources you would like to fetch, see:
2537
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2538
+ example: option_type
2539
+ schema:
2540
+ type: string
2541
+ responses:
2542
+ '200':
2543
+ description: record updated
2544
+ content:
2545
+ application/vnd.api+json:
2546
+ examples:
2547
+ Example:
2548
+ value:
2549
+ data:
2550
+ id: '1'
2551
+ type: option_value
2552
+ attributes:
2553
+ position: 1
2554
+ name: M
2555
+ presentation: S
2556
+ created_at: '2021-08-30T22:29:09.941Z'
2557
+ updated_at: '2021-08-30T22:29:09.946Z'
2558
+ relationships:
2559
+ option_type:
2560
+ data:
2561
+ id: '1'
2562
+ type: option_type
2563
+ '422':
2564
+ description: invalid request
2565
+ content:
2566
+ application/vnd.api+json:
2567
+ examples:
2568
+ Example:
2569
+ value:
2570
+ error: Name can't be blank
2571
+ errors:
2572
+ name:
2573
+ - can't be blank
2574
+ '404':
2575
+ description: Record not found
2576
+ content:
2577
+ application/vnd.api+json:
2578
+ examples:
2579
+ Example:
2580
+ value:
2581
+ error: The resource you were looking for could not be found.
2582
+ '401':
2583
+ description: Authentication Failed
2584
+ content:
2585
+ application/vnd.api+json:
2586
+ examples:
2587
+ Example:
2588
+ value:
2589
+ error: The access token is invalid
2590
+ requestBody:
2591
+ content:
2592
+ application/json:
2593
+ schema:
2594
+ "$ref": "#/components/schemas/option_value_params"
2595
+ delete:
2596
+ summary: Deletes an Option Value
2597
+ tags:
2598
+ - Option Values
2599
+ security:
2600
+ - bearer_auth: []
2601
+ description: Deletes an Option Value
2602
+ operationId: delete-option-value
2603
+ parameters:
2604
+ - name: id
2605
+ in: path
2606
+ required: true
2607
+ schema:
2608
+ type: string
2609
+ responses:
2610
+ '204':
2611
+ description: Record deleted
2612
+ '404':
2613
+ description: Record not found
2614
+ content:
2615
+ application/vnd.api+json:
2616
+ examples:
2617
+ Example:
2618
+ value:
2619
+ error: The resource you were looking for could not be found.
2620
+ '401':
2621
+ description: Authentication Failed
2622
+ content:
2623
+ application/vnd.api+json:
2624
+ examples:
2625
+ Example:
2626
+ value:
2627
+ error: The access token is invalid
2628
+ "/api/v2/platform/taxons":
2629
+ get:
2630
+ summary: Returns a list of Taxons
2631
+ tags:
2632
+ - Taxons
2633
+ security:
2634
+ - bearer_auth: []
2635
+ description: Returns a list of Taxons
2636
+ operationId: taxons-list
2637
+ parameters:
2638
+ - name: page
2639
+ in: query
2640
+ example: 1
2641
+ schema:
2642
+ type: integer
2643
+ - name: per_page
2644
+ in: query
2645
+ example: 50
2646
+ schema:
2647
+ type: integer
2648
+ - name: include
2649
+ in: query
2650
+ description: 'Select which associated resources you would like to fetch, see:
2651
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2652
+ example: taxonomy,parent,children
2653
+ schema:
2654
+ type: string
2655
+ - name: filter
2656
+ in: query
2657
+ description: ''
2658
+ example: taxonomy_id_eq=1&name_cont=Shirts
2659
+ schema:
2660
+ type: string
2661
+ responses:
2662
+ '200':
2663
+ description: Records returned
2664
+ content:
2665
+ application/vnd.api+json:
2666
+ examples:
2667
+ Example:
2668
+ value:
2669
+ data:
2670
+ - id: '1'
2671
+ type: taxon
2672
+ attributes:
2673
+ position: 0
2674
+ name: taxonomy_16
2675
+ permalink: taxonomy-16
2676
+ lft: 1
2677
+ rgt: 6
2678
+ description:
2679
+ created_at: '2021-08-30T22:29:10.032Z'
2680
+ updated_at: '2021-08-30T22:29:10.059Z'
2681
+ meta_title:
2682
+ meta_description:
2683
+ meta_keywords:
2684
+ depth: 0
2685
+ pretty_name: taxonomy_16
2686
+ seo_title: taxonomy_16
2687
+ is_root: true
2688
+ is_child: false
2689
+ is_leaf: false
2690
+ relationships:
2691
+ parent:
2692
+ data:
2693
+ taxonomy:
2694
+ data:
2695
+ id: '1'
2696
+ type: taxonomy
2697
+ children:
2698
+ data:
2699
+ - id: '2'
2700
+ type: taxon
2701
+ - id: '3'
2702
+ type: taxon
2703
+ image:
2704
+ data:
2705
+ - id: '2'
2706
+ type: taxon
2707
+ attributes:
2708
+ position: 0
2709
+ name: taxon_16
2710
+ permalink: taxonomy-16/taxon-16
2711
+ lft: 2
2712
+ rgt: 3
2713
+ description:
2714
+ created_at: '2021-08-30T22:29:10.043Z'
2715
+ updated_at: '2021-08-30T22:29:10.044Z'
2716
+ meta_title:
2717
+ meta_description:
2718
+ meta_keywords:
2719
+ depth: 1
2720
+ pretty_name: taxonomy_16 -> taxon_16
2721
+ seo_title: taxon_16
2722
+ is_root: false
2723
+ is_child: true
2724
+ is_leaf: true
2725
+ relationships:
2726
+ parent:
2727
+ data:
2728
+ id: '1'
2729
+ type: taxon
2730
+ taxonomy:
2731
+ data:
2732
+ id: '1'
2733
+ type: taxonomy
2734
+ children:
2735
+ data: []
2736
+ image:
2737
+ data:
2738
+ id: '1'
2739
+ type: taxon_image
2740
+ - id: '3'
2741
+ type: taxon
2742
+ attributes:
2743
+ position: 0
2744
+ name: taxon_17
2745
+ permalink: taxonomy-16/taxon-17
2746
+ lft: 4
2747
+ rgt: 5
2748
+ description:
2749
+ created_at: '2021-08-30T22:29:10.053Z'
2750
+ updated_at: '2021-08-30T22:29:10.055Z'
2751
+ meta_title:
2752
+ meta_description:
2753
+ meta_keywords:
2754
+ depth: 1
2755
+ pretty_name: taxonomy_16 -> taxon_17
2756
+ seo_title: taxon_17
2757
+ is_root: false
2758
+ is_child: true
2759
+ is_leaf: true
2760
+ relationships:
2761
+ parent:
2762
+ data:
2763
+ id: '1'
2764
+ type: taxon
2765
+ taxonomy:
2766
+ data:
2767
+ id: '1'
2768
+ type: taxonomy
2769
+ children:
2770
+ data: []
2771
+ image:
2772
+ data:
2773
+ id: '2'
2774
+ type: taxon_image
2775
+ meta:
2776
+ count: 3
2777
+ total_count: 3
2778
+ total_pages: 1
2779
+ links:
2780
+ self: http://www.example.com/api/v2/platform/taxons?page=1&per_page=&include=&filter=
2781
+ next: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
2782
+ prev: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
2783
+ last: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
2784
+ first: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
2785
+ '401':
2786
+ description: Authentication Failed
2787
+ content:
2788
+ application/vnd.api+json:
2789
+ examples:
2790
+ Example:
2791
+ value:
2792
+ error: The access token is invalid
2793
+ post:
2794
+ summary: Creates a Taxon
2795
+ tags:
2796
+ - Taxons
2797
+ security:
2798
+ - bearer_auth: []
2799
+ description: Creates a Taxon
2800
+ operationId: create-taxon
2801
+ parameters:
2802
+ - name: include
2803
+ in: query
2804
+ description: 'Select which associated resources you would like to fetch, see:
2805
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2806
+ example: taxonomy,parent,children
2807
+ schema:
2808
+ type: string
2809
+ responses:
2810
+ '201':
2811
+ description: record created
2812
+ content:
2813
+ application/vnd.api+json:
2814
+ examples:
2815
+ Example:
2816
+ value:
2817
+ data:
2818
+ id: '2'
2819
+ type: taxon
2820
+ attributes:
2821
+ position: 0
2822
+ name: taxon_20
2823
+ permalink: taxonomy-18/taxon-20
2824
+ lft: 2
2825
+ rgt: 3
2826
+ description:
2827
+ created_at: '2021-08-30T22:29:10.139Z'
2828
+ updated_at: '2021-08-30T22:29:10.141Z'
2829
+ meta_title:
2830
+ meta_description:
2831
+ meta_keywords:
2832
+ depth: 1
2833
+ pretty_name: taxonomy_18 -> taxon_20
2834
+ seo_title: taxon_20
2835
+ is_root: false
2836
+ is_child: true
2837
+ is_leaf: true
2838
+ relationships:
2839
+ parent:
2840
+ data:
2841
+ id: '1'
2842
+ type: taxon
2843
+ taxonomy:
2844
+ data:
2845
+ id: '1'
2846
+ type: taxonomy
2847
+ children:
2848
+ data: []
2849
+ image:
2850
+ data:
2851
+ '422':
2852
+ description: invalid request
2853
+ content:
2854
+ application/vnd.api+json:
2855
+ examples:
2856
+ Example:
2857
+ value:
2858
+ error: Name can't be blank and Taxonomy can't be blank
2859
+ errors:
2860
+ name:
2861
+ - can't be blank
2862
+ taxonomy:
2863
+ - can't be blank
2864
+ requestBody:
2865
+ content:
2866
+ application/json:
2867
+ schema:
2868
+ "$ref": "#/components/schemas/taxon_params"
2869
+ "/api/v2/platform/taxons/{id}":
2870
+ get:
2871
+ summary: Returns a Taxon
2872
+ tags:
2873
+ - Taxons
2874
+ security:
2875
+ - bearer_auth: []
2876
+ description: Returns a Taxon
2877
+ operationId: show-taxon
2878
+ parameters:
2879
+ - name: id
2880
+ in: path
2881
+ required: true
2882
+ schema:
2883
+ type: string
2884
+ - name: include
2885
+ in: query
2886
+ description: 'Select which associated resources you would like to fetch, see:
2887
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2888
+ example: taxonomy,parent,children
2889
+ schema:
2890
+ type: string
2891
+ responses:
2892
+ '200':
2893
+ description: Record found
2894
+ content:
2895
+ application/vnd.api+json:
2896
+ examples:
2897
+ Example:
2898
+ value:
2899
+ data:
2900
+ id: '2'
2901
+ type: taxon
2902
+ attributes:
2903
+ position: 0
2904
+ name: taxon_21
2905
+ permalink: taxonomy-19/taxon-21
2906
+ lft: 2
2907
+ rgt: 3
2908
+ description:
2909
+ created_at: '2021-08-30T22:29:10.185Z'
2910
+ updated_at: '2021-08-30T22:29:10.186Z'
2911
+ meta_title:
2912
+ meta_description:
2913
+ meta_keywords:
2914
+ depth: 1
2915
+ pretty_name: taxonomy_19 -> taxon_21
2916
+ seo_title: taxon_21
2917
+ is_root: false
2918
+ is_child: true
2919
+ is_leaf: true
2920
+ relationships:
2921
+ parent:
2922
+ data:
2923
+ id: '1'
2924
+ type: taxon
2925
+ taxonomy:
2926
+ data:
2927
+ id: '1'
2928
+ type: taxonomy
2929
+ children:
2930
+ data: []
2931
+ products:
2932
+ data: []
2933
+ image:
2934
+ data:
2935
+ id: '1'
2936
+ type: taxon_image
2937
+ '404':
2938
+ description: Record not found
2939
+ content:
2940
+ application/vnd.api+json:
2941
+ examples:
2942
+ Example:
2943
+ value:
2944
+ error: The resource you were looking for could not be found.
2945
+ '401':
2946
+ description: Authentication Failed
2947
+ content:
2948
+ application/vnd.api+json:
2949
+ examples:
2950
+ Example:
2951
+ value:
2952
+ error: The access token is invalid
2953
+ put:
2954
+ summary: Updates a Taxon
2955
+ tags:
2956
+ - Taxons
2957
+ security:
2958
+ - bearer_auth: []
2959
+ description: Updates a Taxon
2960
+ operationId: update-taxon
2961
+ parameters:
2962
+ - name: id
2963
+ in: path
2964
+ required: true
2965
+ schema:
2966
+ type: string
2967
+ - name: include
2968
+ in: query
2969
+ description: 'Select which associated resources you would like to fetch, see:
2970
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2971
+ example: taxonomy,parent,children
2972
+ schema:
2973
+ type: string
2974
+ responses:
2975
+ '200':
2976
+ description: record updated
2977
+ content:
2978
+ application/vnd.api+json:
2979
+ examples:
2980
+ Example:
2981
+ value:
2982
+ data:
2983
+ id: '2'
2984
+ type: taxon
2985
+ attributes:
2986
+ position: 0
2987
+ name: T-Shirts
2988
+ permalink: taxonomy-21/taxon-23
2989
+ lft: 2
2990
+ rgt: 3
2991
+ description:
2992
+ created_at: '2021-08-30T22:29:10.259Z'
2993
+ updated_at: '2021-08-30T22:29:10.270Z'
2994
+ meta_title:
2995
+ meta_description:
2996
+ meta_keywords:
1275
2997
  depth: 1
1276
2998
  pretty_name: taxonomy_21 -> T-Shirts
1277
2999
  seo_title: T-Shirts
@@ -1279,20 +3001,226 @@ paths:
1279
3001
  is_child: true
1280
3002
  is_leaf: true
1281
3003
  relationships:
1282
- parent:
3004
+ parent:
3005
+ data:
3006
+ id: '1'
3007
+ type: taxon
3008
+ taxonomy:
3009
+ data:
3010
+ id: '1'
3011
+ type: taxonomy
3012
+ children:
3013
+ data: []
3014
+ image:
3015
+ data:
3016
+ id: '1'
3017
+ type: taxon_image
3018
+ '422':
3019
+ description: invalid request
3020
+ content:
3021
+ application/vnd.api+json:
3022
+ examples:
3023
+ Example:
3024
+ value:
3025
+ error: Name can't be blank
3026
+ errors:
3027
+ name:
3028
+ - can't be blank
3029
+ '404':
3030
+ description: Record not found
3031
+ content:
3032
+ application/vnd.api+json:
3033
+ examples:
3034
+ Example:
3035
+ value:
3036
+ error: The resource you were looking for could not be found.
3037
+ '401':
3038
+ description: Authentication Failed
3039
+ content:
3040
+ application/vnd.api+json:
3041
+ examples:
3042
+ Example:
3043
+ value:
3044
+ error: The access token is invalid
3045
+ requestBody:
3046
+ content:
3047
+ application/json:
3048
+ schema:
3049
+ "$ref": "#/components/schemas/taxon_params"
3050
+ delete:
3051
+ summary: Deletes a Taxon
3052
+ tags:
3053
+ - Taxons
3054
+ security:
3055
+ - bearer_auth: []
3056
+ description: Deletes a Taxon
3057
+ operationId: delete-taxon
3058
+ parameters:
3059
+ - name: id
3060
+ in: path
3061
+ required: true
3062
+ schema:
3063
+ type: string
3064
+ responses:
3065
+ '204':
3066
+ description: Record deleted
3067
+ '404':
3068
+ description: Record not found
3069
+ content:
3070
+ application/vnd.api+json:
3071
+ examples:
3072
+ Example:
3073
+ value:
3074
+ error: The resource you were looking for could not be found.
3075
+ '401':
3076
+ description: Authentication Failed
3077
+ content:
3078
+ application/vnd.api+json:
3079
+ examples:
3080
+ Example:
3081
+ value:
3082
+ error: The access token is invalid
3083
+ "/api/v2/platform/users":
3084
+ get:
3085
+ summary: Returns a list of Users
3086
+ tags:
3087
+ - Users
3088
+ security:
3089
+ - bearer_auth: []
3090
+ description: Returns a list of Users
3091
+ operationId: users-list
3092
+ parameters:
3093
+ - name: page
3094
+ in: query
3095
+ example: 1
3096
+ schema:
3097
+ type: integer
3098
+ - name: per_page
3099
+ in: query
3100
+ example: 50
3101
+ schema:
3102
+ type: integer
3103
+ - name: include
3104
+ in: query
3105
+ description: 'Select which associated resources you would like to fetch, see:
3106
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
3107
+ example: ship_address,bill_address
3108
+ schema:
3109
+ type: string
3110
+ - name: filter
3111
+ in: query
3112
+ description: ''
3113
+ example: user_id_eq=1&email_cont=spree@example.com
3114
+ schema:
3115
+ type: string
3116
+ responses:
3117
+ '200':
3118
+ description: Records returned
3119
+ content:
3120
+ application/vnd.api+json:
3121
+ examples:
3122
+ Example:
3123
+ value:
3124
+ data:
3125
+ - id: '1'
3126
+ type: user
3127
+ attributes:
3128
+ email: delmy@little.name
3129
+ created_at: '2021-08-30T22:29:10.502Z'
3130
+ updated_at: '2021-08-30T22:29:10.502Z'
3131
+ average_order_value: []
3132
+ lifetime_value: []
3133
+ store_credits: []
3134
+ relationships:
3135
+ bill_address:
1283
3136
  data:
1284
- id: '43'
1285
- type: taxon
1286
- taxonomy:
3137
+ ship_address:
1287
3138
  data:
1288
- id: '21'
1289
- type: taxonomy
1290
- children:
1291
- data: []
1292
- image:
3139
+ - id: '2'
3140
+ type: user
3141
+ attributes:
3142
+ email: yoko_brakus@walker.com
3143
+ created_at: '2021-08-30T22:29:10.506Z'
3144
+ updated_at: '2021-08-30T22:29:10.506Z'
3145
+ average_order_value: []
3146
+ lifetime_value: []
3147
+ store_credits: []
3148
+ relationships:
3149
+ bill_address:
3150
+ data:
3151
+ ship_address:
3152
+ data:
3153
+ - id: '3'
3154
+ type: user
3155
+ attributes:
3156
+ email: florida.stoltenberg@legros.com
3157
+ created_at: '2021-08-30T22:29:10.507Z'
3158
+ updated_at: '2021-08-30T22:29:10.507Z'
3159
+ average_order_value: []
3160
+ lifetime_value: []
3161
+ store_credits: []
3162
+ relationships:
3163
+ bill_address:
3164
+ data:
3165
+ ship_address:
3166
+ data:
3167
+ meta:
3168
+ count: 3
3169
+ total_count: 3
3170
+ total_pages: 1
3171
+ links:
3172
+ self: http://www.example.com/api/v2/platform/users?page=1&per_page=&include=&filter=
3173
+ next: http://www.example.com/api/v2/platform/users?include=&page=1&per_page=
3174
+ prev: http://www.example.com/api/v2/platform/users?include=&page=1&per_page=
3175
+ last: http://www.example.com/api/v2/platform/users?include=&page=1&per_page=
3176
+ first: http://www.example.com/api/v2/platform/users?include=&page=1&per_page=
3177
+ '401':
3178
+ description: Authentication Failed
3179
+ content:
3180
+ application/vnd.api+json:
3181
+ examples:
3182
+ Example:
3183
+ value:
3184
+ error: The access token is invalid
3185
+ post:
3186
+ summary: Creates an User
3187
+ tags:
3188
+ - Users
3189
+ security:
3190
+ - bearer_auth: []
3191
+ description: Creates an User
3192
+ operationId: create-user
3193
+ parameters:
3194
+ - name: include
3195
+ in: query
3196
+ description: 'Select which associated resources you would like to fetch, see:
3197
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
3198
+ example: ship_address,bill_address
3199
+ schema:
3200
+ type: string
3201
+ responses:
3202
+ '201':
3203
+ description: record created
3204
+ content:
3205
+ application/vnd.api+json:
3206
+ examples:
3207
+ Example:
3208
+ value:
3209
+ data:
3210
+ id: '2'
3211
+ type: user
3212
+ attributes:
3213
+ email: marcie@ondrickavandervort.com
3214
+ created_at: '2021-08-30T22:29:10.549Z'
3215
+ updated_at: '2021-08-30T22:29:10.549Z'
3216
+ average_order_value: []
3217
+ lifetime_value: []
3218
+ store_credits: []
3219
+ relationships:
3220
+ bill_address:
3221
+ data:
3222
+ ship_address:
1293
3223
  data:
1294
- id: '22'
1295
- type: taxon_image
1296
3224
  '422':
1297
3225
  description: invalid request
1298
3226
  content:
@@ -1300,10 +3228,131 @@ paths:
1300
3228
  examples:
1301
3229
  Example:
1302
3230
  value:
1303
- error: Name can't be blank
3231
+ error: Bill address belongs to other user
1304
3232
  errors:
1305
- name:
1306
- - can't be blank
3233
+ bill_address_id:
3234
+ - belongs to other user
3235
+ requestBody:
3236
+ content:
3237
+ application/json:
3238
+ schema:
3239
+ "$ref": "#/components/schemas/user_params"
3240
+ "/api/v2/platform/users/{id}":
3241
+ get:
3242
+ summary: Returns an User
3243
+ tags:
3244
+ - Users
3245
+ security:
3246
+ - bearer_auth: []
3247
+ description: Returns an User
3248
+ operationId: show-user
3249
+ parameters:
3250
+ - name: id
3251
+ in: path
3252
+ required: true
3253
+ schema:
3254
+ type: string
3255
+ - name: include
3256
+ in: query
3257
+ description: 'Select which associated resources you would like to fetch, see:
3258
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
3259
+ example: ship_address,bill_address
3260
+ schema:
3261
+ type: string
3262
+ responses:
3263
+ '200':
3264
+ description: Record found
3265
+ content:
3266
+ application/vnd.api+json:
3267
+ examples:
3268
+ Example:
3269
+ value:
3270
+ data:
3271
+ id: '2'
3272
+ type: user
3273
+ attributes:
3274
+ email: anita@hilll.name
3275
+ created_at: '2021-08-30T22:29:10.578Z'
3276
+ updated_at: '2021-08-30T22:29:10.578Z'
3277
+ average_order_value: []
3278
+ lifetime_value: []
3279
+ store_credits: []
3280
+ relationships:
3281
+ bill_address:
3282
+ data:
3283
+ ship_address:
3284
+ data:
3285
+ '404':
3286
+ description: Record not found
3287
+ content:
3288
+ application/vnd.api+json:
3289
+ examples:
3290
+ Example:
3291
+ value:
3292
+ error: The resource you were looking for could not be found.
3293
+ '401':
3294
+ description: Authentication Failed
3295
+ content:
3296
+ application/vnd.api+json:
3297
+ examples:
3298
+ Example:
3299
+ value:
3300
+ error: The access token is invalid
3301
+ put:
3302
+ summary: Updates an User
3303
+ tags:
3304
+ - Users
3305
+ security:
3306
+ - bearer_auth: []
3307
+ description: Updates an User
3308
+ operationId: update-user
3309
+ parameters:
3310
+ - name: id
3311
+ in: path
3312
+ required: true
3313
+ schema:
3314
+ type: string
3315
+ - name: include
3316
+ in: query
3317
+ description: 'Select which associated resources you would like to fetch, see:
3318
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
3319
+ example: ship_address,bill_address
3320
+ schema:
3321
+ type: string
3322
+ responses:
3323
+ '200':
3324
+ description: record updated
3325
+ content:
3326
+ application/vnd.api+json:
3327
+ examples:
3328
+ Example:
3329
+ value:
3330
+ data:
3331
+ id: '2'
3332
+ type: user
3333
+ attributes:
3334
+ email: john@example.com
3335
+ created_at: '2021-08-30T22:29:10.622Z'
3336
+ updated_at: '2021-08-30T22:29:10.627Z'
3337
+ average_order_value: []
3338
+ lifetime_value: []
3339
+ store_credits: []
3340
+ relationships:
3341
+ bill_address:
3342
+ data:
3343
+ ship_address:
3344
+ data:
3345
+ '422':
3346
+ description: invalid request
3347
+ content:
3348
+ application/vnd.api+json:
3349
+ examples:
3350
+ Example:
3351
+ value:
3352
+ error: Bill address belongs to other user
3353
+ errors:
3354
+ bill_address_id:
3355
+ - belongs to other user
1307
3356
  '404':
1308
3357
  description: Record not found
1309
3358
  content:
@@ -1324,13 +3373,15 @@ paths:
1324
3373
  content:
1325
3374
  application/json:
1326
3375
  schema:
1327
- "$ref": "#/components/schemas/taxon_params"
3376
+ "$ref": "#/components/schemas/user_params"
1328
3377
  delete:
1329
- summary: Deletes a Taxon
3378
+ summary: Deletes an User
1330
3379
  tags:
1331
- - Taxons
3380
+ - Users
1332
3381
  security:
1333
3382
  - bearer_auth: []
3383
+ description: Deletes an User
3384
+ operationId: delete-user
1334
3385
  parameters:
1335
3386
  - name: id
1336
3387
  in: path
@@ -1361,6 +3412,16 @@ servers:
1361
3412
  variables:
1362
3413
  defaultHost:
1363
3414
  default: localhost:3000
3415
+ tags:
3416
+ - name: Addresses
3417
+ - name: Classifications
3418
+ - name: Countries
3419
+ - name: Menu Items
3420
+ - name: Menus
3421
+ - name: Option Types
3422
+ - name: Option Values
3423
+ - name: Taxons
3424
+ - name: Users
1364
3425
  components:
1365
3426
  securitySchemes:
1366
3427
  bearer_auth:
@@ -1405,16 +3466,153 @@ components:
1405
3466
  type: string
1406
3467
  position:
1407
3468
  type: integer
3469
+ option_type_params:
3470
+ type: object
3471
+ properties:
3472
+ name:
3473
+ type: string
3474
+ presentation:
3475
+ type: string
3476
+ required:
3477
+ - name
3478
+ - presentation
3479
+ option_value_params:
3480
+ type: object
3481
+ properties:
3482
+ name:
3483
+ type: string
3484
+ presentation:
3485
+ type: string
3486
+ option_values_attributes:
3487
+ type: string
3488
+ required:
3489
+ - name
3490
+ - presentation
3491
+ product_params:
3492
+ type: object
3493
+ properties:
3494
+ name:
3495
+ type: string
3496
+ description:
3497
+ type: string
3498
+ available_on:
3499
+ type: string
3500
+ discontinue_on:
3501
+ type: string
3502
+ permalink:
3503
+ type: string
3504
+ meta_description:
3505
+ type: string
3506
+ meta_keywords:
3507
+ type: string
3508
+ price:
3509
+ type: string
3510
+ sku:
3511
+ type: string
3512
+ deleted_at:
3513
+ type: string
3514
+ prototype_id:
3515
+ type: string
3516
+ option_values_hash:
3517
+ type: string
3518
+ weight:
3519
+ type: string
3520
+ height:
3521
+ type: string
3522
+ width:
3523
+ type: string
3524
+ depth:
3525
+ type: string
3526
+ shipping_category_id:
3527
+ type: string
3528
+ tax_category_id:
3529
+ type: string
3530
+ cost_currency:
3531
+ type: string
3532
+ cost_price:
3533
+ type: string
3534
+ compare_at_price:
3535
+ type: string
3536
+ option_type_ids:
3537
+ type: string
3538
+ taxon_ids:
3539
+ type: string
3540
+ required:
3541
+ - name
3542
+ - price
3543
+ - shipping_category_id
3544
+ user_params:
3545
+ type: object
3546
+ properties:
3547
+ email:
3548
+ type: string
3549
+ password:
3550
+ type: string
3551
+ password_confirmation:
3552
+ type: string
3553
+ ship_address_id:
3554
+ type: string
3555
+ bill_address_id:
3556
+ type: string
3557
+ required:
3558
+ - email
3559
+ - password
3560
+ - password_confirmation
1408
3561
  taxon_params:
1409
3562
  type: object
1410
3563
  properties:
1411
3564
  taxonomy_id:
1412
3565
  type: string
3566
+ parent_id:
3567
+ type: string
1413
3568
  name:
1414
3569
  type: string
1415
3570
  required:
1416
3571
  - name
1417
3572
  - taxonomy_id
3573
+ menu_params:
3574
+ type: object
3575
+ properties:
3576
+ name:
3577
+ type: string
3578
+ location:
3579
+ type: string
3580
+ locale:
3581
+ type: string
3582
+ required:
3583
+ - name
3584
+ - location
3585
+ - locale
3586
+ menu_item_params:
3587
+ type: object
3588
+ properties:
3589
+ name:
3590
+ type: string
3591
+ code:
3592
+ type: string
3593
+ subtitle:
3594
+ type: string
3595
+ destination:
3596
+ type: string
3597
+ new_window:
3598
+ type: boolean
3599
+ item_type:
3600
+ type: string
3601
+ linked_resource_type:
3602
+ type: string
3603
+ linked_resource_id:
3604
+ type: integer
3605
+ required:
3606
+ - name
3607
+ menu_item_reposition_params:
3608
+ type: object
3609
+ properties:
3610
+ new_parent_id:
3611
+ type: integer
3612
+ new_position_idx:
3613
+ type: integer
3614
+ required:
3615
+ - name
1418
3616
  resources_list:
1419
3617
  type: object
1420
3618
  properties: