Skip to main content

deleteCategory()

deleteCategory(categoryId: string): Promise<void>

Defined in: packages/core/src/index.ts:995

Delete a category by ID

Parameters

ParameterTypeDescription
categoryIdstringThe unique identifier of the category to delete

Returns

Promise<void>

void

Throws

401 - Not authenticated

Throws

403 - Admin privileges required

Throws

404 - Category not found

Example

import { deleteCategory } from "@cpod/sdk";

await deleteCategory("category-123");
console.log("Category deleted successfully");