Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Update catalog.md (#8401)
Browse files Browse the repository at this point in the history
* Update catalog.md

Added Response of the Category creation.

* Update catalog.md

* Update catalog.md

Co-authored-by: Kevin Harper <[email protected]>
  • Loading branch information
RakeshJesadiya and keharper authored Dec 18, 2020
1 parent dec2142 commit 413025a
Showing 1 changed file with 88 additions and 25 deletions.
113 changes: 88 additions & 25 deletions src/guides/v2.3/rest/modules/catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,36 +43,99 @@ 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": {
"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"
}
]
}
}
```

## Response

```json
{
"id": 42,
"parent_id": 2,
"name": "My New Category",
"name": "Kids",
"is_active": true,
"position": 9,
"level": 2,
"children": "",
"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 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":"url_key",
"value":"women-test-key"
}
]
}
"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": "is_anchor",
"value": "1"
},
{
"attribute_code": "path",
"value": "1/2/43"
},
{
"attribute_code": "children_count",
"value": "0"
},
{
"attribute_code": "url_key",
"value": "kids"
},
{
"attribute_code": "url_path",
"value": "kids"
}
]
}
```

0 comments on commit 413025a

Please sign in to comment.