Create Category

POST {{baseUrl}}/categories

This endpoint allows you to create a new category and return the category id and its details.

Request Body

{"name"=>"<string>", "parent_id"=>"<number>", "sort_order"=>"<number>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring
Acceptstring

RESPONSES

status: Created

{&quot;status&quot;:&quot;\u003cnumber\u003e&quot;,&quot;success&quot;:&quot;\u003cboolean\u003e&quot;,&quot;data&quot;:{&quot;id&quot;:&quot;\u003cnumber\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;urls&quot;:{&quot;customer&quot;:&quot;\u003cstring\u003e&quot;,&quot;admin&quot;:&quot;\u003cstring\u003e&quot;},&quot;items&quot;:[{&quot;value&quot;:&quot;\u003cCircular reference to #/components/schemas/Category detected\u003e&quot;}],&quot;parent_id&quot;:&quot;\u003cinteger\u003e&quot;,&quot;status&quot;:&quot;hidden&quot;,&quot;sort_order&quot;:&quot;\u003cinteger\u003e&quot;}}