V1 and V2Categories

Create a product category

POST
/api/v1/categories/product

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

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' \  -H 'Content-Type: application/json' \  --data-raw '{  "name": "Kitchen Sinks"}'
{  "data": [    {      "id": "5cfa05273da03100019ba90e",      "modified": "2019-06-07T06:33:11.965893+00:00",      "n_children": 0,      "name": "Kitchen Sinks",      "order": "5",      "parents_ids": [],      "path": [        "Kitchen Sinks"      ],      "slug": "kitchen-sinks"    }  ]}