> For the complete documentation index, see [llms.txt](https://apidocs.pepperi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.pepperi.com/updating-data/updating-transactions-items.md).

# Updating Items in Transaction Scope

### Data Update Methods

#### Update Multiple Items in Transaction Scope

* **Description:** Updates or upserts multiple items in the Order Center (transaction scope) using the update function, requiring a transaction UUID and item details.
* **Behavior:** Updates existing items; for items not in the cart, it acts as an upsert, adding them.
* **Syntax:**

  ```javascript
  pepperi.api.transactionScopeItems.update({
    transaction: { UUID: "<transaction UUID>" },
    objects: [
      { item: { UUID: "<item UUID>" }, <field1>: <value1>, <field2>: <value2> },
      { item: { UUID: "<item UUID>" }, <field1>: <value1>, <field2>: <value2> }
    ]
  });
  ```
* **Example:**

  ```javascript
  pepperi.api.transactionScopeItems.update({
    transaction: { UUID: "1af91512-81ef-4897-afb1-55d51f0a1948" },
    objects: [
      { item: { UUID: "c1e3fa63-6ca3-4ac2-82bf-c75a43ad138a" }, TSAHello: "hi" },
      { item: { UUID: "4a4bfe74-e948-46da-8a61-01be248e42c2" }, TSAHello: "bye" }
    ]
  });
  ```
* **Returns:**

  ```json
  {
    "success": true,
    "result": [
      {
        "id": "c1e3fa63-6ca3-4ac2-82bf-c75a43ad138a",
        "status": "updated",
        "message": ""
      },
      {
        "id": "4a4bfe74-e948-46da-8a61-01be248e42c2",
        "status": "updated",
        "message": ""
      }
    ]
  }
  ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.pepperi.com/updating-data/updating-transactions-items.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
