spree_api 4.2.3.1 → 4.3.0.rc2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +14 -1
  3. data/app/controllers/concerns/spree/api/v2/caching.rb +33 -0
  4. data/app/controllers/concerns/spree/api/v2/product_list_includes.rb +23 -0
  5. data/app/controllers/spree/api/v1/classifications_controller.rb +4 -3
  6. data/app/controllers/spree/api/v1/orders_controller.rb +5 -1
  7. data/app/controllers/spree/api/v1/products_controller.rb +2 -2
  8. data/app/controllers/spree/api/v1/taxonomies_controller.rb +1 -1
  9. data/app/controllers/spree/api/v2/base_controller.rb +29 -6
  10. data/app/controllers/spree/api/v2/platform/addresses_controller.rb +19 -0
  11. data/app/controllers/spree/api/v2/platform/classifications_controller.rb +43 -0
  12. data/app/controllers/spree/api/v2/platform/cms_pages_controller.rb +15 -0
  13. data/app/controllers/spree/api/v2/platform/cms_sections_controller.rb +34 -0
  14. data/app/controllers/spree/api/v2/platform/countries_controller.rb +19 -0
  15. data/app/controllers/spree/api/v2/platform/menu_items_controller.rb +35 -0
  16. data/app/controllers/spree/api/v2/platform/menus_controller.rb +19 -0
  17. data/app/controllers/spree/api/v2/platform/option_types_controller.rb +15 -0
  18. data/app/controllers/spree/api/v2/platform/option_values_controller.rb +19 -0
  19. data/app/controllers/spree/api/v2/platform/products_controller.rb +33 -0
  20. data/app/controllers/spree/api/v2/platform/resource_controller.rb +112 -0
  21. data/app/controllers/spree/api/v2/platform/taxons_controller.rb +30 -0
  22. data/app/controllers/spree/api/v2/platform/users_controller.rb +28 -0
  23. data/app/controllers/spree/api/v2/resource_controller.rb +24 -7
  24. data/app/controllers/spree/api/v2/storefront/account/addresses_controller.rb +2 -14
  25. data/app/controllers/spree/api/v2/storefront/account/credit_cards_controller.rb +13 -11
  26. data/app/controllers/spree/api/v2/storefront/account/orders_controller.rb +6 -2
  27. data/app/controllers/spree/api/v2/storefront/account_controller.rb +32 -1
  28. data/app/controllers/spree/api/v2/storefront/cart_controller.rb +28 -6
  29. data/app/controllers/spree/api/v2/storefront/checkout_controller.rb +2 -1
  30. data/app/controllers/spree/api/v2/storefront/cms_pages_controller.rb +41 -0
  31. data/app/controllers/spree/api/v2/storefront/countries_controller.rb +9 -14
  32. data/app/controllers/spree/api/v2/storefront/menus_controller.rb +35 -0
  33. data/app/controllers/spree/api/v2/storefront/order_status_controller.rb +1 -1
  34. data/app/controllers/spree/api/v2/storefront/products_controller.rb +10 -12
  35. data/app/controllers/spree/api/v2/storefront/stores_controller.rb +1 -1
  36. data/app/controllers/spree/api/v2/storefront/taxons_controller.rb +7 -8
  37. data/app/helpers/spree/api/v2/display_money_helper.rb +2 -2
  38. data/app/models/spree/api_configuration.rb +4 -1
  39. data/app/models/spree/api_dependencies.rb +20 -5
  40. data/app/serializers/concerns/spree/api/v2/resource_serializer_concern.rb +16 -0
  41. data/app/serializers/spree/api/v2/base_serializer.rb +32 -0
  42. data/app/serializers/spree/api/v2/platform/address_serializer.rb +15 -0
  43. data/app/serializers/spree/api/v2/platform/base_serializer.rb +10 -0
  44. data/app/serializers/spree/api/v2/platform/classification_serializer.rb +14 -0
  45. data/app/serializers/spree/api/v2/platform/cms_page_serializer.rb +13 -0
  46. data/app/serializers/spree/api/v2/platform/cms_section_serializer.rb +11 -0
  47. data/app/serializers/spree/api/v2/platform/country_serializer.rb +13 -0
  48. data/app/serializers/spree/api/v2/platform/image_serializer.rb +15 -0
  49. data/app/serializers/spree/api/v2/platform/menu_item_serializer.rb +27 -0
  50. data/app/serializers/spree/api/v2/platform/menu_serializer.rb +13 -0
  51. data/app/serializers/spree/api/v2/platform/option_type_serializer.rb +13 -0
  52. data/app/serializers/spree/api/v2/platform/option_value_serializer.rb +13 -0
  53. data/app/serializers/spree/api/v2/platform/product_property_serializer.rb +11 -0
  54. data/app/serializers/spree/api/v2/platform/product_serializer.rb +78 -0
  55. data/app/serializers/spree/api/v2/platform/state_serializer.rb +13 -0
  56. data/app/serializers/spree/api/v2/platform/stock_item_serializer.rb +20 -0
  57. data/app/serializers/spree/api/v2/platform/stock_location_serializer.rb +16 -0
  58. data/app/serializers/spree/api/v2/platform/store_serializer.rb +14 -0
  59. data/app/serializers/spree/api/v2/platform/tax_category_serializer.rb +13 -0
  60. data/app/serializers/spree/api/v2/platform/taxon_image_serializer.rb +13 -0
  61. data/app/serializers/spree/api/v2/platform/taxon_serializer.rb +38 -0
  62. data/app/serializers/spree/api/v2/platform/taxonomy_serializer.rb +14 -0
  63. data/app/serializers/spree/api/v2/platform/user_serializer.rb +37 -0
  64. data/app/serializers/spree/api/v2/platform/variant_serializer.rb +57 -0
  65. data/app/serializers/spree/v2/storefront/base_serializer.rb +3 -2
  66. data/app/serializers/spree/v2/storefront/cms_page_serializer.rb +14 -0
  67. data/app/serializers/spree/v2/storefront/cms_section_serializer.rb +28 -0
  68. data/app/serializers/spree/v2/storefront/country_serializer.rb +4 -4
  69. data/app/serializers/spree/v2/storefront/estimated_shipping_rate_serializer.rb +2 -0
  70. data/app/serializers/spree/v2/storefront/menu_item_serializer.rb +43 -0
  71. data/app/serializers/spree/v2/storefront/menu_serializer.rb +13 -0
  72. data/app/serializers/spree/v2/storefront/product_property_serializer.rb +1 -1
  73. data/app/serializers/spree/v2/storefront/product_serializer.rb +20 -11
  74. data/app/serializers/spree/v2/storefront/store_serializer.rb +10 -0
  75. data/app/serializers/spree/v2/storefront/taxon_serializer.rb +6 -5
  76. data/config/initializers/doorkeeper.rb +8 -1
  77. data/config/initializers/rabl.rb +9 -0
  78. data/config/locales/en.yml +1 -1
  79. data/config/routes.rb +115 -3
  80. data/db/migrate/20210727102516_change_integer_id_columns_type.rb +9 -0
  81. data/docs/oauth/index.yml +4 -4
  82. data/docs/v2/platform/index.yaml +2505 -0
  83. data/docs/v2/storefront/index.yaml +3508 -1220
  84. data/lib/spree/api/engine.rb +6 -17
  85. data/lib/spree/api/testing_support/v2/base.rb +1 -1
  86. data/lib/spree/api/testing_support/v2/platform_contexts.rb +214 -0
  87. data/lib/spree/api/testing_support/v2/serializers_params.rb +14 -0
  88. data/lib/spree/api.rb +1 -0
  89. data/spree_api.gemspec +6 -3
  90. metadata +110 -13
  91. data/app/assets/javascripts/spree/api/main.js +0 -36
  92. data/app/assets/javascripts/spree/api/storefront/cart.js +0 -49
