spree_api 4.3.0.rc1 → 4.3.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 381bcae626a5cfcc30444d47853c1bc26063befbc5c18db328276d8c1998c309
4
- data.tar.gz: 01fc310be446eff60debb73a6da32a1b4e548dcd2ec7e7fca562ef7fada5a248
3
+ metadata.gz: 48615e27a8581045bc1b9839021d0d247059463a110a8edae568d697b615c6fa
4
+ data.tar.gz: 4f68efa95ca9540d8bdd18d34889d37b25a210c4867035ac09e2eda66643459b
5
5
  SHA512:
6
- metadata.gz: 03c6087202462b6ff19e3cc1b081a175e3db9273ce486b321c27aa44e4ae82a57c9b73b24894f788c1335584e0cfcf7b94733844f3875d8f4ff67be59ba04acb
7
- data.tar.gz: 24ae9980e17d37c7963cdbd7fb1e9ab6a02ef099e7763b83bf8276d9ea8e296ee49e4a3b4c42587a3b02010151f450478c0c376f6c835f8db4e6536fbc33d0fa
6
+ metadata.gz: a859373d202ea8f1ad70c30a9fcc48ed8d89a62bcbaab5d77844a5128dff9a674fb219ed5e523676be47317c259fbab13ba16a4fcfdd2742c6a81247a5ca0097
7
+ data.tar.gz: 54e262a305a30977dc426ef8fe1462634214c3e2f4e566182559d8cc54fc79b23fd9ec78f7ece0655a7d77703d879266e2572789071d093b53f401254960b7dd
@@ -0,0 +1,33 @@
1
+ module Spree
2
+ module Api
3
+ module V2
4
+ module Caching
5
+ extend ActiveSupport::Concern
6
+
7
+ def collection_cache_key(collection)
8
+ unscoped_collection = collection.unscope(:includes).unscope(:order)
9
+ cache_key_parts = [
10
+ self.class.to_s,
11
+ unscoped_collection.maximum(:updated_at),
12
+ unscoped_collection.ids,
13
+ resource_includes,
14
+ sparse_fields,
15
+ serializer_params,
16
+ params[:sort]&.strip,
17
+ params[:page]&.strip,
18
+ params[:per_page]&.strip,
19
+ ].flatten.join('-')
20
+
21
+ Digest::MD5.hexdigest(cache_key_parts)
22
+ end
23
+
24
+ def collection_cache_opts
25
+ {
26
+ namespace: Spree::Api::Config[:api_v2_collection_cache_namespace],
27
+ expires_in: Spree::Api::Config[:api_v2_collection_cache_ttl],
28
+ }
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -14,6 +14,18 @@ module Spree
14
14
  def scope_includes
15
15
  product_list_includes
16
16
  end
17
+
18
+ def allowed_sort_attributes
19
+ super << :available_on
20
+ end
21
+
22
+ def sorted_collection
23
+ collection_sorter.new(collection, current_currency, params, allowed_sort_attributes).call
24
+ end
25
+
26
+ def collection_sorter
27
+ Spree::Api::Dependencies.platform_products_sorter.constantize
28
+ end
17
29
  end
18
30
  end
19
31
  end
@@ -3,9 +3,14 @@ module Spree
3
3
  module V2
4
4
  class ResourceController < ::Spree::Api::V2::BaseController
5
5
  include Spree::Api::V2::CollectionOptionsHelpers
6
+ include Spree::Api::V2::Caching
6
7
 
7
8
  def index
8
- render_serialized_payload { serialize_collection(paginated_collection) }
9
+ render_serialized_payload do
10
+ Rails.cache.fetch(collection_cache_key(paginated_collection), collection_cache_opts) do
11
+ serialize_collection(paginated_collection)
12
+ end
13
+ end
9
14
  end
10
15
 
11
16
  def show
@@ -38,6 +38,10 @@ module Spree
38
38
  def resource_finder
39
39
  Spree::Api::Dependencies.storefront_completed_order_finder.constantize
40
40
  end
41
+
42
+ def model_class
43
+ Spree::Order
44
+ end
41
45
  end
42
46
  end
43
47
  end
@@ -42,6 +42,10 @@ module Spree
42
42
  def scope_includes
43
43
  product_list_includes
44
44
  end
45
+
46
+ def allowed_sort_attributes
47
+ super << :available_on
48
+ end
45
49
  end
46
50
  end
47
51
  end
@@ -1,8 +1,10 @@
1
1
  module Spree
2
2
  class ApiConfiguration < Preferences::Configuration
3
3
  preference :requires_authentication, :boolean, default: true
4
- preference :api_v2_cache_ttl, :integer, default: 3600 # 1 hour in seconds
4
+ preference :api_v2_serializers_cache_ttl, :integer, default: 3600 # 1 hour in seconds
5
+ preference :api_v2_collection_cache_ttl, :integer, default: 3600 # 1 hour in seconds
6
+ preference :api_v2_collection_cache_namespace, :string, default: 'api_v2_collection_cache'
5
7
  preference :api_v2_content_type, :string, default: 'application/vnd.api+json'
6
- preference :api_v2_per_page_limit, :integer, default: 100
8
+ preference :api_v2_per_page_limit, :integer, default: 500
7
9
  end
8
10
  end
@@ -19,7 +19,7 @@ module Spree
19
19
  :storefront_store_serializer, :storefront_address_serializer, :storefront_order_serializer,
20
20
  :storefront_account_create_address_service, :storefront_account_update_address_service, :storefront_address_finder,
21
21
  :storefront_account_create_service, :storefront_account_update_service, :storefront_collection_sorter, :error_handler,
22
- :storefront_cart_empty_service, :storefront_cart_destroy_service, :storefront_credit_cards_destroy_service
22
+ :storefront_cart_empty_service, :storefront_cart_destroy_service, :storefront_credit_cards_destroy_service, :platform_products_sorter
23
23
  ].freeze
24
24
 
25
25
  attr_accessor *INJECTION_POINTS
@@ -85,6 +85,7 @@ module Spree
85
85
  @storefront_collection_sorter = Spree::Dependencies.collection_sorter
86
86
  @storefront_order_sorter = Spree::Dependencies.collection_sorter
87
87
  @storefront_products_sorter = Spree::Dependencies.products_sorter
88
+ @platform_products_sorter = Spree::Dependencies.products_sorter
88
89
 
89
90
  # paginators
90
91
  @storefront_collection_paginator = Spree::Dependencies.collection_paginator
@@ -7,7 +7,7 @@ module Spree
7
7
  # to learn more about caching, please refer to:
8
8
  # https://github.com/jsonapi-serializer/jsonapi-serializer#caching
9
9
  # https://guides.rubyonrails.org/caching_with_rails.html#low-level-caching
10
- cache_options(store: Rails.cache, namespace: 'jsonapi-serializer', expires_in: Spree::Api::Config[:api_v2_cache_ttl])
10
+ cache_options(store: Rails.cache, namespace: 'jsonapi-serializer', expires_in: Spree::Api::Config[:api_v2_serializers_cache_ttl])
11
11
 
12
12
  def self.record_cache_options(options, fieldset, include_list, params)
13
13
  opts = options.dup
@@ -13,8 +13,13 @@ module Spree
13
13
 
14
14
  belongs_to :menu, serializer: :menu
15
15
  belongs_to :parent, record_type: :menu_item, serializer: :menu_item
16
- belongs_to :linked_resource, polymorphic: true
17
- has_many :children, record_type: :menu_item, serializer: :menu_item
16
+ belongs_to :linked_resource, polymorphic: {
17
+ Spree::Cms::Pages::StandardPage => :cms_page,
18
+ Spree::Cms::Pages::FeaturePage => :cms_page,
19
+ Spree::Cms::Pages::Homepage => :cms_page
20
+ }
21
+
22
+ has_many :children, record_type: :menu_item, serializer: :menu_item
18
23
  end
19
24
  end
20
25
  end
@@ -44,22 +44,22 @@ module Spree
44
44
 
45
45
  belongs_to :tax_category
46
46
 
47
- has_one :master_variant,
48
- object_method_name: :master,
49
- id_method_name: :master_id,
50
- record_type: :variant,
51
- serializer: :variant
47
+ has_one :primary_variant,
48
+ object_method_name: :master,
49
+ id_method_name: :master_id,
50
+ record_type: :variant,
51
+ serializer: :variant
52
52
 
53
- has_one :default_variant,
54
- object_method_name: :default_variant,
55
- id_method_name: :default_variant_id,
56
- record_type: :variant,
57
- serializer: :variant
53
+ has_one :default_variant,
54
+ object_method_name: :default_variant,
55
+ id_method_name: :default_variant_id,
56
+ record_type: :variant,
57
+ serializer: :variant
58
58
 
59
59
  has_many :variants
60
60
  has_many :option_types
61
61
  has_many :product_properties
62
- has_many :taxons do |object, params|
62
+ has_many :taxons, serializer: :taxon, record_type: :taxon do |object, params|
63
63
  object.taxons_for_store(params[:store])
64
64
  end
65
65
 
@@ -7,6 +7,18 @@ module Spree
7
7
 
8
8
  attributes :email, :created_at, :updated_at
9
9
 
