Skip to main content
This performs a soft delete operation, marking the category as inactive while preserving data integrity and audit trails.
Deleting a category will also mark all its subcategories and objects as inactive. This action cannot be undone through the API.

Prerequisites

  • Valid API key with category management permissions
  • Category must exist and be accessible to your account
  • Category should not have active subcategories or objects (will return 409 if it does)

Request

curl -X DELETE "https://api.g2cplatform.com/v2/categories/123e4567-e89b-12d3-a456-426614174000" \
  -H "X-API-Key: your-api-key"

Path Parameters

ParameterTypeRequiredDescription
categoryIdstring (uuid)YesUnique identifier for the category to delete

Response

No content - category deleted successfully

Response Codes

Status CodeDescription
204Category deleted successfully
401Unauthorized - invalid API key
404Category not found
409Cannot delete category (has active subcategories or objects)
500Internal server error

Usage Notes

  • Soft Delete: Categories are marked as inactive rather than permanently removed
  • Cascade Effect: Deleting a category affects all subcategories and objects within it
  • Audit Trail: Deletion events are logged for compliance and audit purposes
  • Dependencies: Categories with active subcategories or objects cannot be deleted
  • Recovery: Contact support if you need to recover a deleted category

Best Practices

  1. Check Dependencies: Use the Get Category endpoint to check for subcategories and objects before deletion
  2. Backup Important Data: Export or backup important category data before deletion
  3. Inform Users: Notify relevant users before deleting shared categories
  4. Use Carefully: Consider deactivating instead of deleting if you might need the category later