---
description: >-
  Implementation of the latest Diamant webservice to access and modify data in
  your accounting software. Here is an explanation of reading data.
---

# Reading data

### General parameters

Each reading endpoint has the following parameters to choose from in order to limit, sort or filter the result. At least the **filter option is required** to see results.

<table><thead><tr><th width="163.12109375">Name</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>select</td><td>Limits the properties returned in the result.</td><td><code>select = Name,Phone,Address</code></td></tr><tr><td>expand</td><td>Indicates the related entities to be represented inline. The maximum depth is 2.</td><td><code>expand = Customer,OrderItems</code></td></tr><tr><td>filter</td><td>Restricts the set of items returned. The maximum number of expressions is 100. </td><td><code>filter = company eq 999</code></td></tr><tr><td>orderby</td><td>Specifies the order in which items are returned. The maximum number of expressions is 5.</td><td><code>orderby = LastName asc,HireDate desc</code></td></tr><tr><td>top</td><td>Limits the number of items returned from a collection.</td><td><code>top = 5</code></td></tr><tr><td>skip</td><td>Excludes the specified number of items of the queried collection from the result.</td><td><code>skip = 10</code></td></tr><tr><td>company</td><td>Optional: Can be used to override the default company (workspace settings)</td><td>company = 999</td></tr></tbody></table>

#### Example

```javascript
let result = app.businessFunction({
    functionName: "Diamant",
    methodName: "GetAddresses",
    filter: "companyId eq 999",
    top: 10,
    orderby: "addressId asc",
    company: 999 //optional
})
```



### GetAddresses

Retrieves address data.

#### Example

```javascript
let result = app.businessFunction({
    functionName: "Diamant",
    methodName: "GetAddresses",
    filter: "companyId eq 999"
})
```

### GetBanks

Retrieves bank data

#### Example

```javascript
let result = app.businessFunction({
    functionName: "Diamant",
    methodName: "GetBanks",
    filter: "companyId eq 999"
})
```

### GetCustomers

Retrieves customer data

#### Example

```javascript
let result = app.businessFunction({
    functionName: "Diamant",
    methodName: "GetCustomers",
    filter: "companyId eq 999"
})
```

### GetVendors

Retrieves vendor data

#### Example

```javascript
let result = app.businessFunction({
    functionName: "Diamant",
    methodName: "GetVendors",
    filter: "companyId eq 999"
})
```

### GetOpenItems

Retrieves open items data

#### Example

```javascript
let result = app.businessFunction({
    functionName: "Diamant",
    methodName: "GetOpenItems",
    filter: "companyId eq 999"
})
```

### GetGenLedgerAccounts

Retrieves general ledger accounts

#### Example

```javascript
let result = app.businessFunction({
    functionName: "Diamant",
    methodName: "GetGenLedgerAccounts",
    filter: "companyId eq 999"
})
```