10
+ attribute :average_order_value do |user, params|
11
+ price_stats(user.report_values_for(:average_order_value, params[:store]))
12
+ end
13
+
14
+ attribute :lifetime_value do |user, params|
15
+ price_stats(user.report_values_for(:lifetime_value, params[:store]))
16
+ end
17
+
18
+ attribute :store_credits do |user, params|
19
+ price_stats(user.available_store_credits(params[:store]))
20
+ end
21
+
10
22
  has_one :bill_address,
11
23
  record_type: :address,
12
24
  serializer: :address
@@ -14,6 +26,10 @@ module Spree
14
26
  has_one :ship_address,
15
27
  record_type: :address,
16
28
  serializer: :address
29
+
30
+ def self.price_stats(stats)
31
+ stats.map { |value| { currency: value.currency.to_s, amount: value.money.to_s } }
32
+ end
17
33
  end
18
34
  end
19
35
  end
@@ -28,9 +28,15 @@ module Spree
28
28
  record_type: :image,
29
29
  serializer: :image
30
30
 
31
+ belongs_to :menu, serializer: :menu
31
32
  belongs_to :parent, record_type: :menu_item, serializer: :menu_item
32
- belongs_to :linked_resource, polymorphic: true
33
- has_many :children, record_type: :menu_item, serializer: :menu_item
33
+ belongs_to :linked_resource, polymorphic: {
34
+ Spree::Cms::Pages::StandardPage => :cms_page,
35
+ Spree::Cms::Pages::FeaturePage => :cms_page,
36
+ Spree::Cms::Pages::Homepage => :cms_page
37
+ }
38
+
39
+ has_many :children, record_type: :menu_item, serializer: :menu_item
34
40
  end
35
41
  end
36
42
  end
@@ -48,22 +48,28 @@ module Spree
48
48
  has_many :option_types
49
49
  has_many :product_properties
50
50
 
51
- has_many :taxons do |object, params|
51
+ has_many :taxons, serializer: :taxon, record_type: :taxon do |object, params|
52
52
  object.taxons_for_store(params[:store])
53
53
  end
54
54
 
55
55
  # all images from all variants
56
56
  has_many :images,
57
- object_method_name: :variant_images,
58
- id_method_name: :variant_image_ids,
59
- record_type: :image,
60
- serializer: :image
61
-
62
- has_one :default_variant,
63
- object_method_name: :default_variant,
64
- id_method_name: :default_variant_id,
65
- record_type: :variant,
66
- serializer: :variant
57
+ object_method_name: :variant_images,
58
+ id_method_name: :variant_image_ids,
59
+ record_type: :image,
60
+ serializer: :image
61
+
62
+ has_one :default_variant,
63
+ object_method_name: :default_variant,
64
+ id_method_name: :default_variant_id,
65
+ record_type: :variant,
66
+ serializer: :variant
67
+
68
+ has_one :primary_variant,
69
+ object_method_name: :master,
70
+ id_method_name: :master_id,
71
+ record_type: :variant,
72
+ serializer: :variant
67
73
  end
68
74
  end
69
75
  end
@@ -26,7 +26,7 @@ en:
26
26
  cannot_ready: "Cannot ready shipment."
27
27
  stock_location_required: "A stock_location_id parameter must be provided in order to retrieve stock movements."
28
28
  invalid_taxonomy_id: "Invalid taxonomy id."
29
- shipment_transfer_errors_occurred: "Following errors occured while attempting this action:"
29
+ shipment_transfer_errors_occurred: "Following errors occurred while attempting this action:"
30
30
  negative_quantity: "quantity is negative"
31
31
  wrong_shipment_target: "target shipment is the same as original shipment"
32
32
 
data/docs/oauth/index.yml CHANGED
@@ -18,13 +18,13 @@ info:
18
18
  paths:
19
19
  /spree_oauth/token:
20
20
  post:
21
- description: Creates or refreshes a Bearer token required to authorize calls API calls
21
+ description: Creates or refreshes a Bearer token required to authorize API calls
22
22
  tags:
23
23
  - Token
24
24
  operationId: Create or Refresh Token
25
25
  responses:
26
26
  '200':
27
- description: Token was succesfully created or refreshed
27
+ description: Token was successfully created or refreshed
28
28
  content:
29
29
  application/json:
30
30
  schema:
@@ -24,14 +24,14 @@ paths:
24
24
  type: integer
25
25
  - name: include
26
26
  in: query
27
- descripton: 'Select which associated resources you would like to fetch, see:
27
+ description: 'Select which associated resources you would like to fetch, see:
28
28
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
29
29
  example: user,country,state
30
30
  schema:
31
31
  type: string
32
32
  - name: filter
33
33
  in: query
34
- descripton: ''
34
+ description: ''
35
35
  example: user_id_eq=1&firstname_cont=Joh
36
36
  schema:
37
37
  type: string
@@ -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-06T06:53:18.846Z'
61
- updated_at: '2021-08-06T06:53:18.846Z'
60
+ created_at: '2021-08-20T11:02:26.158Z'
61
+ updated_at: '2021-08-20T11:02:26.158Z'
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-06T06:53:18.853Z'
89
- updated_at: '2021-08-06T06:53:18.853Z'
88
+ created_at: '2021-08-20T11:02:26.166Z'
89
+ updated_at: '2021-08-20T11:02:26.166Z'
90
90
  deleted_at:
91
91
  label:
92
92
  relationships:
@@ -127,7 +127,7 @@ paths:
127
127
  parameters:
128
128
  - name: include
129
129
  in: query
130
- descripton: 'Select which associated resources you would like to fetch, see:
130
+ description: 'Select which associated resources you would like to fetch, see:
131
131
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
132
132
  example: user,country,state
133
133
  schema:
@@ -141,7 +141,7 @@ paths:
141
141
  Example:
142
142
  value:
143
143
  data:
144
- id: '5'
144
+ id: '1'
145
145
  type: address
146
146
  attributes:
147
147
  firstname: John
@@ -154,18 +154,18 @@ paths:
154
154
  state_name:
155
155
  alternative_phone: 555-555-0199
156
156
  company: Company
157
- created_at: '2021-08-06T06:53:19.077Z'
158
- updated_at: '2021-08-06T06:53:19.077Z'
157
+ created_at: '2021-08-20T11:02:26.535Z'
158
+ updated_at: '2021-08-20T11:02:26.535Z'
159
159
  deleted_at:
160
160
  label:
161
161
  relationships:
162
162
  country:
163
163
  data:
164
- id: '4'
164
+ id: '2'
165
165
  type: country
166
166
  state:
167
167
  data:
168
- id: '5'
168
+ id: '1'
169
169
  type: state
170
170
  user:
171
171
  data:
@@ -216,7 +216,7 @@ paths:
216
216
  type: string
217
217
  - name: include
218
218
  in: query
219
- descripton: 'Select which associated resources you would like to fetch, see:
219
+ description: 'Select which associated resources you would like to fetch, see:
220
220
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
221
221
  example: user,country,state
222
222
  schema:
@@ -230,7 +230,7 @@ paths:
230
230
  Example:
231
231
  value:
232
232
  data:
233
- id: '6'
233
+ id: '1'
234
234
  type: address
235
235
  attributes:
236
236
  firstname: John
@@ -243,18 +243,18 @@ paths:
243
243
  state_name:
244
244
  alternative_phone: 555-555-0199
245
245
  company: Company
246
- created_at: '2021-08-06T06:53:19.150Z'
247
- updated_at: '2021-08-06T06:53:19.150Z'
246
+ created_at: '2021-08-20T11:02:26.609Z'
247
+ updated_at: '2021-08-20T11:02:26.609Z'
248
248
  deleted_at:
249
249
  label:
250
250
  relationships:
251
251
  country:
252
252
  data:
253
- id: '6'
253
+ id: '1'
254
254
  type: country
255
255
  state:
256
256
  data:
257
- id: '6'
257
+ id: '1'
258
258
  type: state
259
259
  user:
260
260
  data:
@@ -288,7 +288,7 @@ paths:
288
288
  type: string
289
289
  - name: include
290
290
  in: query
291
- descripton: 'Select which associated resources you would like to fetch, see:
291
+ description: 'Select which associated resources you would like to fetch, see:
292
292
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
293
293
  example: user,country,state
294
294
  schema:
@@ -302,7 +302,7 @@ paths:
302
302
  Example:
303
303
  value:
304
304
  data:
305
- id: '8'
305
+ id: '1'
306
306
  type: address
307
307
  attributes:
308
308
  firstname: Jack
@@ -315,18 +315,18 @@ paths:
315
315
  state_name:
316
316
  alternative_phone: 555-555-0199
317
317
  company: Company
318
- created_at: '2021-08-06T06:53:19.236Z'
319
- updated_at: '2021-08-06T06:53:19.247Z'
318
+ created_at: '2021-08-20T11:02:26.706Z'
319
+ updated_at: '2021-08-20T11:02:26.721Z'
320
320
  deleted_at:
321
321
  label:
322
322
  relationships:
323
323
  country:
324
324
  data:
325
- id: '9'
325
+ id: '1'
326
326
  type: country
327
327
  state:
328
328
  data:
329
- id: '8'
329
+ id: '1'
330
330
  type: state
331
331
  user:
332
332
  data:
@@ -415,14 +415,14 @@ paths:
415
415
  type: integer
