V1 and V2Categories

Create a product subcategory

POST
/api/v1/categories/product/{category_id}

Add a new sub-category under an existing category

Authorization

bearerAuth
AuthorizationBearer <token>

Obtain a token via POST /auth/api/get-token (15 minute lifetime), then send it as Authorization: Bearer <token>.

In: header

Path Parameters

category_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST 'https://example.com/api/v1/categories/product/string' \  -H 'Content-Type: application/json' \  --data-raw '{  "name": "Kitchen Sinks"}'
{  "data": [    {      "id": "5cfa0c1e3da03100019ba90f",      "modified": "2019-06-07T07:02:54.817539+00:00",      "n_children": 0,      "name": "Apron",      "order": "1",      "parents_ids": [        "5cfa05273da03100019ba90e"      ],      "path": [        "Kitchen Sinks",        "Apron"      ],      "slug": "apron"    }  ]}