> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# Method name:

data.items.patch(dataCollectionId: string, itemId: string)

# Method Link:

https://dev.wix.com/docs/sdk/data-items-sdk/data/items/patch.md

# Method Description:

undefined

# Method Permissions:



# Method Permissions Scopes IDs:

undefined



# Method Code Examples:

## Patch an item in a collection

```javascript
import { items } from "@wix/data";

async function patch() {
  const updatedItem = await items.patch("BlogPosts", "fb071093-9a40-432d-ae1f-2e5966fecbfa")
  .appendToArray("tags", "travel")
  .setField("published", true)
  .run()

  const id = updatedItem._id;        // "fb071093-9a40-432d-ae1f-2e5966fecbfa"
  const tags = updatedItem.tags;    // ["vacations", "travel"]
  const published = updatedItem.published;    // true
}

```

## Patch an item in a collection with condition

```javascript
import { items } from "@wix/data";

async function patch() {
  const filter = items.filter().eq("published", false);

  const updatedItem = await items.patch("BlogPosts", "fb071093-9a40-432d-ae1f-2e5966fecbfa")
  .appendToArray("tags", "travel")
  .setField("published", true)
  .run({ condition: filter })

  const id = updatedItem._id;        // "fb071093-9a40-432d-ae1f-2e5966fecbfa"
  const tags = updatedItem.tags;    // ["vacations", "travel"]
  const published = updatedItem.published;    // true
}

```

## default

```javascript
try {
      const result = await items.patch("collection-0.40585083498947694", "6892593d-d57f-428d-bc53-3f0870a1beef");
      return result;
    } catch (error) {
      console.error(error);
      throw error;
   }
```