416
416
  - name: include
417
417
  in: query
418
- descripton: 'Select which associated resources you would like to fetch, see:
418
+ description: 'Select which associated resources you would like to fetch, see:
419
419
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
420
420
  example: product,taxon
421
421
  schema:
422
422
  type: string
423
423
  - name: filter
424
424
  in: query
425
- descripton: ''
425
+ description: ''
426
426
  example: taxon_id_eq=1
427
427
  schema:
428
428
  type: string
@@ -439,8 +439,8 @@ paths:
439
439
  type: classification
440
440
  attributes:
441
441
  position: 1
442
- created_at: '2021-08-06T06:53:19.739Z'
443
- updated_at: '2021-08-06T06:53:19.739Z'
442
+ created_at: '2021-08-20T11:02:27.225Z'
443
+ updated_at: '2021-08-20T11:02:27.225Z'
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-06T06:53:19.836Z'
458
- updated_at: '2021-08-06T06:53:19.836Z'
457
+ created_at: '2021-08-20T11:02:27.336Z'
458
+ updated_at: '2021-08-20T11:02:27.336Z'
459
459
  relationships:
460
460
  product:
461
461
  data:
@@ -492,7 +492,7 @@ paths:
492
492
  parameters:
493
493
  - name: include
494
494
  in: query
495
- descripton: 'Select which associated resources you would like to fetch, see:
495
+ description: 'Select which associated resources you would like to fetch, see:
496
496
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
497
497
  example: product,taxon
498
498
  schema:
@@ -506,20 +506,20 @@ paths:
506
506
  Example:
507
507
  value:
508
508
  data:
509
- id: '5'
509
+ id: '1'
510
510
  type: classification
511
511
  attributes:
512
512
  position: 1
513
- created_at: '2021-08-06T06:53:20.242Z'
514
- updated_at: '2021-08-06T06:53:20.242Z'
513
+ created_at: '2021-08-20T11:02:27.775Z'
514
+ updated_at: '2021-08-20T11:02:27.775Z'
515
515
  relationships:
516
516
  product:
517
517
  data:
518
- id: '5'
518
+ id: '1'
519
519
  type: product
520
520
  taxon:
521
521
  data:
522
- id: '10'
522
+ id: '2'
523
523
  type: taxon
524
524
  '422':
525
525
  description: invalid request
@@ -554,7 +554,7 @@ paths:
554
554
  type: string
555
555
  - name: include
556
556
  in: query
557
- descripton: 'Select which associated resources you would like to fetch, see:
557
+ description: 'Select which associated resources you would like to fetch, see:
558
558
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
559
559
  example: product,taxon
560
560
  schema:
@@ -568,20 +568,20 @@ paths:
568
568
  Example:
569
569
  value:
570
570
  data:
571
- id: '6'
571
+ id: '1'
572
572
  type: classification
573
573
  attributes:
574
574
  position: 1
575
- created_at: '2021-08-06T06:53:20.399Z'
576
- updated_at: '2021-08-06T06:53:20.399Z'
575
+ created_at: '2021-08-20T11:02:27.921Z'
576
+ updated_at: '2021-08-20T11:02:27.921Z'
577
577
  relationships:
578
578
  product:
579
579
  data:
580
- id: '6'
580
+ id: '1'
581
581
  type: product
582
582
  taxon:
583
583
  data:
584
- id: '12'
584
+ id: '2'
585
585
  type: taxon
586
586
  '404':
587
587
  description: Record not found
@@ -613,7 +613,7 @@ paths:
613
613
  type: string
614
614
  - name: include
615
615
  in: query
616
- descripton: 'Select which associated resources you would like to fetch, see:
616
+ description: 'Select which associated resources you would like to fetch, see:
617
617
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
618
618
  example: product,taxon
619
619
  schema:
@@ -627,20 +627,20 @@ paths:
627
627
  Example:
628
628
  value:
629
629
  data:
630
- id: '8'
630
+ id: '1'
631
631
  type: classification
632
632
  attributes:
633
633
  position: 1
634
- created_at: '2021-08-06T06:53:20.705Z'
635
- updated_at: '2021-08-06T06:53:20.705Z'
634
+ created_at: '2021-08-20T11:02:28.202Z'
635
+ updated_at: '2021-08-20T11:02:28.202Z'
636
636
  relationships:
637
637
  product:
638
638
  data:
639
- id: '8'
639
+ id: '1'
640
640
  type: product
641
641
  taxon:
642
642
  data:
643
- id: '16'
643
+ id: '2'
644
644
  type: taxon
645
645
  '422':
646
646
  description: invalid request
@@ -720,7 +720,7 @@ paths:
720
720
  type: string
721
721
  - name: include
722
722
  in: query
723
- descripton: 'Select which associated resources you would like to fetch, see:
723
+ description: 'Select which associated resources you would like to fetch, see:
724
724
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
725
725
  example: product,taxon
726
726
  schema:
@@ -734,20 +734,20 @@ paths:
734
734
  Example:
735
735
  value:
736
736
  data:
737
- id: '13'
737
+ id: '1'
738
738
  type: classification
739
739
  attributes:
740
740
  position: 2
741
- created_at: '2021-08-06T06:53:21.437Z'
742
- updated_at: '2021-08-06T06:53:21.461Z'
741
+ created_at: '2021-08-20T11:02:28.904Z'
742
+ updated_at: '2021-08-20T11:02:28.922Z'
743
743
  relationships:
744
744
  product:
745
745
  data:
746
- id: '13'
746
+ id: '1'
747
747
  type: product
748
748
  taxon:
749
749
  data:
750
- id: '26'
750
+ id: '2'
751
751
  type: taxon
752
752
  '422':
753
753
  description: invalid request
@@ -795,7 +795,7 @@ paths:
795
795
  Example:
796
796
  value:
797
797
  data:
798
- - id: '34'
798
+ - id: '1'
799
799
  type: country
800
800
  attributes:
801
801
  iso_name: UNITED STATES
@@ -804,13 +804,13 @@ paths:
804
804
  name: United States of America
805
805
  numcode: 840
806
806
  states_required: true
807
- updated_at: '2021-08-06T06:53:21.782Z'
807
+ updated_at: '2021-08-20T11:02:29.220Z'
808
808
  zipcode_required: true
809
- created_at: '2021-08-06T06:53:21.782Z'
809
+ created_at: '2021-08-20T11:02:29.220Z'
810
810
  relationships:
811
811
  states:
812
812
  data: []
813
- - id: '35'
813
+ - id: '2'
814
814
  type: country
815
815
  attributes:
816
816
  iso_name: ISO_NAME_2
@@ -819,13 +819,13 @@ paths:
819
819
  name: NAME_2
820
820
  numcode: 840
821
821
  states_required: false
822
- updated_at: '2021-08-06T06:53:21.793Z'
822
+ updated_at: '2021-08-20T11:02:29.229Z'
823
823
  zipcode_required: true
824
- created_at: '2021-08-06T06:53:21.793Z'
824
+ created_at: '2021-08-20T11:02:29.229Z'
825
825
  relationships:
826
826
  states:
827
827
  data: []
828
- - id: '36'
828
+ - id: '3'
829
829
  type: country
830
830
  attributes:
831
831
  iso_name: ISO_NAME_3
@@ -834,9 +834,9 @@ paths:
834
834
  name: NAME_3
835
835
  numcode: 840
836
836
  states_required: false
837
- updated_at: '2021-08-06T06:53:21.796Z'
837
+ updated_at: '2021-08-20T11:02:29.231Z'
838
838
  zipcode_required: true
839
- created_at: '2021-08-06T06:53:21.796Z'
839
+ created_at: '2021-08-20T11:02:29.231Z'
840
840
  relationships:
841
841
  states:
842
842
  data: []
@@ -880,7 +880,7 @@ paths:
880
880
  Example:
881
881
  value:
882
882
  data:
883
- id: '41'
883
+ id: '2'
884
884
  type: country
885
885
  attributes:
886
886
  iso_name: ISO_NAME_6
@@ -889,9 +889,9 @@ paths:
889
889
  name: NAME_6
890
890
  numcode: 840
891
891
  states_required: false
892
- updated_at: '2021-08-06T06:53:21.864Z'
892
+ updated_at: '2021-08-20T11:02:29.297Z'
893
893
  zipcode_required: true
894
- created_at: '2021-08-06T06:53:21.864Z'
894
+ created_at: '2021-08-20T11:02:29.297Z'
895
895
  relationships:
896
896
  states:
897
897
  data: []
@@ -911,11 +911,11 @@ paths:
911
911
  Example:
912
912
  value:
913
913
  error: The access token is invalid
914
- "/api/v2/platform/taxons":
914
+ "/api/v2/platform/option_types":
915
915
  get:
916
- summary: Returns a list of Taxons
916
+ summary: Returns a list of OptionTypes
917
917
  tags:
918
- - Taxons
918
+ - OptionTypes
919
919
  security:
920
920
  - bearer_auth: []
921
921
  parameters:
@@ -931,15 +931,15 @@ paths:
931
931
  type: integer
932
932
  - name: include
933
933
  in: query
934
- descripton: 'Select which associated resources you would like to fetch, see:
934
+ description: 'Select which associated resources you would like to fetch, see:
935
935
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
936
- example: taxonomy,parent,children
936
+ example: ''
937
937
  schema:
