DELETE

Remove Data Item


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.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage All Data Resources
Manage Data Items
Write Data Items
Learn more about app permissions.
Endpoint
DELETE
https://www.wixapis.com/wix-data/v2/items/{dataItemId}

Path Params
dataItemIdstringRequired

ID of the item to remove.

Query Params
dataCollectionIdstringRequired

ID of the collection from which to remove the item.


appOptionsstruct

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.

publishPluginOptionsPublishPluginOptions

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.

Response Object
dataItemDataItem

Removed item.

Request
cURL
curl -X DELETE \ 'https://www.wixapis.com/wix-data/v2/items/5331fc15-9441-4fd4-bc7b-7f6870c69228?dataCollectionId=cities' \ -H 'Authorization: <AUTH>' \
Response
JSON
{ "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 } } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?