POST

Bulk Patch Data Items


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Patches one or more items in a collection.

This method modifies the existing data of one or more items. Unlike Bulk Update Data Item, only the fields specified in the request are modified. Data that isn't explicitly modified remains unchanged.

To patch items, specify the ID of the collection that contains them. For each item, specify its ID and the modifications you want to apply. If the item is found in the specified collection with the specified ID, that item is patched. If no such item is found, the response's results array contains a corresponding item whose itemMetadata.error property contains details about the error.

Learn more about Wix Data error codes.

Notes:

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
POST
https://www.wixapis.com/wix-data/v2/bulk/items/patch

Body Params
dataCollectionIdstringRequiredmaxLength 256

ID of the collection that contains the items to patch.


patchesArray <Patch>RequiredminItems 1maxItems 100

Patches to apply to the items.


returnEntityboolean

Whether to return the patched data items. When true, each item in the results array contains a dataItem field with the full patched data item.

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
resultsArray <BulkDataItemResult>

Patched items.


bulkActionMetadataBulkActionMetadata

Bulk action metadata.

Bulk patch items
Request
cURL
Response
JSON
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?