@@ -0,0 +1,9 @@
1
+ class ChangeIntegerIdColumnsType < ActiveRecord::Migration[5.2]
2
+ def change
3
+ change_column :spree_oauth_access_grants, :resource_owner_id, :bigint
4
+ change_column :spree_oauth_access_grants, :application_id, :bigint
5
+
6
+ change_column :spree_oauth_access_tokens, :resource_owner_id, :bigint
7
+ change_column :spree_oauth_access_tokens, :application_id, :bigint
8
+ end
9
+ end
data/docs/oauth/index.yml CHANGED
@@ -6,8 +6,8 @@ servers:
6
6
  description: localhost
7
7
  info:
8
8
  version: 1.0.0
9
- title: Spree OAuth 2.0 Authentication
10
- description: "For API v2 Spree uses [Doorkeeper](https://github.com/doorkeeper-gem/doorkeeper) gem for handling OAuth athentication. \n\nSpree supports new token creation and refreshing of existing tokens."
9
+ title: Authentication
10
+ description: "Spree uses oAuth based Authentication via short-lived Bearer tokens. You can either create a new one or refresh existing token."
11
11
  contact:
12
12
  name: Spark Solutions
13
13
  url: 'https://sparksolutions.co'
@@ -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:
@@ -0,0 +1,2505 @@
1
+ ---
2
+ openapi: 3.0.1
3
+ info:
4
+ title: Platform API V2
5
+ version: v2
6
+ paths:
7
+ "/api/v2/platform/addresses":
8
+ get:
9
+ summary: Returns a list of Addresses
10
+ tags:
11
+ - Addresses
12
+ security:
13
+ - bearer_auth: []
14
+ parameters:
15
+ - name: page
16
+ in: query
17
+ example: 1
18
+ schema:
19
+ type: integer
20
+ - name: per_page
21
+ in: query
22
+ example: 50
23
+ schema:
24
+ type: integer
25
+ - name: include
26
+ in: query
27
+ description: 'Select which associated resources you would like to fetch, see:
28
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
29
+ example: user,country,state
30
+ schema:
31
+ type: string
32
+ - name: filter
33
+ in: query
34
+ description: ''
35
+ example: user_id_eq=1&firstname_cont=Joh
36
+ schema:
37
+ type: string
38
+ responses:
39
+ '200':
40
+ description: Records returned
41
+ content:
42
+ application/vnd.api+json:
43
+ examples:
44
+ Example:
45
+ value:
46
+ data:
47
+ - id: '1'
48
+ type: address
49
+ attributes:
50
+ firstname: John
51
+ lastname: Doe
52
+ address1: 1 Lovely Street
53
+ address2: Northwest
54
+ city: Herndon
55
+ zipcode: '35005'
56
+ phone: 555-555-0199
57
+ state_name:
58
+ alternative_phone: 555-555-0199
59
+ company: Company
60
+ created_at: '2021-08-20T11:02:26.158Z'
61
+ updated_at: '2021-08-20T11:02:26.158Z'
62
+ deleted_at:
63
+ label:
64
+ relationships:
65
+ country:
66
+ data:
67
+ id: '1'
68
+ type: country
69
+ state:
70
+ data:
71
+ id: '1'
72
+ type: state
73
+ user:
74
+ data:
75
+ - id: '2'
76
+ type: address
77
+ attributes:
78
+ firstname: John
79
+ lastname: Doe
80
+ address1: 2 Lovely Street
81
+ address2: Northwest
82
+ city: Herndon
83
+ zipcode: '35005'
84
+ phone: 555-555-0199
85
+ state_name:
86
+ alternative_phone: 555-555-0199
87
+ company: Company
88
+ created_at: '2021-08-20T11:02:26.166Z'
89
+ updated_at: '2021-08-20T11:02:26.166Z'
90
+ deleted_at:
91
+ label:
92
+ relationships:
93
+ country:
94
+ data:
95
+ id: '1'
96
+ type: country
97
+ state:
98
+ data:
99
+ id: '2'
100
+ type: state
101
+ user:
102
+ data:
103
+ meta:
104
+ count: 2
105
+ total_count: 2
106
+ total_pages: 1
107
+ links:
108
+ self: http://www.example.com/api/v2/platform/addresses?page=1&per_page=&include=&filter=
109
+ next: http://www.example.com/api/v2/platform/addresses?include=&page=1&per_page=
110
+ prev: http://www.example.com/api/v2/platform/addresses?include=&page=1&per_page=
111
+ last: http://www.example.com/api/v2/platform/addresses?include=&page=1&per_page=
112
+ first: http://www.example.com/api/v2/platform/addresses?include=&page=1&per_page=
113
+ '401':
114
+ description: Authentication Failed
115
+ content:
116
+ application/vnd.api+json:
117
+ examples:
118
+ Example:
119
+ value:
120
+ error: The access token is invalid
121
+ post:
122
+ summary: Creates an Address
123
+ tags:
124
+ - Addresses
125
+ security:
126
+ - bearer_auth: []
127
+ parameters:
128
+ - name: include
129
+ in: query
130
+ description: 'Select which associated resources you would like to fetch, see:
131
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
132
+ example: user,country,state
133
+ schema:
134
+ type: string
135
+ responses:
136
+ '201':
137
+ description: record created
138
+ content:
139
+ application/vnd.api+json:
140
+ examples:
141
+ Example:
142
+ value:
143
+ data:
144
+ id: '1'
145
+ type: address
146
+ attributes:
147
+ firstname: John
148
+ lastname: Doe
149
+ address1: 5 Lovely Street
150
+ address2: Northwest
151
+ city: Herndon
152
+ zipcode: '35005'
153
+ phone: 555-555-0199
154
+ state_name:
155
+ alternative_phone: 555-555-0199
156
+ company: Company
157
+ created_at: '2021-08-20T11:02:26.535Z'
158
+ updated_at: '2021-08-20T11:02:26.535Z'
159
+ deleted_at:
160
+ label:
161
+ relationships:
162
+ country:
163
+ data:
164
+ id: '2'
165
+ type: country
166
+ state:
167
+ data:
168
+ id: '1'
169
+ type: state
170
+ user:
171
+ data:
172
+ id: '1'
173
+ type: user
174
+ '422':
175
+ description: invalid request
176
+ content:
177
+ application/vnd.api+json:
178
+ examples:
179
+ Example:
180
+ value:
181
+ error: First Name can't be blank, Last Name can't be blank, Address
182
+ can't be blank, City can't be blank, Country can't be blank,
183
+ Zip Code can't be blank, and Phone can't be blank
184
+ errors:
185
+ firstname:
186
+ - can't be blank
187
+ lastname:
188
+ - can't be blank
189
+ address1:
190
+ - can't be blank
191
+ city:
192
+ - can't be blank
193
+ country:
194
+ - can't be blank
195
+ zipcode:
196
+ - can't be blank
197
+ phone:
198
+ - can't be blank
199
+ requestBody:
200
+ content:
201
+ application/json:
202
+ schema:
203
+ "$ref": "#/components/schemas/address_params"
204
+ "/api/v2/platform/addresses/{id}":
205
+ get:
206
+ summary: Returns an Address
207
+ tags:
208
+ - Addresses
209
+ security:
210
+ - bearer_auth: []
211
+ parameters:
212
+ - name: id
213
+ in: path
214
+ required: true
215
+ schema:
216
+ type: string
217
+ - name: include
218
+ in: query
219
+ description: 'Select which associated resources you would like to fetch, see:
220
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
221
+ example: user,country,state
222
+ schema:
223
+ type: string
224
+ responses:
225
+ '200':
226
+ description: Record found
227
+ content:
228
+ application/vnd.api+json:
229
+ examples:
230
+ Example:
231
+ value:
232
+ data:
233
+ id: '1'
234
+ type: address
235
+ attributes:
236
+ firstname: John
237
+ lastname: Doe
238
+ address1: 6 Lovely Street
239
+ address2: Northwest
240
+ city: Herndon
241
+ zipcode: '35005'
242
+ phone: 555-555-0199
243
+ state_name:
244
+ alternative_phone: 555-555-0199
245
+ company: Company
246
+ created_at: '2021-08-20T11:02:26.609Z'
247
+ updated_at: '2021-08-20T11:02:26.609Z'
248
+ deleted_at:
249
+ label:
250
+ relationships:
251
+ country:
252
+ data:
253
+ id: '1'
254
+ type: country
255
+ state:
256
+ data:
257
+ id: '1'
258
+ type: state
259
+ user:
260
+ data:
261
+ '404':
262
+ description: Record not found
263
+ content:
264
+ application/vnd.api+json:
265
+ examples:
266
+ Example:
267
+ value:
268
+ error: The resource you were looking for could not be found.
269
+ '401':
270
+ description: Authentication Failed
271
+ content:
272
+ application/vnd.api+json:
273
+ examples:
274
+ Example:
275
+ value:
276
+ error: The access token is invalid
277
+ put:
278
+ summary: Updates an Address
279
+ tags:
280
+ - Addresses
281
+ security:
282
+ - bearer_auth: []
283
+ parameters:
284
+ - name: id
285
+ in: path
286
+ required: true
287
+ schema:
288
+ type: string
289
+ - name: include
290
+ in: query
291
+ description: 'Select which associated resources you would like to fetch, see:
292
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
293
+ example: user,country,state
294
+ schema:
295
+ type: string
296
+ responses:
297
+ '200':
298
+ description: record updated
299
+ content:
300
+ application/vnd.api+json:
301
+ examples:
302
+ Example:
303
+ value:
304
+ data:
305
+ id: '1'
306
+ type: address
307
+ attributes:
308
+ firstname: Jack
309
+ lastname: Doe
310
+ address1: 8 Lovely Street
311
+ address2: Northwest
312
+ city: Herndon
313
+ zipcode: '35005'
314
+ phone: 555-555-0199
315
+ state_name:
316
+ alternative_phone: 555-555-0199
317
+ company: Company
318
+ created_at: '2021-08-20T11:02:26.706Z'
319
+ updated_at: '2021-08-20T11:02:26.721Z'
320
+ deleted_at:
321
+ label:
322
+ relationships:
323
+ country:
324
+ data:
325
+ id: '1'
326
+ type: country
327
+ state:
328
+ data:
329
+ id: '1'
330
+ type: state
331
+ user:
332
+ data:
333
+ '422':
334
+ description: invalid request
335
+ content:
336
+ application/vnd.api+json:
337
+ examples:
338
+ Example:
339
+ value:
340
+ error: First Name can't be blank and Last Name can't be blank
341
+ errors:
342
+ firstname:
343
+ - can't be blank
344
+ lastname:
345
+ - can't be blank
346
+ '404':
347
+ description: Record not found
348
+ content:
349
+ application/vnd.api+json:
350
+ examples:
351
+ Example:
352
+ value:
353
+ error: The resource you were looking for could not be found.
354
+ '401':
355
+ description: Authentication Failed
356
+ content:
357
+ application/vnd.api+json:
358
+ examples:
359
+ Example:
360
+ value:
361
+ error: The access token is invalid
362
+ requestBody:
363
+ content:
364
+ application/json:
365
+ schema:
366
+ "$ref": "#/components/schemas/address_params"
367
+ delete:
368
+ summary: Deletes an Address
369
+ tags:
370
+ - Addresses
371
+ security:
372
+ - bearer_auth: []
373
+ parameters:
374
+ - name: id
375
+ in: path
376
+ required: true
377
+ schema:
378
+ type: string
379
+ responses:
380
+ '204':
381
+ description: Record deleted
382
+ '404':
383
+ description: Record not found
384
+ content:
385
+ application/vnd.api+json:
386
+ examples:
387
+ Example:
388
+ value:
389
+ error: The resource you were looking for could not be found.
390
+ '401':
391
+ description: Authentication Failed
392
+ content:
393
+ application/vnd.api+json:
394
+ examples:
395
+ Example:
396
+ value:
397
+ error: The access token is invalid
398
+ "/api/v2/platform/classifications":
399
+ get:
400
+ summary: Returns a list of Classifications
401
+ tags:
402
+ - Classifications
403
+ security:
404
+ - bearer_auth: []
405
+ parameters:
406
+ - name: page
407
+ in: query
408
+ example: 1
409
+ schema:
410
+ type: integer
411
+ - name: per_page
412
+ in: query
413
+ example: 50
414
+ schema:
415
+ type: integer
416
+ - name: include
417
+ in: query
418
+ description: 'Select which associated resources you would like to fetch, see:
419
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
420
+ example: product,taxon
421
+ schema:
422
+ type: string
423
+ - name: filter
424
+ in: query
425
+ description: ''
426
+ example: taxon_id_eq=1
427
+ schema:
428
+ type: string
429
+ responses:
430
+ '200':
431
+ description: Records returned
432
+ content:
433
+ application/vnd.api+json:
434
+ examples:
435
+ Example:
436
+ value:
437
+ data:
438
+ - id: '1'
439
+ type: classification
440
+ attributes:
441
+ position: 1
442
+ created_at: '2021-08-20T11:02:27.225Z'
443
+ updated_at: '2021-08-20T11:02:27.225Z'
444
+ relationships:
445
+ product:
446
+ data:
447
+ id: '1'
448
+ type: product
449
+ taxon:
450
+ data:
451
+ id: '2'
452
+ type: taxon
453
+ - id: '2'
454
+ type: classification
455
+ attributes:
456
+ position: 1
457
+ created_at: '2021-08-20T11:02:27.336Z'
458
+ updated_at: '2021-08-20T11:02:27.336Z'
459
+ relationships:
460
+ product:
461
+ data:
462
+ id: '2'
463
+ type: product
464
+ taxon:
465
+ data:
466
+ id: '4'
467
+ type: taxon
468
+ meta:
469
+ count: 2
470
+ total_count: 2
471
+ total_pages: 1
472
+ links:
473
+ self: http://www.example.com/api/v2/platform/classifications?page=1&per_page=&include=&filter=
474
+ next: http://www.example.com/api/v2/platform/classifications?include=&page=1&per_page=
475
+ prev: http://www.example.com/api/v2/platform/classifications?include=&page=1&per_page=
476
+ last: http://www.example.com/api/v2/platform/classifications?include=&page=1&per_page=
477
+ first: http://www.example.com/api/v2/platform/classifications?include=&page=1&per_page=
478
+ '401':
479
+ description: Authentication Failed
480
+ content:
481
+ application/vnd.api+json:
482
+ examples:
483
+ Example:
484
+ value:
485
+ error: The access token is invalid
486
+ post:
487
+ summary: Creates a Classification
488
+ tags:
489
+ - Classifications
490
+ security:
491
+ - bearer_auth: []
492
+ parameters:
493
+ - name: include
494
+ in: query
495
+ description: 'Select which associated resources you would like to fetch, see:
496
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
497
+ example: product,taxon
498
+ schema:
499
+ type: string
500
+ responses:
501
+ '201':
502
+ description: record created
503
+ content:
504
+ application/vnd.api+json:
505
+ examples:
506
+ Example:
507
+ value:
508
+ data:
509
+ id: '1'
510
+ type: classification
511
+ attributes:
512
+ position: 1
513
+ created_at: '2021-08-20T11:02:27.775Z'
514
+ updated_at: '2021-08-20T11:02:27.775Z'
515
+ relationships:
516
+ product:
517
+ data:
518
+ id: '1'
519
+ type: product
520
+ taxon:
521
+ data:
522
+ id: '2'
523
+ type: taxon
524
+ '422':
525
+ description: invalid request
526
+ content:
527
+ application/vnd.api+json:
528
+ examples:
529
+ Example:
530
+ value:
531
+ error: Taxon can't be blank and Product can't be blank
532
+ errors:
533
+ taxon:
534
+ - can't be blank
535
+ product:
536
+ - can't be blank
537
+ requestBody:
538
+ content:
539
+ application/json:
540
+ schema:
541
+ "$ref": "#/components/schemas/classification_params"
542
+ "/api/v2/platform/classifications/{id}":
543
+ get:
544
+ summary: Returns a Classification
545
+ tags:
546
+ - Classifications
547
+ security:
548
+ - bearer_auth: []
549
+ parameters:
550
+ - name: id
551
+ in: path
552
+ required: true
553
+ schema:
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-20T11:02:27.921Z'
576
+ updated_at: '2021-08-20T11:02:27.921Z'
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-20T11:02:28.202Z'
635
+ updated_at: '2021-08-20T11:02:28.202Z'
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/classification_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-20T11:02:28.904Z'
742
+ updated_at: '2021-08-20T11:02:28.922Z'
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-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
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-20T11:02:29.297Z'
893
+ zipcode_required: true
894
+ created_at: '2021-08-20T11:02:29.297Z'
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/option_types":
915
+ get:
916
+ summary: Returns a list of OptionTypes
917
+ tags:
918
+ - OptionTypes
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: ''
937
+ schema:
938
+ type: string
939
+ - name: filter
940
+ in: query
941
+ description: ''
942
+ example: option_type_id_eq=1&name_cont=Size
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: option_type
956
+ attributes:
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
963
+ relationships:
964
+ option_values:
965
+ data: []
966
+ - id: '2'
967
+ type: option_type
968
+ attributes:
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
975
+ relationships:
976
+ option_values:
977
+ data: []
978
+ meta:
979
+ count: 2
980
+ total_count: 2
981
+ total_pages: 1
982
+ links:
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=
988
+ '401':
989
+ description: Authentication Failed
990
+ content:
991
+ application/vnd.api+json:
992
+ examples:
993
+ Example:
994
+ value:
995
+ error: The access token is invalid
996
+ post:
997
+ summary: Creates an OptionType
998
+ tags:
999
+ - OptionTypes
1000
+ security:
1001
+ - bearer_auth: []
1002
+ parameters:
1003
+ - name: include
1004
+ in: query
1005
+ description: 'Select which associated resources you would like to fetch, see:
1006
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1007
+ example: ''
1008
+ schema:
1009
+ type: string
1010
+ responses:
1011
+ '201':
1012
+ description: record created
1013
+ content:
1014
+ application/vnd.api+json:
1015
+ examples:
1016
+ Example:
1017
+ value:
1018
+ data:
1019
+ id: '1'
1020
+ type: option_type
1021
+ attributes:
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
1028
+ relationships:
1029
+ option_values:
1030
+ data: []
1031
+ '422':
1032
+ description: invalid request
1033
+ content:
1034
+ application/vnd.api+json:
1035
+ examples:
1036
+ Example:
1037
+ value:
1038
+ error: Name can't be blank and Presentation can't be blank
1039
+ errors:
1040
+ name:
1041
+ - can't be blank
1042
+ presentation:
1043
+ - can't be blank
1044
+ requestBody:
1045
+ content:
1046
+ application/json:
1047
+ schema:
1048
+ "$ref": "#/components/schemas/optiontype_params"
1049
+ "/api/v2/platform/option_types/{id}":
1050
+ get:
1051
+ summary: Returns an OptionType
1052
+ tags:
1053
+ - OptionTypes
1054
+ security:
1055
+ - bearer_auth: []
1056
+ parameters:
1057
+ - name: id
1058
+ in: path
1059
+ required: true
1060
+ schema:
1061
+ type: string
1062
+ - name: include
1063
+ in: query
1064
+ description: 'Select which associated resources you would like to fetch, see:
1065
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1066
+ example: ''
1067
+ schema:
1068
+ type: string
1069
+ responses:
1070
+ '200':
1071
+ description: Record found
1072
+ content:
1073
+ application/vnd.api+json:
1074
+ examples:
1075
+ Example:
1076
+ value:
1077
+ data:
1078
+ id: '1'
1079
+ type: option_type
1080
+ attributes:
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
1087
+ relationships:
1088
+ option_values:
1089
+ data: []
1090
+ '404':
1091
+ description: Record not found
1092
+ content:
1093
+ application/vnd.api+json:
1094
+ examples:
1095
+ Example:
1096
+ value:
1097
+ error: The resource you were looking for could not be found.
1098
+ '401':
1099
+ description: Authentication Failed
1100
+ content:
1101
+ application/vnd.api+json:
1102
+ examples:
1103
+ Example:
1104
+ value:
1105
+ error: The access token is invalid
1106
+ put:
1107
+ summary: Updates an OptionType
1108
+ tags:
1109
+ - OptionTypes
1110
+ security:
1111
+ - bearer_auth: []
1112
+ parameters:
1113
+ - name: id
1114
+ in: path
1115
+ required: true
1116
+ schema:
1117
+ type: string
1118
+ - name: include
1119
+ in: query
1120
+ description: 'Select which associated resources you would like to fetch, see:
1121
+ <a href="https://jsonapi.org/format/#fetching-includes">https://jsonapi.org/format/#fetching-includes</a>'
1122
+ example: ''
1123
+ schema:
1124
+ type: string
1125
+ responses:
1126
+ '200':
1127
+ description: record updated
1128
+ content:
1129
+ application/vnd.api+json:
1130
+ examples:
1131
+ Example:
1132
+ value:
1133
+ data:
1134
+ id: '1'
1135
+ type: option_type
1136
+ attributes:
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
1143
+ relationships:
1144
+ option_values:
1145
+ data: []
1146
+ '422':
1147
+ description: invalid request
1148
+ content:
1149
+ application/vnd.api+json:
1150
+ examples:
1151
+ Example:
1152
+ value:
1153
+ error: Name can't be blank
1154
+ errors:
1155
+ name:
1156
+ - can't be blank
1157
+ '404':
1158
+ description: Record not found
1159
+ content:
1160
+ application/vnd.api+json:
1161
+ examples:
1162
+ Example:
1163
+ value:
1164
+ error: The resource you were looking for could not be found.
1165
+ '401':
1166
+ description: Authentication Failed
1167
+ content:
1168
+ application/vnd.api+json:
1169
+ examples:
1170
+ Example:
1171
+ value:
1172
+ error: The access token is invalid
1173
+ requestBody:
1174
+ content:
1175
+ application/json:
1176
+ schema:
1177
+ "$ref": "#/components/schemas/optiontype_params"
1178
+ delete:
1179
+ summary: Deletes an OptionType
1180
+ tags:
1181
+ - OptionTypes
1182
+ security:
1183
+ - bearer_auth: []
1184
+ parameters:
1185
+ - name: id
1186
+ in: path
1187
+ required: true
1188
+ schema:
1189
+ type: string
1190
+ responses:
1191
+ '204':
1192
+ description: Record deleted
1193
+ '404':
1194
+ description: Record not found
1195
+ content:
1196
+ application/vnd.api+json:
1197
+ examples:
1198
+ Example:
1199
+ value:
1200
+ error: The resource you were looking for could not be found.
1201
+ '401':
1202
+ description: Authentication Failed
1203
+ content:
1204
+ application/vnd.api+json:
1205
+ examples:
1206
+ Example:
1207
+ value:
1208
+ error: The access token is invalid
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:
1233
+ type: string
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:
2290
+ type: string
2291
+ city:
2292
+ type: string
2293
+ zipcode:
2294
+ type: string
2295
+ phone:
2296
+ type: string
2297
+ alternative_phone:
2298
+ type: string
2299
+ firstname:
2300
+ type: string
2301
+ lastname:
2302
+ type: string
2303
+ label:
2304
+ type: string
2305
+ company:
2306
+ type: string
2307
+ user_id:
2308
+ type: string
2309
+ classification_params:
2310
+ type: object
2311
+ properties:
2312
+ product_id:
2313
+ type: string
2314
+ taxon_id:
2315
+ type: string
2316
+ position:
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
2410
+ taxon_params:
2411
+ type: object
2412
+ properties:
2413
+ taxonomy_id:
2414
+ type: string
2415
+ parent_id:
2416
+ type: string
2417
+ name:
2418
+ type: string
2419
+ required:
2420
+ - name
2421
+ - taxonomy_id
2422
+ resources_list:
2423
+ type: object
2424
+ properties:
2425
+ data:
2426
+ type: array
2427
+ items:
2428
+ allOf:
2429
+ - "$ref": "#/components/schemas/resource_properties"
2430
+ meta:
2431
+ type: object
2432
+ properties:
2433
+ count:
2434
+ type: integer
2435
+ total_count:
2436
+ type: integer
2437
+ total_pages:
2438
+ type: integer
2439
+ required:
2440
+ - count
2441
+ - total_count
2442
+ - total_pages
2443
+ links:
2444
+ type: object
2445
+ properties:
2446
+ self:
2447
+ type: string
2448
+ next:
2449
+ type: string
2450
+ prev:
2451
+ type: string
2452
+ last:
2453
+ type: string
2454
+ first:
2455
+ type: string
2456
+ required:
2457
+ - self
2458
+ - next
2459
+ - prev
2460
+ - last
2461
+ - first
2462
+ required:
2463
+ - data
2464
+ - meta
2465
+ - links
2466
+ resource_properties:
2467
+ type: object
2468
+ properties:
2469
+ id:
2470
+ type: string
2471
+ type:
2472
+ type: string
2473
+ attributes:
2474
+ type: object
2475
+ relationships:
2476
+ type: object
2477
+ required:
2478
+ - id
2479
+ - type
2480
+ - attributes
2481
+ - relationships
2482
+ resource:
2483
+ type: object
2484
+ properties:
2485
+ data:
2486
+ "$ref": "#/components/schemas/resource_properties"
2487
+ required:
2488
+ - data
2489
+ error:
2490
+ type: object
2491
+ properties:
2492
+ error:
2493
+ type: string
2494
+ required:
2495
+ - error
2496
+ validation_errors:
2497
+ type: object
2498
+ properties:
2499
+ error:
2500
+ type: string
2501
+ errors:
2502
+ type: object
2503
+ required:
2504
+ - error
2505
+ - errors