Reading data

Implementation of the latest Diamant webservice to access and modify data in your accounting software. Here is an explanation of 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.

Name
Description
Example

select

Limits the properties returned in the result.

select = Name,Phone,Address

expand

Indicates the related entities to be represented inline. The maximum depth is 2.

expand = Customer,OrderItems

filter

Restricts the set of items returned. The maximum number of expressions is 100.

filter = company eq 999

orderby

Specifies the order in which items are returned. The maximum number of expressions is 5.

orderby = LastName asc,HireDate desc

top

Limits the number of items returned from a collection.

top = 5

skip

Excludes the specified number of items of the queried collection from the result.

skip = 10

company

Optional: Can be used to override the default company (workspace settings)

company = 999

Example

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

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

GetBanks

Retrieves bank data

Example

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

GetCustomers

Retrieves customer data

Example

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

GetVendors

Retrieves vendor data

Example

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

GetOpenItems

Retrieves open items data

Example

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

GetGenLedgerAccounts

Retrieves general ledger accounts

Example

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

Last updated

Was this helpful?