938
938
  type: string
939
939
  - name: filter
940
940
  in: query
941
- descripton: ''
942
- example: taxonomy_id_eq=1&name_cont=Shirts
941
+ description: ''
942
+ example: option_type_id_eq=1&name_cont=Size
943
943
  schema:
944
944
  type: string
945
945
  responses:
@@ -951,121 +951,40 @@ paths:
951
951
  Example:
952
952
  value:
953
953
  data:
954
- - id: '32'
955
- type: taxon
954
+ - id: '1'
955
+ type: option_type
956
956
  attributes:
957
- position: 0
958
- name: taxon_16
959
- permalink: taxonomy-16/taxon-16
960
- lft: 2
961
- 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
- depth: 1
969
- pretty_name: taxonomy_16 -> taxon_16
970
- seo_title: taxon_16
971
- is_root: false
972
- is_child: true
973
- is_leaf: true
957
+ name: foo-size-1
958
+ presentation: Size
959
+ position: 1
960
+ created_at: '2021-08-20T11:02:29.373Z'
961
+ updated_at: '2021-08-20T11:02:29.373Z'
962
+ filterable: true
974
963
  relationships:
975
- parent:
976
- data:
977
- id: '31'
978
- type: taxon
979
- taxonomy:
980
- data:
981
- id: '16'
982
- type: taxonomy
983
- children:
964
+ option_values:
984
965
  data: []
985
- image:
986
- data:
987
- id: '16'
988
- type: taxon_image
989
- - id: '33'
990
- type: taxon
966
+ - id: '2'
967
+ type: option_type
991
968
  attributes:
992
- position: 0
993
- name: taxon_17
994
- permalink: taxonomy-16/taxon-17
995
- lft: 4
996
- 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
- depth: 1
1004
- pretty_name: taxonomy_16 -> taxon_17
1005
- seo_title: taxon_17
1006
- is_root: false
1007
- is_child: true
1008
- is_leaf: true
969
+ name: foo-size-2
970
+ presentation: Size
971
+ position: 2
972
+ created_at: '2021-08-20T11:02:29.375Z'
973
+ updated_at: '2021-08-20T11:02:29.375Z'
974
+ filterable: true
1009
975
  relationships:
1010
- parent:
1011
- data:
1012
- id: '31'
1013
- type: taxon
1014
- taxonomy:
1015
- data:
1016
- id: '16'
1017
- type: taxonomy
1018
- children:
976
+ option_values:
1019
977
  data: []
1020
- image:
1021
- data:
1022
- id: '17'
1023
- type: taxon_image
1024
- - id: '31'
1025
- type: taxon
1026
- 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
1044
- relationships:
1045
- parent:
1046
- data:
1047
- taxonomy:
1048
- data:
1049
- id: '16'
1050
- type: taxonomy
1051
- children:
1052
- data:
1053
- - id: '32'
1054
- type: taxon
1055
- - id: '33'
1056
- type: taxon
1057
- image:
1058
- data:
1059
978
  meta:
1060
- count: 3
1061
- total_count: 3
979
+ count: 2
980
+ total_count: 2
1062
981
  total_pages: 1
1063
982
  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=
983
+ self: http://www.example.com/api/v2/platform/option_types?page=1&per_page=&include=&filter=
984
+ next: http://www.example.com/api/v2/platform/option_types?include=&page=1&per_page=
985
+ prev: http://www.example.com/api/v2/platform/option_types?include=&page=1&per_page=
986
+ last: http://www.example.com/api/v2/platform/option_types?include=&page=1&per_page=
987
+ first: http://www.example.com/api/v2/platform/option_types?include=&page=1&per_page=
1069
988
  '401':
1070
989
  description: Authentication Failed
1071
990
  content:
@@ -1075,17 +994,17 @@ paths:
1075
994
  value:
1076
995
  error: The access token is invalid
1077
996
  post:
1078
- summary: Creates a Taxon
997
+ summary: Creates an OptionType
1079
998
  tags:
1080
- - Taxons
999
+ - OptionTypes
1081
1000
  security:
1082
1001
  - bearer_auth: []
1083
1002
  parameters:
1084
1003
  - name: include
1085
1004
  in: query
1086
- descripton: 'Select which associated resources you would like to fetch, see:
1005
+ description: 'Select which associated resources you would like to fetch, see:
1087
1006
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1088
- example: taxonomy,parent,children
1007
+ example: ''
1089
1008
  schema:
1090
1009
  type: string
1091
1010
  responses:
@@ -1097,39 +1016,18 @@ paths:
1097
1016
  Example:
1098
1017
  value:
1099
1018
  data:
1100
- id: '38'
1101
- type: taxon
1019
+ id: '1'
1020
+ type: option_type
1102
1021
  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:
1114
- depth: 1
1115
- pretty_name: taxonomy_18 -> taxon_20
1116
- seo_title: taxon_20
1117
- is_root: false
1118
- is_child: true
1119
- is_leaf: true
1022
+ name: foo-size-5
1023
+ presentation: Size
1024
+ position: 1
1025
+ created_at: '2021-08-20T11:02:29.453Z'
1026
+ updated_at: '2021-08-20T11:02:29.453Z'
1027
+ filterable: true
1120
1028
  relationships:
1121
- parent:
1122
- data:
1123
- id: '37'
1124
- type: taxon
1125
- taxonomy:
1126
- data:
1127
- id: '18'
1128
- type: taxonomy
1129
- children:
1029
+ option_values:
1130
1030
  data: []
1131
- image:
1132
- data:
1133
1031
  '422':
1134
1032
  description: invalid request
1135
1033
  content:
@@ -1137,22 +1035,22 @@ paths:
1137
1035
  examples:
1138
1036
  Example:
1139
1037
  value:
1140
- error: Name can't be blank and Taxonomy can't be blank
1038
+ error: Name can't be blank and Presentation can't be blank
1141
1039
  errors:
1142
1040
  name:
1143
1041
  - can't be blank
1144
- taxonomy:
1042
+ presentation:
1145
1043
  - can't be blank
1146
1044
  requestBody:
1147
1045
  content:
1148
1046
  application/json:
1149
1047
  schema:
1150
- "$ref": "#/components/schemas/taxon_params"
1151
- "/api/v2/platform/taxons/{id}":
1048
+ "$ref": "#/components/schemas/optiontype_params"
1049
+ "/api/v2/platform/option_types/{id}":
1152
1050
  get:
1153
- summary: Returns a Taxon
1051
+ summary: Returns an OptionType
1154
1052
  tags:
1155
- - Taxons
1053
+ - OptionTypes
1156
1054
  security:
1157
1055
  - bearer_auth: []
1158
1056
  parameters:
@@ -1163,9 +1061,9 @@ paths:
1163
1061
  type: string
1164
1062
  - name: include
1165
1063
  in: query
1166
- descripton: 'Select which associated resources you would like to fetch, see:
1064
+ description: 'Select which associated resources you would like to fetch, see:
1167
1065
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1168
- example: taxonomy,parent,children
1066
+ example: ''
1169
1067
  schema:
1170
1068
  type: string
1171
1069
  responses:
@@ -1177,43 +1075,18 @@ paths:
1177
1075
  Example:
1178
1076
  value:
1179
1077
  data:
1180
- id: '40'
1181
- type: taxon
1078
+ id: '1'
1079
+ type: option_type
1182
1080
  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:
1194
- depth: 1
1195
- pretty_name: taxonomy_19 -> taxon_21
1196
- seo_title: taxon_21
1197
- is_root: false
1198
- is_child: true
1199
- is_leaf: true
1081
+ name: foo-size-6
1082
+ presentation: Size
1083
+ position: 1
1084
+ created_at: '2021-08-20T11:02:29.497Z'
1085
+ updated_at: '2021-08-20T11:02:29.497Z'
1086
+ filterable: true
1200
1087
  relationships:
1201
- parent:
1202
- data:
1203
- id: '39'
1204
- type: taxon
1205
- taxonomy:
1206
- data:
1207
- id: '19'
1208
- type: taxonomy
1209
- children:
1088
+ option_values:
1210
1089
  data: []
1211
- products:
1212
- data: []
1213
- image:
1214
- data:
1215
- id: '20'
1216
- type: taxon_image
1217
1090
  '404':
1218
1091
  description: Record not found
1219
1092
  content:
@@ -1231,9 +1104,9 @@ paths:
1231
1104
  value:
1232
1105
  error: The access token is invalid
1233
1106
  put:
1234
- summary: Updates a Taxon
1107
+ summary: Updates an OptionType
1235
1108
  tags:
1236
- - Taxons
1109
+ - OptionTypes
1237
1110
  security:
1238
1111
  - bearer_auth: []
1239
1112
  parameters:
@@ -1244,9 +1117,9 @@ paths:
1244
1117
  type: string
1245
1118
  - name: include
1246
1119
  in: query
1247
- descripton: 'Select which associated resources you would like to fetch, see:
1120
+ description: 'Select which associated resources you would like to fetch, see:
1248
1121
  <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1249
- example: taxonomy,parent,children
1122
+ example: ''
1250
1123
  schema:
1251
1124
  type: string
1252
1125
  responses:
@@ -1258,41 +1131,18 @@ paths:
1258
1131
  Example:
