Postman collection
Payments Read

pixiReadCustomerAccount

Returns entries of the customer account (CustomerAccount) by key, by key range with paging, or filtered by creation and/or update date.

Reads rows from the CustomerAccount table, the customer account ledger. Entries reference invoices, bank lines, DTAUS records and manual bookings. The parameters select exactly one of the following modes, checked in this order:

  1. Create or update date: CreateAndUpdateDateFrom and/or CreateAndUpdateDateTo is set. Returns entries with CustomerAccountKey > CustomerAccountKey.
    • From-condition: CreateDate >= from or UpdateDate >= from.
    • To-condition: CreateDate < to or UpdateDate < to.
  2. Create date: CreateDateFrom and/or CreateDateTo is set. Returns entries with CustomerAccountKey > CustomerAccountKey and CreateDate in the half-open range [from, to).
  3. Update date: UpdateDateFrom and/or UpdateDateTo is set. Same as mode 2, but uses UpdateDate.
  4. Key range: RowCount is passed and no date is set. Returns all entries with CustomerAccountKey > CustomerAccountKey.
  5. Single entry: otherwise. Returns the entry with exactly CustomerAccountKey.

Modes 1 to 4 are sorted by CustomerAccountKey ascending. If RowCount is non-zero, the number of returned rows is limited to that value (SET ROWCOUNT).

For keyset paging, pass the last CustomerAccountKey you received as CustomerAccountKey in the next call.

ExchRateId is only filled when the setting MultiCurrencyEnabled is 1; otherwise it is always NULL.

Notes

  • Reads with NOLOCK, so uncommitted data can be returned.
  • If CustomerAccountKey is omitted, it is treated as 0. Called without any parameter, the call therefore runs the single-entry mode for key 0 and normally returns no row. The final "no data" branch in the code can never be reached.
  • RowCount = 0 still counts as "passed" for mode 4. The call then returns all entries above the key without a row limit.
  • In the combined date mode the OR logic is loose. An entry matches if any one of its two dates fulfils the from-condition and any one fulfils the to-condition. This is not necessarily the same date.
  • The date parameter groups do not combine. Only the first group that is set (in the order of the modes) is used; the other groups are ignored.
  • The column types of CustomerAccount are not part of the supplied code; the column types shown here are partly assumed.

Tables used

CustomerAccount · Read Settings · Read
SQL object:
dbo.pipiReadCustomerAccount
Updated at 2026-10-30