@@ -43,36 +43,99 @@ Third-party modules may define other custom attributes.
4343
4444The following example uses the ` POST V1/categories ` call to assign four custom attributes to the "My New Category" category.
4545
46+ ## Request
47+
4648``` json
4749{
48- "category" : {
50+ "category" : {
51+ "parent_id" : 2 ,
52+ "name" : " Kids" ,
53+ "is_active" : true ,
54+ "level" : 2 ,
55+ "include_in_menu" : true ,
56+ "custom_attributes" : [
57+ {
58+ "attribute_code" : " description" ,
59+ "value" : " kids category description"
60+ },
61+ {
62+ "attribute_code" : " meta_title" ,
63+ "value" : " Kids meta title"
64+ },
65+ {
66+ "attribute_code" : " meta_keywords" ,
67+ "value" : " Kids meta keywords"
68+ },
69+ {
70+ "attribute_code" : " meta_description" ,
71+ "value" : " Kids meta description"
72+ },
73+ {
74+ "attribute_code" : " url_key" ,
75+ "value" : " kids"
76+ },
77+ {
78+ "attribute_code" : " url_path" ,
79+ "value" : " kids"
80+ }
81+ ]
82+ }
83+ }
84+ ```
85+
86+ ## Response
87+
88+ ``` json
89+ {
90+ "id" : 42 ,
4991 "parent_id" : 2 ,
50- "name" : " My New Category " ,
92+ "name" : " Kids " ,
5193 "is_active" : true ,
94+ "position" : 9 ,
5295 "level" : 2 ,
96+ "children" : " " ,
97+ "created_at" : " 2020-12-18 08:50:47" ,
98+ "updated_at" : " 2020-12-18 08:50:47" ,
99+ "path" : " 1/2/43" ,
100+ "available_sort_by" : [],
53101 "include_in_menu" : true ,
54- "custom_attributes" :[
55- {
56- "attribute_code" :" description" ,
57- "value" :" Women category description"
58- },
59- {
60- "attribute_code" :" meta_title" ,
61- "value" :" Women meta title"
62- },
63- {
64- "attribute_code" :" meta_keywords" ,
65- "value" :" Women meta keywords"
66- },
67- {
68- "attribute_code" :" meta_description" ,
69- "value" :" Women meta description"
70- },
71- {
72- "attribute_code" :" url_key" ,
73- "value" :" women-test-key"
74- }
75- ]
76- }
102+ "custom_attributes" : [
103+ {
104+ "attribute_code" : " description" ,
105+ "value" : " kids category description"
106+ },
107+ {
108+ "attribute_code" : " meta_title" ,
109+ "value" : " Kids meta title"
110+ },
111+ {
112+ "attribute_code" : " meta_keywords" ,
113+ "value" : " Kids meta keywords"
114+ },
115+ {
116+ "attribute_code" : " meta_description" ,
117+ "value" : " Kids meta description"
118+ },
119+ {
120+ "attribute_code" : " is_anchor" ,
121+ "value" : " 1"
122+ },
123+ {
124+ "attribute_code" : " path" ,
125+ "value" : " 1/2/43"
126+ },
127+ {
128+ "attribute_code" : " children_count" ,
129+ "value" : " 0"
130+ },
131+ {
132+ "attribute_code" : " url_key" ,
133+ "value" : " kids"
134+ },
135+ {
136+ "attribute_code" : " url_path" ,
137+ "value" : " kids"
138+ }
139+ ]
77140}
78141```
0 commit comments