Removes an item from a collection.
If any items in other collections reference the removed item in reference or multi-reference fields, those fields are cleared.
Note: Once an item has been removed from a collection, it can't be restored.
You can only call this method when authenticated as a Wix app or Wix user identity.
ID of the item to remove.
ID of the collection from which to remove the item.
Additional parameters specific to the Wix app collection you are querying.
When querying the Wix Stores Products collection, pass the following optional parameters:
includeHiddenProducts
: Whether to include hidden products in the response. Default: false
.includeVariants
: Whether to include product variants in the query. Default: false
.Options for the Publish plugin. This plugin allows items in a data collection to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
Removed item.
curl -X DELETE \
'https://www.wixapis.com/wix-data/v2/items/5331fc15-9441-4fd4-bc7b-7f6870c69228?dataCollectionId=cities' \
-H 'Authorization: <AUTH>' \
{
"dataItem": {
"id": "5331fc15-9441-4fd4-bc7b-7f6870c69228",
"dataCollectionId": "cities",
"data": {
"_id": "5331fc15-9441-4fd4-bc7b-7f6870c69228",
"_createdDate": { "$date": "2023-03-28T12:20:43.745Z" },
"_updatedDate": { "$date": "2023-03-28T12:20:43.745Z" },
"_owner": "690264f5-29a0-4aa8-a9b5-0842fc5ab360",
"state": "California",
"year": 2022.0,
"city": "Los Angeles",
"population": 3800000.0
}
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.