Postman collection
Returns Read

pixiReadReturnLines

Returns return lines (Retourenpositionen) in pages ordered by Id, optionally filtered by creation and/or modification date.

Reads rows from the table ReturnLine (return lines) and returns them sorted by Id ascending. The call is designed for keyset paging and delta synchronisation.

Paging

  • Id is an exclusive lower bound: only lines with Id > @Id are returned. If Id is omitted or NULL, it is treated as 0, so reading starts at the first line.
  • At most RowCount rows are returned (default 1000; NULL is also treated as 1000).
  • To read the next page, pass the highest Id of the previous page as Id.

Date filters (only one group is applied, checked in this order):

  1. CreateAndUpdateDateFrom / CreateAndUpdateDateTo: if at least one is set, a line matches if its creation or modification date is >= the from value and its creation or modification date is < the to value.
  2. Otherwise CreateDateFrom / CreateDateTo: filters on RecordCreatedOn (from inclusive, to exclusive).
  3. Otherwise UpdateDateFrom / UpdateDateTo: filters on RecordModifiedOn (from inclusive, to exclusive).
  4. If no date parameter is set, all lines with Id > @Id are returned (limited by RowCount).

Each bound of a group can be omitted to get an open-ended range. Parameters of lower-priority groups are ignored when a higher-priority group is used.

Notes

  • The table is read with NOLOCK; uncommitted or inconsistent data may be returned.
  • Id cannot be used to fetch a single line: the code contains a branch for Id = @Id, but it is unreachable because Id is always set (NULL becomes 0) and RowCount is never NULL. Passing an Id always returns lines with a greater Id.
  • The combined filter (CreateAndUpdateDate…) checks both bounds with separate OR conditions. With both bounds set, a line created before the range and modified after the range can still match (e.g. created before To and modified after From).
  • A negative RowCount causes a SQL error from TOP; 0 returns an empty result.
  • Column data types are not visible in the code (table definition not attached).

Tables used

ReturnLine · Read
SQL object:
dbo.pipiReadReturnLines
Updated at 2026-10-30