Skip to main content
POST
/
api
/
v2
/
admin
/
category
/
create
Create category
curl --request POST \
  --url https://faisalshop.mvp-apps.ae/api/v2/admin/category/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Tenant-ID: <x-tenant-id>' \
  --data '
{
  "name": "<string>",
  "description": "<string>"
}
'

Overview

Create a new product category in your tenant’s catalog. Categories help organize products and improve navigation.

Authorization

  • User must be authenticated with a valid Bearer token
  • User must be a member of the tenant
  • Requires X-Tenant-ID header

Tenant Scoping

Categories are automatically associated with the tenant from the X-Tenant-ID header.

Example Usage

curl -X POST \
  https://faisalshop.mvp-apps.ae/api/v2/admin/category/create \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Tenant-ID: 123' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Electronics",
    "description": "Electronic devices and accessories"
  }'
await axios.post(
  '/api/v2/admin/category/create',
  {
    name: 'Electronics',
    description: 'Electronic devices and accessories'
  },
  {
    headers: {
      Authorization: `Bearer ${token}`,
      'X-Tenant-ID': tenantId
    }
  }
);

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Tenant-ID
string
required

Tenant ID for multi-tenancy

Body

application/json
name
string
required
description
string

Response

201

Category created