POST

Bulk Patch Data Items


Patches one or more items in a collection.

Call this method when you need to apply partial changes to many items and want each item to keep fields that aren't mentioned in the request. This is also the right bulk surface for fieldModifications actions such as SET_FIELD and INCREMENT_FIELD: increments and decrements apply atomically on the server, so concurrent writers don't have to read the current value first or coordinate to avoid lost updates. For different behavior, you can call:

  • Bulk Update Data Items to replace each item's full payload rather than patch part of it.
  • Save Data Item per item for upsert behavior, meaning to create the item if its ID doesn't exist yet and update it if it does.

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
Write Data Items
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/wix-data/v2/bulk/items/patch

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?