From 47277592f32c48c604ff103b6e80055d7306ba80 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Thu, 17 Dec 2020 16:10:25 +0530 Subject: [PATCH 1/3] Update catalog.md Added Response of the Category creation. --- src/guides/v2.3/rest/modules/catalog.md | 58 +++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/guides/v2.3/rest/modules/catalog.md b/src/guides/v2.3/rest/modules/catalog.md index 899584dff3c..81769aa8d4f 100644 --- a/src/guides/v2.3/rest/modules/catalog.md +++ b/src/guides/v2.3/rest/modules/catalog.md @@ -43,6 +43,8 @@ Third-party modules may define other custom attributes. The following example uses the `POST V1/categories` call to assign four custom attributes to the "My New Category" category. +## Request + ```json { "category": { @@ -76,3 +78,59 @@ The following example uses the `POST V1/categories` call to assign four custom a } } ``` + +## Response +```json +{ + "id": 42, + "parent_id": 2, + "name": "My New Category", + "is_active": true, + "position": 8, + "level": 2, + "children": "", + "created_at": "2020-12-17 10:38:01", + "updated_at": "2020-12-17 10:38:01", + "path": "1/2/42", + "available_sort_by": [], + "include_in_menu": true, + "custom_attributes": [ + { + "attribute_code": "description", + "value": "Women category description" + }, + { + "attribute_code": "meta_title", + "value": "Women meta title" + }, + { + "attribute_code": "meta_keywords", + "value": "Women meta keywords" + }, + { + "attribute_code": "meta_description", + "value": "Women meta description" + }, + { + "attribute_code": "is_anchor", + "value": "1" + }, + { + "attribute_code": "path", + "value": "1/2/42" + }, + { + "attribute_code": "children_count", + "value": "0" + }, + { + "attribute_code": "url_key", + "value": "women-test-key" + }, + { + "attribute_code": "url_path", + "value": "women-test-key" + } + ] +} +``` From fef4ae4fc7ec19730cfea8d9ec35d6bb99906bee Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Thu, 17 Dec 2020 18:17:26 +0530 Subject: [PATCH 2/3] Update catalog.md --- src/guides/v2.3/rest/modules/catalog.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/guides/v2.3/rest/modules/catalog.md b/src/guides/v2.3/rest/modules/catalog.md index 81769aa8d4f..325cdabb3e8 100644 --- a/src/guides/v2.3/rest/modules/catalog.md +++ b/src/guides/v2.3/rest/modules/catalog.md @@ -56,23 +56,23 @@ The following example uses the `POST V1/categories` call to assign four custom a "custom_attributes":[ { "attribute_code":"description", - "value":"Women category description" + "value":"Women's category description" }, { "attribute_code":"meta_title", - "value":"Women meta title" + "value":"Women's meta title" }, { "attribute_code":"meta_keywords", - "value":"Women meta keywords" + "value":"Women's meta keywords" }, { "attribute_code":"meta_description", - "value":"Women meta description" + "value":"Women's meta description" }, { "attribute_code":"url_key", - "value":"women-test-key" + "value":"womens-test-key" } ] } @@ -80,6 +80,7 @@ The following example uses the `POST V1/categories` call to assign four custom a ``` ## Response + ```json { "id": 42, @@ -97,19 +98,19 @@ The following example uses the `POST V1/categories` call to assign four custom a "custom_attributes": [ { "attribute_code": "description", - "value": "Women category description" + "value": "Women's category description" }, { "attribute_code": "meta_title", - "value": "Women meta title" + "value": "Women's meta title" }, { "attribute_code": "meta_keywords", - "value": "Women meta keywords" + "value": "Women's meta keywords" }, { "attribute_code": "meta_description", - "value": "Women meta description" + "value": "Women's meta description" }, { "attribute_code": "is_anchor", @@ -125,11 +126,11 @@ The following example uses the `POST V1/categories` call to assign four custom a }, { "attribute_code": "url_key", - "value": "women-test-key" + "value": "womens-test-key" }, { "attribute_code": "url_path", - "value": "women-test-key" + "value": "womens-test-key" } ] } From f8aa217420cab8c04893e2605989a7f72c722391 Mon Sep 17 00:00:00 2001 From: Rakesh Jesadiya Date: Fri, 18 Dec 2020 14:23:45 +0530 Subject: [PATCH 3/3] Update catalog.md --- src/guides/v2.3/rest/modules/catalog.md | 84 +++++++++++++------------ 1 file changed, 44 insertions(+), 40 deletions(-) diff --git a/src/guides/v2.3/rest/modules/catalog.md b/src/guides/v2.3/rest/modules/catalog.md index 325cdabb3e8..da62103b7c5 100644 --- a/src/guides/v2.3/rest/modules/catalog.md +++ b/src/guides/v2.3/rest/modules/catalog.md @@ -47,34 +47,38 @@ The following example uses the `POST V1/categories` call to assign four custom a ```json { -"category": { - "parent_id": 2, - "name": "My New Category", - "is_active": true, - "level": 2, - "include_in_menu": true, - "custom_attributes":[ - { - "attribute_code":"description", - "value":"Women's category description" - }, - { - "attribute_code":"meta_title", - "value":"Women's meta title" - }, - { - "attribute_code":"meta_keywords", - "value":"Women's meta keywords" - }, - { - "attribute_code":"meta_description", - "value":"Women's meta description" - }, - { - "attribute_code":"url_key", - "value":"womens-test-key" - } - ] + "category": { + "parent_id": 2, + "name": "Kids", + "is_active": true, + "level": 2, + "include_in_menu": true, + "custom_attributes": [ + { + "attribute_code": "description", + "value": "kids category description" + }, + { + "attribute_code": "meta_title", + "value": "Kids meta title" + }, + { + "attribute_code": "meta_keywords", + "value": "Kids meta keywords" + }, + { + "attribute_code": "meta_description", + "value": "Kids meta description" + }, + { + "attribute_code": "url_key", + "value": "kids" + }, + { + "attribute_code": "url_path", + "value": "kids" + } + ] } } ``` @@ -85,32 +89,32 @@ The following example uses the `POST V1/categories` call to assign four custom a { "id": 42, "parent_id": 2, - "name": "My New Category", + "name": "Kids", "is_active": true, - "position": 8, + "position": 9, "level": 2, "children": "", - "created_at": "2020-12-17 10:38:01", - "updated_at": "2020-12-17 10:38:01", - "path": "1/2/42", + "created_at": "2020-12-18 08:50:47", + "updated_at": "2020-12-18 08:50:47", + "path": "1/2/43", "available_sort_by": [], "include_in_menu": true, "custom_attributes": [ { "attribute_code": "description", - "value": "Women's category description" + "value": "kids category description" }, { "attribute_code": "meta_title", - "value": "Women's meta title" + "value": "Kids meta title" }, { "attribute_code": "meta_keywords", - "value": "Women's meta keywords" + "value": "Kids meta keywords" }, { "attribute_code": "meta_description", - "value": "Women's meta description" + "value": "Kids meta description" }, { "attribute_code": "is_anchor", @@ -118,7 +122,7 @@ The following example uses the `POST V1/categories` call to assign four custom a }, { "attribute_code": "path", - "value": "1/2/42" + "value": "1/2/43" }, { "attribute_code": "children_count", @@ -126,11 +130,11 @@ The following example uses the `POST V1/categories` call to assign four custom a }, { "attribute_code": "url_key", - "value": "womens-test-key" + "value": "kids" }, { "attribute_code": "url_path", - "value": "womens-test-key" + "value": "kids" } ] }