spree_api 4.3.0.rc2 → 4.3.0.rc3
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.
- checksums.yaml +4 -4
- data/app/controllers/concerns/spree/api/v2/caching.rb +2 -2
- data/app/controllers/spree/api/v2/base_controller.rb +3 -1
- data/app/controllers/spree/api/v2/platform/menu_items_controller.rb +2 -2
- data/app/controllers/spree/api/v2/platform/menus_controller.rb +4 -0
- data/app/controllers/spree/api/v2/platform/resource_controller.rb +3 -0
- data/app/controllers/spree/api/v2/storefront/countries_controller.rb +7 -0
- data/app/serializers/concerns/spree/api/v2/image_transformation_concern.rb +15 -0
- data/app/serializers/concerns/spree/api/v2/taxon_image_transformation_concern.rb +15 -0
- data/app/serializers/spree/api/v2/platform/icon_serializer.rb +16 -0
- data/app/serializers/spree/api/v2/platform/image_serializer.rb +3 -1
- data/app/serializers/spree/api/v2/platform/menu_item_serializer.rb +21 -3
- data/app/serializers/spree/api/v2/platform/taxon_image_serializer.rb +3 -1
- data/app/serializers/spree/v2/storefront/icon_serializer.rb +14 -0
- data/app/serializers/spree/v2/storefront/image_serializer.rb +3 -1
- data/app/serializers/spree/v2/storefront/menu_item_serializer.rb +4 -4
- data/app/serializers/spree/v2/storefront/payment_method_serializer.rb +4 -0
- data/app/serializers/spree/v2/storefront/product_serializer.rb +1 -1
- data/app/serializers/spree/v2/storefront/taxon_image_serializer.rb +3 -1
- data/config/routes.rb +1 -1
- data/docs/v2/platform/index.yaml +1360 -268
- data/docs/v2/storefront/index.yaml +8290 -71
- data/lib/spree/api/testing_support/v2/platform_contexts.rb +2 -2
- metadata +10 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2bd9fd052b9bc9fd57cabf4fb28955081e4e3522aad98fe014641d46ca7b5c2c
|
4
|
+
data.tar.gz: f91442e429d34783f73dbc25806afa80ab0cbd5013c07c499c8b7da4bc5a29aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcc5d4344630b798bb0ea424285c89267ec2034d2a2f2fb483686c17670793b13fb23499a10aec1c579a3c807cd995b2b6b9f6c33ba68cfe4da9883b57de017f
|
7
|
+
data.tar.gz: c9d7016ddc08b9d26a438b46a5374d1c229e90e51cb2bace94c4f616c647d13d37eecd913c10ed80126508e25b23d5054032f1bd4ef349098c2caa8fc8869ae6
|
@@ -14,8 +14,8 @@ module Spree
|
|
14
14
|
sparse_fields,
|
15
15
|
serializer_params,
|
16
16
|
params[:sort]&.strip,
|
17
|
-
params[:page]&.strip,
|
18
|
-
params[:per_page]&.strip,
|
17
|
+
params[:page]&.to_s&.strip,
|
18
|
+
params[:per_page]&.to_s&.strip,
|
19
19
|
].flatten.join('-')
|
20
20
|
|
21
21
|
Digest::MD5.hexdigest(cache_key_parts)
|
@@ -132,7 +132,9 @@ module Spree
|
|
132
132
|
currency: current_currency,
|
133
133
|
locale: current_locale,
|
134
134
|
store: current_store,
|
135
|
-
user: spree_current_user
|
135
|
+
user: spree_current_user,
|
136
|
+
image_transformation: params[:image_transformation],
|
137
|
+
taxon_image_transformation: params[:taxon_image_transformation]
|
136
138
|
}
|
137
139
|
end
|
138
140
|
|
@@ -8,7 +8,7 @@ module Spree
|
|
8
8
|
def reposition
|
9
9
|
spree_authorize! :update, @moved_item if spree_current_user.present?
|
10
10
|
|
11
|
-
@moved_item = scope.find(params[:
|
11
|
+
@moved_item = scope.find(params[:id])
|
12
12
|
@new_parent = scope.find(params[:new_parent_id])
|
13
13
|
new_index = params[:new_position_idx].to_i
|
14
14
|
|
@@ -19,7 +19,7 @@ module Spree
|
|
19
19
|
end
|
20
20
|
|
21
21
|
if @moved_item.save
|
22
|
-
|
22
|
+
render_serialized_payload { serialize_resource(resource) }
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -18,6 +18,8 @@ module Spree
|
|
18
18
|
def create
|
19
19
|
resource = model_class.new(permitted_resource_params)
|
20
20
|
|
21
|
+
ensure_current_store(resource)
|
22
|
+
|
21
23
|
if resource.save
|
22
24
|
render_serialized_payload(201) { serialize_resource(resource) }
|
23
25
|
else
|
@@ -27,6 +29,7 @@ module Spree
|
|
27
29
|
|
28
30
|
def update
|
29
31
|
if resource.update(permitted_resource_params)
|
32
|
+
ensure_current_store(resource)
|
30
33
|
render_serialized_payload { serialize_resource(resource) }
|
31
34
|
else
|
32
35
|
render_error_payload(resource.errors)
|
@@ -3,6 +3,8 @@ module Spree
|
|
3
3
|
module V2
|
4
4
|
module Storefront
|
5
5
|
class CountriesController < ::Spree::Api::V2::ResourceController
|
6
|
+
before_action :set_default_per_page
|
7
|
+
|
6
8
|
private
|
7
9
|
|
8
10
|
def serialize_collection(collection)
|
@@ -43,6 +45,11 @@ module Spree
|
|
43
45
|
def model_class
|
44
46
|
Spree::Country
|
45
47
|
end
|
48
|
+
|
49
|
+
# by default we want to return all countries on a single page
|
50
|
+
def set_default_per_page
|
51
|
+
params[:per_page] ||= Spree::Country.count
|
52
|
+
end
|
46
53
|
end
|
47
54
|
end
|
48
55
|
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module V2
|
4
|
+
module ImageTransformationConcern
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
def self.included(base)
|
8
|
+
base.attribute :transformed_url do |image, params|
|
9
|
+
image.generate_url(size: params.dig(:image_transformation, :size))
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module V2
|
4
|
+
module TaxonImageTransformationConcern
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
def self.included(base)
|
8
|
+
base.attribute :transformed_url do |image, params|
|
9
|
+
image.generate_url(size: params.dig(:taxon_image_transformation, :size))
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module Spree
|
2
|
+
module Api
|
3
|
+
module V2
|
4
|
+
module Platform
|
5
|
+
class IconSerializer < BaseSerializer
|
6
|
+
set_type :icon
|
7
|
+
|
8
|
+
attribute :url do |icon|
|
9
|
+
url_helpers = Rails.application.routes.url_helpers
|
10
|
+
url_helpers.polymorphic_url(icon.attachment, only_path: true)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -3,9 +3,11 @@ module Spree
|
|
3
3
|
module V2
|
4
4
|
module Platform
|
5
5
|
class ImageSerializer < BaseSerializer
|
6
|
+
include ::Spree::Api::V2::ImageTransformationConcern
|
7
|
+
|
6
8
|
set_type :image
|
7
9
|
|
8
|
-
attributes :styles, :position, :alt, :created_at, :updated_at
|
10
|
+
attributes :styles, :position, :alt, :created_at, :updated_at, :original_url
|
9
11
|
|
10
12
|
belongs_to :viewable, polymorphic: true
|
11
13
|
end
|
@@ -5,11 +5,29 @@ module Spree
|
|
5
5
|
class MenuItemSerializer < BaseSerializer
|
6
6
|
include ::Spree::Api::V2::ResourceSerializerConcern
|
7
7
|
|
8
|
-
|
8
|
+
attributes :link
|
9
|
+
|
10
|
+
attribute :is_container do |menu_item|
|
11
|
+
menu_item.container?
|
12
|
+
end
|
13
|
+
|
14
|
+
attribute :is_root do |menu_item|
|
15
|
+
menu_item.root?
|
16
|
+
end
|
17
|
+
|
18
|
+
attribute :is_child do |menu_item|
|
19
|
+
menu_item.child?
|
20
|
+
end
|
21
|
+
|
22
|
+
attribute :is_leaf do |menu_item|
|
23
|
+
menu_item.leaf?
|
24
|
+
end
|
25
|
+
|
26
|
+
has_one :icon,
|
9
27
|
object_method_name: :icon,
|
10
28
|
id_method_name: :icon_id,
|
11
|
-
record_type: :
|
12
|
-
serializer: :
|
29
|
+
record_type: :icon,
|
30
|
+
serializer: :icon
|
13
31
|
|
14
32
|
belongs_to :menu, serializer: :menu
|
15
33
|
belongs_to :parent, record_type: :menu_item, serializer: :menu_item
|
@@ -3,9 +3,11 @@ module Spree
|
|
3
3
|
module V2
|
4
4
|
module Platform
|
5
5
|
class TaxonImageSerializer < BaseSerializer
|
6
|
+
include ::Spree::Api::V2::TaxonImageTransformationConcern
|
7
|
+
|
6
8
|
set_type :taxon_image
|
7
9
|
|
8
|
-
attributes :
|
10
|
+
attributes :alt, :created_at, :updated_at, :original_url
|
9
11
|
end
|
10
12
|
end
|
11
13
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Spree
|
2
|
+
module V2
|
3
|
+
module Storefront
|
4
|
+
class IconSerializer < BaseSerializer
|
5
|
+
set_type :icon
|
6
|
+
|
7
|
+
attribute :url do |icon|
|
8
|
+
url_helpers = Rails.application.routes.url_helpers
|
9
|
+
url_helpers.polymorphic_url(icon.attachment, only_path: true)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -2,9 +2,11 @@ module Spree
|
|
2
2
|
module V2
|
3
3
|
module Storefront
|
4
4
|
class ImageSerializer < BaseSerializer
|
5
|
+
include ::Spree::Api::V2::ImageTransformationConcern
|
6
|
+
|
5
7
|
set_type :image
|
6
8
|
|
7
|
-
attributes :
|
9
|
+
attributes :styles, :position, :alt, :original_url
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
@@ -4,7 +4,7 @@ module Spree
|
|
4
4
|
class MenuItemSerializer < BaseSerializer
|
5
5
|
set_type :menu_item
|
6
6
|
|
7
|
-
attributes :code, :name, :subtitle, :link, :new_window, :lft, :rgt, :depth
|
7
|
+
attributes :code, :name, :subtitle, :link, :destination, :item_type, :new_window, :lft, :rgt, :depth
|
8
8
|
|
9
9
|
attribute :is_container do |menu_item|
|
10
10
|
menu_item.container?
|
@@ -22,11 +22,11 @@ module Spree
|
|
22
22
|
menu_item.leaf?
|
23
23
|
end
|
24
24
|
|
25
|
-
has_one :
|
25
|
+
has_one :icon,
|
26
26
|
object_method_name: :icon,
|
27
27
|
id_method_name: :icon_id,
|
28
|
-
record_type: :
|
29
|
-
serializer: :
|
28
|
+
record_type: :icon,
|
29
|
+
serializer: :icon
|
30
30
|
|
31
31
|
belongs_to :menu, serializer: :menu
|
32
32
|
belongs_to :parent, record_type: :menu_item, serializer: :menu_item
|
@@ -6,7 +6,7 @@ module Spree
|
|
6
6
|
|
7
7
|
set_type :product
|
8
8
|
|
9
|
-
attributes :name, :description, :available_on, :slug, :meta_description, :meta_keywords, :updated_at
|
9
|
+
attributes :name, :description, :available_on, :slug, :meta_description, :meta_keywords, :updated_at, :sku
|
10
10
|
|
11
11
|
attribute :purchasable do |product|
|
12
12
|
product.purchasable?
|
@@ -2,9 +2,11 @@ module Spree
|
|
2
2
|
module V2
|
3
3
|
module Storefront
|
4
4
|
class TaxonImageSerializer < BaseSerializer
|
5
|
+
include ::Spree::Api::V2::TaxonImageTransformationConcern
|
6
|
+
|
5
7
|
set_type :taxon_image
|
6
8
|
|
7
|
-
attributes :
|
9
|
+
attributes :styles, :alt, :original_url
|
8
10
|
end
|
9
11
|
end
|
10
12
|
end
|
data/config/routes.rb
CHANGED
data/docs/v2/platform/index.yaml
CHANGED
@@ -57,8 +57,8 @@ paths:
|
|
57
57
|
state_name:
|
58
58
|
alternative_phone: 555-555-0199
|
59
59
|
company: Company
|
60
|
-
created_at: '2021-08-
|
61
|
-
updated_at: '2021-08-
|
60
|
+
created_at: '2021-08-23T21:28:22.108Z'
|
61
|
+
updated_at: '2021-08-23T21:28:22.108Z'
|
62
62
|
deleted_at:
|
63
63
|
label:
|
64
64
|
relationships:
|
@@ -85,8 +85,8 @@ paths:
|
|
85
85
|
state_name:
|
86
86
|
alternative_phone: 555-555-0199
|
87
87
|
company: Company
|
88
|
-
created_at: '2021-08-
|
89
|
-
updated_at: '2021-08-
|
88
|
+
created_at: '2021-08-23T21:28:22.134Z'
|
89
|
+
updated_at: '2021-08-23T21:28:22.134Z'
|
90
90
|
deleted_at:
|
91
91
|
label:
|
92
92
|
relationships:
|
@@ -154,8 +154,8 @@ paths:
|
|
154
154
|
state_name:
|
155
155
|
alternative_phone: 555-555-0199
|
156
156
|
company: Company
|
157
|
-
created_at: '2021-08-
|
158
|
-
updated_at: '2021-08-
|
157
|
+
created_at: '2021-08-23T21:28:22.275Z'
|
158
|
+
updated_at: '2021-08-23T21:28:22.275Z'
|
159
159
|
deleted_at:
|
160
160
|
label:
|
161
161
|
relationships:
|
@@ -200,7 +200,7 @@ paths:
|
|
200
200
|
content:
|
201
201
|
application/json:
|
202
202
|
schema:
|
203
|
-
"$ref": "#/components/schemas/
|
203
|
+
"$ref": "#/components/schemas/addresses_params"
|
204
204
|
"/api/v2/platform/addresses/{id}":
|
205
205
|
get:
|
206
206
|
summary: Returns an Address
|
@@ -243,8 +243,8 @@ paths:
|
|
243
243
|
state_name:
|
244
244
|
alternative_phone: 555-555-0199
|
245
245
|
company: Company
|
246
|
-
created_at: '2021-08-
|
247
|
-
updated_at: '2021-08-
|
246
|
+
created_at: '2021-08-23T21:28:22.297Z'
|
247
|
+
updated_at: '2021-08-23T21:28:22.297Z'
|
248
248
|
deleted_at:
|
249
249
|
label:
|
250
250
|
relationships:
|
@@ -315,8 +315,8 @@ paths:
|
|
315
315
|
state_name:
|
316
316
|
alternative_phone: 555-555-0199
|
317
317
|
company: Company
|
318
|
-
created_at: '2021-08-
|
319
|
-
updated_at: '2021-08-
|
318
|
+
created_at: '2021-08-23T21:28:22.331Z'
|
319
|
+
updated_at: '2021-08-23T21:28:22.336Z'
|
320
320
|
deleted_at:
|
321
321
|
label:
|
322
322
|
relationships:
|
@@ -363,7 +363,7 @@ paths:
|
|
363
363
|
content:
|
364
364
|
application/json:
|
365
365
|
schema:
|
366
|
-
"$ref": "#/components/schemas/
|
366
|
+
"$ref": "#/components/schemas/addresses_params"
|
367
367
|
delete:
|
368
368
|
summary: Deletes an Address
|
369
369
|
tags:
|
@@ -439,8 +439,8 @@ paths:
|
|
439
439
|
type: classification
|
440
440
|
attributes:
|
441
441
|
position: 1
|
442
|
-
created_at: '2021-08-
|
443
|
-
updated_at: '2021-08-
|
442
|
+
created_at: '2021-08-23T21:28:22.534Z'
|
443
|
+
updated_at: '2021-08-23T21:28:22.534Z'
|
444
444
|
relationships:
|
445
445
|
product:
|
446
446
|
data:
|
@@ -454,8 +454,8 @@ paths:
|
|
454
454
|
type: classification
|
455
455
|
attributes:
|
456
456
|
position: 1
|
457
|
-
created_at: '2021-08-
|
458
|
-
updated_at: '2021-08-
|
457
|
+
created_at: '2021-08-23T21:28:22.569Z'
|
458
|
+
updated_at: '2021-08-23T21:28:22.569Z'
|
459
459
|
relationships:
|
460
460
|
product:
|
461
461
|
data:
|
@@ -510,8 +510,8 @@ paths:
|
|
510
510
|
type: classification
|
511
511
|
attributes:
|
512
512
|
position: 1
|
513
|
-
created_at: '2021-08-
|
514
|
-
updated_at: '2021-08-
|
513
|
+
created_at: '2021-08-23T21:28:22.728Z'
|
514
|
+
updated_at: '2021-08-23T21:28:22.728Z'
|
515
515
|
relationships:
|
516
516
|
product:
|
517
517
|
data:
|
@@ -538,7 +538,7 @@ paths:
|
|
538
538
|
content:
|
539
539
|
application/json:
|
540
540
|
schema:
|
541
|
-
"$ref": "#/components/schemas/
|
541
|
+
"$ref": "#/components/schemas/classifications_params"
|
542
542
|
"/api/v2/platform/classifications/{id}":
|
543
543
|
get:
|
544
544
|
summary: Returns a Classification
|
@@ -551,46 +551,1183 @@ paths:
|
|
551
551
|
in: path
|
552
552
|
required: true
|
553
553
|
schema:
|
554
|
-
type: string
|
554
|
+
type: string
|
555
|
+
- name: include
|
556
|
+
in: query
|
557
|
+
description: 'Select which associated resources you would like to fetch, see:
|
558
|
+
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
559
|
+
example: product,taxon
|
560
|
+
schema:
|
561
|
+
type: string
|
562
|
+
responses:
|
563
|
+
'200':
|
564
|
+
description: Record found
|
565
|
+
content:
|
566
|
+
application/vnd.api+json:
|
567
|
+
examples:
|
568
|
+
Example:
|
569
|
+
value:
|
570
|
+
data:
|
571
|
+
id: '1'
|
572
|
+
type: classification
|
573
|
+
attributes:
|
574
|
+
position: 1
|
575
|
+
created_at: '2021-08-23T21:28:22.787Z'
|
576
|
+
updated_at: '2021-08-23T21:28:22.787Z'
|
577
|
+
relationships:
|
578
|
+
product:
|
579
|
+
data:
|
580
|
+
id: '1'
|
581
|
+
type: product
|
582
|
+
taxon:
|
583
|
+
data:
|
584
|
+
id: '2'
|
585
|
+
type: taxon
|
586
|
+
'404':
|
587
|
+
description: Record not found
|
588
|
+
content:
|
589
|
+
application/vnd.api+json:
|
590
|
+
examples:
|
591
|
+
Example:
|
592
|
+
value:
|
593
|
+
error: The resource you were looking for could not be found.
|
594
|
+
'401':
|
595
|
+
description: Authentication Failed
|
596
|
+
content:
|
597
|
+
application/vnd.api+json:
|
598
|
+
examples:
|
599
|
+
Example:
|
600
|
+
value:
|
601
|
+
error: The access token is invalid
|
602
|
+
put:
|
603
|
+
summary: Updates a Classification
|
604
|
+
tags:
|
605
|
+
- Classifications
|
606
|
+
security:
|
607
|
+
- bearer_auth: []
|
608
|
+
parameters:
|
609
|
+
- name: id
|
610
|
+
in: path
|
611
|
+
required: true
|
612
|
+
schema:
|
613
|
+
type: string
|
614
|
+
- name: include
|
615
|
+
in: query
|
616
|
+
description: 'Select which associated resources you would like to fetch, see:
|
617
|
+
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
618
|
+
example: product,taxon
|
619
|
+
schema:
|
620
|
+
type: string
|
621
|
+
responses:
|
622
|
+
'200':
|
623
|
+
description: record updated
|
624
|
+
content:
|
625
|
+
application/vnd.api+json:
|
626
|
+
examples:
|
627
|
+
Example:
|
628
|
+
value:
|
629
|
+
data:
|
630
|
+
id: '1'
|
631
|
+
type: classification
|
632
|
+
attributes:
|
633
|
+
position: 1
|
634
|
+
created_at: '2021-08-23T21:28:22.904Z'
|
635
|
+
updated_at: '2021-08-23T21:28:22.904Z'
|
636
|
+
relationships:
|
637
|
+
product:
|
638
|
+
data:
|
639
|
+
id: '1'
|
640
|
+
type: product
|
641
|
+
taxon:
|
642
|
+
data:
|
643
|
+
id: '2'
|
644
|
+
type: taxon
|
645
|
+
'422':
|
646
|
+
description: invalid request
|
647
|
+
content:
|
648
|
+
application/vnd.api+json:
|
649
|
+
examples:
|
650
|
+
Example:
|
651
|
+
value:
|
652
|
+
error: Product can't be blank
|
653
|
+
errors:
|
654
|
+
product:
|
655
|
+
- can't be blank
|
656
|
+
'404':
|
657
|
+
description: Record not found
|
658
|
+
content:
|
659
|
+
application/vnd.api+json:
|
660
|
+
examples:
|
661
|
+
Example:
|
662
|
+
value:
|
663
|
+
error: The resource you were looking for could not be found.
|
664
|
+
'401':
|
665
|
+
description: Authentication Failed
|
666
|
+
content:
|
667
|
+
application/vnd.api+json:
|
668
|
+
examples:
|
669
|
+
Example:
|
670
|
+
value:
|
671
|
+
error: The access token is invalid
|
672
|
+
requestBody:
|
673
|
+
content:
|
674
|
+
application/json:
|
675
|
+
schema:
|
676
|
+
"$ref": "#/components/schemas/classifications_params"
|
677
|
+
delete:
|
678
|
+
summary: Deletes a Classification
|
679
|
+
tags:
|
680
|
+
- Classifications
|
681
|
+
security:
|
682
|
+
- bearer_auth: []
|
683
|
+
parameters:
|
684
|
+
- name: id
|
685
|
+
in: path
|
686
|
+
required: true
|
687
|
+
schema:
|
688
|
+
type: string
|
689
|
+
responses:
|
690
|
+
'204':
|
691
|
+
description: Record deleted
|
692
|
+
'404':
|
693
|
+
description: Record not found
|
694
|
+
content:
|
695
|
+
application/vnd.api+json:
|
696
|
+
examples:
|
697
|
+
Example:
|
698
|
+
value:
|
699
|
+
error: The resource you were looking for could not be found.
|
700
|
+
'401':
|
701
|
+
description: Authentication Failed
|
702
|
+
content:
|
703
|
+
application/vnd.api+json:
|
704
|
+
examples:
|
705
|
+
Example:
|
706
|
+
value:
|
707
|
+
error: The access token is invalid
|
708
|
+
"/api/v2/platform/classifications/{id}/reposition":
|
709
|
+
put:
|
710
|
+
summary: Reposition a Classification
|
711
|
+
tags:
|
712
|
+
- Classifications
|
713
|
+
security:
|
714
|
+
- bearer_auth: []
|
715
|
+
parameters:
|
716
|
+
- name: id
|
717
|
+
in: path
|
718
|
+
required: true
|
719
|
+
schema:
|
720
|
+
type: string
|
721
|
+
- name: include
|
722
|
+
in: query
|
723
|
+
description: 'Select which associated resources you would like to fetch, see:
|
724
|
+
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
725
|
+
example: product,taxon
|
726
|
+
schema:
|
727
|
+
type: string
|
728
|
+
responses:
|
729
|
+
'200':
|
730
|
+
description: record updated
|
731
|
+
content:
|
732
|
+
application/vnd.api+json:
|
733
|
+
examples:
|
734
|
+
Example:
|
735
|
+
value:
|
736
|
+
data:
|
737
|
+
id: '1'
|
738
|
+
type: classification
|
739
|
+
attributes:
|
740
|
+
position: 2
|
741
|
+
created_at: '2021-08-23T21:28:23.191Z'
|
742
|
+
updated_at: '2021-08-23T21:28:23.199Z'
|
743
|
+
relationships:
|
744
|
+
product:
|
745
|
+
data:
|
746
|
+
id: '1'
|
747
|
+
type: product
|
748
|
+
taxon:
|
749
|
+
data:
|
750
|
+
id: '2'
|
751
|
+
type: taxon
|
752
|
+
'422':
|
753
|
+
description: invalid request
|
754
|
+
content:
|
755
|
+
application/vnd.api+json:
|
756
|
+
examples:
|
757
|
+
Example:
|
758
|
+
value:
|
759
|
+
error: is not a number
|
760
|
+
errors: {}
|
761
|
+
'404':
|
762
|
+
description: Record not found
|
763
|
+
content:
|
764
|
+
application/vnd.api+json:
|
765
|
+
examples:
|
766
|
+
Example:
|
767
|
+
value:
|
768
|
+
error: The resource you were looking for could not be found.
|
769
|
+
'401':
|
770
|
+
description: Authentication Failed
|
771
|
+
content:
|
772
|
+
application/vnd.api+json:
|
773
|
+
examples:
|
774
|
+
Example:
|
775
|
+
value:
|
776
|
+
error: The access token is invalid
|
777
|
+
requestBody:
|
778
|
+
content:
|
779
|
+
application/json:
|
780
|
+
schema:
|
781
|
+
"$ref": "#/components/schemas/classification_params"
|
782
|
+
"/api/v2/platform/countries":
|
783
|
+
get:
|
784
|
+
summary: Returns a list of Countries
|
785
|
+
tags:
|
786
|
+
- Countries
|
787
|
+
security:
|
788
|
+
- bearer_auth: []
|
789
|
+
responses:
|
790
|
+
'200':
|
791
|
+
description: Records returned
|
792
|
+
content:
|
793
|
+
application/vnd.api+json:
|
794
|
+
examples:
|
795
|
+
Example:
|
796
|
+
value:
|
797
|
+
data:
|
798
|
+
- id: '1'
|
799
|
+
type: country
|
800
|
+
attributes:
|
801
|
+
iso_name: UNITED STATES
|
802
|
+
iso: US
|
803
|
+
iso3: IS34
|
804
|
+
name: United States of America
|
805
|
+
numcode: 840
|
806
|
+
states_required: true
|
807
|
+
updated_at: '2021-08-23T21:28:23.328Z'
|
808
|
+
zipcode_required: true
|
809
|
+
created_at: '2021-08-23T21:28:23.328Z'
|
810
|
+
relationships:
|
811
|
+
states:
|
812
|
+
data: []
|
813
|
+
- id: '2'
|
814
|
+
type: country
|
815
|
+
attributes:
|
816
|
+
iso_name: ISO_NAME_2
|
817
|
+
iso: I2
|
818
|
+
iso3: IS35
|
819
|
+
name: NAME_2
|
820
|
+
numcode: 840
|
821
|
+
states_required: false
|
822
|
+
updated_at: '2021-08-23T21:28:23.332Z'
|
823
|
+
zipcode_required: true
|
824
|
+
created_at: '2021-08-23T21:28:23.332Z'
|
825
|
+
relationships:
|
826
|
+
states:
|
827
|
+
data: []
|
828
|
+
- id: '3'
|
829
|
+
type: country
|
830
|
+
attributes:
|
831
|
+
iso_name: ISO_NAME_3
|
832
|
+
iso: I3
|
833
|
+
iso3: IS36
|
834
|
+
name: NAME_3
|
835
|
+
numcode: 840
|
836
|
+
states_required: false
|
837
|
+
updated_at: '2021-08-23T21:28:23.333Z'
|
838
|
+
zipcode_required: true
|
839
|
+
created_at: '2021-08-23T21:28:23.333Z'
|
840
|
+
relationships:
|
841
|
+
states:
|
842
|
+
data: []
|
843
|
+
meta:
|
844
|
+
count: 3
|
845
|
+
total_count: 3
|
846
|
+
total_pages: 1
|
847
|
+
links:
|
848
|
+
self: http://www.example.com/api/v2/platform/countries
|
849
|
+
next: http://www.example.com/api/v2/platform/countries?page=1
|
850
|
+
prev: http://www.example.com/api/v2/platform/countries?page=1
|
851
|
+
last: http://www.example.com/api/v2/platform/countries?page=1
|
852
|
+
first: http://www.example.com/api/v2/platform/countries?page=1
|
853
|
+
'401':
|
854
|
+
description: Authentication Failed
|
855
|
+
content:
|
856
|
+
application/vnd.api+json:
|
857
|
+
examples:
|
858
|
+
Example:
|
859
|
+
value:
|
860
|
+
error: The access token is invalid
|
861
|
+
"/api/v2/platform/countries/{id}":
|
862
|
+
get:
|
863
|
+
summary: Returns a Country
|
864
|
+
tags:
|
865
|
+
- Countries
|
866
|
+
security:
|
867
|
+
- bearer_auth: []
|
868
|
+
parameters:
|
869
|
+
- name: id
|
870
|
+
in: path
|
871
|
+
required: true
|
872
|
+
schema:
|
873
|
+
type: string
|
874
|
+
responses:
|
875
|
+
'200':
|
876
|
+
description: Record found
|
877
|
+
content:
|
878
|
+
application/vnd.api+json:
|
879
|
+
examples:
|
880
|
+
Example:
|
881
|
+
value:
|
882
|
+
data:
|
883
|
+
id: '2'
|
884
|
+
type: country
|
885
|
+
attributes:
|
886
|
+
iso_name: ISO_NAME_6
|
887
|
+
iso: I6
|
888
|
+
iso3: IS41
|
889
|
+
name: NAME_6
|
890
|
+
numcode: 840
|
891
|
+
states_required: false
|
892
|
+
updated_at: '2021-08-23T21:28:23.362Z'
|
893
|
+
zipcode_required: true
|
894
|
+
created_at: '2021-08-23T21:28:23.362Z'
|
895
|
+
relationships:
|
896
|
+
states:
|
897
|
+
data: []
|
898
|
+
'404':
|
899
|
+
description: Record not found
|
900
|
+
content:
|
901
|
+
application/vnd.api+json:
|
902
|
+
examples:
|
903
|
+
Example:
|
904
|
+
value:
|
905
|
+
error: The resource you were looking for could not be found.
|
906
|
+
'401':
|
907
|
+
description: Authentication Failed
|
908
|
+
content:
|
909
|
+
application/vnd.api+json:
|
910
|
+
examples:
|
911
|
+
Example:
|
912
|
+
value:
|
913
|
+
error: The access token is invalid
|
914
|
+
"/api/v2/platform/menu_items":
|
915
|
+
get:
|
916
|
+
summary: Returns a list of MenuItems
|
917
|
+
tags:
|
918
|
+
- MenuItems
|
919
|
+
security:
|
920
|
+
- bearer_auth: []
|
921
|
+
parameters:
|
922
|
+
- name: page
|
923
|
+
in: query
|
924
|
+
example: 1
|
925
|
+
schema:
|
926
|
+
type: integer
|
927
|
+
- name: per_page
|
928
|
+
in: query
|
929
|
+
example: 50
|
930
|
+
schema:
|
931
|
+
type: integer
|
932
|
+
- name: include
|
933
|
+
in: query
|
934
|
+
description: 'Select which associated resources you would like to fetch, see:
|
935
|
+
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
936
|
+
example: linked_resource
|
937
|
+
schema:
|
938
|
+
type: string
|
939
|
+
- name: filter
|
940
|
+
in: query
|
941
|
+
description: ''
|
942
|
+
example:
|
943
|
+
schema:
|
944
|
+
type: string
|
945
|
+
responses:
|
946
|
+
'200':
|
947
|
+
description: Records returned
|
948
|
+
content:
|
949
|
+
application/vnd.api+json:
|
950
|
+
examples:
|
951
|
+
Example:
|
952
|
+
value:
|
953
|
+
data:
|
954
|
+
- id: '1'
|
955
|
+
type: menu_item
|
956
|
+
attributes:
|
957
|
+
name: Quia ea unde minus sunt voluptatum iste repellendus.
|
958
|
+
subtitle:
|
959
|
+
destination:
|
960
|
+
new_window: false
|
961
|
+
item_type: Container
|
962
|
+
linked_resource_type: URL
|
963
|
+
code:
|
964
|
+
lft: 1
|
965
|
+
rgt: 16
|
966
|
+
depth: 0
|
967
|
+
created_at: '2021-08-23T21:28:23.403Z'
|
968
|
+
updated_at: '2021-08-23T21:28:23.479Z'
|
969
|
+
link:
|
970
|
+
is_container: true
|
971
|
+
is_root: true
|
972
|
+
is_child: false
|
973
|
+
is_leaf: false
|
974
|
+
relationships:
|
975
|
+
icon:
|
976
|
+
data:
|
977
|
+
menu:
|
978
|
+
data:
|
979
|
+
id: '1'
|
980
|
+
type: menu
|
981
|
+
parent:
|
982
|
+
data:
|
983
|
+
linked_resource:
|
984
|
+
data:
|
985
|
+
children:
|
986
|
+
data:
|
987
|
+
- id: '2'
|
988
|
+
type: menu_item
|
989
|
+
- id: '3'
|
990
|
+
type: menu_item
|
991
|
+
- id: '4'
|
992
|
+
type: menu_item
|
993
|
+
- id: '5'
|
994
|
+
type: menu_item
|
995
|
+
- id: '6'
|
996
|
+
type: menu_item
|
997
|
+
- id: '7'
|
998
|
+
type: menu_item
|
999
|
+
- id: '8'
|
1000
|
+
type: menu_item
|
1001
|
+
- id: '2'
|
1002
|
+
type: menu_item
|
1003
|
+
attributes:
|
1004
|
+
name: Link no. 1 To Somewhere
|
1005
|
+
subtitle:
|
1006
|
+
destination:
|
1007
|
+
new_window: false
|
1008
|
+
item_type: Link
|
1009
|
+
linked_resource_type: URL
|
1010
|
+
code:
|
1011
|
+
lft: 2
|
1012
|
+
rgt: 3
|
1013
|
+
depth: 1
|
1014
|
+
created_at: '2021-08-23T21:28:23.414Z'
|
1015
|
+
updated_at: '2021-08-23T21:28:23.416Z'
|
1016
|
+
link:
|
1017
|
+
is_container: false
|
1018
|
+
is_root: false
|
1019
|
+
is_child: true
|
1020
|
+
is_leaf: true
|
1021
|
+
relationships:
|
1022
|
+
icon:
|
1023
|
+
data:
|
1024
|
+
id: '1'
|
1025
|
+
type: icon
|
1026
|
+
menu:
|
1027
|
+
data:
|
1028
|
+
id: '1'
|
1029
|
+
type: menu
|
1030
|
+
parent:
|
1031
|
+
data:
|
1032
|
+
id: '1'
|
1033
|
+
type: menu_item
|
1034
|
+
linked_resource:
|
1035
|
+
data:
|
1036
|
+
children:
|
1037
|
+
data: []
|
1038
|
+
- id: '3'
|
1039
|
+
type: menu_item
|
1040
|
+
attributes:
|
1041
|
+
name: Link no. 2 To Somewhere
|
1042
|
+
subtitle:
|
1043
|
+
destination:
|
1044
|
+
new_window: false
|
1045
|
+
item_type: Link
|
1046
|
+
linked_resource_type: URL
|
1047
|
+
code:
|
1048
|
+
lft: 4
|
1049
|
+
rgt: 5
|
1050
|
+
depth: 1
|
1051
|
+
created_at: '2021-08-23T21:28:23.425Z'
|
1052
|
+
updated_at: '2021-08-23T21:28:23.426Z'
|
1053
|
+
link:
|
1054
|
+
is_container: false
|
1055
|
+
is_root: false
|
1056
|
+
is_child: true
|
1057
|
+
is_leaf: true
|
1058
|
+
relationships:
|
1059
|
+
icon:
|
1060
|
+
data:
|
1061
|
+
id: '2'
|
1062
|
+
type: icon
|
1063
|
+
menu:
|
1064
|
+
data:
|
1065
|
+
id: '1'
|
1066
|
+
type: menu
|
1067
|
+
parent:
|
1068
|
+
data:
|
1069
|
+
id: '1'
|
1070
|
+
type: menu_item
|
1071
|
+
linked_resource:
|
1072
|
+
data:
|
1073
|
+
children:
|
1074
|
+
data: []
|
1075
|
+
- id: '4'
|
1076
|
+
type: menu_item
|
1077
|
+
attributes:
|
1078
|
+
name: Link no. 3 To Somewhere
|
1079
|
+
subtitle:
|
1080
|
+
destination:
|
1081
|
+
new_window: false
|
1082
|
+
item_type: Link
|
1083
|
+
linked_resource_type: URL
|
1084
|
+
code:
|
1085
|
+
lft: 6
|
1086
|
+
rgt: 7
|
1087
|
+
depth: 1
|
1088
|
+
created_at: '2021-08-23T21:28:23.435Z'
|
1089
|
+
updated_at: '2021-08-23T21:28:23.436Z'
|
1090
|
+
link:
|
1091
|
+
is_container: false
|
1092
|
+
is_root: false
|
1093
|
+
is_child: true
|
1094
|
+
is_leaf: true
|
1095
|
+
relationships:
|
1096
|
+
icon:
|
1097
|
+
data:
|
1098
|
+
id: '3'
|
1099
|
+
type: icon
|
1100
|
+
menu:
|
1101
|
+
data:
|
1102
|
+
id: '1'
|
1103
|
+
type: menu
|
1104
|
+
parent:
|
1105
|
+
data:
|
1106
|
+
id: '1'
|
1107
|
+
type: menu_item
|
1108
|
+
linked_resource:
|
1109
|
+
data:
|
1110
|
+
children:
|
1111
|
+
data: []
|
1112
|
+
- id: '5'
|
1113
|
+
type: menu_item
|
1114
|
+
attributes:
|
1115
|
+
name: Link no. 4 To Somewhere
|
1116
|
+
subtitle:
|
1117
|
+
destination:
|
1118
|
+
new_window: false
|
1119
|
+
item_type: Link
|
1120
|
+
linked_resource_type: URL
|
1121
|
+
code:
|
1122
|
+
lft: 8
|
1123
|
+
rgt: 9
|
1124
|
+
depth: 1
|
1125
|
+
created_at: '2021-08-23T21:28:23.444Z'
|
1126
|
+
updated_at: '2021-08-23T21:28:23.446Z'
|
1127
|
+
link:
|
1128
|
+
is_container: false
|
1129
|
+
is_root: false
|
1130
|
+
is_child: true
|
1131
|
+
is_leaf: true
|
1132
|
+
relationships:
|
1133
|
+
icon:
|
1134
|
+
data:
|
1135
|
+
id: '4'
|
1136
|
+
type: icon
|
1137
|
+
menu:
|
1138
|
+
data:
|
1139
|
+
id: '1'
|
1140
|
+
type: menu
|
1141
|
+
parent:
|
1142
|
+
data:
|
1143
|
+
id: '1'
|
1144
|
+
type: menu_item
|
1145
|
+
linked_resource:
|
1146
|
+
data:
|
1147
|
+
children:
|
1148
|
+
data: []
|
1149
|
+
- id: '6'
|
1150
|
+
type: menu_item
|
1151
|
+
attributes:
|
1152
|
+
name: Link no. 5 To Somewhere
|
1153
|
+
subtitle:
|
1154
|
+
destination:
|
1155
|
+
new_window: false
|
1156
|
+
item_type: Link
|
1157
|
+
linked_resource_type: URL
|
1158
|
+
code:
|
1159
|
+
lft: 10
|
1160
|
+
rgt: 11
|
1161
|
+
depth: 1
|
1162
|
+
created_at: '2021-08-23T21:28:23.454Z'
|
1163
|
+
updated_at: '2021-08-23T21:28:23.456Z'
|
1164
|
+
link:
|
1165
|
+
is_container: false
|
1166
|
+
is_root: false
|
1167
|
+
is_child: true
|
1168
|
+
is_leaf: true
|
1169
|
+
relationships:
|
1170
|
+
icon:
|
1171
|
+
data:
|
1172
|
+
id: '5'
|
1173
|
+
type: icon
|
1174
|
+
menu:
|
1175
|
+
data:
|
1176
|
+
id: '1'
|
1177
|
+
type: menu
|
1178
|
+
parent:
|
1179
|
+
data:
|
1180
|
+
id: '1'
|
1181
|
+
type: menu_item
|
1182
|
+
linked_resource:
|
1183
|
+
data:
|
1184
|
+
children:
|
1185
|
+
data: []
|
1186
|
+
- id: '7'
|
1187
|
+
type: menu_item
|
1188
|
+
attributes:
|
1189
|
+
name: Link no. 6 To Somewhere
|
1190
|
+
subtitle:
|
1191
|
+
destination:
|
1192
|
+
new_window: false
|
1193
|
+
item_type: Link
|
1194
|
+
linked_resource_type: URL
|
1195
|
+
code:
|
1196
|
+
lft: 12
|
1197
|
+
rgt: 13
|
1198
|
+
depth: 1
|
1199
|
+
created_at: '2021-08-23T21:28:23.464Z'
|
1200
|
+
updated_at: '2021-08-23T21:28:23.465Z'
|
1201
|
+
link:
|
1202
|
+
is_container: false
|
1203
|
+
is_root: false
|
1204
|
+
is_child: true
|
1205
|
+
is_leaf: true
|
1206
|
+
relationships:
|
1207
|
+
icon:
|
1208
|
+
data:
|
1209
|
+
id: '6'
|
1210
|
+
type: icon
|
1211
|
+
menu:
|
1212
|
+
data:
|
1213
|
+
id: '1'
|
1214
|
+
type: menu
|
1215
|
+
parent:
|
1216
|
+
data:
|
1217
|
+
id: '1'
|
1218
|
+
type: menu_item
|
1219
|
+
linked_resource:
|
1220
|
+
data:
|
1221
|
+
children:
|
1222
|
+
data: []
|
1223
|
+
- id: '8'
|
1224
|
+
type: menu_item
|
1225
|
+
attributes:
|
1226
|
+
name: Link no. 7 To Somewhere
|
1227
|
+
subtitle:
|
1228
|
+
destination:
|
1229
|
+
new_window: false
|
1230
|
+
item_type: Link
|
1231
|
+
linked_resource_type: URL
|
1232
|
+
code:
|
1233
|
+
lft: 14
|
1234
|
+
rgt: 15
|
1235
|
+
depth: 1
|
1236
|
+
created_at: '2021-08-23T21:28:23.474Z'
|
1237
|
+
updated_at: '2021-08-23T21:28:23.475Z'
|
1238
|
+
link:
|
1239
|
+
is_container: false
|
1240
|
+
is_root: false
|
1241
|
+
is_child: true
|
1242
|
+
is_leaf: true
|
1243
|
+
relationships:
|
1244
|
+
icon:
|
1245
|
+
data:
|
1246
|
+
id: '7'
|
1247
|
+
type: icon
|
1248
|
+
menu:
|
1249
|
+
data:
|
1250
|
+
id: '1'
|
1251
|
+
type: menu
|
1252
|
+
parent:
|
1253
|
+
data:
|
1254
|
+
id: '1'
|
1255
|
+
type: menu_item
|
1256
|
+
linked_resource:
|
1257
|
+
data:
|
1258
|
+
children:
|
1259
|
+
data: []
|
1260
|
+
meta:
|
1261
|
+
count: 8
|
1262
|
+
total_count: 8
|
1263
|
+
total_pages: 1
|
1264
|
+
links:
|
1265
|
+
self: http://www.example.com/api/v2/platform/menu_items?page=1&per_page=&include=&filter=
|
1266
|
+
next: http://www.example.com/api/v2/platform/menu_items?include=&page=1&per_page=
|
1267
|
+
prev: http://www.example.com/api/v2/platform/menu_items?include=&page=1&per_page=
|
1268
|
+
last: http://www.example.com/api/v2/platform/menu_items?include=&page=1&per_page=
|
1269
|
+
first: http://www.example.com/api/v2/platform/menu_items?include=&page=1&per_page=
|
1270
|
+
'401':
|
1271
|
+
description: Authentication Failed
|
1272
|
+
content:
|
1273
|
+
application/vnd.api+json:
|
1274
|
+
examples:
|
1275
|
+
Example:
|
1276
|
+
value:
|
1277
|
+
error: The access token is invalid
|
1278
|
+
post:
|
1279
|
+
summary: Creates a MenuItem
|
1280
|
+
tags:
|
1281
|
+
- MenuItems
|
1282
|
+
security:
|
1283
|
+
- bearer_auth: []
|
1284
|
+
parameters:
|
1285
|
+
- name: include
|
1286
|
+
in: query
|
1287
|
+
description: 'Select which associated resources you would like to fetch, see:
|
1288
|
+
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
1289
|
+
example: linked_resource
|
1290
|
+
schema:
|
1291
|
+
type: string
|
1292
|
+
responses:
|
1293
|
+
'201':
|
1294
|
+
description: record created
|
1295
|
+
content:
|
1296
|
+
application/vnd.api+json:
|
1297
|
+
examples:
|
1298
|
+
Example:
|
1299
|
+
value:
|
1300
|
+
data:
|
1301
|
+
id: '5'
|
1302
|
+
type: menu_item
|
1303
|
+
attributes:
|
1304
|
+
name: Link no. 18 To Somewhere
|
1305
|
+
subtitle:
|
1306
|
+
destination:
|
1307
|
+
new_window: false
|
1308
|
+
item_type: Link
|
1309
|
+
linked_resource_type: URL
|
1310
|
+
code:
|
1311
|
+
lft: 8
|
1312
|
+
rgt: 9
|
1313
|
+
depth: 1
|
1314
|
+
created_at: '2021-08-23T21:28:23.637Z'
|
1315
|
+
updated_at: '2021-08-23T21:28:23.639Z'
|
1316
|
+
link:
|
1317
|
+
is_container: false
|
1318
|
+
is_root: false
|
1319
|
+
is_child: true
|
1320
|
+
is_leaf: true
|
1321
|
+
relationships:
|
1322
|
+
icon:
|
1323
|
+
data:
|
1324
|
+
menu:
|
1325
|
+
data:
|
1326
|
+
id: '1'
|
1327
|
+
type: menu
|
1328
|
+
parent:
|
1329
|
+
data:
|
1330
|
+
id: '1'
|
1331
|
+
type: menu_item
|
1332
|
+
linked_resource:
|
1333
|
+
data:
|
1334
|
+
children:
|
1335
|
+
data: []
|
1336
|
+
'422':
|
1337
|
+
description: invalid request
|
1338
|
+
content:
|
1339
|
+
application/vnd.api+json:
|
1340
|
+
examples:
|
1341
|
+
Example:
|
1342
|
+
value:
|
1343
|
+
error: Name can't be blank, Menu can't be blank, and Item type
|
1344
|
+
is not included in the list
|
1345
|
+
errors:
|
1346
|
+
name:
|
1347
|
+
- can't be blank
|
1348
|
+
menu:
|
1349
|
+
- can't be blank
|
1350
|
+
item_type:
|
1351
|
+
- is not included in the list
|
1352
|
+
requestBody:
|
1353
|
+
content:
|
1354
|
+
application/json:
|
1355
|
+
schema:
|
1356
|
+
"$ref": "#/components/schemas/menu_items_params"
|
1357
|
+
"/api/v2/platform/menu_items/{id}":
|
1358
|
+
get:
|
1359
|
+
summary: Returns a MenuItem
|
1360
|
+
tags:
|
1361
|
+
- MenuItems
|
1362
|
+
security:
|
1363
|
+
- bearer_auth: []
|
1364
|
+
parameters:
|
1365
|
+
- name: id
|
1366
|
+
in: path
|
1367
|
+
required: true
|
1368
|
+
schema:
|
1369
|
+
type: string
|
1370
|
+
- name: include
|
1371
|
+
in: query
|
1372
|
+
description: 'Select which associated resources you would like to fetch, see:
|
1373
|
+
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
1374
|
+
example: linked_resource
|
1375
|
+
schema:
|
1376
|
+
type: string
|
1377
|
+
responses:
|
1378
|
+
'200':
|
1379
|
+
description: Record found
|
1380
|
+
content:
|
1381
|
+
application/vnd.api+json:
|
1382
|
+
examples:
|
1383
|
+
Example:
|
1384
|
+
value:
|
1385
|
+
data:
|
1386
|
+
id: '5'
|
1387
|
+
type: menu_item
|
1388
|
+
attributes:
|
1389
|
+
name: Link no. 25 To Somewhere
|
1390
|
+
subtitle:
|
1391
|
+
destination:
|
1392
|
+
new_window: false
|
1393
|
+
item_type: Link
|
1394
|
+
linked_resource_type: URL
|
1395
|
+
code:
|
1396
|
+
lft: 8
|
1397
|
+
rgt: 9
|
1398
|
+
depth: 1
|
1399
|
+
created_at: '2021-08-23T21:28:23.746Z'
|
1400
|
+
updated_at: '2021-08-23T21:28:23.748Z'
|
1401
|
+
link:
|
1402
|
+
is_container: false
|
1403
|
+
is_root: false
|
1404
|
+
is_child: true
|
1405
|
+
is_leaf: true
|
1406
|
+
relationships:
|
1407
|
+
icon:
|
1408
|
+
data:
|
1409
|
+
id: '4'
|
1410
|
+
type: icon
|
1411
|
+
menu:
|
1412
|
+
data:
|
1413
|
+
id: '1'
|
1414
|
+
type: menu
|
1415
|
+
parent:
|
1416
|
+
data:
|
1417
|
+
id: '1'
|
1418
|
+
type: menu_item
|
1419
|
+
linked_resource:
|
1420
|
+
data:
|
1421
|
+
children:
|
1422
|
+
data: []
|
1423
|
+
'404':
|
1424
|
+
description: Record not found
|
1425
|
+
content:
|
1426
|
+
application/vnd.api+json:
|
1427
|
+
examples:
|
1428
|
+
Example:
|
1429
|
+
value:
|
1430
|
+
error: The resource you were looking for could not be found.
|
1431
|
+
'401':
|
1432
|
+
description: Authentication Failed
|
1433
|
+
content:
|
1434
|
+
application/vnd.api+json:
|
1435
|
+
examples:
|
1436
|
+
Example:
|
1437
|
+
value:
|
1438
|
+
error: The access token is invalid
|
1439
|
+
put:
|
1440
|
+
summary: Updates a MenuItem
|
1441
|
+
tags:
|
1442
|
+
- MenuItems
|
1443
|
+
security:
|
1444
|
+
- bearer_auth: []
|
1445
|
+
parameters:
|
1446
|
+
- name: id
|
1447
|
+
in: path
|
1448
|
+
required: true
|
1449
|
+
schema:
|
1450
|
+
type: string
|
1451
|
+
- name: include
|
1452
|
+
in: query
|
1453
|
+
description: 'Select which associated resources you would like to fetch, see:
|
1454
|
+
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
1455
|
+
example: linked_resource
|
1456
|
+
schema:
|
1457
|
+
type: string
|
1458
|
+
responses:
|
1459
|
+
'200':
|
1460
|
+
description: record updated
|
1461
|
+
content:
|
1462
|
+
application/vnd.api+json:
|
1463
|
+
examples:
|
1464
|
+
Example:
|
1465
|
+
value:
|
1466
|
+
data:
|
1467
|
+
id: '5'
|
1468
|
+
type: menu_item
|
1469
|
+
attributes:
|
1470
|
+
name: Menu Item One
|
1471
|
+
subtitle:
|
1472
|
+
destination:
|
1473
|
+
new_window: false
|
1474
|
+
item_type: Link
|
1475
|
+
linked_resource_type: URL
|
1476
|
+
code:
|
1477
|
+
lft: 8
|
1478
|
+
rgt: 9
|
1479
|
+
depth: 1
|
1480
|
+
created_at: '2021-08-23T21:28:23.926Z'
|
1481
|
+
updated_at: '2021-08-23T21:28:23.937Z'
|
1482
|
+
link:
|
1483
|
+
is_container: false
|
1484
|
+
is_root: false
|
1485
|
+
is_child: true
|
1486
|
+
is_leaf: true
|
1487
|
+
relationships:
|
1488
|
+
icon:
|
1489
|
+
data:
|
1490
|
+
id: '4'
|
1491
|
+
type: icon
|
1492
|
+
menu:
|
1493
|
+
data:
|
1494
|
+
id: '1'
|
1495
|
+
type: menu
|
1496
|
+
parent:
|
1497
|
+
data:
|
1498
|
+
id: '1'
|
1499
|
+
type: menu_item
|
1500
|
+
linked_resource:
|
1501
|
+
data:
|
1502
|
+
children:
|
1503
|
+
data: []
|
1504
|
+
'422':
|
1505
|
+
description: invalid request
|
1506
|
+
content:
|
1507
|
+
application/vnd.api+json:
|
1508
|
+
examples:
|
1509
|
+
Example:
|
1510
|
+
value:
|
1511
|
+
error: Name can't be blank
|
1512
|
+
errors:
|
1513
|
+
name:
|
1514
|
+
- can't be blank
|
1515
|
+
'404':
|
1516
|
+
description: Record not found
|
1517
|
+
content:
|
1518
|
+
application/vnd.api+json:
|
1519
|
+
examples:
|
1520
|
+
Example:
|
1521
|
+
value:
|
1522
|
+
error: The resource you were looking for could not be found.
|
1523
|
+
'401':
|
1524
|
+
description: Authentication Failed
|
1525
|
+
content:
|
1526
|
+
application/vnd.api+json:
|
1527
|
+
examples:
|
1528
|
+
Example:
|
1529
|
+
value:
|
1530
|
+
error: The access token is invalid
|
1531
|
+
requestBody:
|
1532
|
+
content:
|
1533
|
+
application/json:
|
1534
|
+
schema:
|
1535
|
+
"$ref": "#/components/schemas/menu_items_params"
|
1536
|
+
delete:
|
1537
|
+
summary: Deletes a MenuItem
|
1538
|
+
tags:
|
1539
|
+
- MenuItems
|
1540
|
+
security:
|
1541
|
+
- bearer_auth: []
|
1542
|
+
parameters:
|
1543
|
+
- name: id
|
1544
|
+
in: path
|
1545
|
+
required: true
|
1546
|
+
schema:
|
1547
|
+
type: string
|
1548
|
+
responses:
|
1549
|
+
'204':
|
1550
|
+
description: Record deleted
|
1551
|
+
'404':
|
1552
|
+
description: Record not found
|
1553
|
+
content:
|
1554
|
+
application/vnd.api+json:
|
1555
|
+
examples:
|
1556
|
+
Example:
|
1557
|
+
value:
|
1558
|
+
error: The resource you were looking for could not be found.
|
1559
|
+
'401':
|
1560
|
+
description: Authentication Failed
|
1561
|
+
content:
|
1562
|
+
application/vnd.api+json:
|
1563
|
+
examples:
|
1564
|
+
Example:
|
1565
|
+
value:
|
1566
|
+
error: The access token is invalid
|
1567
|
+
"/api/v2/platform/menu_items/{id}/reposition":
|
1568
|
+
patch:
|
1569
|
+
summary: Reposition a Menu Item
|
1570
|
+
tags:
|
1571
|
+
- MenuItems
|
1572
|
+
security:
|
1573
|
+
- bearer_auth: []
|
1574
|
+
parameters:
|
1575
|
+
- name: id
|
1576
|
+
in: path
|
1577
|
+
required: true
|
1578
|
+
schema:
|
1579
|
+
type: string
|
1580
|
+
responses:
|
1581
|
+
'200':
|
1582
|
+
description: record updated
|
1583
|
+
content:
|
1584
|
+
application/vnd.api+json:
|
1585
|
+
examples:
|
1586
|
+
Example:
|
1587
|
+
value:
|
1588
|
+
data:
|
1589
|
+
id: '5'
|
1590
|
+
type: menu_item
|
1591
|
+
attributes:
|
1592
|
+
name: Link no. 62 To Somewhere
|
1593
|
+
subtitle:
|
1594
|
+
destination:
|
1595
|
+
new_window: false
|
1596
|
+
item_type: Link
|
1597
|
+
linked_resource_type: URL
|
1598
|
+
code:
|
1599
|
+
lft: 5
|
1600
|
+
rgt: 6
|
1601
|
+
depth: 2
|
1602
|
+
created_at: '2021-08-23T21:28:24.309Z'
|
1603
|
+
updated_at: '2021-08-23T21:28:24.321Z'
|
1604
|
+
link:
|
1605
|
+
is_container: false
|
1606
|
+
is_root: false
|
1607
|
+
is_child: true
|
1608
|
+
is_leaf: true
|
1609
|
+
relationships:
|
1610
|
+
icon:
|
1611
|
+
data:
|
1612
|
+
id: '4'
|
1613
|
+
type: icon
|
1614
|
+
menu:
|
1615
|
+
data:
|
1616
|
+
id: '1'
|
1617
|
+
type: menu
|
1618
|
+
parent:
|
1619
|
+
data:
|
1620
|
+
id: '3'
|
1621
|
+
type: menu_item
|
1622
|
+
linked_resource:
|
1623
|
+
data:
|
1624
|
+
children:
|
1625
|
+
data: []
|
1626
|
+
'404':
|
1627
|
+
description: Record not found
|
1628
|
+
content:
|
1629
|
+
application/vnd.api+json:
|
1630
|
+
examples:
|
1631
|
+
Example:
|
1632
|
+
value:
|
1633
|
+
error: The resource you were looking for could not be found.
|
1634
|
+
'401':
|
1635
|
+
description: Authentication Failed
|
1636
|
+
content:
|
1637
|
+
application/vnd.api+json:
|
1638
|
+
examples:
|
1639
|
+
Example:
|
1640
|
+
value:
|
1641
|
+
error: The access token is invalid
|
1642
|
+
requestBody:
|
1643
|
+
content:
|
1644
|
+
application/json:
|
1645
|
+
schema:
|
1646
|
+
"$ref": "#/components/schemas/menu_item_reposition_params"
|
1647
|
+
"/api/v2/platform/menus":
|
1648
|
+
get:
|
1649
|
+
summary: Returns a list of Menus
|
1650
|
+
tags:
|
1651
|
+
- Menus
|
1652
|
+
security:
|
1653
|
+
- bearer_auth: []
|
1654
|
+
parameters:
|
1655
|
+
- name: page
|
1656
|
+
in: query
|
1657
|
+
example: 1
|
1658
|
+
schema:
|
1659
|
+
type: integer
|
1660
|
+
- name: per_page
|
1661
|
+
in: query
|
1662
|
+
example: 50
|
1663
|
+
schema:
|
1664
|
+
type: integer
|
555
1665
|
- name: include
|
556
1666
|
in: query
|
557
1667
|
description: 'Select which associated resources you would like to fetch, see:
|
558
1668
|
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
559
|
-
example:
|
1669
|
+
example: menu_items
|
1670
|
+
schema:
|
1671
|
+
type: string
|
1672
|
+
- name: filter
|
1673
|
+
in: query
|
1674
|
+
description: ''
|
1675
|
+
example: location_eq=header
|
560
1676
|
schema:
|
561
1677
|
type: string
|
562
1678
|
responses:
|
563
1679
|
'200':
|
564
|
-
description:
|
1680
|
+
description: Records returned
|
565
1681
|
content:
|
566
1682
|
application/vnd.api+json:
|
567
1683
|
examples:
|
568
1684
|
Example:
|
569
1685
|
value:
|
570
1686
|
data:
|
571
|
-
|
572
|
-
type:
|
1687
|
+
- id: '1'
|
1688
|
+
type: menu
|
573
1689
|
attributes:
|
574
|
-
|
575
|
-
|
576
|
-
|
1690
|
+
name: Main Menu
|
1691
|
+
location: header
|
1692
|
+
locale: en
|
1693
|
+
created_at: '2021-08-23T21:28:24.436Z'
|
1694
|
+
updated_at: '2021-08-23T21:28:24.464Z'
|
577
1695
|
relationships:
|
578
|
-
|
1696
|
+
menu_items:
|
579
1697
|
data:
|
580
|
-
|
581
|
-
type:
|
582
|
-
|
1698
|
+
- id: '1'
|
1699
|
+
type: menu_item
|
1700
|
+
- id: '3'
|
1701
|
+
type: menu_item
|
1702
|
+
- id: '4'
|
1703
|
+
type: menu_item
|
1704
|
+
- id: '2'
|
1705
|
+
type: menu
|
1706
|
+
attributes:
|
1707
|
+
name: Footer Menu
|
1708
|
+
location: footer
|
1709
|
+
locale: en
|
1710
|
+
created_at: '2021-08-23T21:28:24.440Z'
|
1711
|
+
updated_at: '2021-08-23T21:28:24.484Z'
|
1712
|
+
relationships:
|
1713
|
+
menu_items:
|
583
1714
|
data:
|
584
|
-
|
585
|
-
type:
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
1715
|
+
- id: '2'
|
1716
|
+
type: menu_item
|
1717
|
+
- id: '5'
|
1718
|
+
type: menu_item
|
1719
|
+
- id: '6'
|
1720
|
+
type: menu_item
|
1721
|
+
meta:
|
1722
|
+
count: 2
|
1723
|
+
total_count: 2
|
1724
|
+
total_pages: 1
|
1725
|
+
links:
|
1726
|
+
self: http://www.example.com/api/v2/platform/menus?page=1&per_page=&include=&filter=
|
1727
|
+
next: http://www.example.com/api/v2/platform/menus?include=&page=1&per_page=
|
1728
|
+
prev: http://www.example.com/api/v2/platform/menus?include=&page=1&per_page=
|
1729
|
+
last: http://www.example.com/api/v2/platform/menus?include=&page=1&per_page=
|
1730
|
+
first: http://www.example.com/api/v2/platform/menus?include=&page=1&per_page=
|
594
1731
|
'401':
|
595
1732
|
description: Authentication Failed
|
596
1733
|
content:
|
@@ -599,28 +1736,23 @@ paths:
|
|
599
1736
|
Example:
|
600
1737
|
value:
|
601
1738
|
error: The access token is invalid
|
602
|
-
|
603
|
-
summary:
|
1739
|
+
post:
|
1740
|
+
summary: Creates a Menu
|
604
1741
|
tags:
|
605
|
-
-
|
1742
|
+
- Menus
|
606
1743
|
security:
|
607
1744
|
- bearer_auth: []
|
608
1745
|
parameters:
|
609
|
-
- name: id
|
610
|
-
in: path
|
611
|
-
required: true
|
612
|
-
schema:
|
613
|
-
type: string
|
614
1746
|
- name: include
|
615
1747
|
in: query
|
616
1748
|
description: 'Select which associated resources you would like to fetch, see:
|
617
1749
|
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
618
|
-
example:
|
1750
|
+
example: menu_items
|
619
1751
|
schema:
|
620
1752
|
type: string
|
621
1753
|
responses:
|
622
|
-
'
|
623
|
-
description: record
|
1754
|
+
'201':
|
1755
|
+
description: record created
|
624
1756
|
content:
|
625
1757
|
application/vnd.api+json:
|
626
1758
|
examples:
|
@@ -628,20 +1760,18 @@ paths:
|
|
628
1760
|
value:
|
629
1761
|
data:
|
630
1762
|
id: '1'
|
631
|
-
type:
|
1763
|
+
type: menu
|
632
1764
|
attributes:
|
633
|
-
|
634
|
-
|
635
|
-
|
1765
|
+
name: Main Menu
|
1766
|
+
location: header
|
1767
|
+
locale: en
|
1768
|
+
created_at: '2021-08-23T21:28:24.595Z'
|
1769
|
+
updated_at: '2021-08-23T21:28:24.598Z'
|
636
1770
|
relationships:
|
637
|
-
|
638
|
-
data:
|
639
|
-
id: '1'
|
640
|
-
type: product
|
641
|
-
taxon:
|
1771
|
+
menu_items:
|
642
1772
|
data:
|
643
|
-
|
644
|
-
type:
|
1773
|
+
- id: '1'
|
1774
|
+
type: menu_item
|
645
1775
|
'422':
|
646
1776
|
description: invalid request
|
647
1777
|
content:
|
@@ -649,35 +1779,25 @@ paths:
|
|
649
1779
|
examples:
|
650
1780
|
Example:
|
651
1781
|
value:
|
652
|
-
error:
|
1782
|
+
error: Name can't be blank, Locale can't be blank, and Location
|
1783
|
+
is not included in the list
|
653
1784
|
errors:
|
654
|
-
|
1785
|
+
name:
|
655
1786
|
- can't be blank
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
examples:
|
661
|
-
Example:
|
662
|
-
value:
|
663
|
-
error: The resource you were looking for could not be found.
|
664
|
-
'401':
|
665
|
-
description: Authentication Failed
|
666
|
-
content:
|
667
|
-
application/vnd.api+json:
|
668
|
-
examples:
|
669
|
-
Example:
|
670
|
-
value:
|
671
|
-
error: The access token is invalid
|
1787
|
+
locale:
|
1788
|
+
- can't be blank
|
1789
|
+
location:
|
1790
|
+
- is not included in the list
|
672
1791
|
requestBody:
|
673
1792
|
content:
|
674
1793
|
application/json:
|
675
1794
|
schema:
|
676
|
-
"$ref": "#/components/schemas/
|
677
|
-
|
678
|
-
|
1795
|
+
"$ref": "#/components/schemas/menus_params"
|
1796
|
+
"/api/v2/platform/menus/{id}":
|
1797
|
+
get:
|
1798
|
+
summary: Returns a Menu
|
679
1799
|
tags:
|
680
|
-
-
|
1800
|
+
- Menus
|
681
1801
|
security:
|
682
1802
|
- bearer_auth: []
|
683
1803
|
parameters:
|
@@ -686,9 +1806,35 @@ paths:
|
|
686
1806
|
required: true
|
687
1807
|
schema:
|
688
1808
|
type: string
|
1809
|
+
- name: include
|
1810
|
+
in: query
|
1811
|
+
description: 'Select which associated resources you would like to fetch, see:
|
1812
|
+
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
1813
|
+
example: menu_items
|
1814
|
+
schema:
|
1815
|
+
type: string
|
689
1816
|
responses:
|
690
|
-
'
|
691
|
-
description: Record
|
1817
|
+
'200':
|
1818
|
+
description: Record found
|
1819
|
+
content:
|
1820
|
+
application/vnd.api+json:
|
1821
|
+
examples:
|
1822
|
+
Example:
|
1823
|
+
value:
|
1824
|
+
data:
|
1825
|
+
id: '1'
|
1826
|
+
type: menu
|
1827
|
+
attributes:
|
1828
|
+
name: Main Menu
|
1829
|
+
location: header
|
1830
|
+
locale: en
|
1831
|
+
created_at: '2021-08-23T21:28:24.622Z'
|
1832
|
+
updated_at: '2021-08-23T21:28:24.625Z'
|
1833
|
+
relationships:
|
1834
|
+
menu_items:
|
1835
|
+
data:
|
1836
|
+
- id: '1'
|
1837
|
+
type: menu_item
|
692
1838
|
'404':
|
693
1839
|
description: Record not found
|
694
1840
|
content:
|
@@ -705,11 +1851,10 @@ paths:
|
|
705
1851
|
Example:
|
706
1852
|
value:
|
707
1853
|
error: The access token is invalid
|
708
|
-
"/api/v2/platform/classifications/{id}/reposition":
|
709
1854
|
put:
|
710
|
-
summary:
|
1855
|
+
summary: Updates a Menu
|
711
1856
|
tags:
|
712
|
-
-
|
1857
|
+
- Menus
|
713
1858
|
security:
|
714
1859
|
- bearer_auth: []
|
715
1860
|
parameters:
|
@@ -722,7 +1867,7 @@ paths:
|
|
722
1867
|
in: query
|
723
1868
|
description: 'Select which associated resources you would like to fetch, see:
|
724
1869
|
<a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
|
725
|
-
example:
|
1870
|
+
example: menu_items
|
726
1871
|
schema:
|
727
1872
|
type: string
|
728
1873
|
responses:
|
@@ -735,20 +1880,18 @@ paths:
|
|
735
1880
|
value:
|
736
1881
|
data:
|
737
1882
|
id: '1'
|
738
|
-
type:
|
1883
|
+
type: menu
|
739
1884
|
attributes:
|
740
|
-
|
741
|
-
|
742
|
-
|
1885
|
+
name: Main Menu
|
1886
|
+
location: header
|
1887
|
+
locale: en
|
1888
|
+
created_at: '2021-08-23T21:28:24.664Z'
|
1889
|
+
updated_at: '2021-08-23T21:28:24.667Z'
|
743
1890
|
relationships:
|
744
|
-
|
745
|
-
data:
|
746
|
-
id: '1'
|
747
|
-
type: product
|
748
|
-
taxon:
|
1891
|
+
menu_items:
|
749
1892
|
data:
|
750
|
-
|
751
|
-
type:
|
1893
|
+
- id: '1'
|
1894
|
+
type: menu_item
|
752
1895
|
'422':
|
753
1896
|
description: invalid request
|
754
1897
|
content:
|
@@ -756,8 +1899,15 @@ paths:
|
|
756
1899
|
examples:
|
757
1900
|
Example:
|
758
1901
|
value:
|
759
|
-
error:
|
760
|
-
|
1902
|
+
error: Name can't be blank, Locale can't be blank, and Location
|
1903
|
+
is not included in the list
|
1904
|
+
errors:
|
1905
|
+
name:
|
1906
|
+
- can't be blank
|
1907
|
+
locale:
|
1908
|
+
- can't be blank
|
1909
|
+
location:
|
1910
|
+
- is not included in the list
|
761
1911
|
'404':
|
762
1912
|
description: Record not found
|
763
1913
|
content:
|
@@ -778,91 +1928,11 @@ paths:
|
|
778
1928
|
content:
|
779
1929
|
application/json:
|
780
1930
|
schema:
|
781
|
-
"$ref": "#/components/schemas/
|
782
|
-
|
783
|
-
|
784
|
-
summary: Returns a list of Countries
|
785
|
-
tags:
|
786
|
-
- Countries
|
787
|
-
security:
|
788
|
-
- bearer_auth: []
|
789
|
-
responses:
|
790
|
-
'200':
|
791
|
-
description: Records returned
|
792
|
-
content:
|
793
|
-
application/vnd.api+json:
|
794
|
-
examples:
|
795
|
-
Example:
|
796
|
-
value:
|
797
|
-
data:
|
798
|
-
- id: '1'
|
799
|
-
type: country
|
800
|
-
attributes:
|
801
|
-
iso_name: UNITED STATES
|
802
|
-
iso: US
|
803
|
-
iso3: IS34
|
804
|
-
name: United States of America
|
805
|
-
numcode: 840
|
806
|
-
states_required: true
|
807
|
-
updated_at: '2021-08-20T11:02:29.220Z'
|
808
|
-
zipcode_required: true
|
809
|
-
created_at: '2021-08-20T11:02:29.220Z'
|
810
|
-
relationships:
|
811
|
-
states:
|
812
|
-
data: []
|
813
|
-
- id: '2'
|
814
|
-
type: country
|
815
|
-
attributes:
|
816
|
-
iso_name: ISO_NAME_2
|
817
|
-
iso: I2
|
818
|
-
iso3: IS35
|
819
|
-
name: NAME_2
|
820
|
-
numcode: 840
|
821
|
-
states_required: false
|
822
|
-
updated_at: '2021-08-20T11:02:29.229Z'
|
823
|
-
zipcode_required: true
|
824
|
-
created_at: '2021-08-20T11:02:29.229Z'
|
825
|
-
relationships:
|
826
|
-
states:
|
827
|
-
data: []
|
828
|
-
- id: '3'
|
829
|
-
type: country
|
830
|
-
attributes:
|
831
|
-
iso_name: ISO_NAME_3
|
832
|
-
iso: I3
|
833
|
-
iso3: IS36
|
834
|
-
name: NAME_3
|
835
|
-
numcode: 840
|
836
|
-
states_required: false
|
837
|
-
updated_at: '2021-08-20T11:02:29.231Z'
|
838
|
-
zipcode_required: true
|
839
|
-
created_at: '2021-08-20T11:02:29.231Z'
|
840
|
-
relationships:
|
841
|
-
states:
|
842
|
-
data: []
|
843
|
-
meta:
|
844
|
-
count: 3
|
845
|
-
total_count: 3
|
846
|
-
total_pages: 1
|
847
|
-
links:
|
848
|
-
self: http://www.example.com/api/v2/platform/countries
|
849
|
-
next: http://www.example.com/api/v2/platform/countries?page=1
|
850
|
-
prev: http://www.example.com/api/v2/platform/countries?page=1
|
851
|
-
last: http://www.example.com/api/v2/platform/countries?page=1
|
852
|
-
first: http://www.example.com/api/v2/platform/countries?page=1
|
853
|
-
'401':
|
854
|
-
description: Authentication Failed
|
855
|
-
content:
|
856
|
-
application/vnd.api+json:
|
857
|
-
examples:
|
858
|
-
Example:
|
859
|
-
value:
|
860
|
-
error: The access token is invalid
|
861
|
-
"/api/v2/platform/countries/{id}":
|
862
|
-
get:
|
863
|
-
summary: Returns a Country
|
1931
|
+
"$ref": "#/components/schemas/menus_params"
|
1932
|
+
delete:
|
1933
|
+
summary: Deletes a Menu
|
864
1934
|
tags:
|
865
|
-
-
|
1935
|
+
- Menus
|
866
1936
|
security:
|
867
1937
|
- bearer_auth: []
|
868
1938
|
parameters:
|
@@ -872,29 +1942,8 @@ paths:
|
|
872
1942
|
schema:
|
873
1943
|
type: string
|
874
1944
|
responses:
|
875
|
-
'
|
876
|
-
description: Record
|
877
|
-
content:
|
878
|
-
application/vnd.api+json:
|
879
|
-
examples:
|
880
|
-
Example:
|
881
|
-
value:
|
882
|
-
data:
|
883
|
-
id: '2'
|
884
|
-
type: country
|
885
|
-
attributes:
|
886
|
-
iso_name: ISO_NAME_6
|
887
|
-
iso: I6
|
888
|
-
iso3: IS41
|
889
|
-
name: NAME_6
|
890
|
-
numcode: 840
|
891
|
-
states_required: false
|
892
|
-
updated_at: '2021-08-20T11:02:29.297Z'
|
893
|
-
zipcode_required: true
|
894
|
-
created_at: '2021-08-20T11:02:29.297Z'
|
895
|
-
relationships:
|
896
|
-
states:
|
897
|
-
data: []
|
1945
|
+
'204':
|
1946
|
+
description: Record deleted
|
898
1947
|
'404':
|
899
1948
|
description: Record not found
|
900
1949
|
content:
|
@@ -957,8 +2006,8 @@ paths:
|
|
957
2006
|
name: foo-size-1
|
958
2007
|
presentation: Size
|
959
2008
|
position: 1
|
960
|
-
created_at: '2021-08-
|
961
|
-
updated_at: '2021-08-
|
2009
|
+
created_at: '2021-08-23T21:28:24.774Z'
|
2010
|
+
updated_at: '2021-08-23T21:28:24.774Z'
|
962
2011
|
filterable: true
|
963
2012
|
relationships:
|
964
2013
|
option_values:
|
@@ -969,8 +2018,8 @@ paths:
|
|
969
2018
|
name: foo-size-2
|
970
2019
|
presentation: Size
|
971
2020
|
position: 2
|
972
|
-
created_at: '2021-08-
|
973
|
-
updated_at: '2021-08-
|
2021
|
+
created_at: '2021-08-23T21:28:24.775Z'
|
2022
|
+
updated_at: '2021-08-23T21:28:24.775Z'
|
974
2023
|
filterable: true
|
975
2024
|
relationships:
|
976
2025
|
option_values:
|
@@ -1022,8 +2071,8 @@ paths:
|
|
1022
2071
|
name: foo-size-5
|
1023
2072
|
presentation: Size
|
1024
2073
|
position: 1
|
1025
|
-
created_at: '2021-08-
|
1026
|
-
updated_at: '2021-08-
|
2074
|
+
created_at: '2021-08-23T21:28:24.807Z'
|
2075
|
+
updated_at: '2021-08-23T21:28:24.807Z'
|
1027
2076
|
filterable: true
|
1028
2077
|
relationships:
|
1029
2078
|
option_values:
|
@@ -1045,7 +2094,7 @@ paths:
|
|
1045
2094
|
content:
|
1046
2095
|
application/json:
|
1047
2096
|
schema:
|
1048
|
-
"$ref": "#/components/schemas/
|
2097
|
+
"$ref": "#/components/schemas/option_types_params"
|
1049
2098
|
"/api/v2/platform/option_types/{id}":
|
1050
2099
|
get:
|
1051
2100
|
summary: Returns an OptionType
|
@@ -1081,8 +2130,8 @@ paths:
|
|
1081
2130
|
name: foo-size-6
|
1082
2131
|
presentation: Size
|
1083
2132
|
position: 1
|
1084
|
-
created_at: '2021-08-
|
1085
|
-
updated_at: '2021-08-
|
2133
|
+
created_at: '2021-08-23T21:28:24.829Z'
|
2134
|
+
updated_at: '2021-08-23T21:28:24.829Z'
|
1086
2135
|
filterable: true
|
1087
2136
|
relationships:
|
1088
2137
|
option_values:
|
@@ -1137,8 +2186,8 @@ paths:
|
|
1137
2186
|
name: Size-X
|
1138
2187
|
presentation: Size
|
1139
2188
|
position: 1
|
1140
|
-
created_at: '2021-08-
|
1141
|
-
updated_at: '2021-08-
|
2189
|
+
created_at: '2021-08-23T21:28:24.867Z'
|
2190
|
+
updated_at: '2021-08-23T21:28:24.871Z'
|
1142
2191
|
filterable: true
|
1143
2192
|
relationships:
|
1144
2193
|
option_values:
|
@@ -1174,7 +2223,7 @@ paths:
|
|
1174
2223
|
content:
|
1175
2224
|
application/json:
|
1176
2225
|
schema:
|
1177
|
-
"$ref": "#/components/schemas/
|
2226
|
+
"$ref": "#/components/schemas/option_types_params"
|
1178
2227
|
delete:
|
1179
2228
|
summary: Deletes an OptionType
|
1180
2229
|
tags:
|
@@ -1252,8 +2301,8 @@ paths:
|
|
1252
2301
|
position: 1
|
1253
2302
|
name: Size-1
|
1254
2303
|
presentation: S
|
1255
|
-
created_at: '2021-08-
|
1256
|
-
updated_at: '2021-08-
|
2304
|
+
created_at: '2021-08-23T21:28:24.950Z'
|
2305
|
+
updated_at: '2021-08-23T21:28:24.950Z'
|
1257
2306
|
relationships:
|
1258
2307
|
option_type:
|
1259
2308
|
data:
|
@@ -1265,8 +2314,8 @@ paths:
|
|
1265
2314
|
position: 1
|
1266
2315
|
name: Size-2
|
1267
2316
|
presentation: S
|
1268
|
-
created_at: '2021-08-
|
1269
|
-
updated_at: '2021-08-
|
2317
|
+
created_at: '2021-08-23T21:28:24.952Z'
|
2318
|
+
updated_at: '2021-08-23T21:28:24.952Z'
|
1270
2319
|
relationships:
|
1271
2320
|
option_type:
|
1272
2321
|
data:
|
@@ -1319,8 +2368,8 @@ paths:
|
|
1319
2368
|
position: 1
|
1320
2369
|
name: Size-5
|
1321
2370
|
presentation: S
|
1322
|
-
created_at: '2021-08-
|
1323
|
-
updated_at: '2021-08-
|
2371
|
+
created_at: '2021-08-23T21:28:24.988Z'
|
2372
|
+
updated_at: '2021-08-23T21:28:24.988Z'
|
1324
2373
|
relationships:
|
1325
2374
|
option_type:
|
1326
2375
|
data:
|
@@ -1341,7 +2390,7 @@ paths:
|
|
1341
2390
|
content:
|
1342
2391
|
application/json:
|
1343
2392
|
schema:
|
1344
|
-
"$ref": "#/components/schemas/
|
2393
|
+
"$ref": "#/components/schemas/option_values_params"
|
1345
2394
|
"/api/v2/platform/option_values/{id}":
|
1346
2395
|
get:
|
1347
2396
|
summary: Returns an OptionValue
|
@@ -1377,8 +2426,8 @@ paths:
|
|
1377
2426
|
position: 1
|
1378
2427
|
name: Size-6
|
1379
2428
|
presentation: S
|
1380
|
-
created_at: '2021-08-
|
1381
|
-
updated_at: '2021-08-
|
2429
|
+
created_at: '2021-08-23T21:28:25.015Z'
|
2430
|
+
updated_at: '2021-08-23T21:28:25.015Z'
|
1382
2431
|
relationships:
|
1383
2432
|
option_type:
|
1384
2433
|
data:
|
@@ -1434,8 +2483,8 @@ paths:
|
|
1434
2483
|
position: 1
|
1435
2484
|
name: M
|
1436
2485
|
presentation: S
|
1437
|
-
created_at: '2021-08-
|
1438
|
-
updated_at: '2021-08-
|
2486
|
+
created_at: '2021-08-23T21:28:25.052Z'
|
2487
|
+
updated_at: '2021-08-23T21:28:25.056Z'
|
1439
2488
|
relationships:
|
1440
2489
|
option_type:
|
1441
2490
|
data:
|
@@ -1472,7 +2521,7 @@ paths:
|
|
1472
2521
|
content:
|
1473
2522
|
application/json:
|
1474
2523
|
schema:
|
1475
|
-
"$ref": "#/components/schemas/
|
2524
|
+
"$ref": "#/components/schemas/option_values_params"
|
1476
2525
|
delete:
|
1477
2526
|
summary: Deletes an OptionValue
|
1478
2527
|
tags:
|
@@ -1553,8 +2602,8 @@ paths:
|
|
1553
2602
|
lft: 1
|
1554
2603
|
rgt: 6
|
1555
2604
|
description:
|
1556
|
-
created_at: '2021-08-
|
1557
|
-
updated_at: '2021-08-
|
2605
|
+
created_at: '2021-08-23T21:28:25.145Z'
|
2606
|
+
updated_at: '2021-08-23T21:28:25.172Z'
|
1558
2607
|
meta_title:
|
1559
2608
|
meta_description:
|
1560
2609
|
meta_keywords:
|
@@ -1588,8 +2637,8 @@ paths:
|
|
1588
2637
|
lft: 2
|
1589
2638
|
rgt: 3
|
1590
2639
|
description:
|
1591
|
-
created_at: '2021-08-
|
1592
|
-
updated_at: '2021-08-
|
2640
|
+
created_at: '2021-08-23T21:28:25.156Z'
|
2641
|
+
updated_at: '2021-08-23T21:28:25.157Z'
|
1593
2642
|
meta_title:
|
1594
2643
|
meta_description:
|
1595
2644
|
meta_keywords:
|
@@ -1623,8 +2672,8 @@ paths:
|
|
1623
2672
|
lft: 4
|
1624
2673
|
rgt: 5
|
1625
2674
|
description:
|
1626
|
-
created_at: '2021-08-
|
1627
|
-
updated_at: '2021-08-
|
2675
|
+
created_at: '2021-08-23T21:28:25.167Z'
|
2676
|
+
updated_at: '2021-08-23T21:28:25.168Z'
|
1628
2677
|
meta_title:
|
1629
2678
|
meta_description:
|
1630
2679
|
meta_keywords:
|
@@ -1699,8 +2748,8 @@ paths:
|
|
1699
2748
|
lft: 2
|
1700
2749
|
rgt: 3
|
1701
2750
|
description:
|
1702
|
-
created_at: '2021-08-
|
1703
|
-
updated_at: '2021-08-
|
2751
|
+
created_at: '2021-08-23T21:28:25.251Z'
|
2752
|
+
updated_at: '2021-08-23T21:28:25.254Z'
|
1704
2753
|
meta_title:
|
1705
2754
|
meta_description:
|
1706
2755
|
meta_keywords:
|
@@ -1740,7 +2789,7 @@ paths:
|
|
1740
2789
|
content:
|
1741
2790
|
application/json:
|
1742
2791
|
schema:
|
1743
|
-
"$ref": "#/components/schemas/
|
2792
|
+
"$ref": "#/components/schemas/taxons_params"
|
1744
2793
|
"/api/v2/platform/taxons/{id}":
|
1745
2794
|
get:
|
1746
2795
|
summary: Returns a Taxon
|
@@ -1779,8 +2828,8 @@ paths:
|
|
1779
2828
|
lft: 2
|
1780
2829
|
rgt: 3
|
1781
2830
|
description:
|
1782
|
-
created_at: '2021-08-
|
1783
|
-
updated_at: '2021-08-
|
2831
|
+
created_at: '2021-08-23T21:28:25.291Z'
|
2832
|
+
updated_at: '2021-08-23T21:28:25.293Z'
|
1784
2833
|
meta_title:
|
1785
2834
|
meta_description:
|
1786
2835
|
meta_keywords:
|
@@ -1860,8 +2909,8 @@ paths:
|
|
1860
2909
|
lft: 2
|
1861
2910
|
rgt: 3
|
1862
2911
|
description:
|
1863
|
-
created_at: '2021-08-
|
1864
|
-
updated_at: '2021-08-
|
2912
|
+
created_at: '2021-08-23T21:28:25.371Z'
|
2913
|
+
updated_at: '2021-08-23T21:28:25.383Z'
|
1865
2914
|
meta_title:
|
1866
2915
|
meta_description:
|
1867
2916
|
meta_keywords:
|
@@ -1917,7 +2966,7 @@ paths:
|
|
1917
2966
|
content:
|
1918
2967
|
application/json:
|
1919
2968
|
schema:
|
1920
|
-
"$ref": "#/components/schemas/
|
2969
|
+
"$ref": "#/components/schemas/taxons_params"
|
1921
2970
|
delete:
|
1922
2971
|
summary: Deletes a Taxon
|
1923
2972
|
tags:
|
@@ -1992,9 +3041,9 @@ paths:
|
|
1992
3041
|
- id: '1'
|
1993
3042
|
type: user
|
1994
3043
|
attributes:
|
1995
|
-
email:
|
1996
|
-
created_at: '2021-08-
|
1997
|
-
updated_at: '2021-08-
|
3044
|
+
email: vernetta@huels.co.uk
|
3045
|
+
created_at: '2021-08-23T21:28:25.546Z'
|
3046
|
+
updated_at: '2021-08-23T21:28:25.546Z'
|
1998
3047
|
average_order_value: []
|
1999
3048
|
lifetime_value: []
|
2000
3049
|
store_credits: []
|
@@ -2006,9 +3055,9 @@ paths:
|
|
2006
3055
|
- id: '2'
|
2007
3056
|
type: user
|
2008
3057
|
attributes:
|
2009
|
-
email:
|
2010
|
-
created_at: '2021-08-
|
2011
|
-
updated_at: '2021-08-
|
3058
|
+
email: pansy_hirthe@smitham.us
|
3059
|
+
created_at: '2021-08-23T21:28:25.549Z'
|
3060
|
+
updated_at: '2021-08-23T21:28:25.549Z'
|
2012
3061
|
average_order_value: []
|
2013
3062
|
lifetime_value: []
|
2014
3063
|
store_credits: []
|
@@ -2020,9 +3069,9 @@ paths:
|
|
2020
3069
|
- id: '3'
|
2021
3070
|
type: user
|
2022
3071
|
attributes:
|
2023
|
-
email:
|
2024
|
-
created_at: '2021-08-
|
2025
|
-
updated_at: '2021-08-
|
3072
|
+
email: carmen.kerluke@kossschulist.com
|
3073
|
+
created_at: '2021-08-23T21:28:25.550Z'
|
3074
|
+
updated_at: '2021-08-23T21:28:25.550Z'
|
2026
3075
|
average_order_value: []
|
2027
3076
|
lifetime_value: []
|
2028
3077
|
store_credits: []
|
@@ -2075,9 +3124,9 @@ paths:
|
|
2075
3124
|
id: '2'
|
2076
3125
|
type: user
|
2077
3126
|
attributes:
|
2078
|
-
email:
|
2079
|
-
created_at: '2021-08-
|
2080
|
-
updated_at: '2021-08-
|
3127
|
+
email: marx_feil@borer.info
|
3128
|
+
created_at: '2021-08-23T21:28:25.597Z'
|
3129
|
+
updated_at: '2021-08-23T21:28:25.597Z'
|
2081
3130
|
average_order_value: []
|
2082
3131
|
lifetime_value: []
|
2083
3132
|
store_credits: []
|
@@ -2101,7 +3150,7 @@ paths:
|
|
2101
3150
|
content:
|
2102
3151
|
application/json:
|
2103
3152
|
schema:
|
2104
|
-
"$ref": "#/components/schemas/
|
3153
|
+
"$ref": "#/components/schemas/users_params"
|
2105
3154
|
"/api/v2/platform/users/{id}":
|
2106
3155
|
get:
|
2107
3156
|
summary: Returns an User
|
@@ -2134,9 +3183,9 @@ paths:
|
|
2134
3183
|
id: '2'
|
2135
3184
|
type: user
|
2136
3185
|
attributes:
|
2137
|
-
email:
|
2138
|
-
created_at: '2021-08-
|
2139
|
-
updated_at: '2021-08-
|
3186
|
+
email: stefany@leannon.biz
|
3187
|
+
created_at: '2021-08-23T21:28:25.626Z'
|
3188
|
+
updated_at: '2021-08-23T21:28:25.626Z'
|
2140
3189
|
average_order_value: []
|
2141
3190
|
lifetime_value: []
|
2142
3191
|
store_credits: []
|
@@ -2193,8 +3242,8 @@ paths:
|
|
2193
3242
|
type: user
|
2194
3243
|
attributes:
|
2195
3244
|
email: john@example.com
|
2196
|
-
created_at: '2021-08-
|
2197
|
-
updated_at: '2021-08-
|
3245
|
+
created_at: '2021-08-23T21:28:25.669Z'
|
3246
|
+
updated_at: '2021-08-23T21:28:25.673Z'
|
2198
3247
|
average_order_value: []
|
2199
3248
|
lifetime_value: []
|
2200
3249
|
store_credits: []
|
@@ -2234,7 +3283,7 @@ paths:
|
|
2234
3283
|
content:
|
2235
3284
|
application/json:
|
2236
3285
|
schema:
|
2237
|
-
"$ref": "#/components/schemas/
|
3286
|
+
"$ref": "#/components/schemas/users_params"
|
2238
3287
|
delete:
|
2239
3288
|
summary: Deletes an User
|
2240
3289
|
tags:
|
@@ -2419,6 +3468,49 @@ components:
|
|
2419
3468
|
required:
|
2420
3469
|
- name
|
2421
3470
|
- taxonomy_id
|
3471
|
+
menu_params:
|
3472
|
+
type: object
|
3473
|
+
properties:
|
3474
|
+
name:
|
3475
|
+
type: string
|
3476
|
+
location:
|
3477
|
+
type: string
|
3478
|
+
locale:
|
3479
|
+
type: string
|
3480
|
+
required:
|
3481
|
+
- name
|
3482
|
+
- location
|
3483
|
+
- locale
|
3484
|
+
menu_item_params:
|
3485
|
+
type: object
|
3486
|
+
properties:
|
3487
|
+
name:
|
3488
|
+
type: string
|
3489
|
+
code:
|
3490
|
+
type: string
|
3491
|
+
subtitle:
|
3492
|
+
type: string
|
3493
|
+
destination:
|
3494
|
+
type: string
|
3495
|
+
new_window:
|
3496
|
+
type: boolean
|
3497
|
+
item_type:
|
3498
|
+
type: string
|
3499
|
+
linked_resource_type:
|
3500
|
+
type: string
|
3501
|
+
linked_resource_id:
|
3502
|
+
type: integer
|
3503
|
+
required:
|
3504
|
+
- name
|
3505
|
+
menu_item_reposition_params:
|
3506
|
+
type: object
|
3507
|
+
properties:
|
3508
|
+
new_parent_id:
|
3509
|
+
type: integer
|
3510
|
+
new_position_idx:
|
3511
|
+
type: integer
|
3512
|
+
required:
|
3513
|
+
- name
|
2422
3514
|
resources_list:
|
2423
3515
|
type: object
|
2424
3516
|
properties:
|