Skip to main content
Sub-categories live under a category and group related offers. They support soft-delete, version tracking, and audit logging. For the full sub-categories documentation integrated with the Categories API, see the Categories API reference. All sub-categories support soft-delete (a 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

Returns a paginated list of sub-categories for the tenant, ordered by 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

Updates an existing sub-category. Only provided fields are changed. The 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)

Soft-deletes a sub-category by setting its 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).

Role requirements