1259
1132
  value:
1260
1133
  data:
1261
- id: '44'
1262
- type: taxon
1134
+ id: '1'
1135
+ type: option_type
1263
1136
  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:
1275
- depth: 1
1276
- pretty_name: taxonomy_21 -> T-Shirts
1277
- seo_title: T-Shirts
1278
- is_root: false
1279
- is_child: true
1280
- is_leaf: true
1137
+ name: Size-X
1138
+ presentation: Size
1139
+ position: 1
1140
+ created_at: '2021-08-20T11:02:29.580Z'
1141
+ updated_at: '2021-08-20T11:02:29.591Z'
1142
+ filterable: true
1281
1143
  relationships:
1282
- parent:
1283
- data:
1284
- id: '43'
1285
- type: taxon
1286
- taxonomy:
1287
- data:
1288
- id: '21'
1289
- type: taxonomy
1290
- children:
1144
+ option_values:
1291
1145
  data: []
1292
- image:
1293
- data:
1294
- id: '22'
1295
- type: taxon_image
1296
1146
  '422':
1297
1147
  description: invalid request
1298
1148
  content:
@@ -1324,11 +1174,11 @@ paths:
1324
1174
  content:
1325
1175
  application/json:
1326
1176
  schema:
1327
- "$ref": "#/components/schemas/taxon_params"
1177
+ "$ref": "#/components/schemas/optiontype_params"
1328
1178
  delete:
1329
- summary: Deletes a Taxon
1179
+ summary: Deletes an OptionType
1330
1180
  tags:
1331
- - Taxons
1181
+ - OptionTypes
1332
1182
  security:
1333
1183
  - bearer_auth: []
1334
1184
  parameters:
@@ -1356,27 +1206,1087 @@ paths:
1356
1206
  Example:
1357
1207
  value:
1358
1208
  error: The access token is invalid
1359
- servers:
1360
- - url: https://{defaultHost}
1361
- variables:
1362
- defaultHost:
1363
- default: localhost:3000
1364
- components:
1365
- securitySchemes:
1366
- bearer_auth:
1367
- type: http
1368
- scheme: bearer
1369
- schemas:
1370
- address_params:
1371
- type: object
1372
- properties:
1373
- country_id:
1374
- type: string
1375
- state_id:
1376
- type: string
1377
- state_name:
1209
+ "/api/v2/platform/option_values":
1210
+ get:
1211
+ summary: Returns a list of OptionValues
1212
+ tags:
1213
+ - OptionValues
1214
+ security:
1215
+ - bearer_auth: []
1216
+ parameters:
1217
+ - name: page
1218
+ in: query
1219
+ example: 1
1220
+ schema:
1221
+ type: integer
1222
+ - name: per_page
1223
+ in: query
1224
+ example: 50
1225
+ schema:
1226
+ type: integer
1227
+ - name: include
1228
+ in: query
1229
+ description: 'Select which associated resources you would like to fetch, see:
1230
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1231
+ example: option_type
1232
+ schema:
1378
1233
  type: string
