/
category-trees_catalog.v3.yml
1167 lines (1145 loc) · 36.9 KB
/
category-trees_catalog.v3.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: '3.0.3'
info:
title: Catalog - Category trees
description: |-
> The Catalog API manages products, categories, brands, bulk pricing rules, and more. To learn more about catalog resources, see the [Catalog overview](/docs/store-operations/catalog).
Our Catalog category trees and their [categories](/docs/rest-catalog/category-trees/categories) endpoints are the more modern and performant counterparts to the [categories (deprecated)](/docs/rest-catalog/categories) endpoints. Although the category trees endpoints and objects are designed to center an MSF-compatible, [multi-tenant category tree architecture](#categories), the endpoints work just as well in a single storefront context and support batch requests. Use [catalog trees categories](/docs/rest-catalog/category-trees/categories) endpoints, instead of [categories (deprecated)](/docs/rest-catalog/categories) endpoints.
The category trees endpoints let you [get the categories for a specific tree](/docs/rest-catalog/category-trees/categories#get-a-category-tree), and [bulk create](/docs/rest-catalog/category-trees/categories#create-categories), [bulk update](/docs/rest-catalog/category-trees/categories#update-categories), and [bulk delete](/docs/rest-catalog/category-trees/categories#delete-categories) categories. You can also [bulk update the properties of category trees](/docs/rest-catalog/category-trees#upsert-category-trees), which includes changing the channels to which a tree is assigned.
The terms "category tree" and "catalog tree" are used interchangeably throughout the documentation.
> To learn more about authenticating Catalog endpoints, locate the **Authentication** section at the top of each endpoint, then click **Show Details**.
## Resources
### Webhooks
Learn more about [Category tree webhook events](/docs/integrations/webhooks/events/channels#category-trees).
### Additional Catalog endpoints
* [Brands](/docs/rest-catalog/brands)
* [Categories](/docs/rest-catalog/categories)
* [Products](/docs/rest-catalog/products)
* [Product modifiers](/docs/rest-catalog/product-modifiers)
* [Product variants](/docs/rest-catalog/product-variants)
* [Product variant options](/docs/rest-catalog/product-variant-options)
termsOfService: 'https://www.bigcommerce.com/terms'
contact:
name: BigCommerce
url: 'https://www.bigcommerce.com'
email: support@bigcommerce.com
version: ''
servers:
- url: 'https://api.bigcommerce.com/stores/{store_hash}/v3'
variables:
store_hash:
default: store_hash
description: Permanent ID of the BigCommerce store.
description: BigCommerce API Gateway
security:
- X-Auth-Token: []
tags:
- name: Category trees
- name: Categories
paths:
'/catalog/trees/categories':
get:
summary: Get All Categories
description: |-
Returns a list of categories.
To get a specific category in a tree, provide a category ID.
tags:
- Categories
parameters:
- $ref: '#/components/parameters/CategoryUuidInParam'
- $ref: '#/components/parameters/CategoryIdInParam'
- $ref: '#/components/parameters/TreeIdInParam'
- $ref: '#/components/parameters/ParentIdInParam'
- $ref: '#/components/parameters/CategoryUuidNotInParam'
- $ref: '#/components/parameters/CategoryIdNotInParam'
- $ref: '#/components/parameters/TreeIdNotInParam'
- $ref: '#/components/parameters/ParentIdNotInParam'
- $ref: '#/components/parameters/PageTitleParam'
- $ref: '#/components/parameters/PageTitleLikeParam'
- $ref: '#/components/parameters/NameParam'
- $ref: '#/components/parameters/NameLikeParam'
- $ref: '#/components/parameters/KeywordParam'
- $ref: '#/components/parameters/IsVisibleParam'
- $ref: '#/components/parameters/IncludeFieldsParam'
- $ref: '#/components/parameters/ExcludeFieldsParam'
- $ref: '#/components/parameters/PageParam'
- $ref: '#/components/parameters/LimitParam'
responses:
'200':
description: List of categories.
content:
application/json:
schema:
$ref: '#/components/schemas/CategoryList'
examples:
Get Category 12:
value:
data:
- category_id: 12
category_uuid: d1964756-5e1d-4c72-9fa0-e1a3f7be4a34
parent_id: 2
tree_id: 1
name: Bath
description: <p>We offer a wide variety of products perfect for relaxing</p>
views: 1050
sort_order: 3
page_title: Bath
meta_keywords:
- string
meta_description: string
layout_file: category.html
image_url: 'https://cdn8.bigcommerce.com/s-123456/product_images/d/fakeimage.png'
is_visible: true
search_keywords: string
default_product_sort: use_store_settings
url:
path: string
is_customized: true
meta:
pagination:
total: 246
count: 5
per_page: 5
current_page: 1
total_pages: 50
links:
previous: '?limit=5&page=1'
current: '?limit=5&page=2'
next: '?limit=5&page=3'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequest'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequest'
operationId: getAllCategories
post:
summary: Create Categories
description: |-
Creates new categories.
Creating a category requires:
- `name`
- `tree_id` or `parent_id`
parameters:
- $ref: '#/components/parameters/ContentType'
tags:
- Categories
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCategories'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessResponse'
examples:
Create Category 36:
value:
data:
- category_id: 36
category_uuid: d2de0756-5e1d-4c72-9480-e1a3f7be4a34
parent_id: 0
tree_id: 1
name: Bath
description: <p>We offer a wide variety of products perfect for relaxing</p>
views: 1050
sort_order: 3
page_title: Bath
meta_keywords:
- loofah
- bubbles
meta_description: string
layout_file: category.html
image_url: 'https://cdn8.bigcommerce.com/s-123456/product_images/d/fakeimage.png'
is_visible: true
search_keywords: string
default_product_sort: use_store_settings
url:
path: '/bath/'
is_customized: false
meta:
total: 1
success: 1
failed: 0
'207':
description: Multi-Status
content:
application/json:
schema:
$ref: '#/components/schemas/PartialSuccessResponse'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequest'
'422':
description: 'The Category was not valid. This is the result of missing required fields, or of invalid data. See the response for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequest'
operationId: createCategories
put:
summary: Update Categories
description: |-
Updates existing categories.
To update a specific category in a tree, provide a category id.
parameters:
- $ref: '#/components/parameters/ContentType'
tags:
- Categories
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateCategories'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessNoContentResponse'
'207':
description: Partial success
content:
application/json:
schema:
$ref: '#/components/schemas/PartialSuccessNoContentResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequest'
'422':
description: 'The Category was not valid. This is the result of missing required fields, or of invalid data. See the response for more details.'
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequest'
operationId: updateCategories
delete:
summary: Delete categories
description: |-
Deletes categories.
To delete a specific category in a tree, provide a category ID.
tags:
- Categories
parameters:
- $ref: '#/components/parameters/CategoryUuidInParam'
- $ref: '#/components/parameters/CategoryIdInParam'
- $ref: '#/components/parameters/TreeIdInParam'
- $ref: '#/components/parameters/ParentIdInParam'
responses:
'204':
description: Categories are deleted
content:
application/json:
schema:
$ref: '#/components/schemas/SuccessNoContentResponse'
'400':
description: Bad request
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequest'
'500':
description: Server error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorRequest'
operationId: deleteTreeCategories
parameters:
- $ref: '#/components/parameters/Accept'
'/catalog/trees':
get:
summary: Get all category trees
description: Returns a list of category trees.
operationId: getCategoryTrees
parameters:
- $ref: '#/components/parameters/IdInParam'
- $ref: '#/components/parameters/ChannelIdInParam'
responses:
'200':
description: List of category trees.
content:
application/json:
schema:
$ref: '#/components/schemas/CategoryTreeList'
example:
data:
- id: 0
name: string
channels:
- 0
meta:
pagination:
total: 246
count: 5
per_page: 5
current_page: 1
total_pages: 50
links:
next: '?limit=5&page=2'
current: '?limit=5&page=1'
tags:
- Category trees
put:
summary: Upsert category trees
description: |
Upserts category trees.
This single endpoint updates and creates category trees. If a tree object contains an ID, it is processed as an update operation using that ID. If you do not provide an ID, a new tree is created. The category tree `name` field is required to create trees, but is not required on the update.
**Usage Notes**
* `channel_id` is required to create a category tree. You can assign one `channel_id` to one category tree.
parameters:
- $ref: '#/components/parameters/ContentType'
operationId: upsertCategoryTrees
requestBody:
required: true
content:
application/json:
schema:
'$ref': '#/components/schemas/CategoryTreeListRequest'
responses:
'200':
description: Created a category tree.
content:
application/json:
schema:
$ref: '#/components/schemas/CategoryTree'
example:
data:
- id: 0
name: string
channels:
- 0
meta: {}
'422':
description: The Channel was not valid. See the response for more details.
content:
application/json:
schema:
$ref: '#/components/schemas/beta4ErrorResponse'
example:
status: 0
title: string
type: string
instance: string
errors:
additionalProp1: string
additionalProp2: string
additionalProp3: string
tags:
- Category trees
delete:
summary: Delete category trees
description: Deletes category trees. A filter must be supplied with the endpoint.
operationId: deleteCategoryTrees
parameters:
- $ref: '#/components/parameters/IdInParam'
responses:
'204':
description: Deleted
tags:
- Category trees
parameters:
- $ref: '#/components/parameters/Accept'
'/catalog/trees/{tree_id}/categories':
get:
summary: Get a category tree
description: Returns a category tree.
operationId: getCategoryTree
parameters:
- name: depth
description: Max depth for a tree of categories.
in: query
schema:
type: integer
responses:
'200':
description: Categories tree
content:
application/json:
schema:
$ref: '#/components/schemas/CategoryNodeTree'
example:
data:
- id: 0
parent_id: 0
depth: 0
path:
- 0
name: string
is_visible: true
children:
- string
meta:
type: object
properties: {}
description: Empty meta object; reserved for use later.
'404':
description: The tree was not found.
content:
application/json:
schema:
$ref: '#/components/schemas/beta4ErrorResponse'
example:
status: 0
title: string
type: string
instance: string
errors:
additionalProp1: string
additionalProp2: string
additionalProp3: string
tags:
- Category trees
parameters:
- $ref: '#/components/parameters/Accept'
- $ref: '#/components/parameters/TreeIdParam'
components:
schemas:
metaEmpty_Full:
type: object
title: Response meta
properties: {}
additionalProperties: true
description: Response metadata.
DetailedErrors:
title: DetailedErrors
description: Each key-value pair describes a failure or partial success case.
type: object
properties: {}
additionalProperties: true
x-internal: false
GetCategories:
title: Get Categories
allOf:
- type: object
properties:
name:
$ref: '#/components/schemas/name'
category_id:
$ref: '#/components/schemas/category_id'
category_uuid:
$ref: '#/components/schemas/category_uuid'
tree_id:
$ref: '#/components/schemas/tree_id'
parent_id:
$ref: '#/components/schemas/parent_id'
- $ref: '#/components/schemas/CategoryBase'
- type: object
properties:
url:
$ref: '#/components/schemas/url'
CreateCategories:
title: Create Categories
type: array
items:
allOf:
- type: object
properties:
name:
$ref: '#/components/schemas/name'
url:
$ref: '#/components/schemas/url'
parent_id:
$ref: '#/components/schemas/parent_id'
tree_id:
$ref: '#/components/schemas/tree_id'
required:
- name
- tree_id
- parent_id
- $ref: '#/components/schemas/CategoryBase'
UpdateCategories:
type: array
items:
allOf:
- type: object
properties:
category_id:
$ref: '#/components/schemas/category_id'
name:
$ref: '#/components/schemas/name'
tree_id:
$ref: '#/components/schemas/tree_id'
parent_id:
$ref: '#/components/schemas/parent_id'
required:
- category_id
- $ref: '#/components/schemas/CategoryBase'
- type: object
properties:
url:
$ref: '#/components/schemas/url'
CategoryBase:
title: Category
type: object
properties:
description:
type: string
description: |
The product description, which can include HTML formatting.
example: <p>We offer a wide variety of products perfect for relaxing</p>
views:
type: integer
description: |
Number of views the category has on the storefront.
example: 1050
sort_order:
type: integer
description: |
Priority this category will be given when included in the menu and category pages. The lower the number, the closer to the top of the results the category will be.
example: 3
page_title:
type: string
description: |
Custom title for the category page. If not defined, the category name will be used as the meta title.
example: Bath
meta_keywords:
type: array
description: |
Custom meta keywords for the category page. If not defined, the storeʼs default keywords will be used. Must post as an array like: ["awesome","sauce"].
example:
- shower
- tub
items:
type: string
meta_description:
maxLength: 65535
minLength: 0
type: string
description: |
Custom meta description for the category page. If not defined, the storeʼs default meta description will be used.
layout_file:
maxLength: 500
minLength: 0
type: string
description: |
A valid layout file. (Please refer to [this article](https://support.bigcommerce.com/articles/Public/Creating-Custom-Template-Files/) on creating category files.) This field is writable only for stores with a Blueprint theme applied.
example: category.html
image_url:
type: string
description: |
Image URL used for this category on the storefront. Images can be uploaded via form file post to `/categories/{categoryId}/image`, or by providing a publicly accessible URL in this field. Must be either a full-qualified URL or an empty string.
example: 'https://cdn8.bigcommerce.com/s-123456/product_images/d/fakeimage.png'
x-url: true
is_visible:
type: boolean
description: |
Flag to determine whether the product should be displayed to customers browsing the store. If `true`, the category will be displayed. If `false`, the category will be hidden from view.
search_keywords:
type: string
description: |
A comma-separated list of keywords that can be used to locate the category when searching the store.
default_product_sort:
type: string
description: |
Determines how the products are sorted on category page load.
enum:
- use_store_settings
- featured
- newest
- best_selling
- alpha_asc
- alpha_desc
- avg_customer_review
- price_asc
- price_desc
CategoryList:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/GetCategories'
meta:
$ref: '#/components/schemas/MetaPagination'
CategoryNodeTree:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/CategoryNode'
meta:
$ref: '#/components/schemas/metaEmpty_Full'
CategoryTreeList:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Tree'
meta:
$ref: '#/components/schemas/MetaPaginationObject'
CategoryTree:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/Tree'
meta:
$ref: '#/components/schemas/metaEmpty_Full'
MetaPagination:
type: object
properties:
pagination:
type: object
properties:
total:
type: integer
example: 246
minimum: 0
count:
type: integer
example: 5
minimum: 0
per_page:
type: integer
example: 5
minimum: 0
current_page:
type: integer
example: 1
minimum: 1
total_pages:
type: integer
example: 50
minimum: 0
links:
type: object
properties:
previous:
type: string
example: '?limit=5&page=1'
current:
type: string
example: '?limit=5&page=2'
next:
type: string
example: '?limit=5&page=3'
x-tags:
- Models
ErrorRequest:
type: object
properties:
errors:
type: array
items:
$ref: '#/components/schemas/ErrorBasic'
x-tags:
- Models
ErrorBasic:
type: object
properties:
status:
description: |
The HTTP status code.
type: integer
title:
description: |
The error title describing the particular error.
type: string
type:
type: string
x-tags:
- Models
ErrorAdditional:
type: object
properties:
errors:
$ref: '#/components/schemas/DetailedErrors'
x-tags:
- Models
MetaError:
allOf:
- $ref: '#/components/schemas/ErrorBasic'
- $ref: '#/components/schemas/ErrorAdditional'
x-tags:
- Models
MetaData:
type: object
properties:
total:
type: integer
success:
type: integer
failed:
type: integer
x-tags:
- Models
SuccessNoContentResponse:
type: object
properties:
meta:
$ref: '#/components/schemas/MetaData'
x-tags:
- Models
PartialSuccessNoContentResponse:
type: object
properties:
errors:
$ref: '#/components/schemas/MetaError'
meta:
$ref: '#/components/schemas/MetaData'
x-tags:
- Models
PartialSuccessResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/GetCategories'
errors:
$ref: '#/components/schemas/MetaError'
meta:
$ref: '#/components/schemas/MetaData'
x-tags:
- Models
SuccessResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/GetCategories'
meta:
$ref: '#/components/schemas/MetaData'
x-tags:
- Models
ErrorResponse:
type: object
properties:
errors:
$ref: '#/components/schemas/MetaError'
meta:
$ref: '#/components/schemas/MetaData'
x-tags:
- Models
Tree:
type: object
properties:
id:
type: integer
name:
type: string
minLength: 1
maxLength: 255
channels:
type: array
items:
type: integer
x-tags:
- Models
CategoryTreeListRequest:
type: array
items:
$ref: '#/components/schemas/Tree'
example:
- id: 0
name: string
channels:
- 0
CategoryNode:
type: object
properties:
id:
type: integer
parent_id:
type: integer
depth:
type: integer
path:
type: array
items:
type: integer
name:
type: string
is_visible:
type: boolean
children:
type: array
items:
$ref: '#/components/schemas/CategoryNode'
x-tags:
- Models
MetaPaginationObject:
type: object
properties:
pagination:
type: object
properties:
total:
type: integer
example: 246
minimum: 0
count:
type: integer
example: 5
minimum: 0
per_page:
type: integer
example: 5
minimum: 0
current_page:
type: integer
example: 1
minimum: 1
total_pages:
type: integer
example: 50
minimum: 0
links:
type: object
properties:
next:
type: string
example: '?limit=5&page=2'
current:
type: string
example: '?limit=5&page=1'
x-tags:
- Models
beta4DetailedErrors:
type: object
properties: {}
additionalProperties: true
x-tags:
- Models
BaseError:
type: object
description: |
Error payload for the BigCommerce API.
properties:
status:
description: |
The HTTP status code.
type: integer
title:
description: |
The error title describing the particular error.
type: string
type:
type: string
instance:
type: string
x-tags:
- Models
beta4ErrorResponse:
allOf:
- $ref: '#/components/schemas/BaseError'
- type: object
properties:
errors:
$ref: '#/components/schemas/beta4DetailedErrors'
x-tags:
- Models
url:
title: URL
description: |
If not provided, the URL is autogenerated from the category name.
type: object
properties:
path:
type: string
example: '/bath/'
is_customized:
type: boolean
example: false
category_uuid:
title: Category UUID
type: string
description: An additional unique identifier for the category. Read-Only.
format: uuid
readOnly: true
example: d1964756-5e1d-4c72-9fa0-e1a3f7be4a34
category_id:
title: Category ID
type: integer
description: |-
Unique ID of the *Category*. Increments sequentially.
Read-Only.
readOnly: true
example: 36
parent_id:
title: Parent ID
type: integer
description: |-
The unique numeric ID of the categoryʼs parent. This field controls where the category sits in the tree of categories that organize the catalog.
Required in a POST if creating a child category.
example: 0
tree_id:
title: Tree ID
type: integer
description: The ID of the category tree.
example: 1
name:
title: Name
maxLength: 50
minLength: 1
type: string
description: |-
The name displayed for the category. Name is unique with respect to the categoryʼs siblings.
Required in a POST.
example: Bath
parameters:
Accept:
name: Accept
in: header
required: true
description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.'
schema:
type: string
default: 'application/json'
ContentType:
name: Content-Type
in: header
required: true
description: 'The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.'
schema:
type: string
default: 'application/json'
PageParam:
name: page
description: |
Specifies the page number in a limited (paginated) list of products.
required: false
in: query
schema:
type: integer
LimitParam:
name: limit
description: |
Controls the number of items per page in a limited (paginated) list of products.
required: false
in: query
schema:
type: integer
default: 50
maximum: 250
IncludeFieldsParam:
name: include_fields
in: query
description: Fields to include, in a comma-separated list. The ID and the specified fields will be returned.
style: form
explode: false
schema:
type: array
items:
type: string
ExcludeFieldsParam:
name: exclude_fields
in: query
description: Fields to exclude, in a comma-separated list. The specified fields will be excluded from a response. The ID cannot be excluded.
style: form
explode: false
schema:
type: array
items:
type: string
KeywordParam:
name: keyword
in: query
description: Filter items by keywords found in the `name`, `description`, or `sku` fields, or in the brand name.
schema:
type: string
IsVisibleParam:
name: is_visible
in: query
description: Filter items based on whether the product is currently visible on the storefront.
schema:
type: boolean
NameParam:
name: name
in: query
description: |