Delete one or more entities by id. This playground calls the live API and will remove data from your catalogue. The filters scope is documented below but deliberately not offered here — a filter tree can match your whole catalogue.
Delete every entity in a scope — an explicit list of ids, or everything matching a filter tree.
Each id is resolved as an entity first (brand-scoped), then falls back to a legacy inventory id — in which case the inventory and all of its entities go. Inventories left with no entity at all are removed too, and the matching search-index documents are dropped by the Change Stream shortly after the MongoDB delete. Carrying the scope in the request body removes the URL-length limit of the legacy delete endpoint.
filters scope with an empty condition list means the whole catalogue, and one call deletes up to 5.000 entities with no further confirmation. Deletion is soft — an operator can undo it with php artisan entities:restore for 30 days — but the API offers no way back, so treat every call as final.POST https://api.commerceclarity.com/api/2026-05/entities/deleteSend either ids or filters. If both are present, ids wins and filters is ignored.
| Parameter | Type | Required | Description |
|---|---|---|---|
ids | array | Required | Non-empty array of entity (or legacy inventory) _id strings. Required unless filters is sent. |
filters | object | Required | Filter tree — the same one List / Query entities takes. Deletes everything it matches. Required unless ids is sent. |
filters.operator | string | Required | and or or. Mandatory whenever filters is present. |
filters.conditions | array | Optional | An empty or omitted condition list is the deliberate whole catalogue scope. |
brand_id | string | Optional | Override the active brand. |
filters scope may resolve at most 5 000 entities. The count is checked before anything is deleted; above the cap the request is refused with 422 and nothing is written. An ids scope is not capped.curl -X POST "https://api.commerceclarity.com/api/2026-05/entities/delete" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "ids": ["507f1f77bcf86cd799439011", "507f1f77bcf86cd799439012"] }'
curl -X POST "https://api.commerceclarity.com/api/2026-05/entities/delete" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"filters": {
"operator": "and",
"conditions": [
{ "field": "family_id", "op": "is", "value": "507f1f77bcf86cd7994390f0" },
{ "field": "product_id", "op": "not in", "value": ["507f1f77bcf86cd799439011", "507f1f77bcf86cd799439012"] }
]
}
}'
product_id is the entity's own id: a not in condition is how you subtract entities from an otherwise broad scope.
{
"status": "success",
"message": "Entities deleted"
}{
"status": "error",
"message": "The ids field is required when filters is not present."
}{
"status": "error",
"message": "The selection matches 12480 entities, more than the 5000 allowed for a single bulk action. Narrow the filters and try again.",
"total": 12480,
"limit": 5000
}{
"status": "error",
"message": "Unable to resolve the selected products: <reason>"
}The 503 is only reachable on the filters form: when the search index is unavailable the scope is unknown, so the request is refused rather than applied to a partially resolved set.