1379
- address1:
1234
+ - name: filter
1235
+ in: query
1236
+ description: ''
1237
+ example: option_type_id_eq=1&name_cont=M
1238
+ schema:
1239
+ type: string
1240
+ responses:
1241
+ '200':
1242
+ description: Records returned
1243
+ content:
1244
+ application/vnd.api+json:
1245
+ examples:
1246
+ Example:
1247
+ value:
1248
+ data:
1249
+ - id: '1'
1250
+ type: option_value
1251
+ attributes:
1252
+ position: 1
1253
+ name: Size-1
1254
+ presentation: S
1255
+ created_at: '2021-08-20T11:02:29.758Z'
1256
+ updated_at: '2021-08-20T11:02:29.758Z'
1257
+ relationships:
1258
+ option_type:
1259
+ data:
1260
+ id: '1'
1261
+ type: option_type
1262
+ - id: '2'
1263
+ type: option_value
1264
+ attributes:
1265
+ position: 1
1266
+ name: Size-2
1267
+ presentation: S
1268
+ created_at: '2021-08-20T11:02:29.763Z'
1269
+ updated_at: '2021-08-20T11:02:29.763Z'
1270
+ relationships:
1271
+ option_type:
1272
+ data:
1273
+ id: '2'
1274
+ type: option_type
1275
+ meta:
1276
+ count: 2
1277
+ total_count: 2
1278
+ total_pages: 1
1279
+ links:
1280
+ self: http://www.example.com/api/v2/platform/option_values?page=1&per_page=&include=&filter=
1281
+ next: http://www.example.com/api/v2/platform/option_values?include=&page=1&per_page=
1282
+ prev: http://www.example.com/api/v2/platform/option_values?include=&page=1&per_page=
1283
+ last: http://www.example.com/api/v2/platform/option_values?include=&page=1&per_page=
1284
+ first: http://www.example.com/api/v2/platform/option_values?include=&page=1&per_page=
1285
+ '401':
1286
+ description: Authentication Failed
1287
+ content:
1288
+ application/vnd.api+json:
1289
+ examples:
1290
+ Example:
1291
+ value:
1292
+ error: The access token is invalid
1293
+ post:
1294
+ summary: Creates an OptionValue
1295
+ tags:
1296
+ - OptionValues
1297
+ security:
1298
+ - bearer_auth: []
1299
+ parameters:
1300
+ - name: include
1301
+ in: query
1302
+ description: 'Select which associated resources you would like to fetch, see:
1303
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1304
+ example: option_type
1305
+ schema:
1306
+ type: string
1307
+ responses:
1308
+ '201':
1309
+ description: record created
1310
+ content:
1311
+ application/vnd.api+json:
1312
+ examples:
1313
+ Example:
1314
+ value:
1315
+ data:
1316
+ id: '1'
1317
+ type: option_value
1318
+ attributes:
1319
+ position: 1
1320
+ name: Size-5
1321
+ presentation: S
1322
+ created_at: '2021-08-20T11:02:29.842Z'
1323
+ updated_at: '2021-08-20T11:02:29.842Z'
1324
+ relationships:
1325
+ option_type:
1326
+ data:
1327
+ '422':
1328
+ description: invalid request
1329
+ content:
1330
+ application/vnd.api+json:
1331
+ examples:
1332
+ Example:
1333
+ value:
1334
+ error: Name can't be blank and Presentation can't be blank
1335
+ errors:
1336
+ name:
1337
+ - can't be blank
1338
+ presentation:
1339
+ - can't be blank
1340
+ requestBody:
1341
+ content:
1342
+ application/json:
1343
+ schema:
1344
+ "$ref": "#/components/schemas/optionvalue_params"
1345
+ "/api/v2/platform/option_values/{id}":
1346
+ get:
1347
+ summary: Returns an OptionValue
1348
+ tags:
1349
+ - OptionValues
1350
+ security:
1351
+ - bearer_auth: []
1352
+ parameters:
1353
+ - name: id
1354
+ in: path
1355
+ required: true
1356
+ schema:
1357
+ type: string
1358
+ - name: include
1359
+ in: query
1360
+ description: 'Select which associated resources you would like to fetch, see:
1361
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1362
+ example: option_type
1363
+ schema:
1364
+ type: string
1365
+ responses:
1366
+ '200':
1367
+ description: Record found
1368
+ content:
1369
+ application/vnd.api+json:
1370
+ examples:
1371
+ Example:
1372
+ value:
1373
+ data:
1374
+ id: '1'
1375
+ type: option_value
1376
+ attributes:
1377
+ position: 1
1378
+ name: Size-6
1379
+ presentation: S
1380
+ created_at: '2021-08-20T11:02:29.890Z'
1381
+ updated_at: '2021-08-20T11:02:29.890Z'
1382
+ relationships:
1383
+ option_type:
1384
+ data:
1385
+ id: '1'
1386
+ type: option_type
1387
+ '404':
1388
+ description: Record not found
1389
+ content:
1390
+ application/vnd.api+json:
1391
+ examples:
1392
+ Example:
1393
+ value:
1394
+ error: The resource you were looking for could not be found.
1395
+ '401':
1396
+ description: Authentication Failed
1397
+ content:
1398
+ application/vnd.api+json:
1399
+ examples:
1400
+ Example:
1401
+ value:
1402
+ error: The access token is invalid
1403
+ put:
1404
+ summary: Updates an OptionValue
1405
+ tags:
1406
+ - OptionValues
1407
+ security:
1408
+ - bearer_auth: []
1409
+ parameters:
1410
+ - name: id
1411
+ in: path
1412
+ required: true
1413
+ schema:
1414
+ type: string
1415
+ - name: include
1416
+ in: query
1417
+ description: 'Select which associated resources you would like to fetch, see:
1418
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1419
+ example: option_type
1420
+ schema:
1421
+ type: string
1422
+ responses:
1423
+ '200':
1424
+ description: record updated
1425
+ content:
1426
+ application/vnd.api+json:
1427
+ examples:
1428
+ Example:
1429
+ value:
1430
+ data:
1431
+ id: '1'
1432
+ type: option_value
1433
+ attributes:
1434
+ position: 1
1435
+ name: M
1436
+ presentation: S
1437
+ created_at: '2021-08-20T11:02:29.959Z'
1438
+ updated_at: '2021-08-20T11:02:29.973Z'
1439
+ relationships:
1440
+ option_type:
1441
+ data:
1442
+ id: '1'
1443
+ type: option_type
1444
+ '422':
1445
+ description: invalid request
1446
+ content:
1447
+ application/vnd.api+json:
1448
+ examples:
1449
+ Example:
1450
+ value:
1451
+ error: Name can't be blank
1452
+ errors:
1453
+ name:
1454
+ - can't be blank
1455
+ '404':
1456
+ description: Record not found
1457
+ content:
1458
+ application/vnd.api+json:
1459
+ examples:
1460
+ Example:
1461
+ value:
1462
+ error: The resource you were looking for could not be found.
1463
+ '401':
1464
+ description: Authentication Failed
1465
+ content:
1466
+ application/vnd.api+json:
1467
+ examples:
1468
+ Example:
1469
+ value:
1470
+ error: The access token is invalid
1471
+ requestBody:
1472
+ content:
1473
+ application/json:
1474
+ schema:
1475
+ "$ref": "#/components/schemas/optionvalue_params"
1476
+ delete:
1477
+ summary: Deletes an OptionValue
1478
+ tags:
1479
+ - OptionValues
1480
+ security:
1481
+ - bearer_auth: []
1482
+ parameters:
1483
+ - name: id
1484
+ in: path
1485
+ required: true
1486
+ schema:
1487
+ type: string
1488
+ responses:
1489
+ '204':
1490
+ description: Record deleted
1491
+ '404':
1492
+ description: Record not found
1493
+ content:
1494
+ application/vnd.api+json:
1495
+ examples:
1496
+ Example:
1497
+ value:
1498
+ error: The resource you were looking for could not be found.
1499
+ '401':
1500
+ description: Authentication Failed
1501
+ content:
1502
+ application/vnd.api+json:
1503
+ examples:
1504
+ Example:
1505
+ value:
1506
+ error: The access token is invalid
1507
+ "/api/v2/platform/taxons":
1508
+ get:
1509
+ summary: Returns a list of Taxons
1510
+ tags:
1511
+ - Taxons
1512
+ security:
1513
+ - bearer_auth: []
1514
+ parameters:
1515
+ - name: page
1516
+ in: query
1517
+ example: 1
1518
+ schema:
1519
+ type: integer
1520
+ - name: per_page
1521
+ in: query
1522
+ example: 50
1523
+ schema:
1524
+ type: integer
1525
+ - name: include
1526
+ in: query
1527
+ description: 'Select which associated resources you would like to fetch, see:
1528
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1529
+ example: taxonomy,parent,children
1530
+ schema:
1531
+ type: string
1532
+ - name: filter
1533
+ in: query
1534
+ description: ''
1535
+ example: taxonomy_id_eq=1&name_cont=Shirts
1536
+ schema:
1537
+ type: string
1538
+ responses:
1539
+ '200':
1540
+ description: Records returned
1541
+ content:
1542
+ application/vnd.api+json:
1543
+ examples:
1544
+ Example:
1545
+ value:
1546
+ data:
1547
+ - id: '1'
1548
+ type: taxon
1549
+ attributes:
1550
+ position: 0
1551
+ name: taxonomy_16
1552
+ permalink: taxonomy-16
1553
+ lft: 1
1554
+ rgt: 6
1555
+ description:
1556
+ created_at: '2021-08-20T11:02:30.161Z'
1557
+ updated_at: '2021-08-20T11:02:30.221Z'
1558
+ meta_title:
1559
+ meta_description:
1560
+ meta_keywords:
1561
+ depth: 0
1562
+ pretty_name: taxonomy_16
1563
+ seo_title: taxonomy_16
1564
+ is_root: true
1565
+ is_child: false
1566
+ is_leaf: false
1567
+ relationships:
1568
+ parent:
1569
+ data:
1570
+ taxonomy:
1571
+ data:
1572
+ id: '1'
1573
+ type: taxonomy
1574
+ children:
1575
+ data:
1576
+ - id: '2'
1577
+ type: taxon
1578
+ - id: '3'
1579
+ type: taxon
1580
+ image:
1581
+ data:
1582
+ - id: '2'
1583
+ type: taxon
1584
+ attributes:
1585
+ position: 0
1586
+ name: taxon_16
1587
+ permalink: taxonomy-16/taxon-16
1588
+ lft: 2
1589
+ rgt: 3
1590
+ description:
1591
+ created_at: '2021-08-20T11:02:30.183Z'
1592
+ updated_at: '2021-08-20T11:02:30.187Z'
1593
+ meta_title:
1594
+ meta_description:
1595
+ meta_keywords:
1596
+ depth: 1
1597
+ pretty_name: taxonomy_16 -> taxon_16
1598
+ seo_title: taxon_16
1599
+ is_root: false
1600
+ is_child: true
1601
+ is_leaf: true
1602
+ relationships:
1603
+ parent:
1604
+ data:
1605
+ id: '1'
1606
+ type: taxon
1607
+ taxonomy:
1608
+ data:
1609
+ id: '1'
1610
+ type: taxonomy
1611
+ children:
1612
+ data: []
1613
+ image:
1614
+ data:
1615
+ id: '1'
1616
+ type: taxon_image
1617
+ - id: '3'
1618
+ type: taxon
1619
+ attributes:
1620
+ position: 0
1621
+ name: taxon_17
1622
+ permalink: taxonomy-16/taxon-17
1623
+ lft: 4
1624
+ rgt: 5
1625
+ description:
1626
+ created_at: '2021-08-20T11:02:30.208Z'
1627
+ updated_at: '2021-08-20T11:02:30.212Z'
1628
+ meta_title:
1629
+ meta_description:
1630
+ meta_keywords:
1631
+ depth: 1
1632
+ pretty_name: taxonomy_16 -> taxon_17
1633
+ seo_title: taxon_17
1634
+ is_root: false
1635
+ is_child: true
1636
+ is_leaf: true
1637
+ relationships:
1638
+ parent:
1639
+ data:
1640
+ id: '1'
1641
+ type: taxon
1642
+ taxonomy:
1643
+ data:
1644
+ id: '1'
1645
+ type: taxonomy
1646
+ children:
1647
+ data: []
1648
+ image:
1649
+ data:
1650
+ id: '2'
1651
+ type: taxon_image
1652
+ meta:
1653
+ count: 3
1654
+ total_count: 3
1655
+ total_pages: 1
1656
+ links:
1657
+ self: http://www.example.com/api/v2/platform/taxons?page=1&per_page=&include=&filter=
1658
+ next: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
1659
+ prev: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
1660
+ last: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
1661
+ first: http://www.example.com/api/v2/platform/taxons?include=&page=1&per_page=
1662
+ '401':
1663
+ description: Authentication Failed
1664
+ content:
1665
+ application/vnd.api+json:
1666
+ examples:
1667
+ Example:
1668
+ value:
1669
+ error: The access token is invalid
1670
+ post:
1671
+ summary: Creates a Taxon
1672
+ tags:
1673
+ - Taxons
1674
+ security:
1675
+ - bearer_auth: []
1676
+ parameters:
1677
+ - name: include
1678
+ in: query
1679
+ description: 'Select which associated resources you would like to fetch, see:
1680
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1681
+ example: taxonomy,parent,children
1682
+ schema:
1683
+ type: string
1684
+ responses:
1685
+ '201':
1686
+ description: record created
1687
+ content:
1688
+ application/vnd.api+json:
1689
+ examples:
1690
+ Example:
1691
+ value:
1692
+ data:
1693
+ id: '2'
1694
+ type: taxon
1695
+ attributes:
1696
+ position: 0
1697
+ name: taxon_20
1698
+ permalink: taxonomy-18/taxon-20
1699
+ lft: 2
1700
+ rgt: 3
1701
+ description:
1702
+ created_at: '2021-08-20T11:02:30.393Z'
1703
+ updated_at: '2021-08-20T11:02:30.397Z'
1704
+ meta_title:
1705
+ meta_description:
1706
+ meta_keywords:
1707
+ depth: 1
1708
+ pretty_name: taxonomy_18 -> taxon_20
1709
+ seo_title: taxon_20
1710
+ is_root: false
1711
+ is_child: true
1712
+ is_leaf: true
1713
+ relationships:
1714
+ parent:
1715
+ data:
1716
+ id: '1'
1717
+ type: taxon
1718
+ taxonomy:
1719
+ data:
1720
+ id: '1'
1721
+ type: taxonomy
1722
+ children:
1723
+ data: []
1724
+ image:
1725
+ data:
1726
+ '422':
1727
+ description: invalid request
1728
+ content:
1729
+ application/vnd.api+json:
1730
+ examples:
1731
+ Example:
1732
+ value:
1733
+ error: Name can't be blank and Taxonomy can't be blank
1734
+ errors:
1735
+ name:
1736
+ - can't be blank
1737
+ taxonomy:
1738
+ - can't be blank
1739
+ requestBody:
1740
+ content:
1741
+ application/json:
1742
+ schema:
1743
+ "$ref": "#/components/schemas/taxon_params"
1744
+ "/api/v2/platform/taxons/{id}":
1745
+ get:
1746
+ summary: Returns a Taxon
1747
+ tags:
1748
+ - Taxons
1749
+ security:
1750
+ - bearer_auth: []
1751
+ parameters:
1752
+ - name: id
1753
+ in: path
1754
+ required: true
1755
+ schema:
1756
+ type: string
1757
+ - name: include
1758
+ in: query
1759
+ description: 'Select which associated resources you would like to fetch, see:
1760
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1761
+ example: taxonomy,parent,children
1762
+ schema:
1763
+ type: string
1764
+ responses:
1765
+ '200':
1766
+ description: Record found
1767
+ content:
1768
+ application/vnd.api+json:
1769
+ examples:
1770
+ Example:
1771
+ value:
1772
+ data:
1773
+ id: '2'
1774
+ type: taxon
1775
+ attributes:
1776
+ position: 0
1777
+ name: taxon_21
1778
+ permalink: taxonomy-19/taxon-21
1779
+ lft: 2
1780
+ rgt: 3
1781
+ description:
1782
+ created_at: '2021-08-20T11:02:30.484Z'
1783
+ updated_at: '2021-08-20T11:02:30.488Z'
1784
+ meta_title:
1785
+ meta_description:
1786
+ meta_keywords:
1787
+ depth: 1
1788
+ pretty_name: taxonomy_19 -> taxon_21
1789
+ seo_title: taxon_21
1790
+ is_root: false
1791
+ is_child: true
1792
+ is_leaf: true
1793
+ relationships:
1794
+ parent:
1795
+ data:
1796
+ id: '1'
1797
+ type: taxon
1798
+ taxonomy:
1799
+ data:
1800
+ id: '1'
1801
+ type: taxonomy
1802
+ children:
1803
+ data: []
1804
+ products:
1805
+ data: []
1806
+ image:
1807
+ data:
1808
+ id: '1'
1809
+ type: taxon_image
1810
+ '404':
1811
+ description: Record not found
1812
+ content:
1813
+ application/vnd.api+json:
1814
+ examples:
1815
+ Example:
1816
+ value:
1817
+ error: The resource you were looking for could not be found.
1818
+ '401':
1819
+ description: Authentication Failed
1820
+ content:
1821
+ application/vnd.api+json:
1822
+ examples:
1823
+ Example:
1824
+ value:
1825
+ error: The access token is invalid
1826
+ put:
1827
+ summary: Updates a Taxon
1828
+ tags:
1829
+ - Taxons
1830
+ security:
1831
+ - bearer_auth: []
1832
+ parameters:
1833
+ - name: id
1834
+ in: path
1835
+ required: true
1836
+ schema:
1837
+ type: string
1838
+ - name: include
1839
+ in: query
1840
+ description: 'Select which associated resources you would like to fetch, see:
1841
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1842
+ example: taxonomy,parent,children
1843
+ schema:
1844
+ type: string
1845
+ responses:
1846
+ '200':
1847
+ description: record updated
1848
+ content:
1849
+ application/vnd.api+json:
1850
+ examples:
1851
+ Example:
1852
+ value:
1853
+ data:
1854
+ id: '2'
1855
+ type: taxon
1856
+ attributes:
1857
+ position: 0
1858
+ name: T-Shirts
1859
+ permalink: taxonomy-21/taxon-23
1860
+ lft: 2
1861
+ rgt: 3
1862
+ description:
1863
+ created_at: '2021-08-20T11:02:30.652Z'
1864
+ updated_at: '2021-08-20T11:02:30.675Z'
1865
+ meta_title:
1866
+ meta_description:
1867
+ meta_keywords:
1868
+ depth: 1
1869
+ pretty_name: taxonomy_21 -> T-Shirts
1870
+ seo_title: T-Shirts
1871
+ is_root: false
1872
+ is_child: true
1873
+ is_leaf: true
1874
+ relationships:
1875
+ parent:
1876
+ data:
1877
+ id: '1'
1878
+ type: taxon
1879
+ taxonomy:
1880
+ data:
1881
+ id: '1'
1882
+ type: taxonomy
1883
+ children:
1884
+ data: []
1885
+ image:
1886
+ data:
1887
+ id: '1'
1888
+ type: taxon_image
1889
+ '422':
1890
+ description: invalid request
1891
+ content:
1892
+ application/vnd.api+json:
1893
+ examples:
1894
+ Example:
1895
+ value:
1896
+ error: Name can't be blank
1897
+ errors:
1898
+ name:
1899
+ - can't be blank
1900
+ '404':
1901
+ description: Record not found
1902
+ content:
1903
+ application/vnd.api+json:
1904
+ examples:
1905
+ Example:
1906
+ value:
1907
+ error: The resource you were looking for could not be found.
1908
+ '401':
1909
+ description: Authentication Failed
1910
+ content:
1911
+ application/vnd.api+json:
1912
+ examples:
1913
+ Example:
1914
+ value:
1915
+ error: The access token is invalid
1916
+ requestBody:
1917
+ content:
1918
+ application/json:
1919
+ schema:
1920
+ "$ref": "#/components/schemas/taxon_params"
1921
+ delete:
1922
+ summary: Deletes a Taxon
1923
+ tags:
1924
+ - Taxons
1925
+ security:
1926
+ - bearer_auth: []
1927
+ parameters:
1928
+ - name: id
1929
+ in: path
1930
+ required: true
1931
+ schema:
1932
+ type: string
1933
+ responses:
1934
+ '204':
1935
+ description: Record deleted
1936
+ '404':
1937
+ description: Record not found
1938
+ content:
1939
+ application/vnd.api+json:
1940
+ examples:
1941
+ Example:
1942
+ value:
1943
+ error: The resource you were looking for could not be found.
1944
+ '401':
1945
+ description: Authentication Failed
1946
+ content:
1947
+ application/vnd.api+json:
1948
+ examples:
1949
+ Example:
1950
+ value:
1951
+ error: The access token is invalid
1952
+ "/api/v2/platform/users":
1953
+ get:
1954
+ summary: Returns a list of Users
1955
+ tags:
1956
+ - Users
1957
+ security:
1958
+ - bearer_auth: []
1959
+ parameters:
1960
+ - name: page
1961
+ in: query
1962
+ example: 1
1963
+ schema:
1964
+ type: integer
1965
+ - name: per_page
1966
+ in: query
1967
+ example: 50
1968
+ schema:
1969
+ type: integer
1970
+ - name: include
1971
+ in: query
1972
+ description: 'Select which associated resources you would like to fetch, see:
1973
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1974
+ example: ship_address,bill_address
1975
+ schema:
1976
+ type: string
1977
+ - name: filter
1978
+ in: query
1979
+ description: ''
1980
+ example: user_id_eq=1&email_cont=spree@example.com
1981
+ schema:
1982
+ type: string
1983
+ responses:
1984
+ '200':
1985
+ description: Records returned
1986
+ content:
1987
+ application/vnd.api+json:
1988
+ examples:
1989
+ Example:
1990
+ value:
1991
+ data:
1992
+ - id: '1'
1993
+ type: user
1994
+ attributes:
1995
+ email: jasper@dooley.co.uk
1996
+ created_at: '2021-08-20T11:02:31.076Z'
1997
+ updated_at: '2021-08-20T11:02:31.076Z'
1998
+ average_order_value: []
1999
+ lifetime_value: []
2000
+ store_credits: []
2001
+ relationships:
2002
+ bill_address:
2003
+ data:
2004
+ ship_address:
2005
+ data:
2006
+ - id: '2'
2007
+ type: user
2008
+ attributes:
2009
+ email: shanice.breitenberg@labadie.ca
2010
+ created_at: '2021-08-20T11:02:31.087Z'
2011
+ updated_at: '2021-08-20T11:02:31.087Z'
2012
+ average_order_value: []
2013
+ lifetime_value: []
2014
+ store_credits: []
2015
+ relationships:
2016
+ bill_address:
2017
+ data:
2018
+ ship_address:
2019
+ data:
2020
+ - id: '3'
2021
+ type: user
2022
+ attributes:
2023
+ email: tristan@reilly.co.uk
2024
+ created_at: '2021-08-20T11:02:31.090Z'
2025
+ updated_at: '2021-08-20T11:02:31.090Z'
2026
+ average_order_value: []
2027
+ lifetime_value: []
2028
+ store_credits: []
2029
+ relationships:
2030
+ bill_address:
2031
+ data:
2032
+ ship_address:
2033
+ data:
2034
+ meta:
2035
+ count: 3
2036
+ total_count: 3
2037
+ total_pages: 1
2038
+ links:
2039
+ self: http://www.example.com/api/v2/platform/users?page=1&per_page=&include=&filter=
2040
+ next: http://www.example.com/api/v2/platform/users?include=&page=1&per_page=
2041
+ prev: http://www.example.com/api/v2/platform/users?include=&page=1&per_page=
2042
+ last: http://www.example.com/api/v2/platform/users?include=&page=1&per_page=
2043
+ first: http://www.example.com/api/v2/platform/users?include=&page=1&per_page=
2044
+ '401':
2045
+ description: Authentication Failed
2046
+ content:
2047
+ application/vnd.api+json:
2048
+ examples:
2049
+ Example:
2050
+ value:
2051
+ error: The access token is invalid
2052
+ post:
2053
+ summary: Creates an User
2054
+ tags:
2055
+ - Users
2056
+ security:
2057
+ - bearer_auth: []
2058
+ parameters:
2059
+ - name: include
2060
+ in: query
2061
+ description: 'Select which associated resources you would like to fetch, see:
2062
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2063
+ example: ship_address,bill_address
2064
+ schema:
2065
+ type: string
2066
+ responses:
2067
+ '201':
2068
+ description: record created
2069
+ content:
2070
+ application/vnd.api+json:
2071
+ examples:
2072
+ Example:
2073
+ value:
2074
+ data:
2075
+ id: '2'
2076
+ type: user
2077
+ attributes:
2078
+ email: joan@little.info
2079
+ created_at: '2021-08-20T11:02:31.214Z'
2080
+ updated_at: '2021-08-20T11:02:31.214Z'
2081
+ average_order_value: []
2082
+ lifetime_value: []
2083
+ store_credits: []
2084
+ relationships:
2085
+ bill_address:
2086
+ data:
2087
+ ship_address:
2088
+ data:
2089
+ '422':
2090
+ description: invalid request
2091
+ content:
2092
+ application/vnd.api+json:
2093
+ examples:
2094
+ Example:
2095
+ value:
2096
+ error: Bill address belongs to other user
2097
+ errors:
2098
+ bill_address_id:
2099
+ - belongs to other user
2100
+ requestBody:
2101
+ content:
2102
+ application/json:
2103
+ schema:
2104
+ "$ref": "#/components/schemas/user_params"
2105
+ "/api/v2/platform/users/{id}":
2106
+ get:
2107
+ summary: Returns an User
2108
+ tags:
2109
+ - Users
2110
+ security:
2111
+ - bearer_auth: []
2112
+ parameters:
2113
+ - name: id
2114
+ in: path
2115
+ required: true
2116
+ schema:
2117
+ type: string
2118
+ - name: include
2119
+ in: query
2120
+ description: 'Select which associated resources you would like to fetch, see:
2121
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2122
+ example: ship_address,bill_address
2123
+ schema:
2124
+ type: string
2125
+ responses:
2126
+ '200':
2127
+ description: Record found
2128
+ content:
2129
+ application/vnd.api+json:
2130
+ examples:
2131
+ Example:
2132
+ value:
2133
+ data:
2134
+ id: '2'
2135
+ type: user
2136
+ attributes:
2137
+ email: morris@goyettecormier.com
2138
+ created_at: '2021-08-20T11:02:31.290Z'
2139
+ updated_at: '2021-08-20T11:02:31.290Z'
2140
+ average_order_value: []
2141
+ lifetime_value: []
2142
+ store_credits: []
2143
+ relationships:
2144
+ bill_address:
2145
+ data:
2146
+ ship_address:
2147
+ data:
2148
+ '404':
2149
+ description: Record not found
2150
+ content:
2151
+ application/vnd.api+json:
2152
+ examples:
2153
+ Example:
2154
+ value:
2155
+ error: The resource you were looking for could not be found.
2156
+ '401':
2157
+ description: Authentication Failed
2158
+ content:
2159
+ application/vnd.api+json:
2160
+ examples:
2161
+ Example:
2162
+ value:
2163
+ error: The access token is invalid
2164
+ put:
2165
+ summary: Updates an User
2166
+ tags:
2167
+ - Users
2168
+ security:
2169
+ - bearer_auth: []
2170
+ parameters:
2171
+ - name: id
2172
+ in: path
2173
+ required: true
2174
+ schema:
2175
+ type: string
2176
+ - name: include
2177
+ in: query
2178
+ description: 'Select which associated resources you would like to fetch, see:
2179
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
2180
+ example: ship_address,bill_address
2181
+ schema:
2182
+ type: string
2183
+ responses:
2184
+ '200':
2185
+ description: record updated
2186
+ content:
2187
+ application/vnd.api+json:
2188
+ examples:
2189
+ Example:
2190
+ value:
2191
+ data:
2192
+ id: '2'
2193
+ type: user
2194
+ attributes:
2195
+ email: john@example.com
2196
+ created_at: '2021-08-20T11:02:31.401Z'
2197
+ updated_at: '2021-08-20T11:02:31.417Z'
2198
+ average_order_value: []
2199
+ lifetime_value: []
2200
+ store_credits: []
2201
+ relationships:
2202
+ bill_address:
2203
+ data:
2204
+ ship_address:
2205
+ data:
2206
+ '422':
2207
+ description: invalid request
2208
+ content:
2209
+ application/vnd.api+json:
2210
+ examples:
2211
+ Example:
2212
+ value:
2213
+ error: Bill address belongs to other user
2214
+ errors:
2215
+ bill_address_id:
2216
+ - belongs to other user
2217
+ '404':
2218
+ description: Record not found
2219
+ content:
2220
+ application/vnd.api+json:
2221
+ examples:
2222
+ Example:
2223
+ value:
2224
+ error: The resource you were looking for could not be found.
2225
+ '401':
2226
+ description: Authentication Failed
2227
+ content:
2228
+ application/vnd.api+json:
2229
+ examples:
2230
+ Example:
2231
+ value:
2232
+ error: The access token is invalid
2233
+ requestBody:
2234
+ content:
2235
+ application/json:
2236
+ schema:
2237
+ "$ref": "#/components/schemas/user_params"
2238
+ delete:
2239
+ summary: Deletes an User
2240
+ tags:
2241
+ - Users
2242
+ security:
2243
+ - bearer_auth: []
2244
+ parameters:
2245
+ - name: id
2246
+ in: path
2247
+ required: true
2248
+ schema:
2249
+ type: string
2250
+ responses:
2251
+ '204':
2252
+ description: Record deleted
2253
+ '404':
2254
+ description: Record not found
2255
+ content:
2256
+ application/vnd.api+json:
2257
+ examples:
2258
+ Example:
2259
+ value:
2260
+ error: The resource you were looking for could not be found.
2261
+ '401':
2262
+ description: Authentication Failed
2263
+ content:
2264
+ application/vnd.api+json:
2265
+ examples:
2266
+ Example:
2267
+ value:
2268
+ error: The access token is invalid
2269
+ servers:
2270
+ - url: https://{defaultHost}
2271
+ variables:
2272
+ defaultHost:
2273
+ default: localhost:3000
2274
+ components:
2275
+ securitySchemes:
2276
+ bearer_auth:
2277
+ type: http
2278
+ scheme: bearer
2279
+ schemas:
2280
+ address_params:
2281
+ type: object
2282
+ properties:
2283
+ country_id:
2284
+ type: string
2285
+ state_id:
2286
+ type: string
2287
+ state_name:
2288
+ type: string
2289
+ address1:
1380
2290
  type: string
