> 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/retrieving-data-1/retrieving-data.md).

# Retrieving Standard Resources

### Data Retrieval Methods

#### Get Single Object by Unique Key

* **Description:** Retrieves a single object using the get function for the desired resource, supporting only UUID as the key.
* **Supported Resources:**&#x20;
  * accounts&#x20;
  * transactions
  * activities
  * transactionLines
  * transactionScopeItems&#x20;
  * *from CPI 15.85*
    * items
    * catalogs
    * users
    * contacts&#x20;
* **Syntax:**

  ```javascript
  pepperi.api.<resource>.get({
    key: { UUID: "<UUID>" },
    fields: [<string array of relevant field names>]
  });
  ```
* **Example:**

  ```javascript
  pepperi.api.activities.get({
    key: { UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" },
    fields: ["UUID", "ExternalID", "MyTSA"]
  });
  ```
* **Returns:**

  ```json
  {
    "success": true,
    "object": {
      "UUID": "aefb523e-74ac-4041-8bb1-a76a3b5e78d8",
      "ExternalID": "ABC123",
      "MyTSA": 34.56
    }
  }
  ```

  * The returned object can be used for update functions.

#### Search List of Objects by Filter

* **Description:** Retrieves multiple objects using the search function with a filter, sort, page size, and page number.
*

```
**Supported Resources:**&#x20;
```

```
* accounts&#x20;
* transactions
* activities
* transactionLines
* transactionScopeItems&#x20;
* _from CPI 15.85_
  * items
  * catalogs
  * users
  * contacts&#x20;
```

* **Syntax:**

  ```javascript
  pepperi.api.<resource>.search({
    fields: [<array of fields>],
    filter: { <filter object> },
    sorting: [<array of sort objects>],
    pageSize: <number>,
    page: <number>
  });
  ```
* **Example:**

  ```javascript
  pepperi.api.activities.search({
    fields: ["UUID", "ExternalID", "MyTSA"],
    filter: {
      "Operation": "AND",
      "LeftNode": { "ApiName": "APIName1", "Operation": ">", "Values": ["7"] },
      "RightNode": { "ApiName": "ApiName2", "Operation": "InTheLast", "Values": ["4", "Weeks"] }
    },
    sorting: [{ "Field": "MyTSA", "Ascending": true }, { "Field": "MyTSA2", "Ascending": true }],
    pageSize: 1000,
    page: 1
  });
  ```
* **Returns:**

  ```json
  {
    "success": true,
    "objects": [
      {
        "UUID": "aefb523e-74ac-4041-8bb1-a76a3b5e78d8",
        "ExternalID": "abc123",
        "MyTSA": 12.8
      },
      {
        "UUID": "aefb5346-74ac-4041-8bb1-a76a3b5e734h",
        "ExternalID": "abc456",
        "MyTSA": 34.5
      }
    ]
  }
  ```

#### Retrieve Item’s Images (To Be Developed)

* **Description:** Planned enhancement to add 12 new fields to the items resource for image retrieval, supporting up to 6 images per item.
* **Fields to Add:** ImageURL, ImageURI, ImageURL2, ImageURI2, ..., up to ImageURL6, ImageURI6.
* **Behavior:** Similar to attachments.get, where:
  * ImageURL returns a URL.
  * ImageURI returns Base64 content on mobile devices and a URL on the Web App.
* **Status:** To be developed; not yet available in current API versions.


---

# 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, and the optional `goal` query parameter:

```
GET https://apidocs.pepperi.com/retrieving-data-1/retrieving-data.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
