Skip to main content
PATCH
/
api
/
v2
/
admin
/
category
/
{id}
Toggle category publish status
curl --request PATCH \
  --url https://faisalshop.mvp-apps.ae/api/v2/admin/category/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'X-Tenant-ID: <x-tenant-id>'

Overview

Toggle the publish status of a category. This allows you to show or hide categories from public view without deleting them.

Authorization

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

Use Cases

  • Temporarily hide categories during inventory updates
  • Seasonal category management
  • A/B testing different category structures

Example Usage

curl -X PATCH \
  https://faisalshop.mvp-apps.ae/api/v2/admin/category/5 \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'X-Tenant-ID: 123'
await axios.patch(
  `/api/v2/admin/category/${categoryId}`,
  {},
  {
    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

Path Parameters

id
integer
required

Response

200

Status toggled