1381
2291
  city:
1382
2292
  type: string
@@ -1405,11 +2315,105 @@ components:
1405
2315
  type: string
1406
2316
  position:
1407
2317
  type: integer
2318
+ option_type_params:
2319
+ type: object
2320
+ properties:
2321
+ name:
2322
+ type: string
2323
+ presentation:
2324
+ type: string
2325
+ required:
2326
+ - name
2327
+ - presentation
2328
+ option_value_params:
2329
+ type: object
2330
+ properties:
2331
+ name:
2332
+ type: string
2333
+ presentation:
2334
+ type: string
2335
+ option_values_attributes:
2336
+ type: string
2337
+ required:
2338
+ - name
2339
+ - presentation
2340
+ product_params:
2341
+ type: object
2342
+ properties:
2343
+ name:
2344
+ type: string
2345
+ description:
2346
+ type: string
2347
+ available_on:
2348
+ type: string
2349
+ discontinue_on:
2350
+ type: string
2351
+ permalink:
2352
+ type: string
2353
+ meta_description:
2354
+ type: string
2355
+ meta_keywords:
2356
+ type: string
2357
+ price:
2358
+ type: string
2359
+ sku:
2360
+ type: string
2361
+ deleted_at:
2362
+ type: string
2363
+ prototype_id:
2364
+ type: string
2365
+ option_values_hash:
2366
+ type: string
2367
+ weight:
2368
+ type: string
2369
+ height:
2370
+ type: string
2371
+ width:
2372
+ type: string
2373
+ depth:
2374
+ type: string
2375
+ shipping_category_id:
2376
+ type: string
2377
+ tax_category_id:
2378
+ type: string
2379
+ cost_currency:
2380
+ type: string
2381
+ cost_price:
2382
+ type: string
2383
+ compare_at_price:
2384
+ type: string
2385
+ option_type_ids:
2386
+ type: string
2387
+ taxon_ids:
2388
+ type: string
2389
+ required:
2390
+ - name
2391
+ - price
2392
+ - shipping_category_id
2393
+ user_params:
2394
+ type: object
2395
+ properties:
2396
+ email:
2397
+ type: string
2398
+ password:
2399
+ type: string
2400
+ password_confirmation:
2401
+ type: string
2402
+ ship_address_id:
2403
+ type: string
2404
+ bill_address_id:
2405
+ type: string
2406
+ required:
2407
+ - email
2408
+ - password
2409
+ - password_confirmation
1408
2410
  taxon_params:
1409
2411
  type: object
1410
2412
  properties:
1411
2413
  taxonomy_id:
1412
2414
  type: string
2415
+ parent_id:
2416
+ type: string
1413
2417
  name:
1414
2418
  type: string
1415
2419
  required: