Delete a dataset item

delete/v1/datasets/{datasetId}/items/{itemId}

Permanently removes a processed item from the dataset. The item stops appearing in listings and search results and the dataset's category statistics are queued for recomputation.

Only the processed item is removed. The queue entry that produced it is left in place, so re-uploading the same product unchanged does nothing. To bring it back, delete the queue entry as well, or upload it again with a newer updatedAt.

Private keyapi.v1.datasets.items.deleteNo demo

Path parameters

2
datasetIdstring (uuid)required

The dataset's id, as returned when it was created.

itemIdstring (uuid)required

The item's itemId. It is the id the product's queue entry was given at upload.

Response

200The item was deleted.
okbooleanrequired

Always true on a successful delete.

e.g. true
deletedCountintegerrequired

Number of records removed. Always 1; a miss is reported as an error instead.

e.g. 1

Errors

20

Every error is JSON with a single error string unless noted. Match on the status code; the message is for humans.

401
Organization not found. Check organizationId.

The organization encoded in the API key no longer exists.

404
Dataset not found for this organization.

No dataset with this datasetId belongs to the key's organization.

404
Item not found for the given dataset and organization.

The dataset exists but holds no item with this itemId, or it was already deleted.

curl -X DELETE "https://stylor.ai/api/v1/datasets/YOUR_DATASET_ID/items/YOUR_ITEM_ID" \
  -H "Authorization: Bearer $STYLOR_API_KEY"
Response · 200
{
  "ok": true,
  "deletedCount": 1
}