deletedAt timestamp is set instead of permanent removal), version tracking (the version field auto-increments on every update), and audit logging (before/after snapshots are recorded for every CRUD operation).
Base path
List sub-categories
ordinal ascending. Optionally filter by parent category. By default, soft-deleted sub-categories are excluded.
Query Parameters
Response 200
Create a sub-category
Request Body
Example
Response 201
Returns the created sub-category with its parent category relation, version: 1, and deletedAt: null. An audit log entry is created with a create action.
Error codes
Update a sub-category
version field is auto-incremented and a before/after audit snapshot is recorded.
Request Body
All other fields from the create schema are accepted as optional.
Response 200
Returns the updated sub-category object with the incremented version.
Error codes
Delete a sub-category (soft-delete)
deletedAt timestamp. The version is incremented.
Query Parameters
Response 200
Error codes
To restore a soft-deleted sub-category, use
POST /api/v1/restore?entityType=subCategory&id={subCategoryId} (admin only).