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:
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:
data._updatedDate property is updated to the current date and time.Data Item Updated event for each patched item.You can only call this method when authenticated as a Wix app or Wix user identity.
This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.